carbon-js-sdk 0.3.0 → 0.3.2

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.
@@ -49,7 +49,8 @@ export declare enum ChainIds {
49
49
  Decentr = "mainnet-3",
50
50
  Certik = "shentu-2.2",
51
51
  Carbon = "carbon-1",
52
- Axelar = "axelar-dojo-1"
52
+ Axelar = "axelar-dojo-1",
53
+ Stride = "stride-1"
53
54
  }
54
55
  export declare const swthIbcWhitelist: string[];
55
56
  export declare const ibcWhitelist: string[];
@@ -87,11 +87,12 @@ var ChainIds;
87
87
  ChainIds["Certik"] = "shentu-2.2";
88
88
  ChainIds["Carbon"] = "carbon-1";
89
89
  ChainIds["Axelar"] = "axelar-dojo-1";
90
+ ChainIds["Stride"] = "stride-1";
90
91
  })(ChainIds = exports.ChainIds || (exports.ChainIds = {}));
91
92
  // whitelisted networks for addition of swth as a currency
92
93
  exports.swthIbcWhitelist = [ChainIds.Osmosis];
93
94
  // whitelisted networks for addition of transfer options
94
- exports.ibcWhitelist = [ChainIds.Osmosis, ChainIds.Terra, ChainIds.CosmosHub, ChainIds.Juno, ChainIds.Evmos, ChainIds.Axelar];
95
+ exports.ibcWhitelist = [ChainIds.Osmosis, ChainIds.Terra, ChainIds.CosmosHub, ChainIds.Juno, ChainIds.Evmos, ChainIds.Axelar, ChainIds.Stride];
95
96
  exports.EmbedChainInfosInit = {
96
97
  [ChainIds.Osmosis]: {
97
98
  rpc: "https://rpc-osmosis.keplr.app",
@@ -1566,6 +1567,66 @@ exports.EmbedChainInfosInit = {
1566
1567
  features: ["stargate", "ibc-transfer", "ibc-go", "no-legacy-stdTx"],
1567
1568
  explorerUrlToTx: "https://axelarscan.io/tx/{txHash}",
1568
1569
  },
1570
+ [ChainIds.Stride]: {
1571
+ rpc: "https://rpc-stride.keplr.app",
1572
+ rest: "https://lcd-stride.keplr.app",
1573
+ chainId: "stride-1",
1574
+ chainName: "Stride",
1575
+ stakeCurrency: {
1576
+ coinDenom: "STRD",
1577
+ coinMinimalDenom: "ustrd",
1578
+ coinDecimals: 6,
1579
+ coinGeckoId: "stride",
1580
+ },
1581
+ bip44: {
1582
+ coinType: 118,
1583
+ },
1584
+ bech32Config: exports.IBCAddress.defaultBech32Config("stride"),
1585
+ currencies: [
1586
+ {
1587
+ coinDenom: "STRD",
1588
+ coinMinimalDenom: "ustrd",
1589
+ coinDecimals: 6,
1590
+ coinGeckoId: "stride",
1591
+ },
1592
+ {
1593
+ coinDenom: "stATOM",
1594
+ coinMinimalDenom: "stuatom",
1595
+ coinDecimals: 6,
1596
+ },
1597
+ {
1598
+ coinDenom: "stOSMO",
1599
+ coinMinimalDenom: "stuosmo",
1600
+ coinDecimals: 6,
1601
+ },
1602
+ {
1603
+ coinDenom: "stJUNO",
1604
+ coinMinimalDenom: "stujuno",
1605
+ coinDecimals: 6,
1606
+ },
1607
+ {
1608
+ coinDenom: "stSTARS",
1609
+ coinMinimalDenom: "stustars",
1610
+ coinDecimals: 6,
1611
+ },
1612
+ ],
1613
+ feeCurrencies: [
1614
+ {
1615
+ coinDenom: "STRD",
1616
+ coinMinimalDenom: "ustrd",
1617
+ coinDecimals: 6,
1618
+ coinGeckoId: "stride",
1619
+ },
1620
+ ],
1621
+ gasPriceStep: {
1622
+ low: 0,
1623
+ average: 0,
1624
+ high: 0.04,
1625
+ },
1626
+ features: ["stargate", "ibc-transfer", "no-legacy-stdTx", "ibc-go"],
1627
+ explorerUrlToTx: "https://www.mintscan.io/stride/txs/{txHash}",
1628
+ tmRpc: "https://stride.rpc.kjnodes.com/",
1629
+ },
1569
1630
  };
1570
1631
  exports.swthChannels = {
1571
1632
  [ChainIds.Osmosis]: {
@@ -1592,6 +1653,10 @@ exports.swthChannels = {
1592
1653
  sourceChannel: "channel-7",
1593
1654
  dstChannel: "channel-37",
1594
1655
  },
1656
+ [ChainIds.Stride]: {
1657
+ sourceChannel: "channel-8",
1658
+ dstChannel: "channel-47",
1659
+ },
1595
1660
  };
1596
1661
  exports.ibcTokenRegex = /^ibc\/([a-f\d]+)$/i;
1597
1662
  exports.ibcNetworkRegex = /^([a-z\d_-]+)-([\d]+)$/i;
@@ -17,7 +17,8 @@ export declare enum Blockchain {
17
17
  CosmosHub = "cosmoshub",
18
18
  Juno = "juno",
19
19
  Evmos = "evmos",
20
- Axelar = "axelar"
20
+ Axelar = "axelar",
21
+ Stride = "stride"
21
22
  }
22
23
  export declare const BRIDGE_IDS: {
23
24
  polynetwork: number;
@@ -22,6 +22,7 @@ var Blockchain;
22
22
  Blockchain["Juno"] = "juno";
23
23
  Blockchain["Evmos"] = "evmos";
24
24
  Blockchain["Axelar"] = "axelar";
25
+ Blockchain["Stride"] = "stride";
25
26
  })(Blockchain = exports.Blockchain || (exports.Blockchain = {}));
26
27
  ;
27
28
  exports.BRIDGE_IDS = {
@@ -51,6 +52,7 @@ exports.CHAIN_IDS = {
51
52
  'juno': 247,
52
53
  'evmos': 248,
53
54
  'axelar': 249,
55
+ 'stride': 313,
54
56
  };
55
57
  exports.CHAIN_IDS_DEV = {
56
58
  'eth': 350,
@@ -134,6 +136,8 @@ const blockchainForChainId = (chainId) => {
134
136
  return Blockchain.Evmos;
135
137
  case 249: // mainnet
136
138
  return Blockchain.Axelar;
139
+ case 313: // mainnet
140
+ return Blockchain.Stride;
137
141
  default:
138
142
  return undefined;
139
143
  }
package/lib/util/ibc.js CHANGED
@@ -49,6 +49,7 @@ exports.ChainIdBlockchainMap = {
49
49
  [constant_1.ChainIds.Juno]: blockchain_1.Blockchain.Juno,
50
50
  [constant_1.ChainIds.Evmos]: blockchain_1.Blockchain.Evmos,
51
51
  [constant_1.ChainIds.Axelar]: blockchain_1.Blockchain.Axelar,
52
+ [constant_1.ChainIds.Stride]: blockchain_1.Blockchain.Stride,
52
53
  };
53
54
  const getIbcChainFromBlockchain = (blockchain) => {
54
55
  let ibcChain = undefined;
@@ -42,6 +42,6 @@ const toUnitless = (value, decimals) => {
42
42
  };
43
43
  exports.toUnitless = toUnitless;
44
44
  const generateNonce = () => {
45
- return Math.floor(Math.random() * 100000);
45
+ return Math.floor(Math.random() * 1000000);
46
46
  };
47
47
  exports.generateNonce = generateNonce;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",