example-js-sdk 0.0.5 → 0.0.7

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.
Files changed (125) hide show
  1. package/README.md +134 -52
  2. package/lib/OrbixSDK.d.ts +145 -0
  3. package/lib/{CarbonSDK.js → OrbixSDK.js} +52 -52
  4. package/lib/clients/ETHClient.d.ts +10 -10
  5. package/lib/clients/ETHClient.js +4 -4
  6. package/lib/clients/{CarbonQueryClient.d.ts → OrbixQueryClient.d.ts} +4 -4
  7. package/lib/clients/{CarbonQueryClient.js → OrbixQueryClient.js} +2 -2
  8. package/lib/clients/TokenClient.d.ts +26 -26
  9. package/lib/clients/TokenClient.js +12 -12
  10. package/lib/clients/index.d.ts +1 -1
  11. package/lib/clients/index.js +3 -3
  12. package/lib/codec/index.d.ts +1 -1
  13. package/lib/codec/index.js +253 -253
  14. package/lib/constant/eip712.d.ts +1 -1
  15. package/lib/constant/eip712.js +3 -3
  16. package/lib/constant/generic.d.ts +1 -1
  17. package/lib/constant/generic.js +3 -4
  18. package/lib/constant/ibc.d.ts +0 -1
  19. package/lib/constant/ibc.js +0 -35
  20. package/lib/constant/network.d.ts +7 -7
  21. package/lib/constant/network.js +48 -403
  22. package/lib/constant/node.js +2 -74
  23. package/lib/constant/token.js +6 -6
  24. package/lib/constant/web3Config.d.ts +5 -5
  25. package/lib/constant/web3Config.js +20 -24
  26. package/lib/index.d.ts +3 -3
  27. package/lib/index.js +7 -7
  28. package/lib/insights/balance.d.ts +2 -2
  29. package/lib/modules/admin.d.ts +23 -23
  30. package/lib/modules/admin.js +43 -43
  31. package/lib/modules/alliance.d.ts +6 -6
  32. package/lib/modules/alliance.js +5 -5
  33. package/lib/modules/bank.d.ts +2 -2
  34. package/lib/modules/bank.js +1 -1
  35. package/lib/modules/base.d.ts +4 -4
  36. package/lib/modules/bridge.d.ts +3 -3
  37. package/lib/modules/bridge.js +5 -5
  38. package/lib/modules/broker.d.ts +3 -3
  39. package/lib/modules/broker.js +2 -2
  40. package/lib/modules/coin.d.ts +8 -8
  41. package/lib/modules/coin.js +7 -7
  42. package/lib/modules/evm.d.ts +2 -2
  43. package/lib/modules/evm.js +1 -1
  44. package/lib/modules/evmmerge.d.ts +2 -2
  45. package/lib/modules/evmmerge.js +3 -3
  46. package/lib/modules/gov.d.ts +4 -4
  47. package/lib/modules/gov.js +3 -3
  48. package/lib/modules/grant.d.ts +4 -4
  49. package/lib/modules/grant.js +6 -6
  50. package/lib/modules/ibc.d.ts +3 -3
  51. package/lib/modules/ibc.js +2 -2
  52. package/lib/modules/leverage.d.ts +3 -3
  53. package/lib/modules/leverage.js +2 -2
  54. package/lib/modules/market.d.ts +15 -15
  55. package/lib/modules/market.js +7 -7
  56. package/lib/modules/order.d.ts +8 -8
  57. package/lib/modules/order.js +7 -7
  58. package/lib/modules/perpspool.d.ts +14 -14
  59. package/lib/modules/perpspool.js +23 -23
  60. package/lib/modules/position.d.ts +3 -3
  61. package/lib/modules/position.js +2 -2
  62. package/lib/modules/staking.d.ts +6 -6
  63. package/lib/modules/staking.js +3 -3
  64. package/lib/modules/subaccount.d.ts +4 -4
  65. package/lib/modules/subaccount.js +3 -3
  66. package/lib/provider/amino/types/admin.js +12 -12
  67. package/lib/provider/amino/types/bank.js +2 -2
  68. package/lib/provider/amino/types/bridge.js +3 -3
  69. package/lib/provider/amino/types/broker.js +2 -2
  70. package/lib/provider/amino/types/coin.js +5 -5
  71. package/lib/provider/amino/types/evm.js +2 -2
  72. package/lib/provider/amino/types/evmmerge.js +2 -2
  73. package/lib/provider/amino/types/feemarket.js +2 -2
  74. package/lib/provider/amino/types/gov.js +17 -17
  75. package/lib/provider/amino/types/grant.js +6 -6
  76. package/lib/provider/amino/types/group.js +4 -4
  77. package/lib/provider/amino/types/ibc.js +2 -2
  78. package/lib/provider/amino/types/leverage.js +2 -2
  79. package/lib/provider/amino/types/market.js +7 -7
  80. package/lib/provider/amino/types/order.js +5 -5
  81. package/lib/provider/amino/types/perpspool.js +11 -11
  82. package/lib/provider/amino/types/position.js +2 -2
  83. package/lib/provider/amino/types/staking.js +5 -5
  84. package/lib/provider/amino/types/subaccount.js +4 -4
  85. package/lib/provider/keplr/KeplrAccount.d.ts +3 -3
  86. package/lib/provider/keplr/KeplrAccount.js +11 -11
  87. package/lib/provider/leap/LeapAccount.d.ts +3 -3
  88. package/lib/provider/leap/LeapAccount.js +10 -10
  89. package/lib/provider/metamask/MetaMask.d.ts +8 -8
  90. package/lib/provider/metamask/MetaMask.js +17 -17
  91. package/lib/provider/rainbowKit/RainbowKitAccount.d.ts +7 -7
  92. package/lib/provider/rainbowKit/RainbowKitAccount.js +12 -12
  93. package/lib/provider/sdk/SDKProvider.d.ts +4 -4
  94. package/lib/util/alliance.js +2 -2
  95. package/lib/util/blockchain.d.ts +5 -5
  96. package/lib/util/blockchain.js +11 -11
  97. package/lib/util/eip712.d.ts +2 -2
  98. package/lib/util/eip712.js +1 -1
  99. package/lib/util/ethermint.d.ts +4 -4
  100. package/lib/util/ethermint.js +1 -1
  101. package/lib/util/external.d.ts +2 -2
  102. package/lib/util/gov.js +16 -16
  103. package/lib/util/ibc.js +2 -2
  104. package/lib/util/index.d.ts +1 -1
  105. package/lib/util/index.js +2 -2
  106. package/lib/util/legacyEIP712.js +1 -1
  107. package/lib/util/network.d.ts +1 -1
  108. package/lib/util/network.js +7 -7
  109. package/lib/util/provider.js +1 -1
  110. package/lib/util/token.d.ts +1 -1
  111. package/lib/util/token.js +1 -1
  112. package/lib/util/tx.d.ts +4 -4
  113. package/lib/util/tx.js +10 -10
  114. package/lib/wallet/{CarbonSigner.d.ts → OrbixSigner.d.ts} +19 -19
  115. package/lib/wallet/{CarbonSigner.js → OrbixSigner.js} +19 -19
  116. package/lib/wallet/{CarbonSigningClient.d.ts → OrbixSigningClient.d.ts} +3 -3
  117. package/lib/wallet/{CarbonSigningClient.js → OrbixSigningClient.js} +9 -9
  118. package/lib/wallet/{CarbonWallet.d.ts → OrbixWallet.d.ts} +38 -38
  119. package/lib/wallet/{CarbonWallet.js → OrbixWallet.js} +39 -39
  120. package/lib/wallet/index.d.ts +2 -2
  121. package/lib/wallet/index.js +2 -2
  122. package/package.json +2 -2
  123. package/lib/CarbonSDK.d.ts +0 -145
  124. /package/lib/codec/{carbon-models.d.ts → orbix-models.d.ts} +0 -0
  125. /package/lib/codec/{carbon-models.js → orbix-models.js} +0 -0
