carbon-js-sdk 0.4.1 → 0.4.3-dev.1

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 (87) hide show
  1. package/lib/CarbonSDK.js +1 -1
  2. package/lib/clients/CarbonQueryClient.js +2 -2
  3. package/lib/clients/ETHClient.d.ts +11 -4
  4. package/lib/clients/ETHClient.js +32 -18
  5. package/lib/clients/HydrogenClient.d.ts +16 -7
  6. package/lib/clients/HydrogenClient.js +56 -10
  7. package/lib/clients/NEOClient.d.ts +1 -1
  8. package/lib/clients/NEOClient.js +15 -10
  9. package/lib/clients/TokenClient.d.ts +29 -5
  10. package/lib/clients/TokenClient.js +258 -53
  11. package/lib/clients/ZILClient.d.ts +1 -1
  12. package/lib/clients/ZILClient.js +25 -20
  13. package/lib/codec/cosmos/gov/v1/query.js +2 -2
  14. package/lib/codec/cosmos/gov/v1/tx.js +2 -2
  15. package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
  16. package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
  17. package/lib/codec/cosmos/group/v1/events.js +2 -2
  18. package/lib/codec/cosmos/group/v1/tx.js +4 -4
  19. package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
  20. package/lib/codec/crisis/genesis.d.ts +18 -0
  21. package/lib/codec/crisis/genesis.js +46 -0
  22. package/lib/codec/crisis/query.d.ts +43 -0
  23. package/lib/codec/crisis/query.js +103 -0
  24. package/lib/codec/crisis/tx.d.ts +12 -0
  25. package/lib/codec/crisis/tx.js +20 -0
  26. package/lib/codec/index.d.ts +4 -4
  27. package/lib/codec/index.js +4 -4
  28. package/lib/constant/generic.js +1 -1
  29. package/lib/constant/ibc.d.ts +7 -0
  30. package/lib/constant/ibc.js +4 -1
  31. package/lib/constant/network.d.ts +2 -0
  32. package/lib/constant/network.js +5 -1
  33. package/lib/hydrogen/transfer.d.ts +5 -5
  34. package/lib/modules/cdp.js +43 -43
  35. package/lib/modules/cosmwasm.js +1 -1
  36. package/lib/modules/gov.js +12 -12
  37. package/lib/modules/ibc.d.ts +5 -1
  38. package/lib/modules/ibc.js +78 -0
  39. package/lib/modules/liquiditypool.js +1 -1
  40. package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
  41. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
  42. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
  43. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
  44. package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
  45. package/lib/provider/amino/types/admin.js +27 -27
  46. package/lib/provider/amino/types/bank.js +1 -1
  47. package/lib/provider/amino/types/broker.js +1 -1
  48. package/lib/provider/amino/types/cdp.js +22 -22
  49. package/lib/provider/amino/types/coin.js +4 -4
  50. package/lib/provider/amino/types/gov.js +4 -4
  51. package/lib/provider/amino/types/ibc.js +1 -1
  52. package/lib/provider/amino/types/leverage.js +1 -1
  53. package/lib/provider/amino/types/liquidityPool.js +7 -7
  54. package/lib/provider/amino/types/market.js +1 -1
  55. package/lib/provider/amino/types/oracle.js +1 -1
  56. package/lib/provider/amino/types/order.js +4 -4
  57. package/lib/provider/amino/types/position.js +1 -1
  58. package/lib/provider/amino/types/profile.js +1 -1
  59. package/lib/provider/amino/types/staking.js +4 -4
  60. package/lib/provider/amino/types/subaccount.js +3 -3
  61. package/lib/provider/amino/utils.js +11 -11
  62. package/lib/provider/keplr/KeplrStore.d.ts +1 -1
  63. package/lib/provider/keplr/KeplrStore.js +2 -5
  64. package/lib/provider/ledger/ledger.js +2 -2
  65. package/lib/provider/metamask/MetaMask.d.ts +5 -5
  66. package/lib/provider/metamask/MetaMask.js +37 -37
  67. package/lib/provider/o3/O3Wallet.js +2 -2
  68. package/lib/util/address.js +13 -13
  69. package/lib/util/api.js +4 -4
  70. package/lib/util/blockchain.d.ts +26 -0
  71. package/lib/util/blockchain.js +160 -1
  72. package/lib/util/fetch.js +1 -1
  73. package/lib/util/generic.js +3 -3
  74. package/lib/util/ibc.d.ts +4 -3
  75. package/lib/util/ibc.js +20 -1
  76. package/lib/util/number.js +5 -5
  77. package/lib/util/tx.d.ts +4 -4
  78. package/lib/wallet/CarbonSigner.js +2 -2
  79. package/lib/wallet/CarbonSigningClient.js +8 -8
  80. package/lib/wallet/CarbonWallet.js +6 -6
  81. package/lib/websocket/connector.d.ts +2 -1
  82. package/lib/websocket/connector.js +7 -9
  83. package/package.json +1 -1
  84. package/lib/codec/broker/incoming_pool_swap.d.ts +0 -23
  85. package/lib/codec/broker/incoming_pool_swap.js +0 -136
  86. package/lib/codec/cosmos/base/store/v1beta1/snapshot.d.ts +0 -45
  87. package/lib/codec/cosmos/base/store/v1beta1/snapshot.js +0 -246
