Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sour-geckos-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'micro-stacks': minor
---

Use new Hiro.so API endpoints.
4 changes: 2 additions & 2 deletions packages/core/src/network/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ChainID, fetchPrivate, TransactionVersion } from 'micro-stacks/common';

type Fetcher = (input: RequestInfo, init?: RequestInit) => Promise<Response>;

export const HIRO_MAINNET_DEFAULT = 'https://stacks-node-api.mainnet.stacks.co';
export const HIRO_TESTNET_DEFAULT = 'https://stacks-node-api.testnet.stacks.co';
export const HIRO_MAINNET_DEFAULT = 'https://api.mainnet.hiro.so';
export const HIRO_TESTNET_DEFAULT = 'https://api.testnet.hiro.so';
export const HIRO_MOCKNET_DEFAULT = 'http://localhost:3999';

export interface NetworkConfig {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/network/network.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StacksMainnet, StacksMocknet, StacksTestnet } from 'micro-stacks/network';

export const HIRO_MAINNET_DEFAULT = 'https://stacks-node-api.mainnet.stacks.co';
export const HIRO_TESTNET_DEFAULT = 'https://stacks-node-api.testnet.stacks.co';
export const HIRO_MAINNET_DEFAULT = 'https://api.mainnet.hiro.so';
export const HIRO_TESTNET_DEFAULT = 'https://api.testnet.hiro.so';
export const HIRO_MOCKNET_DEFAULT = 'http://localhost:3999';

describe('Setting coreApiUrl', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/storage/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const SIGNATURE_FILE_SUFFIX = '.sig';
export const DEFAULT_ZONEFILE_LOOKUP_URL = 'https://stacks-node-api.stacks.co/v1/names';
export const DEFAULT_ZONEFILE_LOOKUP_URL = 'https://api.mainnet.hiro.so/v1/names';
2 changes: 1 addition & 1 deletion packages/core/src/transactions/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TransactionVersion } from 'micro-stacks/common';

export const CLARITY_INT_BYTE_SIZE = 16;
export const DEFAULT_CORE_NODE_API_URL = 'https://stacks-node-api.mainnet.stacks.co';
export const DEFAULT_CORE_NODE_API_URL = 'https://api.mainnet.hiro.so';

/**
* How a transaction should get appended to the Stacks blockchain.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/wallet-sdk/auth/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

const privateKey = 'a5c61c6ca7b3e7e55edee68566aeab22e4da26baa285c7bd10e8d2218aa3b229';
// const publicKey = '027d28f9951ce46538951e3697c62588a87f1f1f295de4a14fdd4c780fc52cfe69';
// const nameLookupURL = 'https://stacks-node-api.mainnet.stacks.co/v1/names/';
// const nameLookupURL = 'https://api.mainnet.hiro.so/v1/names/';
const profile = {
'@type': 'Person',
account: [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tests/mocks/get-file.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const PROFILE_CONTENT = [
];

export const GET_FILE_MOCKS = [
rest.get('https://stacks-node-api.stacks.co/v1/names/yukan.id', (_req, res, ctx) => {
rest.get('https://api.mainnet.hiro.so/v1/names/yukan.id', (_req, res, ctx) => {
return res(ctx.json(NAME_RECORD));
}),
rest.get('https://potato/v1/names/yukan.id', (_req, res, ctx) => {
Expand Down