@@ -1,4 +1,4 @@
1
- import CarbonSDK, { Carbon } from "../CarbonSDK";
1
+ import OrbixSDK, { Orbix } from "../OrbixSDK";
2
2
  import { EthNetworkConfig, NetworkConfig, NetworkConfigProvider } from "../constant";
3
3
  import { BlockchainV2, EVMChain } from "../util/blockchain";
4
4
  import { TokenInitInfo, TokensWithExternalBalance } from "../util/external";
@@ -19,8 +19,8 @@ interface ETHTxParams {
19
19
  nonce?: number;
20
20
  }
21
21
  export interface BridgeParams {
22
- fromToken: Carbon.Coin.Token;
23
- toToken: Carbon.Coin.Token;
22
+ fromToken: Orbix.Coin.Token;
23
+ toToken: Orbix.Coin.Token;
24
24
  amount: BigNumber;
25
25
  fromAddress: string;
26
26
  recoveryAddress: string;
@@ -35,11 +35,11 @@ export interface BridgeParams {
35
35
  export interface LockParams extends ETHTxParams {
36
36
  address: Uint8Array;
37
37
  amount: BigNumber;
38
- token: Carbon.Coin.Token;
38
+ token: Orbix.Coin.Token;
39
39
  signCompleteCallback?: () => void;
40
40
  }
41
41
  export interface ApproveERC20Params extends ETHTxParams {
42
- token: Carbon.Coin.Token;
42
+ token: Orbix.Coin.Token;
43
43
  spenderAddress?: string;
44
44
  amount?: BigNumber;
45
45
  signCompleteCallback?: () => void;
@@ -54,10 +54,10 @@ export declare class ETHClient {
54
54
  readonly tokenClient: TokenClient;
55
55
  readonly rpcURL: string;
56
56
  private constructor();
57
- static instance(opts: ETHClientOpts): CarbonSDK.ETHClient;
58
- getExternalBalances(api: CarbonSDK, address: string, whitelistDenoms?: string[], version?: string): Promise<TokensWithExternalBalance[]>;
57
+ static instance(opts: ETHClientOpts): OrbixSDK.ETHClient;
58
+ getExternalBalances(api: OrbixSDK, address: string, whitelistDenoms?: string[], version?: string): Promise<TokensWithExternalBalance[]>;
59
59
  approveERC20(params: ApproveERC20Params): Promise<EthersTransactionResponse>;
60
- checkAllowanceERC20(token: Carbon.Coin.Token, owner: string, spender: string): Promise<BigNumber>;
60
+ checkAllowanceERC20(token: Orbix.Coin.Token, owner: string, spender: string): Promise<BigNumber>;
61
61
  bridgeTokens(params: BridgeParams): Promise<EthersTransactionResponse>;
62
62
  lockDeposit(params: LockParams): Promise<EthersTransactionResponse>;
63
63
  getDepositContractAddress(swthBech32Address: string, ownerEthAddress: string): Promise<string>;
@@ -65,7 +65,7 @@ export declare class ETHClient {
65
65
  address: string;
66
66
  signature: string;
67
67
  }>, overrideFee?: ethers.BigNumber): Promise<Response | "insufficient balance">;
68
- getDepositFeeAmount(token: Carbon.Coin.Token, depositAddress: string): Promise<ethers.BigNumber>;
68
+ getDepositFeeAmount(token: Orbix.Coin.Token, depositAddress: string): Promise<ethers.BigNumber>;
69
69
  isContract(address: string): Promise<boolean>;
70
70
  retrieveERC20Info(address: string): Promise<TokenInitInfo>;
71
71
  static formatWithdrawalAddress(address: string): string;
@@ -80,7 +80,7 @@ export declare class ETHClient {
80
80
  *
81
81
  * @param token
82
82
  */
83
- getTargetProxyHash(token: Carbon.Coin.Token): string;
83
+ getTargetProxyHash(token: Orbix.Coin.Token): string;
84
84
  getProvider(): ethers.providers.JsonRpcProvider;
85
85
  getNetworkConfig(): NetworkConfig;
86
86
  getConfig(): EthNetworkConfig;
@@ -23,7 +23,7 @@ class ETHClient {
23
23
  }
24
24
  static instance(opts) {
25
25
  const { configProvider, blockchain, tokenClient, rpcURL } = opts;
26
- if (!util_1.BlockchainUtils.isEvmChain(blockchain) || blockchain === 'Carbon') {
26
+ if (!util_1.BlockchainUtils.isEvmChain(blockchain) || blockchain === 'Orbix') {
27
27
  throw new Error(`unsupported blockchain - ${blockchain}`);
28
28
  }
29
29
  return new ETHClient(configProvider, blockchain, tokenClient, rpcURL);
@@ -91,18 +91,18 @@ class ETHClient {
91
91
  if (!recoveryAddress.match(recoveryAddrRegex)) {
92
92
  throw new Error("Invalid recovery address");
93
93
  }
94
- const carbonNetwork = networkConfig.network;
94
+ const orbixNetwork = networkConfig.network;
95
95
  const fromTokenId = fromToken.id;
96
96
  const fromTokenAddress = (0, generic_1.appendHexPrefix)(fromToken.tokenAddress);
97
97
  const toTokenDenom = toToken.denom;
98
- const recoveryAddressHex = ethers_1.ethers.utils.hexlify(util_1.AddressUtils.SWTHAddress.getAddressBytes(recoveryAddress, carbonNetwork));
98
+ const recoveryAddressHex = ethers_1.ethers.utils.hexlify(util_1.AddressUtils.SWTHAddress.getAddressBytes(recoveryAddress, orbixNetwork));
99
99
  const fromAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(fromTokenId));
100
100
  const toAssetHash = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.toUtf8Bytes(toTokenDenom));
101
101
  const nonce = await this.getTxNonce(fromAddress, params.nonce, rpcProvider);
102
102
  const contract = new ethers_1.ethers.Contract(this.getBridgeEntranceAddr(), eth_1.ABIs.bridgeEntrance, rpcProvider);
103
103
  const feeAddress = (0, generic_1.appendHexPrefix)(networkConfig.feeAddress);
104
104
  const tokenCreator = fromToken.creator;
105
- const targetAddressBytes = util_1.AddressUtils.SWTHAddress.getAddressBytes(tokenCreator, carbonNetwork);
105
+ const targetAddressBytes = util_1.AddressUtils.SWTHAddress.getAddressBytes(tokenCreator, orbixNetwork);
106
106
  const targetProxyHash = ethers_1.ethers.utils.hexlify(targetAddressBytes);
107
107
  const ethAmount = fromToken.tokenAddress === constant_1.NativeTokenHash ? amount : number_1.BN_ZERO;
108
108
  const bridgeResultTx = await contract.connect(signer).lock(fromTokenAddress, // the asset to deposit (from) (0x00 if eth)
@@ -58,11 +58,11 @@ export interface EthermintClientGroup {
58
58
  evm: EthermintEVMQueryClient;
59
59
  feeMarket: EthermintFeeMarketQueryClient;
60
60
  }
61
- export interface CarbonQueryClientOpts {
61
+ export interface OrbixQueryClientOpts {
62
62
  tmClient: Tendermint37Client;
63
63
  grpcClient?: GrpcQueryClient;
64
64
  }
65
- declare class CarbonQueryClient {
65
+ declare class OrbixQueryClient {
66
66
  adl: ADLQueryClient;
67
67
  book: BookQueryClient;
68
68
  bridge: BridgeQueryClient;
@@ -103,6 +103,6 @@ declare class CarbonQueryClient {
103
103
  evmmerge: EvmMergeQueryClient;
104
104
  evmbank: EvmBankQueryClient;
105
105
  admin: AdminQueryClient;
106
- constructor(opts: CarbonQueryClientOpts);
106
+ constructor(opts: OrbixQueryClientOpts);
107
107
  }
108
- export default CarbonQueryClient;
108
+ export default OrbixQueryClient;
@@ -50,7 +50,7 @@ const query_44 = require("../codec/Mememax/orbix/perpspool/query");
50
50
  const query_45 = require("../codec/Mememax/orbix/admin/query");
51
51
  const stargate_1 = require("@cosmjs/stargate");
52
52
  const BlockchainClient_1 = __importDefault(require("./BlockchainClient"));
53
- class CarbonQueryClient {
53
+ class OrbixQueryClient {
54
54
  constructor(opts) {
55
55
  const rpcClient = opts.grpcClient ?? (0, stargate_1.createProtobufRpcClient)(new stargate_1.QueryClient(opts.tmClient));
56
56
  this.chain = BlockchainClient_1.default.connectWithTm(opts.tmClient);
@@ -106,4 +106,4 @@ class CarbonQueryClient {
106
106
  };
107
107
  }
108
108
  }
109
- exports.default = CarbonQueryClient;
109
+ exports.default = OrbixQueryClient;
@@ -1,18 +1,18 @@
1
- import { Carbon } from "../CarbonSDK";
1
+ import { Orbix } from "../OrbixSDK";
2
2
  import { NetworkConfigProvider } from "../constant";
3
3
  import { GetFeeQuoteResponse } from "../hydrogen/feeQuote";
4
4
  import { BlockchainUtils, TypeUtils } from "../util";
5
5
  import { AxelarBridge, BlockchainV2, BridgeMap, IbcBridge } from '../util/blockchain';
6
6
  import BigNumber from "bignumber.js";
7
- import CarbonQueryClient from "./CarbonQueryClient";
7
+ import OrbixQueryClient from "./OrbixQueryClient";
8
8
  declare class TokenClient {
9
- readonly query: CarbonQueryClient;
9
+ readonly query: OrbixQueryClient;
10
10
  readonly configProvider: NetworkConfigProvider;
11
11
  static Blacklist: Partial<TypeUtils.NetworkMap<string[]>>;
12
- readonly tokens: TypeUtils.SimpleMap<Carbon.Coin.Token>;
12
+ readonly tokens: TypeUtils.SimpleMap<Orbix.Coin.Token>;
13
13
  readonly wrapperMap: TypeUtils.SimpleMap<string>;
14
- readonly poolTokens: TypeUtils.SimpleMap<Carbon.Coin.Token>;
15
- readonly cdpTokens: TypeUtils.SimpleMap<Carbon.Coin.Token>;
14
+ readonly poolTokens: TypeUtils.SimpleMap<Orbix.Coin.Token>;
15
+ readonly cdpTokens: TypeUtils.SimpleMap<Orbix.Coin.Token>;
16
16
  readonly bridges: BridgeMap;
17
17
  readonly symbols: TypeUtils.SimpleMap<string>;
18
18
  readonly usdValues: TypeUtils.SimpleMap<BigNumber>;
@@ -21,7 +21,7 @@ declare class TokenClient {
21
21
  initialUsdValuesLoaded: boolean;
22
22
  private additionalGeckoDenoms;
23
23
  private constructor();
24
- static instance(query: CarbonQueryClient, configProvider: NetworkConfigProvider): TokenClient;
24
+ static instance(query: OrbixQueryClient, configProvider: NetworkConfigProvider): TokenClient;
25
25
  initialize(): Promise<void>;
26
26
  registerGeckoIdMap(map: TypeUtils.SimpleMap<string>): void;
27
27
  getCommonDenom(denom: string): string;
@@ -36,8 +36,8 @@ declare class TokenClient {
36
36
  getUSDValue(denom: string): BigNumber | undefined;
37
37
  toHuman(denom: string, unitlessAmt: BigNumber): BigNumber;
38
38
  toUnitless(denom: string, humanAmt: BigNumber): BigNumber;
39
- tokenForId(id: string): Carbon.Coin.Token | undefined;
40
- tokenForDenom(denom: string): Carbon.Coin.Token | undefined;
39
+ tokenForId(id: string): Orbix.Coin.Token | undefined;
40
+ tokenForDenom(denom: string): Orbix.Coin.Token | undefined;
41
41
  getFeeInfo(denom: string): Promise<GetFeeQuoteResponse>;
42
42
  getTokenName(denom: string, overrideMap?: TypeUtils.SimpleMap<string>): string;
43
43
  getTokenDesc(denom: string): string;
@@ -52,21 +52,21 @@ declare class TokenClient {
52
52
  static isCdpIbcDenom(denom: string): boolean;
53
53
  isWrappedToken(denom?: string): boolean;
54
54
  hasWrappedToken(denom?: string): boolean;
55
- getWrappedTokens(denom: string): Carbon.Coin.Token[];
56
- getWrappedToken(denom: string, blockchain?: BlockchainUtils.Blockchain | BlockchainUtils.BlockchainV2, version?: string): Carbon.Coin.Token | null;
57
- getSourceToken(denom: string): Carbon.Coin.Token | null;
58
- getNativeToken(): Carbon.Coin.Token | undefined;
59
- getNativeStablecoin(): Carbon.Coin.Token | undefined;
55
+ getWrappedTokens(denom: string): Orbix.Coin.Token[];
56
+ getWrappedToken(denom: string, blockchain?: BlockchainUtils.Blockchain | BlockchainUtils.BlockchainV2, version?: string): Orbix.Coin.Token | null;
57
+ getSourceToken(denom: string): Orbix.Coin.Token | null;
58
+ getNativeToken(): Orbix.Coin.Token | undefined;
59
+ getNativeStablecoin(): Orbix.Coin.Token | undefined;
60
60
  isNativeToken(denom: string): boolean;
61
61
  isNativeStablecoin(denom: string): boolean;
62
62
  isGroupChequeDenom(denom: string): boolean;
63
63
  isBridgedToken(denom: string): boolean;
64
- isCarbonToken(token?: Carbon.Coin.Token | null): boolean;
65
- getDepositTokenFor(tokenDenom: string, chain: BlockchainUtils.Blockchain | BlockchainUtils.BlockchainV2, version?: string): Carbon.Coin.Token | undefined;
66
- getAllTokens(): Promise<Carbon.Coin.Token[]>;
67
- reloadTokens(): Promise<TypeUtils.SimpleMap<Carbon.Coin.Token>>;
64
+ isOrbixToken(token?: Orbix.Coin.Token | null): boolean;
65
+ getDepositTokenFor(tokenDenom: string, chain: BlockchainUtils.Blockchain | BlockchainUtils.BlockchainV2, version?: string): Orbix.Coin.Token | undefined;
66
+ getAllTokens(): Promise<Orbix.Coin.Token[]>;
67
+ reloadTokens(): Promise<TypeUtils.SimpleMap<Orbix.Coin.Token>>;
68
68
  getBridges(): Promise<BridgeMap>;
69
- matchChainsWithDifferentChainIds(bridges: Carbon.Coin.Bridge[]): Promise<IbcBridge[]>;
69
+ matchChainsWithDifferentChainIds(bridges: Orbix.Coin.Bridge[]): Promise<IbcBridge[]>;
70
70
  mapBridgesFromConnections(): Promise<AxelarBridge[]>;
71
71
  getIbcBlockchainNames(): string[];
72
72
  getAxelarBlockchainNames(): string[];
@@ -74,18 +74,18 @@ declare class TokenClient {
74
74
  getIbcChainFromBlockchainV2: (blockchain: BlockchainV2 | undefined) => string | undefined;
75
75
  getPolynetworkBlockchainNames(): string[];
76
76
  getAllBlockchainNames(): string[];
77
- getBridgesFromBridgeId(bridgeId: number): Carbon.Coin.Bridge[] | IbcBridge[] | AxelarBridge[];
78
- getIbcTokens(): TypeUtils.SimpleMap<Carbon.Coin.Token>;
79
- getPolyNetworkTokens(): TypeUtils.SimpleMap<Carbon.Coin.Token>;
77
+ getBridgesFromBridgeId(bridgeId: number): Orbix.Coin.Bridge[] | IbcBridge[] | AxelarBridge[];
78
+ getIbcTokens(): TypeUtils.SimpleMap<Orbix.Coin.Token>;
79
+ getPolyNetworkTokens(): TypeUtils.SimpleMap<Orbix.Coin.Token>;
80
80
  getBlockchainV2FromIDs(chainId: number, bridgeId: number): BlockchainV2 | undefined;
81
- getBridgeFromToken(token: Carbon.Coin.Token | null | undefined): Carbon.Coin.Bridge | IbcBridge | undefined;
82
- getIbcChainIdFromToken(token: Carbon.Coin.Token | null): string | undefined;
83
- getCdpUnderlyingToken(cdpDenom: string): Carbon.Coin.Token | undefined;
81
+ getBridgeFromToken(token: Orbix.Coin.Token | null | undefined): Orbix.Coin.Bridge | IbcBridge | undefined;
82
+ getIbcChainIdFromToken(token: Orbix.Coin.Token | null): string | undefined;
83
+ getCdpUnderlyingToken(cdpDenom: string): Orbix.Coin.Token | undefined;
84
84
  reloadWrapperMap(): Promise<TypeUtils.SimpleMap<string>>;
85
85
  reloadDenomGeckoMap(): Promise<void>;
86
86
  reloadUSDValues(denoms?: string[]): Promise<TypeUtils.SimpleMap<BigNumber>>;
87
87
  getUSDValuesFromCoinGecko(geckoIds: string[]): Promise<any>;
88
- processTokenPrices(tokenPrices: Carbon.Pricing.TokenPrice[]): TypeUtils.SimpleMap<BigNumber>;
88
+ processTokenPrices(tokenPrices: Orbix.Pricing.TokenPrice[]): TypeUtils.SimpleMap<BigNumber>;
89
89
  getUSDValuesFromPricingModule(): Promise<TypeUtils.SimpleMap<BigNumber>>;
90
90
  getDenomToGeckoIdMap(): Promise<TypeUtils.SimpleMap<string>>;
91
91
  setCommonAssetConfig(): void;
@@ -13,7 +13,7 @@ const number_1 = require("../util/number");
13
13
  const long_1 = __importDefault(require("long"));
14
14
  const InsightsQueryClient_1 = __importDefault(require("./InsightsQueryClient"));
15
15
  const SYMBOL_OVERRIDE = {
16
- swth: "SWTH",
16
+ fee: "FEE",
17
17
  NNEO: "nNEO",
18
18
  YAM1: "YAM",
19
19
  YAM2: "YAM",
@@ -22,7 +22,7 @@ const SYMBOL_OVERRIDE = {
22
22
  DBC1: "DBC",
23
23
  DBC2: "DBC",
24
24
  AVA1: "AVA",
25
- TSWTH: "tSWTH",
25
+ TSWTH: "tFEE",
26
26
  "cibStride Liquid Staked LUNA": "cibstLUNA",
27
27
  };
28
28
  const regexCdpDenom = RegExp(`^${constant_1.DenomPrefix.CDPToken}/`, "i");
@@ -93,7 +93,7 @@ class TokenClient {
93
93
  // chainId defaults to 3 so that blockchain will be undefined
94
94
  let chainId = tokenData?.chainId?.toNumber() ?? 3;
95
95
  if (this.isNativeToken(denom) || this.isNativeStablecoin(denom) || TokenClient.isPoolToken(denom) || TokenClient.isCdpToken(denom) || TokenClient.isVaultToken(denom)) {
96
- // native denoms "swth" and "usc" should be native.
96
+ // native denoms "fee" and "usc" should be native.
97
97
  // pool and cdp tokens are on the Native blockchain, hence 0
98
98
  chainId = 0;
99
99
  }
@@ -322,13 +322,13 @@ class TokenClient {
322
322
  return null;
323
323
  }
324
324
  getNativeToken() {
325
- return this.tokenForId("swth");
325
+ return this.tokenForId("fee");
326
326
  }
327
327
  getNativeStablecoin() {
328
328
  return this.tokenForId("usc");
329
329
  }
330
330
  isNativeToken(denom) {
331
- return denom === "swth";
331
+ return denom === "fee";
332
332
  }
333
333
  isNativeStablecoin(denom) {
334
334
  return denom === "usc";
@@ -341,7 +341,7 @@ class TokenClient {
341
341
  const bridgedTokenRegex = new RegExp(/^brdg\//);
342
342
  return bridgedTokenRegex.test(denom);
343
343
  }
344
- isCarbonToken(token) {
344
+ isOrbixToken(token) {
345
345
  return Boolean(token && (this.isNativeToken(token.denom) || token.bridgeId.eq(0)));
346
346
  }
347
347
  getDepositTokenFor(tokenDenom, chain, version = "V1") {
@@ -362,7 +362,7 @@ class TokenClient {
362
362
  else {
363
363
  targetChain = this.getBlockchainV2(token.denom);
364
364
  }
365
- const isSourceToken = targetChain === chain && token.denom !== "swth";
365
+ const isSourceToken = targetChain === chain && token.denom !== "fee";
366
366
  // if not source token find wrapped token for chain
367
367
  const depositToken = isSourceToken ? token : this.getWrappedToken(token.denom, chain, version);
368
368
  if (!depositToken) {
@@ -573,7 +573,7 @@ class TokenClient {
573
573
  }
574
574
  getBlockchainV2FromIDs(chainId, bridgeId) {
575
575
  if ((chainId === 5 && bridgeId === 1) || (chainId === 0 && bridgeId === 2))
576
- return "Carbon";
576
+ return "Orbix";
577
577
  const bridgeList = this.getBridgesFromBridgeId(bridgeId);
578
578
  return bridgeList.find(bridge => bridge.chainId.toNumber() === chainId)?.chainName ?? undefined;
579
579
  }
@@ -626,10 +626,10 @@ class TokenClient {
626
626
  return coinIds;
627
627
  }, []);
628
628
  const geckoIdToUsdPriceMap = await this.getUSDValuesFromCoinGecko(geckoIds);
629
- const carbonTokenPrices = await this.getUSDValuesFromPricingModule();
629
+ const orbixTokenPrices = await this.getUSDValuesFromPricingModule();
630
630
  const uscStablecoin = this.getNativeStablecoin();
631
- // add carbon token prices first
632
- Object.entries(carbonTokenPrices).forEach(([key, value]) => {
631
+ // add orbix token prices first
632
+ Object.entries(orbixTokenPrices).forEach(([key, value]) => {
633
633
  this.usdValues[key] = value;
634
634
  });
635
635
  //store price based on denoms
@@ -698,7 +698,7 @@ class TokenClient {
698
698
  const currencies = util_1.IBCUtils.EmbedChainInfos[chainId].currencies;
699
699
  const channelObj = ibc_1.swthChannels[chainId]?.ibc;
700
700
  currencies.forEach((asset) => {
701
- const channel = asset.coinMinimalDenom !== "swth" ? channelObj?.sourceChannel ?? "channel-0" : channelObj?.dstChannel ?? "channel-0";
701
+ const channel = asset.coinMinimalDenom !== "fee" ? channelObj?.sourceChannel ?? "channel-0" : channelObj?.dstChannel ?? "channel-0";
702
702
  const assetDenom = TokenClient.isIBCDenom(asset.coinMinimalDenom)
703
703
  ? asset.coinMinimalDenom
704
704
  : util_1.IBCUtils.makeIBCMinimalDenom(channel, asset.coinMinimalDenom);
@@ -1,6 +1,6 @@
1
1
  export { default as BatchQueryClient } from "./BatchQueryClient";
2
2
  export { default as BlockchainClient } from "./BlockchainClient";
3
- export { default as CarbonQueryClient } from "./CarbonQueryClient";
3
+ export { default as OrbixQueryClient } from "./OrbixQueryClient";
4
4
  export { default as ETHClient } from "./ETHClient";
5
5
  export { default as HydrogenClient } from "./HydrogenClient";
6
6
  export { default as InsightsQueryClient } from "./InsightsQueryClient";
@@ -3,13 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TokenClient = exports.InsightsQueryClient = exports.HydrogenClient = exports.ETHClient = exports.CarbonQueryClient = exports.BlockchainClient = exports.BatchQueryClient = void 0;
6
+ exports.TokenClient = exports.InsightsQueryClient = exports.HydrogenClient = exports.ETHClient = exports.OrbixQueryClient = exports.BlockchainClient = exports.BatchQueryClient = void 0;
7
7
  var BatchQueryClient_1 = require("./BatchQueryClient");
8
8
  Object.defineProperty(exports, "BatchQueryClient", { enumerable: true, get: function () { return __importDefault(BatchQueryClient_1).default; } });
9
9
  var BlockchainClient_1 = require("./BlockchainClient");
10
10
  Object.defineProperty(exports, "BlockchainClient", { enumerable: true, get: function () { return __importDefault(BlockchainClient_1).default; } });
11
- var CarbonQueryClient_1 = require("./CarbonQueryClient");
12
- Object.defineProperty(exports, "CarbonQueryClient", { enumerable: true, get: function () { return __importDefault(CarbonQueryClient_1).default; } });
11
+ var OrbixQueryClient_1 = require("./OrbixQueryClient");
12
+ Object.defineProperty(exports, "OrbixQueryClient", { enumerable: true, get: function () { return __importDefault(OrbixQueryClient_1).default; } });
13
13
  var ETHClient_1 = require("./ETHClient");
14
14
  Object.defineProperty(exports, "ETHClient", { enumerable: true, get: function () { return __importDefault(ETHClient_1).default; } });
15
15
  var HydrogenClient_1 = require("./HydrogenClient");
@@ -1,7 +1,7 @@
1
1
  import { Registry } from "@cosmjs/proto-signing";
2
2
  export * from "./cosmos-models";
3
3
  export * as IBC from "./ibc-models";
4
- export * as Carbon from "./carbon-models";
4
+ export * as Orbix from "./orbix-models";
5
5
  export declare const registry: Registry;
6
6
  export declare const TxTypes: {
7
7
  MsgSetTradingFlag: string;