@@ -1474,7 +1474,7 @@ exports.MsgVote = {
1474
1474
  : "";
1475
1475
  message.option =
1476
1476
  object.option !== undefined && object.option !== null
1477
- ? types_1.voteOptionFromJSON(object.option)
1477
+ ? (0, types_1.voteOptionFromJSON)(object.option)
1478
1478
  : 0;
1479
1479
  message.metadata =
1480
1480
  object.metadata !== undefined && object.metadata !== null
@@ -1492,7 +1492,7 @@ exports.MsgVote = {
1492
1492
  (obj.proposalId = (message.proposalId || long_1.default.UZERO).toString());
1493
1493
  message.voter !== undefined && (obj.voter = message.voter);
1494
1494
  message.option !== undefined &&
1495
- (obj.option = types_1.voteOptionToJSON(message.option));
1495
+ (obj.option = (0, types_1.voteOptionToJSON)(message.option));
1496
1496
  message.metadata !== undefined && (obj.metadata = message.metadata);
1497
1497
  message.exec !== undefined && (obj.exec = execToJSON(message.exec));
1498
1498
  return obj;
@@ -1633,14 +1633,14 @@ exports.MsgExecResponse = {
1633
1633
  const message = Object.assign({}, baseMsgExecResponse);
1634
1634
  message.result =
1635
1635
  object.result !== undefined && object.result !== null
1636
- ? types_1.proposalExecutorResultFromJSON(object.result)
1636
+ ? (0, types_1.proposalExecutorResultFromJSON)(object.result)
1637
1637
  : 0;
1638
1638
  return message;
1639
1639
  },
1640
1640
  toJSON(message) {
1641
1641
  const obj = {};
1642
1642
  message.result !== undefined &&
1643
- (obj.result = types_1.proposalExecutorResultToJSON(message.result));
1643
+ (obj.result = (0, types_1.proposalExecutorResultToJSON)(message.result));
1644
1644
  return obj;
1645
1645
  },
1646
1646
  fromPartial(object) {
@@ -763,13 +763,13 @@ exports.ModeInfo_Single = {
763
763
  const message = Object.assign({}, baseModeInfo_Single);
764
764
  message.mode =
765
765
  object.mode !== undefined && object.mode !== null
766
- ? signing_1.signModeFromJSON(object.mode)
766
+ ? (0, signing_1.signModeFromJSON)(object.mode)
767
767
  : 0;
768
768
  return message;
769
769
  },
770
770
  toJSON(message) {
771
771
  const obj = {};
772
- message.mode !== undefined && (obj.mode = signing_1.signModeToJSON(message.mode));
772
+ message.mode !== undefined && (obj.mode = (0, signing_1.signModeToJSON)(message.mode));
773
773
  return obj;
774
774
  },
775
775
  fromPartial(object) {
@@ -1052,7 +1052,7 @@ exports.AuxSignerData = {
1052
1052
  : undefined;
1053
1053
  message.mode =
1054
1054
  object.mode !== undefined && object.mode !== null
1055
- ? signing_1.signModeFromJSON(object.mode)
1055
+ ? (0, signing_1.signModeFromJSON)(object.mode)
1056
1056
  : 0;
1057
1057
  message.sig =
1058
1058
  object.sig !== undefined && object.sig !== null
@@ -1067,7 +1067,7 @@ exports.AuxSignerData = {
1067
1067
  (obj.signDoc = message.signDoc
1068
1068
  ? exports.SignDocDirectAux.toJSON(message.signDoc)
1069
1069
  : undefined);
1070
- message.mode !== undefined && (obj.mode = signing_1.signModeToJSON(message.mode));
1070
+ message.mode !== undefined && (obj.mode = (0, signing_1.signModeToJSON)(message.mode));
1071
1071
  message.sig !== undefined &&
1072
1072
  (obj.sig = base64FromBytes(message.sig !== undefined ? message.sig : new Uint8Array()));
1073
1073
  return obj;
@@ -0,0 +1,18 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ export declare const protobufPackage = "Switcheo.carbon.crisis";
4
+ /** GenesisState defines the crisis module's genesis state. */
5
+ export interface GenesisState {
6
+ }
7
+ export declare const GenesisState: {
8
+ encode(_: GenesisState, writer?: _m0.Writer): _m0.Writer;
9
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState;
10
+ fromJSON(_: any): GenesisState;
11
+ toJSON(_: GenesisState): unknown;
12
+ fromPartial(_: DeepPartial<GenesisState>): GenesisState;
13
+ };
14
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
15
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
16
+ [K in keyof T]?: DeepPartial<T[K]>;
17
+ } : Partial<T>;
18
+ export {};
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GenesisState = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "Switcheo.carbon.crisis";
11
+ const baseGenesisState = {};
12
+ exports.GenesisState = {
13
+ encode(_, writer = minimal_1.default.Writer.create()) {
14
+ return writer;
15
+ },
16
+ decode(input, length) {
17
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
18
+ let end = length === undefined ? reader.len : reader.pos + length;
19
+ const message = Object.assign({}, baseGenesisState);
20
+ while (reader.pos < end) {
21
+ const tag = reader.uint32();
22
+ switch (tag >>> 3) {
23
+ default:
24
+ reader.skipType(tag & 7);
25
+ break;
26
+ }
27
+ }
28
+ return message;
29
+ },
30
+ fromJSON(_) {
31
+ const message = Object.assign({}, baseGenesisState);
32
+ return message;
33
+ },
34
+ toJSON(_) {
35
+ const obj = {};
36
+ return obj;
37
+ },
38
+ fromPartial(_) {
39
+ const message = Object.assign({}, baseGenesisState);
40
+ return message;
41
+ },
42
+ };
43
+ if (minimal_1.default.util.Long !== long_1.default) {
44
+ minimal_1.default.util.Long = long_1.default;
45
+ minimal_1.default.configure();
46
+ }
@@ -0,0 +1,43 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ export declare const protobufPackage = "Switcheo.carbon.crisis";
4
+ /** QueryParamsRequest is request type for the Query/Params RPC method. */
5
+ export interface QueryParamsRequest {
6
+ }
7
+ /** QueryParamsResponse is response type for the Query/Params RPC method. */
8
+ export interface QueryParamsResponse {
9
+ /** params holds all the parameters of this module. */
10
+ params: string;
11
+ }
12
+ export declare const QueryParamsRequest: {
13
+ encode(_: QueryParamsRequest, writer?: _m0.Writer): _m0.Writer;
14
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryParamsRequest;
15
+ fromJSON(_: any): QueryParamsRequest;
16
+ toJSON(_: QueryParamsRequest): unknown;
17
+ fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest;
18
+ };
19
+ export declare const QueryParamsResponse: {
20
+ encode(message: QueryParamsResponse, writer?: _m0.Writer): _m0.Writer;
21
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryParamsResponse;
22
+ fromJSON(object: any): QueryParamsResponse;
23
+ toJSON(message: QueryParamsResponse): unknown;
24
+ fromPartial(object: DeepPartial<QueryParamsResponse>): QueryParamsResponse;
25
+ };
26
+ /** Query defines the gRPC querier service. */
27
+ export interface Query {
28
+ /** Parameters queries the crisis parameters. */
29
+ Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
30
+ }
31
+ export declare class QueryClientImpl implements Query {
32
+ private readonly rpc;
33
+ constructor(rpc: Rpc);
34
+ Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
35
+ }
36
+ interface Rpc {
37
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
38
+ }
39
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
40
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
41
+ [K in keyof T]?: DeepPartial<T[K]>;
42
+ } : Partial<T>;
43
+ export {};
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.QueryClientImpl = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "Switcheo.carbon.crisis";
11
+ const baseQueryParamsRequest = {};
12
+ exports.QueryParamsRequest = {
13
+ encode(_, writer = minimal_1.default.Writer.create()) {
14
+ return writer;
15
+ },
16
+ decode(input, length) {
17
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
18
+ let end = length === undefined ? reader.len : reader.pos + length;
19
+ const message = Object.assign({}, baseQueryParamsRequest);
20
+ while (reader.pos < end) {
21
+ const tag = reader.uint32();
22
+ switch (tag >>> 3) {
23
+ default:
24
+ reader.skipType(tag & 7);
25
+ break;
26
+ }
27
+ }
28
+ return message;
29
+ },
30
+ fromJSON(_) {
31
+ const message = Object.assign({}, baseQueryParamsRequest);
32
+ return message;
33
+ },
34
+ toJSON(_) {
35
+ const obj = {};
36
+ return obj;
37
+ },
38
+ fromPartial(_) {
39
+ const message = Object.assign({}, baseQueryParamsRequest);
40
+ return message;
41
+ },
42
+ };
43
+ const baseQueryParamsResponse = { params: "" };
44
+ exports.QueryParamsResponse = {
45
+ encode(message, writer = minimal_1.default.Writer.create()) {
46
+ if (message.params !== "") {
47
+ writer.uint32(10).string(message.params);
48
+ }
49
+ return writer;
50
+ },
51
+ decode(input, length) {
52
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
53
+ let end = length === undefined ? reader.len : reader.pos + length;
54
+ const message = Object.assign({}, baseQueryParamsResponse);
55
+ while (reader.pos < end) {
56
+ const tag = reader.uint32();
57
+ switch (tag >>> 3) {
58
+ case 1:
59
+ message.params = reader.string();
60
+ break;
61
+ default:
62
+ reader.skipType(tag & 7);
63
+ break;
64
+ }
65
+ }
66
+ return message;
67
+ },
68
+ fromJSON(object) {
69
+ const message = Object.assign({}, baseQueryParamsResponse);
70
+ message.params =
71
+ object.params !== undefined && object.params !== null
72
+ ? String(object.params)
73
+ : "";
74
+ return message;
75
+ },
76
+ toJSON(message) {
77
+ const obj = {};
78
+ message.params !== undefined && (obj.params = message.params);
79
+ return obj;
80
+ },
81
+ fromPartial(object) {
82
+ var _a;
83
+ const message = Object.assign({}, baseQueryParamsResponse);
84
+ message.params = (_a = object.params) !== null && _a !== void 0 ? _a : "";
85
+ return message;
86
+ },
87
+ };
88
+ class QueryClientImpl {
89
+ constructor(rpc) {
90
+ this.rpc = rpc;
91
+ this.Params = this.Params.bind(this);
92
+ }
93
+ Params(request) {
94
+ const data = exports.QueryParamsRequest.encode(request).finish();
95
+ const promise = this.rpc.request("Switcheo.carbon.crisis.Query", "Params", data);
96
+ return promise.then((data) => exports.QueryParamsResponse.decode(new minimal_1.default.Reader(data)));
97
+ }
98
+ }
99
+ exports.QueryClientImpl = QueryClientImpl;
100
+ if (minimal_1.default.util.Long !== long_1.default) {
101
+ minimal_1.default.util.Long = long_1.default;
102
+ minimal_1.default.configure();
103
+ }
@@ -0,0 +1,12 @@
1
+ export declare const protobufPackage = "Switcheo.carbon.crisis";
2
+ /** Msg defines the Msg service. */
3
+ export interface Msg {
4
+ }
5
+ export declare class MsgClientImpl implements Msg {
6
+ private readonly rpc;
7
+ constructor(rpc: Rpc);
8
+ }
9
+ interface Rpc {
10
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
11
+ }
12
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MsgClientImpl = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "Switcheo.carbon.crisis";
11
+ class MsgClientImpl {
12
+ constructor(rpc) {
13
+ this.rpc = rpc;
14
+ }
15
+ }
16
+ exports.MsgClientImpl = MsgClientImpl;
17
+ if (minimal_1.default.util.Long !== long_1.default) {
18
+ minimal_1.default.util.Long = long_1.default;
19
+ minimal_1.default.configure();
20
+ }
@@ -141,8 +141,8 @@ export declare const TxTypes: {
141
141
  MsgRevokeAllowanceResponse: string;
142
142
  MsgSubmitEvidence: string;
143
143
  MsgSubmitEvidenceResponse: string;
144
- MsgSend: string;
145
- MsgSendResponse: string;
144
+ MsgSendNft: string;
145
+ MsgSendNftResponse: string;
146
146
  MsgCreateGroup: string;
147
147
  MsgCreateGroupResponse: string;
148
148
  MsgUpdateGroupMembers: string;
@@ -171,8 +171,8 @@ export declare const TxTypes: {
171
171
  MsgExecResponse: string;
172
172
  MsgLeaveGroup: string;
173
173
  MsgLeaveGroupResponse: string;
174
- MsgBankSend: string;
175
- MsgBankSendResponse: string;
174
+ MsgSend: string;
175
+ MsgSendResponse: string;
176
176
  MsgMultiSend: string;
177
177
  MsgMultiSendResponse: string;
178
178
  MsgSetWithdrawAddress: string;
@@ -648,8 +648,8 @@ exports.TxTypes = {
648
648
  "MsgRevokeAllowanceResponse": "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse",
649
649
  "MsgSubmitEvidence": "/cosmos.evidence.v1beta1.MsgSubmitEvidence",
650
650
  "MsgSubmitEvidenceResponse": "/cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse",
651
- "MsgSend": "/cosmos.nft.v1beta1.MsgSend",
652
- "MsgSendResponse": "/cosmos.nft.v1beta1.MsgSendResponse",
651
+ "MsgSendNft": "/cosmos.nft.v1beta1.MsgSend",
652
+ "MsgSendNftResponse": "/cosmos.nft.v1beta1.MsgSendResponse",
653
653
  "MsgCreateGroup": "/cosmos.group.v1.MsgCreateGroup",
654
654
  "MsgCreateGroupResponse": "/cosmos.group.v1.MsgCreateGroupResponse",
655
655
  "MsgUpdateGroupMembers": "/cosmos.group.v1.MsgUpdateGroupMembers",
@@ -678,8 +678,8 @@ exports.TxTypes = {
678
678
  "MsgExecResponse": "/cosmos.group.v1.MsgExecResponse",
679
679
  "MsgLeaveGroup": "/cosmos.group.v1.MsgLeaveGroup",
680
680
  "MsgLeaveGroupResponse": "/cosmos.group.v1.MsgLeaveGroupResponse",
681
- "MsgBankSend": "/cosmos.bank.v1beta1.MsgSend",
682
- "MsgBankSendResponse": "/cosmos.bank.v1beta1.MsgSendResponse",
681
+ "MsgSend": "/cosmos.bank.v1beta1.MsgSend",
682
+ "MsgSendResponse": "/cosmos.bank.v1beta1.MsgSendResponse",
683
683
  "MsgMultiSend": "/cosmos.bank.v1beta1.MsgMultiSend",
684
684
  "MsgMultiSendResponse": "/cosmos.bank.v1beta1.MsgMultiSendResponse",
685
685
  "MsgSetWithdrawAddress": "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
@@ -12,7 +12,7 @@ exports.DEFAULT_FEE_DENOM = "swth";
12
12
  exports.DEFAULT_GAS_PRICE = new bignumber_js_1.default(10);
13
13
  exports.DEFAULT_GAS = new bignumber_js_1.default(10000000);
14
14
  exports.DEFAULT_FEE = {
15
- amount: proto_signing_1.coins(exports.DEFAULT_GAS_PRICE.times(exports.DEFAULT_GAS).dp(0).toString(), "swth"),
15
+ amount: (0, proto_signing_1.coins)(exports.DEFAULT_GAS_PRICE.times(exports.DEFAULT_GAS).dp(0).toString(), "swth"),
16
16
  gas: exports.DEFAULT_GAS.toString(10),
17
17
  };
18
18
  exports.CARBON_GAS_PRICE = {
@@ -78,6 +78,13 @@ export interface CosmWasmChannelSet extends ChannelSet {
78
78
  export declare const swthChannels: SimpleMap<ChannelConfig>;
79
79
  export declare const cibtIbcTokenRegex: RegExp;
80
80
  export declare const ibcTokenRegex: RegExp;
81
+ export declare const cw20TokenRegex: RegExp;
82
+ export declare const cosmBridgeRegex: RegExp;
81
83
  export declare const ibcNetworkRegex: RegExp;
84
+ export declare const ibcTransferChannelRegex: RegExp;
82
85
  export declare const ibcDefaultGas: number;
83
86
  export declare const DefaultGasPriceStep: GasPriceStep;
87
+ export declare type MinimalDenomMap = SimpleMap<string>;
88
+ export interface ExtendedChainInfo extends ChainInfo {
89
+ minimalDenomMap: MinimalDenomMap;
90
+ }
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.DefaultGasPriceStep = exports.ibcDefaultGas = exports.ibcNetworkRegex = exports.ibcTokenRegex = exports.cibtIbcTokenRegex = exports.swthChannels = exports.EmbedChainInfosInit = exports.ibcWhitelist = exports.swthIbcWhitelist = exports.ChainIds = exports.IBCAddress = void 0;
22
+ exports.DefaultGasPriceStep = exports.ibcDefaultGas = exports.ibcTransferChannelRegex = exports.ibcNetworkRegex = exports.cosmBridgeRegex = exports.cw20TokenRegex = exports.ibcTokenRegex = exports.cibtIbcTokenRegex = exports.swthChannels = exports.EmbedChainInfosInit = exports.ibcWhitelist = exports.swthIbcWhitelist = exports.ChainIds = exports.IBCAddress = void 0;
23
23
  const bech32 = __importStar(require("bech32"));
24
24
  const generic_1 = require("./generic");
25
25
  const token_1 = require("./token");
@@ -2116,7 +2116,10 @@ exports.swthChannels = {
2116
2116
  };
2117
2117
  exports.cibtIbcTokenRegex = RegExp(`^${token_1.DenomPrefix.CDPToken}/ibc/([a-f\\d]+)$`, "i");
2118
2118
  exports.ibcTokenRegex = /^ibc\/([a-f\d]+)$/i;
2119
+ exports.cw20TokenRegex = /^cw20:([a-z\d]+)$/i;
2120
+ exports.cosmBridgeRegex = /^wasm\.([a-z\d]+)$/i;
2119
2121
  exports.ibcNetworkRegex = /^([a-z\d_-]+)-([\d]+)$/i;
2122
+ exports.ibcTransferChannelRegex = /^transfer\/channel-(\d+)/i;
2120
2123
  exports.ibcDefaultGas = 300000;
2121
2124
  exports.DefaultGasPriceStep = {
2122
2125
  low: 0.01,
@@ -1,3 +1,4 @@
1
+ import { SimpleMap } from "../util/type";
1
2
  export declare enum Network {
2
3
  MainNet = "mainnet",
3
4
  TestNet = "testnet",
@@ -64,3 +65,4 @@ export interface NetworkConfigProvider {
64
65
  export declare const NetworkConfigs: {
65
66
  [key in Network]: NetworkConfig;
66
67
  };
68
+ export declare const publicRpcNodes: SimpleMap<string>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NetworkConfigs = exports.DEFAULT_NETWORK = exports.CarbonChainIDs = exports.Network = void 0;
3
+ exports.publicRpcNodes = exports.NetworkConfigs = exports.DEFAULT_NETWORK = exports.CarbonChainIDs = exports.Network = void 0;
4
4
  const neon_core_next_1 = require("@cityofzion/neon-core-next");
5
5
  var Network;
6
6
  (function (Network) {
@@ -318,3 +318,7 @@ exports.NetworkConfigs = {
318
318
  },
319
319
  },
320
320
  };
321
+ exports.publicRpcNodes = {
322
+ Osmosis: "https://rpc.osmosis.zone/",
323
+ Terra: "https://terra-rpc.lavenderfive.com:443/",
324
+ };
@@ -1,4 +1,4 @@
1
- import { Blockchain } from "../util/blockchain";
1
+ import { Blockchain, BlockchainV2 } from "../util/blockchain";
2
2
  export interface GetTransfersRequest {
3
3
  bridging_blockchain?: string;
4
4
  source_blockchain?: string;
@@ -53,9 +53,9 @@ export interface CrossChainTransfer {
53
53
  nonce: string;
54
54
  created_at: Date;
55
55
  updated_at: Date;
56
- source_blockchain: Blockchain | null;
57
- bridging_blockchain: Blockchain | null;
58
- destination_blockchain: Blockchain | null;
56
+ source_blockchain: Blockchain | BlockchainV2 | null;
57
+ bridging_blockchain: Blockchain | BlockchainV2 | null;
58
+ destination_blockchain: Blockchain | BlockchainV2 | null;
59
59
  status: CrossChainFlowStatus;
60
60
  carbon_token_id: string;
61
61
  recovery_address_hash: string;
@@ -68,7 +68,7 @@ export interface CrossChainTransferDetailed extends CrossChainTransfer {
68
68
  }
69
69
  export interface ChainTransaction {
70
70
  id: string;
71
- blockchain: Blockchain;
71
+ blockchain: Blockchain | BlockchainV2;
72
72
  contract: string;
73
73
  block_height: number;
74
74
  tx_hash: string;