carbon-js-sdk 0.3.21 → 0.3.23

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.
@@ -228,8 +228,9 @@ class TokenClient {
228
228
  return result;
229
229
  }
230
230
  getWrappedToken(denom, blockchain) {
231
- // check if denom is wrapped token
232
- if (this.wrapperMap[denom]) {
231
+ // if denom is already a wrapped denom or no blockchain was specified,
232
+ // just return the input denom.
233
+ if (this.wrapperMap[denom] || !blockchain) {
233
234
  return this.tokens[denom];
234
235
  }
235
236
  // check if denom is source token
@@ -245,7 +246,10 @@ class TokenClient {
245
246
  if (TokenClient.isIBCDenom(wrappedDenom)) {
246
247
  tokenChain = util_1.IBCUtils.BlockchainMap[wrappedDenom];
247
248
  }
248
- if (!blockchain || !tokenChain || tokenChain === blockchain) {
249
+ if (!tokenChain) {
250
+ continue; // unknown chain! just ignore this source token
251
+ }
252
+ if (tokenChain === blockchain) {
249
253
  return token;
250
254
  }
251
255
  }
@@ -1580,6 +1580,12 @@ exports.EmbedChainInfosInit = {
1580
1580
  coinDecimals: 6,
1581
1581
  coinGeckoId: "", // TODO: fill in when available
1582
1582
  },
1583
+ {
1584
+ coinDenom: "USDC",
1585
+ coinMinimalDenom: "uusdc",
1586
+ coinDecimals: 6,
1587
+ coinGeckoId: "usd-coin",
1588
+ },
1583
1589
  ],
1584
1590
  stakeCurrency: {
1585
1591
  coinDenom: "AXL",
package/lib/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export * as Models from "./codec";
4
4
  export * from "./util";
5
5
  export { Blockchain } from "./util/blockchain";
6
6
  export * from "./websocket";
7
- export { AminoTypesMap, CoinPretty, SDKProvider, KeplrAccount, KeplrWindow, CosmosLedger, Keplr, ChainInfo, EVMChain, MetaMaskChangeNetworkParam, CallContractArgs, MetaMaskSyncResult, MetaMask, EthLedgerAccount, EthLedgerSigner, NeoLedgerAccount, Zilpay, ZilPayChangeNetworkParam, O3Types, O3Wallet, LeapAccount, Leap } from "./provider";
7
+ export { AminoTypesMap, CoinPretty, SDKProvider, KeplrAccount, KeplrWindow, CosmosLedger, Keplr, ChainInfo, EVMChain, MetaMaskChangeNetworkParam, CallContractArgs, MetaMaskSyncResult, MetaMask, EthLedgerAccount, EthLedgerSigner, NeoLedgerAccount, Zilpay, ZilPayChangeNetworkParam, O3Types, O3Wallet, LeapAccount, Leap, Key, getSigningCosmosClientOptions, AssetList, Chain } from "./provider";
8
8
  export { default as CarbonSDK } from "./CarbonSDK";
9
9
  export { ProviderAgent } from "./constant";
10
10
  export * as Insights from "./insights";
package/lib/index.js CHANGED
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.CarbonNonSigner = exports.CarbonPrivateKeySigner = exports.CarbonLedgerSigner = exports.Hydrogen = exports.Insights = exports.ProviderAgent = exports.CarbonSDK = exports.LeapAccount = exports.O3Wallet = exports.O3Types = exports.Zilpay = exports.NeoLedgerAccount = exports.EthLedgerSigner = exports.EthLedgerAccount = exports.MetaMask = exports.CosmosLedger = exports.KeplrAccount = exports.CoinPretty = exports.AminoTypesMap = exports.Blockchain = exports.Models = void 0;
28
+ exports.CarbonNonSigner = exports.CarbonPrivateKeySigner = exports.CarbonLedgerSigner = exports.Hydrogen = exports.Insights = exports.ProviderAgent = exports.CarbonSDK = exports.getSigningCosmosClientOptions = exports.LeapAccount = exports.O3Wallet = exports.O3Types = exports.Zilpay = exports.NeoLedgerAccount = exports.EthLedgerSigner = exports.EthLedgerAccount = exports.MetaMask = exports.CosmosLedger = exports.KeplrAccount = exports.CoinPretty = exports.AminoTypesMap = exports.Blockchain = exports.Models = void 0;
29
29
  __exportStar(require("./CarbonSDK"), exports);
30
30
  __exportStar(require("./modules"), exports);
31
31
  exports.Models = __importStar(require("./codec"));
@@ -46,6 +46,7 @@ Object.defineProperty(exports, "Zilpay", { enumerable: true, get: function () {
46
46
  Object.defineProperty(exports, "O3Types", { enumerable: true, get: function () { return provider_1.O3Types; } });
47
47
  Object.defineProperty(exports, "O3Wallet", { enumerable: true, get: function () { return provider_1.O3Wallet; } });
48
48
  Object.defineProperty(exports, "LeapAccount", { enumerable: true, get: function () { return provider_1.LeapAccount; } });
49
+ Object.defineProperty(exports, "getSigningCosmosClientOptions", { enumerable: true, get: function () { return provider_1.getSigningCosmosClientOptions; } });
49
50
  var CarbonSDK_1 = require("./CarbonSDK");
50
51
  Object.defineProperty(exports, "CarbonSDK", { enumerable: true, get: function () { return __importDefault(CarbonSDK_1).default; } });
51
52
  var constant_1 = require("./constant");
@@ -0,0 +1,7 @@
1
+ import { AminoTypes, GasPrice } from '@cosmjs/stargate';
2
+ import { Registry } from '@cosmjs/proto-signing';
3
+ export declare const getSigningCosmosClientOptions: () => {
4
+ registry: Registry;
5
+ aminoTypes: AminoTypes;
6
+ gasPrice: GasPrice;
7
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSigningCosmosClientOptions = void 0;
4
+ const amino_1 = require("../amino");
5
+ const codec_1 = require("../../codec");
6
+ const stargate_1 = require("@cosmjs/stargate");
7
+ // import { GasPrice } from '@cosmjs/stargate';
8
+ const getSigningCosmosClientOptions = () => {
9
+ const registry = codec_1.registry;
10
+ const aminoTypes = amino_1.AminoTypesMap;
11
+ const gasPrice = stargate_1.GasPrice.fromString('0.025uosmo');
12
+ return {
13
+ registry,
14
+ aminoTypes,
15
+ gasPrice,
16
+ };
17
+ };
18
+ exports.getSigningCosmosClientOptions = getSigningCosmosClientOptions;
@@ -0,0 +1,2 @@
1
+ export { getSigningCosmosClientOptions } from './GetSigningCosmosClientOptions';
2
+ export { AssetList, Chain } from '@chain-registry/types';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSigningCosmosClientOptions = void 0;
4
+ var GetSigningCosmosClientOptions_1 = require("./GetSigningCosmosClientOptions");
5
+ Object.defineProperty(exports, "getSigningCosmosClientOptions", { enumerable: true, get: function () { return GetSigningCosmosClientOptions_1.getSigningCosmosClientOptions; } });
@@ -1,9 +1,10 @@
1
1
  export { EthLedgerAccount, EthLedgerSigner, NeoLedgerAccount } from "./account";
2
2
  export { AminoTypesMap } from "./amino";
3
3
  export { ChainInfo, CoinPretty, default as KeplrAccount, Keplr, KeplrWindow } from "./keplr";
4
- export { default as LeapAccount, Leap } from "./leap";
4
+ export { default as LeapAccount, Leap, Key } from "./leap";
5
5
  export { default as CosmosLedger } from "./ledger";
6
6
  export { CallContractArgs, EVMChain, MetaMask, MetaMaskChangeNetworkParam, MetaMaskSyncResult } from "./metamask";
7
7
  export { O3Types, O3Wallet } from "./o3";
8
8
  export { default as SDKProvider } from "./sdk";
9
9
  export { Zilpay, ZilPayChangeNetworkParam } from "./zilpay";
10
+ export { getSigningCosmosClientOptions, AssetList, Chain } from "./chainProvider";
@@ -3,7 +3,7 @@ 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.Zilpay = exports.O3Wallet = exports.O3Types = exports.MetaMask = exports.CosmosLedger = exports.LeapAccount = exports.KeplrAccount = exports.CoinPretty = exports.AminoTypesMap = exports.NeoLedgerAccount = exports.EthLedgerSigner = exports.EthLedgerAccount = void 0;
6
+ exports.getSigningCosmosClientOptions = exports.Zilpay = exports.O3Wallet = exports.O3Types = exports.MetaMask = exports.CosmosLedger = exports.LeapAccount = exports.KeplrAccount = exports.CoinPretty = exports.AminoTypesMap = exports.NeoLedgerAccount = exports.EthLedgerSigner = exports.EthLedgerAccount = void 0;
7
7
  var account_1 = require("./account");
8
8
  Object.defineProperty(exports, "EthLedgerAccount", { enumerable: true, get: function () { return account_1.EthLedgerAccount; } });
9
9
  Object.defineProperty(exports, "EthLedgerSigner", { enumerable: true, get: function () { return account_1.EthLedgerSigner; } });
@@ -24,3 +24,5 @@ Object.defineProperty(exports, "O3Types", { enumerable: true, get: function () {
24
24
  Object.defineProperty(exports, "O3Wallet", { enumerable: true, get: function () { return o3_1.O3Wallet; } });
25
25
  var zilpay_1 = require("./zilpay");
26
26
  Object.defineProperty(exports, "Zilpay", { enumerable: true, get: function () { return zilpay_1.Zilpay; } });
27
+ var chainProvider_1 = require("./chainProvider");
28
+ Object.defineProperty(exports, "getSigningCosmosClientOptions", { enumerable: true, get: function () { return chainProvider_1.getSigningCosmosClientOptions; } });
@@ -1,3 +1,3 @@
1
1
  export { default } from "./LeapAccount";
2
- export { Key as LeapKey } from "@cosmos-kit/core";
2
+ export { Key } from "@cosmos-kit/core";
3
3
  export { Leap } from "@cosmos-kit/leap";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",