@tomo-inc/chains-service 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3289,7 +3289,7 @@ var loadNetworks = (WALLET_DOMAIN) => {
3289
3289
  chainIndex: 628197100,
3290
3290
  name: "DOGEOS_TESTNET",
3291
3291
  chainName: "DogeOS Testnet",
3292
- rpcUrls: [`${WALLET_DOMAIN}/rpc/v1/doge_test`],
3292
+ rpcUrls: ["https://rpc.testnet.dogeos.com"],
3293
3293
  blockExplorerUrl: "https://rpc.testnet.dogeos.com",
3294
3294
  platformType: "EVM",
3295
3295
  isTestnet: true,
@@ -3906,14 +3906,18 @@ function tomoPublicApiService(publicApiBase, tomoAppInfo) {
3906
3906
  var TX_DOMAIN_OVERRIDES = {
3907
3907
  "prod-dogeos": "https://wallet.tomo.inc"
3908
3908
  };
3909
+ var RPC_DOMAIN_OVERRIDES = {
3910
+ "prod-dogeos": "https://wallet.tomo.inc"
3911
+ };
3909
3912
  function getConfig(tomoStage) {
3910
3913
  const domain = walletUtils.TomoApiDomains[tomoStage];
3911
3914
  if (!domain) {
3912
3915
  throw new Error("Invalid tomo stage");
3913
3916
  }
3914
3917
  const txDomain = TX_DOMAIN_OVERRIDES[tomoStage] ?? domain;
3918
+ const rpcDomain = RPC_DOMAIN_OVERRIDES[tomoStage] ?? domain;
3915
3919
  return {
3916
- rpcBaseUrl: `${domain}`,
3920
+ rpcBaseUrl: `${rpcDomain}`,
3917
3921
  walletBaseUrl: `${domain}/wallet`,
3918
3922
  txBaseUrl: `${txDomain}/quote`,
3919
3923
  tokenBaseUrl: `${domain}/token`,
@@ -5192,8 +5196,7 @@ var SolanaService = class _SolanaService extends BaseService {
5192
5196
  return fetch(url, { ...options });
5193
5197
  }
5194
5198
  };
5195
- const domain = walletUtils.TomoApiDomains[tomoAppInfo.tomoStage];
5196
- const rpcUrl = `${domain}/rpc/v1/solana`;
5199
+ const rpcUrl = "https://wallet.tomo.inc/rpc/v1/solana";
5197
5200
  this.rpcUrl = rpcUrl;
5198
5201
  this.connection = new web3_js.Connection(rpcUrl, config);
5199
5202
  }
package/dist/index.js CHANGED
@@ -3281,7 +3281,7 @@ var loadNetworks = (WALLET_DOMAIN) => {
3281
3281
  chainIndex: 628197100,
3282
3282
  name: "DOGEOS_TESTNET",
3283
3283
  chainName: "DogeOS Testnet",
3284
- rpcUrls: [`${WALLET_DOMAIN}/rpc/v1/doge_test`],
3284
+ rpcUrls: ["https://rpc.testnet.dogeos.com"],
3285
3285
  blockExplorerUrl: "https://rpc.testnet.dogeos.com",
3286
3286
  platformType: "EVM",
3287
3287
  isTestnet: true,
@@ -3898,14 +3898,18 @@ function tomoPublicApiService(publicApiBase, tomoAppInfo) {
3898
3898
  var TX_DOMAIN_OVERRIDES = {
3899
3899
  "prod-dogeos": "https://wallet.tomo.inc"
3900
3900
  };
3901
+ var RPC_DOMAIN_OVERRIDES = {
3902
+ "prod-dogeos": "https://wallet.tomo.inc"
3903
+ };
3901
3904
  function getConfig(tomoStage) {
3902
3905
  const domain = TomoApiDomains[tomoStage];
3903
3906
  if (!domain) {
3904
3907
  throw new Error("Invalid tomo stage");
3905
3908
  }
3906
3909
  const txDomain = TX_DOMAIN_OVERRIDES[tomoStage] ?? domain;
3910
+ const rpcDomain = RPC_DOMAIN_OVERRIDES[tomoStage] ?? domain;
3907
3911
  return {
3908
- rpcBaseUrl: `${domain}`,
3912
+ rpcBaseUrl: `${rpcDomain}`,
3909
3913
  walletBaseUrl: `${domain}/wallet`,
3910
3914
  txBaseUrl: `${txDomain}/quote`,
3911
3915
  tokenBaseUrl: `${domain}/token`,
@@ -5184,8 +5188,7 @@ var SolanaService = class _SolanaService extends BaseService {
5184
5188
  return fetch(url, { ...options });
5185
5189
  }
5186
5190
  };
5187
- const domain = TomoApiDomains[tomoAppInfo.tomoStage];
5188
- const rpcUrl = `${domain}/rpc/v1/solana`;
5191
+ const rpcUrl = "https://wallet.tomo.inc/rpc/v1/solana";
5189
5192
  this.rpcUrl = rpcUrl;
5190
5193
  this.connection = new Connection(rpcUrl, config);
5191
5194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomo-inc/chains-service",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "author": "tomo.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -23,7 +23,7 @@
23
23
  "bitcoinjs-lib": "^7.0.0",
24
24
  "crypto-js": "4.2.0",
25
25
  "viem": "2.21.54",
26
- "@tomo-inc/wallet-utils": "0.0.19"
26
+ "@tomo-inc/wallet-utils": "0.0.20"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/supertest": "^2.0.12",
@@ -62,7 +62,7 @@ export const loadNetworks = (WALLET_DOMAIN: string) => {
62
62
  chainIndex: 628197100,
63
63
  name: "DOGEOS_TESTNET",
64
64
  chainName: "DogeOS Testnet",
65
- rpcUrls: [`${WALLET_DOMAIN}/rpc/v1/doge_test`],
65
+ rpcUrls: ["https://rpc.testnet.dogeos.com"],
66
66
  blockExplorerUrl: "https://rpc.testnet.dogeos.com",
67
67
  platformType: "EVM",
68
68
  isTestnet: true,
package/src/config.ts CHANGED
@@ -4,14 +4,19 @@ const TX_DOMAIN_OVERRIDES: Partial<Record<TomoStage, string>> = {
4
4
  "prod-dogeos": "https://wallet.tomo.inc",
5
5
  };
6
6
 
7
+ const RPC_DOMAIN_OVERRIDES: Partial<Record<TomoStage, string>> = {
8
+ "prod-dogeos": "https://wallet.tomo.inc",
9
+ };
10
+
7
11
  export function getConfig(tomoStage: TomoStage) {
8
12
  const domain = TomoApiDomains[tomoStage];
9
13
  if (!domain) {
10
14
  throw new Error("Invalid tomo stage");
11
15
  }
12
16
  const txDomain = TX_DOMAIN_OVERRIDES[tomoStage] ?? domain;
17
+ const rpcDomain = RPC_DOMAIN_OVERRIDES[tomoStage] ?? domain;
13
18
  return {
14
- rpcBaseUrl: `${domain}`,
19
+ rpcBaseUrl: `${rpcDomain}`,
15
20
  walletBaseUrl: `${domain}/wallet`,
16
21
  txBaseUrl: `${txDomain}/quote`,
17
22
  tokenBaseUrl: `${domain}/token`,
@@ -1,4 +1,4 @@
1
- import { ChainTypeEnum, SupportedChainTypes, TomoApiDomains } from "@tomo-inc/wallet-utils";
1
+ import { ChainTypeEnum, SupportedChainTypes } from "@tomo-inc/wallet-utils";
2
2
 
3
3
  import { BaseService } from "../base/service";
4
4
 
@@ -31,8 +31,7 @@ export class SolanaService extends BaseService {
31
31
  return fetch(url, { ...options });
32
32
  },
33
33
  };
34
- const domain = TomoApiDomains[tomoAppInfo.tomoStage];
35
- const rpcUrl = `${domain}/rpc/v1/solana`;
34
+ const rpcUrl = "https://wallet.tomo.inc/rpc/v1/solana";
36
35
 
37
36
  this.rpcUrl = rpcUrl;
38
37
  this.connection = new Connection(rpcUrl, config);