carbon-js-sdk 0.3.19 → 0.3.20

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.
@@ -4,6 +4,7 @@ export declare enum Blockchain {
4
4
  Ethereum = "eth",
5
5
  BinanceSmartChain = "bsc",
6
6
  Zilliqa = "zil",
7
+ Arbitrum = "arbitrum",
7
8
  Native = "native",
8
9
  Btc = "btc",
9
10
  Carbon = "carbon",
@@ -40,6 +41,8 @@ export declare const ChainNames: {
40
41
  readonly 97: "BSC TestNet";
41
42
  readonly 110: "ZIL DevNet";
42
43
  readonly 111: "ZIL TestNet";
44
+ readonly 42161: "Arbitrum MainNet";
45
+ readonly 421611: "Arbitrum TestNet";
43
46
  };
44
47
  export declare const CHAIN_IDS: ChainIds;
45
48
  export declare const CHAIN_IDS_DEV: ChainIds;
@@ -47,5 +50,5 @@ export declare const CHAIN_IDS_TEST: ChainIds;
47
50
  export declare const chainIdsByBlockchain: SimpleMap<ChainIds>;
48
51
  export declare function parseBlockchain(value: string | null): Blockchain | null;
49
52
  export declare function getChainFromID(id: number): string | undefined;
50
- export declare const getBlockchainFromChain: (chainId?: number | undefined) => Blockchain.Ethereum | Blockchain.BinanceSmartChain | Blockchain.Zilliqa | undefined;
53
+ export declare const getBlockchainFromChain: (chainId?: number | undefined) => Blockchain.Ethereum | Blockchain.BinanceSmartChain | Blockchain.Zilliqa | Blockchain.Arbitrum | undefined;
51
54
  export declare const blockchainForChainId: (chainId?: number | undefined) => Blockchain | undefined;
@@ -8,6 +8,7 @@ var Blockchain;
8
8
  Blockchain["Ethereum"] = "eth";
9
9
  Blockchain["BinanceSmartChain"] = "bsc";
10
10
  Blockchain["Zilliqa"] = "zil";
11
+ Blockchain["Arbitrum"] = "arbitrum";
11
12
  Blockchain["Native"] = "native";
12
13
  Blockchain["Btc"] = "btc";
13
14
  Blockchain["Carbon"] = "carbon";
@@ -44,6 +45,8 @@ exports.ChainNames = {
44
45
  97: 'BSC TestNet',
45
46
  110: 'ZIL DevNet',
46
47
  111: 'ZIL TestNet',
48
+ 42161: 'Arbitrum MainNet',
49
+ 421611: 'Arbitrum TestNet',
47
50
  };
48
51
  exports.CHAIN_IDS = {
49
52
  'native': 0,
@@ -53,6 +56,7 @@ exports.CHAIN_IDS = {
53
56
  'bsc': 6,
54
57
  'neo3': 14,
55
58
  'zil': 18,
59
+ 'arbitrum': 19,
56
60
  'osmosis': 244,
57
61
  'terra': 245,
58
62
  'cosmoshub': 246,
@@ -111,6 +115,9 @@ const getBlockchainFromChain = (chainId) => {
111
115
  case 110:
112
116
  case 111:
113
117
  return Blockchain.Zilliqa;
118
+ case 42161:
119
+ case 421611:
120
+ return Blockchain.Arbitrum;
114
121
  }
115
122
  return undefined;
116
123
  };
@@ -139,6 +146,8 @@ const blockchainForChainId = (chainId) => {
139
146
  case 14: // mainnet
140
147
  case 88: // testnet
141
148
  return Blockchain.Neo3;
149
+ case 19: // mainnet
150
+ return Blockchain.Arbitrum;
142
151
  case 244: // mainnet
143
152
  return Blockchain.Osmosis;
144
153
  case 245: // mainnet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",