From cdd72f679199ece016d002ad209e996eefde8c7f Mon Sep 17 00:00:00 2001 From: veralygit <57183851+veralygit@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:44:25 +0800 Subject: [PATCH] fix: trim structure --- packages/sdk/src/api/jsonrpc.ts | 16 +++++------ packages/sdk/src/config/index.ts | 48 ++++++-------------------------- 2 files changed, 16 insertions(+), 48 deletions(-) diff --git a/packages/sdk/src/api/jsonrpc.ts b/packages/sdk/src/api/jsonrpc.ts index be637a9d..82474507 100644 --- a/packages/sdk/src/api/jsonrpc.ts +++ b/packages/sdk/src/api/jsonrpc.ts @@ -70,17 +70,17 @@ export const rpc = { return Math.floor(Math.random() * 100000) }, bitcoin: { - mainnet: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.mainnet.batter)), - testnet: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.testnet.batter)), - signet: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.signet.batter)), - regtest: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.regtest.batter)) + mainnet: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.mainnet)), + testnet: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.testnet)), + signet: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.signet)), + regtest: new JsonRpc(getRpcUrl(apiConfig.apis.bitcoin.regtest)) }, "fractal-bitcoin": { - mainnet: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].mainnet.batter)), - testnet: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].testnet.batter)), + mainnet: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].mainnet)), + testnet: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].testnet)), // unused - signet: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].signet.batter)), - regtest: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].regtest.batter)) + signet: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].signet)), + regtest: new JsonRpc(getRpcUrl(apiConfig.apis["fractal-bitcoin"].regtest)) } } as const diff --git a/packages/sdk/src/config/index.ts b/packages/sdk/src/config/index.ts index 1e1946e4..a2794a39 100644 --- a/packages/sdk/src/config/index.ts +++ b/packages/sdk/src/config/index.ts @@ -2,48 +2,16 @@ export const apiConfig = { version: "0.0.0.10", apis: { bitcoin: { - mainnet: { - batter: "https://mainnet.ordit.io/", - orderbook: "1H4vvBnr62YWQmvNSt8Z4pDw3Vcv1n5xz7", - ipfs: "http://ipfs-gateway.ordit.io/" - }, - regtest: { - batter: "https://regtest.ordit.io/", - orderbook: "bcrt1q2ys7qws8g072dqe3psp92pqz93ac6wmztexkh5", - ipfs: "http://ipfs-gateway.ordit.io/" - }, - testnet: { - batter: "https://testnet.ordit.io/", - orderbook: "tb1qfnw26753j7kqu3q099sd48htvtk5wm4e0enmru", - ipfs: "http://ipfs-gateway.ordit.io/" - }, - signet: { - batter: "https://signet.ordit.io/", - orderbook: "tb1qfnw26753j7kqu3q099sd48htvtk5wm4e0enmru", - ipfs: "http://ipfs-gateway.ordit.io/" - } + mainnet: "https://mainnet.ordit.io/", + regtest: "https://regtest.ordit.io/", + testnet: "https://testnet.ordit.io/", + signet: "https://signet.ordit.io/" }, "fractal-bitcoin": { - mainnet: { - batter: "https://fractal.ordit.io/", - orderbook: "", - ipfs: "http://ipfs-gateway.ordit.io/" - }, - regtest: { - batter: "https://fractal-regtest.ordit.io/", - orderbook: "", - ipfs: "http://ipfs-gateway.ordit.io/" - }, - testnet: { - batter: "https://fractal-testnet.ordit.io/", - orderbook: "", - ipfs: "http://ipfs-gateway.ordit.io/" - }, - signet: { - batter: "https://fractal-signet.ordit.io/", - orderbook: "", - ipfs: "http://ipfs-gateway.ordit.io/" - } + mainnet: "https://fractal.ordit.io/", + regtest: "https://fractal-regtest.ordit.io/", + testnet: "https://fractal-testnet.ordit.io/", + signet: "https://fractal-signet.ordit.io/" } } }