@skip-go/client 1.3.6 → 1.4.0

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 (118) hide show
  1. package/dist/cjs/api/getAssets.cjs +4 -4
  2. package/dist/cjs/api/getAssetsBetweenChains.cjs +3 -3
  3. package/dist/cjs/api/getBridges.cjs +3 -3
  4. package/dist/cjs/api/getChains.cjs +3 -3
  5. package/dist/cjs/api/getVenues.cjs +3 -3
  6. package/dist/cjs/api/postAssetsFromSource.cjs +4 -4
  7. package/dist/cjs/api/postBalances.cjs +3 -3
  8. package/dist/cjs/api/postIbcOriginAssets.cjs +3 -3
  9. package/dist/cjs/api/postMessages.cjs +3 -3
  10. package/dist/cjs/api/postMessagesDirect.cjs +3 -3
  11. package/dist/cjs/api/postRecommendAssets.cjs +3 -3
  12. package/dist/cjs/api/postRoute.cjs +3 -3
  13. package/dist/cjs/api/postSubmitTransaction.cjs +3 -3
  14. package/dist/cjs/api/postTrackTransaction.cjs +3 -3
  15. package/dist/cjs/api/postTransactionStatus.cjs +3 -3
  16. package/dist/cjs/chunk-3M7YYWGL.cjs +295 -0
  17. package/dist/cjs/{chunk-IE22IVFA.cjs → chunk-46VB6RQK.cjs} +8 -8
  18. package/dist/cjs/{chunk-MW3TE7DC.cjs → chunk-5AYPH3ZR.cjs} +2 -2
  19. package/dist/cjs/{chunk-2CCLIBCC.cjs → chunk-5HDKZVOL.cjs} +2 -2
  20. package/dist/cjs/{chunk-3FYU3BJ7.cjs → chunk-6LA66667.cjs} +126 -16
  21. package/dist/cjs/chunk-7MC3BVQN.cjs +370 -0
  22. package/dist/cjs/{chunk-YYBGBKRE.cjs → chunk-A26H4FVN.cjs} +4 -4
  23. package/dist/cjs/{chunk-P7CDAHIX.cjs → chunk-AXYRULAI.cjs} +2 -2
  24. package/dist/cjs/{chunk-WMXUOVHN.cjs → chunk-DWOE6N5S.cjs} +248 -532
  25. package/dist/cjs/{chunk-7I2KQNIU.cjs → chunk-EJMC4JXF.cjs} +2 -2
  26. package/dist/cjs/{chunk-HKQ5VION.cjs → chunk-ERGJBZUC.cjs} +5 -1
  27. package/dist/cjs/{chunk-J5RC6ZU5.cjs → chunk-FNB244QI.cjs} +6 -6
  28. package/dist/cjs/{chunk-2EKCOIWV.cjs → chunk-IDEJORRT.cjs} +155 -154
  29. package/dist/cjs/{chunk-DBDB2XWX.cjs → chunk-JBKNEFXB.cjs} +3 -3
  30. package/dist/cjs/{chunk-N3LR7KTI.cjs → chunk-KM2D7PJL.cjs} +33 -57
  31. package/dist/cjs/{chunk-XGBCEYWI.cjs → chunk-LHY62HPI.cjs} +2 -2
  32. package/dist/cjs/{chunk-EXK2GDR5.cjs → chunk-LUVMRHAJ.cjs} +2 -2
  33. package/dist/cjs/{chunk-QSISUSYP.cjs → chunk-N4UW74AG.cjs} +4 -4
  34. package/dist/cjs/{chunk-FY56EEFB.cjs → chunk-OZUCMWNE.cjs} +2 -2
  35. package/dist/cjs/{chunk-JTB3SPCH.cjs → chunk-Q43XCBMX.cjs} +6 -6
  36. package/dist/cjs/{chunk-2VQ2TNFM.cjs → chunk-QPM7H2YL.cjs} +2 -2
  37. package/dist/cjs/{chunk-FO25SR66.cjs → chunk-RCGCQD6T.cjs} +6 -6
  38. package/dist/cjs/chunk-VIG2BHYJ.cjs +185 -0
  39. package/dist/cjs/{chunk-DCFIIF7G.cjs → chunk-X5AJHZ2J.cjs} +2 -2
  40. package/dist/cjs/{chunk-SZ64FWGB.cjs → chunk-ZAATXQBG.cjs} +2 -2
  41. package/dist/cjs/{chunk-MCZ3F457.cjs → chunk-ZBPDDVQ2.cjs} +2 -2
  42. package/dist/cjs/{chunk-VGS46RWR.cjs → chunk-ZKBSNSHQ.cjs} +188 -209
  43. package/dist/cjs/index.cjs +57 -51
  44. package/dist/cjs/public-functions/executeRoute.cjs +16 -15
  45. package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +5 -4
  46. package/dist/cjs/public-functions/getFeeInfoForChain.cjs +5 -5
  47. package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +6 -6
  48. package/dist/cjs/public-functions/getSigningStargateClient.cjs +6 -5
  49. package/dist/cjs/public-functions/setApiOptions.cjs +3 -3
  50. package/dist/cjs/public-functions/setClientOptions.cjs +6 -5
  51. package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +26 -0
  52. package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +9 -8
  53. package/dist/cjs/public-functions/waitForTransaction.cjs +5 -5
  54. package/dist/esm/api/getAssets.js +2 -2
  55. package/dist/esm/api/getAssetsBetweenChains.js +2 -2
  56. package/dist/esm/api/getBridges.js +2 -2
  57. package/dist/esm/api/getChains.js +2 -2
  58. package/dist/esm/api/getVenues.js +2 -2
  59. package/dist/esm/api/postAssetsFromSource.js +3 -3
  60. package/dist/esm/api/postBalances.js +2 -2
  61. package/dist/esm/api/postIbcOriginAssets.js +2 -2
  62. package/dist/esm/api/postMessages.js +2 -2
  63. package/dist/esm/api/postMessagesDirect.js +2 -2
  64. package/dist/esm/api/postRecommendAssets.js +2 -2
  65. package/dist/esm/api/postRoute.js +2 -2
  66. package/dist/esm/api/postSubmitTransaction.js +2 -2
  67. package/dist/esm/api/postTrackTransaction.d.ts +2 -1
  68. package/dist/esm/api/postTrackTransaction.js +2 -2
  69. package/dist/esm/api/postTransactionStatus.d.ts +1 -1
  70. package/dist/esm/api/postTransactionStatus.js +2 -2
  71. package/dist/esm/callbacks-B3kjKg0v.d.ts +175 -0
  72. package/dist/esm/chunk-3J6O2PVK.js +180 -0
  73. package/dist/esm/{chunk-SJP6W2SK.js → chunk-3XOGEVJL.js} +1 -1
  74. package/dist/esm/{chunk-ZL6XF5A3.js → chunk-4RLJWCQR.js} +2 -2
  75. package/dist/esm/{chunk-JSY7M43P.js → chunk-52PEBJRQ.js} +1 -1
  76. package/dist/esm/{chunk-7ITTEUMR.js → chunk-7X4ERB3R.js} +1 -1
  77. package/dist/esm/{chunk-LZI7A4JI.js → chunk-A6KSECAH.js} +5 -1
  78. package/dist/esm/{chunk-7LSTJXAF.js → chunk-AND7HVIU.js} +1 -1
  79. package/dist/esm/{chunk-MXCJ2M3K.js → chunk-APRMN34M.js} +1 -1
  80. package/dist/esm/{chunk-6ZLEWCU2.js → chunk-BAJFQZDT.js} +146 -167
  81. package/dist/esm/{chunk-5KIWNRW4.js → chunk-CIAOTO3M.js} +1 -1
  82. package/dist/esm/{chunk-JYUNVL4F.js → chunk-FH2YHZVV.js} +1 -1
  83. package/dist/esm/{chunk-ADUNNC4O.js → chunk-GHNH5QC3.js} +3 -3
  84. package/dist/esm/{chunk-OHV2LZEG.js → chunk-JQ4F4WBG.js} +1 -1
  85. package/dist/esm/{chunk-TV2XPAIF.js → chunk-KNXMSLOB.js} +3 -26
  86. package/dist/esm/{chunk-YLVFZDR5.js → chunk-KYDY7QRT.js} +109 -3
  87. package/dist/esm/{chunk-IWXRHEX4.js → chunk-LHNGF5J2.js} +2 -2
  88. package/dist/esm/{chunk-JIADJKRD.js → chunk-OTS5KO43.js} +1 -1
  89. package/dist/esm/{chunk-CU6W3622.js → chunk-QIS6ILPS.js} +3 -3
  90. package/dist/esm/chunk-QO2CYYF5.js +278 -0
  91. package/dist/esm/{chunk-OL7CWCPB.js → chunk-REWUSU53.js} +4 -3
  92. package/dist/esm/chunk-RQ7DXNSS.js +365 -0
  93. package/dist/esm/{chunk-XXTECZG3.js → chunk-S4RO2LHD.js} +1 -1
  94. package/dist/esm/{chunk-7YN3UVVF.js → chunk-UI3SIFZN.js} +1 -1
  95. package/dist/esm/{chunk-TD63P2AG.js → chunk-UIDIKXMB.js} +65 -340
  96. package/dist/esm/{chunk-HT6O3BQ7.js → chunk-Y2YCODZK.js} +1 -1
  97. package/dist/esm/{chunk-IPHFFTGO.js → chunk-ZI3SYUQH.js} +1 -1
  98. package/dist/esm/{chunk-2L7PKZDY.js → chunk-ZOUYAZU6.js} +1 -1
  99. package/dist/esm/index.d.ts +2 -3
  100. package/dist/esm/index.js +27 -25
  101. package/dist/esm/public-functions/executeRoute.d.ts +7 -76
  102. package/dist/esm/public-functions/executeRoute.js +15 -14
  103. package/dist/esm/public-functions/getCosmosGasAmountForMessage.js +3 -2
  104. package/dist/esm/public-functions/getFeeInfoForChain.js +4 -4
  105. package/dist/esm/public-functions/getRecommendedGasPrice.js +5 -5
  106. package/dist/esm/public-functions/getSigningStargateClient.js +5 -4
  107. package/dist/esm/public-functions/setApiOptions.js +2 -2
  108. package/dist/esm/public-functions/setClientOptions.js +5 -4
  109. package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +12 -0
  110. package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -0
  111. package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +3 -2
  112. package/dist/esm/public-functions/validateCosmosGasBalance.js +8 -7
  113. package/dist/esm/public-functions/waitForTransaction.d.ts +5 -1
  114. package/dist/esm/public-functions/waitForTransaction.js +4 -4
  115. package/package.json +3 -3
  116. package/dist/cjs/chunk-MN763TPC.cjs +0 -187
  117. package/dist/esm/callbacks-CuL50GnB.d.ts +0 -38
  118. package/dist/esm/chunk-VBWLUZXT.js +0 -182
@@ -1,7 +1,7 @@
1
- import { MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgExecute, MsgInitiateTokenDeposit, BaseVestingAccount, Timestamp, toTimestamp, Period, fromTimestamp, isSet, fromJsonTimestamp } from './chunk-TD63P2AG.js';
1
+ import { MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgExecute, MsgInitiateTokenDeposit, BaseVestingAccount, Timestamp, Period } from './chunk-UIDIKXMB.js';
2
+ import { toTimestamp, fromTimestamp, isSet, fromJsonTimestamp } from './chunk-QO2CYYF5.js';
2
3
  import '@cosmjs/stargate';
3
4
  import { toUtf8 } from '@cosmjs/encoding';
4
- import { MsgTransfer as MsgTransfer$1, MsgExecuteContractCompat } from '@injectivelabs/sdk-ts';
5
5
  import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx.js';
6
6
  import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx.js';
7
7
  import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx.js';
@@ -246,29 +246,6 @@ function getEncodeObjectFromCosmosMessage(message) {
246
246
  value: msgJson
247
247
  };
248
248
  }
249
- function getEncodeObjectFromCosmosMessageInjective(message) {
250
- const msgJson = JSON.parse(message.msg ?? "");
251
- if (message.msgTypeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
252
- return MsgTransfer$1.fromJSON({
253
- port: msgJson.source_port,
254
- channelId: msgJson.source_channel,
255
- amount: msgJson.token,
256
- sender: msgJson.sender,
257
- receiver: msgJson.receiver,
258
- timeout: msgJson.timeout_timestamp,
259
- memo: msgJson.memo
260
- });
261
- }
262
- if (message.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract") {
263
- return MsgExecuteContractCompat.fromJSON({
264
- sender: msgJson.sender,
265
- contractAddress: msgJson.contract,
266
- msg: msgJson.msg,
267
- funds: msgJson.funds
268
- });
269
- }
270
- throw new Error("Unsupported message type");
271
- }
272
249
 
273
250
  // src/public-functions/getCosmosGasAmountForMessage.ts
274
251
  var DEFAULT_GAS_MULTIPLIER = 1.5;
@@ -292,4 +269,4 @@ async function getCosmosGasAmountForMessage(client, signerAddress, chainId, mess
292
269
  return Math.ceil(estimatedGasWithBuffer).toFixed(0);
293
270
  }
294
271
 
295
- export { DEFAULT_GAS_MULTIPLIER, getCosmosGasAmountForMessage, getEncodeObjectFromCosmosMessage, getEncodeObjectFromCosmosMessageInjective };
272
+ export { DEFAULT_GAS_MULTIPLIER, getCosmosGasAmountForMessage, getEncodeObjectFromCosmosMessage };
@@ -1,14 +1,15 @@
1
- import { chains, findFirstWorkingEndpoint } from './chunk-VBWLUZXT.js';
2
- import { ClientState } from './chunk-2L7PKZDY.js';
1
+ import { chains, findFirstWorkingEndpoint } from './chunk-3J6O2PVK.js';
2
+ import { BaseAccount as BaseAccount$1, isSet, bytesFromBase64, base64FromBytes } from './chunk-QO2CYYF5.js';
3
+ import { ClientState } from './chunk-ZOUYAZU6.js';
3
4
  import { accountFromAny, SigningStargateClient } from '@cosmjs/stargate';
4
5
  import { assertDefinedAndNotNull } from '@cosmjs/utils';
5
6
  import { BinaryWriter, BinaryReader } from 'cosmjs-types/binary.js';
6
7
  import { BaseAccount } from 'cosmjs-types/cosmos/auth/v1beta1/auth.js';
7
8
  import { Coin } from 'cosmjs-types/cosmos/base/v1beta1/coin.js';
8
9
  import { decodePubkey } from '@cosmjs/proto-signing';
9
- import { accountEthParser } from '@injectivelabs/sdk-ts';
10
10
  import { PubKey } from 'cosmjs-types/cosmos/crypto/secp256k1/keys.js';
11
11
  import { encodeSecp256k1Pubkey } from '@cosmjs/amino';
12
+ import _m0 from 'protobufjs/minimal.js';
12
13
 
13
14
  var createBaseVestingAccount = () => {
14
15
  return {
@@ -168,6 +169,95 @@ var StridePeriodicVestingAccount = {
168
169
  return message;
169
170
  }
170
171
  };
172
+ function createBaseEthAccount() {
173
+ return {
174
+ baseAccount: void 0,
175
+ codeHash: new Uint8Array()
176
+ };
177
+ }
178
+ var EthAccount = {
179
+ typeUrl: "/injective.types.v1beta1.EthAccount",
180
+ encode(message, writer = _m0.Writer.create()) {
181
+ if (message.baseAccount !== void 0) {
182
+ BaseAccount$1.encode(message.baseAccount, writer.uint32(10).fork()).ldelim();
183
+ }
184
+ if (message.codeHash.length !== 0) {
185
+ writer.uint32(18).bytes(message.codeHash);
186
+ }
187
+ return writer;
188
+ },
189
+ decode(input, length) {
190
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
191
+ let end = length === void 0 ? reader.len : reader.pos + length;
192
+ const message = createBaseEthAccount();
193
+ while (reader.pos < end) {
194
+ const tag = reader.uint32();
195
+ switch (tag >>> 3) {
196
+ case 1:
197
+ message.baseAccount = BaseAccount$1.decode(reader, reader.uint32());
198
+ break;
199
+ case 2:
200
+ message.codeHash = reader.bytes();
201
+ break;
202
+ default:
203
+ reader.skipType(tag & 7);
204
+ break;
205
+ }
206
+ }
207
+ return message;
208
+ },
209
+ fromJSON(object) {
210
+ return {
211
+ baseAccount: isSet(object.baseAccount) ? BaseAccount$1.fromJSON(object.baseAccount) : void 0,
212
+ codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array()
213
+ };
214
+ },
215
+ toJSON(message) {
216
+ const obj = {};
217
+ message.baseAccount !== void 0 && (obj.baseAccount = message.baseAccount ? BaseAccount$1.toJSON(message.baseAccount) : void 0);
218
+ message.codeHash !== void 0 && (obj.codeHash = base64FromBytes(message.codeHash !== void 0 ? message.codeHash : new Uint8Array()));
219
+ return obj;
220
+ },
221
+ fromPartial(object) {
222
+ const message = createBaseEthAccount();
223
+ message.baseAccount = object.baseAccount !== void 0 && object.baseAccount !== null ? BaseAccount$1.fromPartial(object.baseAccount) : void 0;
224
+ message.codeHash = object.codeHash ?? new Uint8Array();
225
+ return message;
226
+ },
227
+ fromAmino(object) {
228
+ const message = createBaseEthAccount();
229
+ if (object.base_account !== void 0 && object.base_account !== null) {
230
+ message.baseAccount = BaseAccount$1.fromAmino(object.base_account);
231
+ }
232
+ if (object.code_hash !== void 0 && object.code_hash !== null) {
233
+ message.codeHash = bytesFromBase64(object.code_hash);
234
+ }
235
+ return message;
236
+ },
237
+ toAmino(message) {
238
+ const obj = {};
239
+ obj.base_account = message.baseAccount ? BaseAccount$1.toAmino(message.baseAccount) : void 0;
240
+ obj.code_hash = message.codeHash ? base64FromBytes(message.codeHash) : void 0;
241
+ return obj;
242
+ },
243
+ fromAminoMsg(object) {
244
+ return EthAccount.fromAmino(object.value);
245
+ },
246
+ fromProtoMsg(message) {
247
+ return EthAccount.decode(message.value);
248
+ },
249
+ toProto(message) {
250
+ return EthAccount.encode(message).finish();
251
+ },
252
+ toProtoMsg(message) {
253
+ return {
254
+ typeUrl: "/injective.types.v1beta1.EthAccount",
255
+ value: EthAccount.encode(message).finish()
256
+ };
257
+ }
258
+ };
259
+
260
+ // src/registry.ts
171
261
  var accountParser = (acc) => {
172
262
  switch (acc.typeUrl) {
173
263
  case "/stride.vesting.StridePeriodicVestingAccount": {
@@ -207,6 +297,22 @@ var accountParser = (acc) => {
207
297
  }
208
298
  }
209
299
  };
300
+ var accountEthParser = (ethAccount, pubKeyTypeUrl = "/injective.crypto.v1beta1.ethsecp256k1.PubKey") => {
301
+ const account = EthAccount.decode(
302
+ ethAccount.value
303
+ );
304
+ const baseAccount = account.baseAccount;
305
+ const pubKey = baseAccount.pubKey;
306
+ return {
307
+ address: baseAccount.address,
308
+ pubkey: pubKey ? {
309
+ type: pubKeyTypeUrl,
310
+ value: Buffer.from(pubKey.value).toString("base64")
311
+ } : null,
312
+ accountNumber: parseInt(baseAccount.accountNumber.toString(), 10),
313
+ sequence: parseInt(baseAccount.sequence.toString(), 10)
314
+ };
315
+ };
210
316
 
211
317
  // src/private-functions/getRpcEndpointForChain.ts
212
318
  var getRpcEndpointForChain = async (chainId) => {
@@ -1,5 +1,5 @@
1
- import { transformAssetsMap } from './chunk-2L7PKZDY.js';
2
- import { api } from './chunk-LZI7A4JI.js';
1
+ import { transformAssetsMap } from './chunk-ZOUYAZU6.js';
2
+ import { api } from './chunk-A6KSECAH.js';
3
3
 
4
4
  // src/api/postAssetsFromSource.ts
5
5
  var assetsFromSource = api({
@@ -1,4 +1,4 @@
1
- import { ApiState, api } from './chunk-LZI7A4JI.js';
1
+ import { ApiState, api } from './chunk-A6KSECAH.js';
2
2
 
3
3
  // src/api/postRoute.ts
4
4
  var route = async (request) => {
@@ -1,6 +1,6 @@
1
- import { trackTransaction } from './chunk-7ITTEUMR.js';
2
- import { transactionStatus } from './chunk-MXCJ2M3K.js';
3
- import { wait } from './chunk-LZI7A4JI.js';
1
+ import { trackTransaction } from './chunk-7X4ERB3R.js';
2
+ import { transactionStatus } from './chunk-APRMN34M.js';
3
+ import { wait } from './chunk-A6KSECAH.js';
4
4
 
5
5
  // src/public-functions/waitForTransaction.ts
6
6
  var waitForTransaction = async ({
@@ -0,0 +1,278 @@
1
+ import _m0 from 'protobufjs/minimal.js';
2
+ import Long from 'long';
3
+ export { default as Long } from 'long';
4
+ import { Dec } from '@keplr-wallet/unit';
5
+
6
+ // src/codegen/helpers.ts
7
+ if (_m0.util.Long !== Long) {
8
+ _m0.util.Long = Long;
9
+ _m0.configure();
10
+ }
11
+ var globalThis = (() => {
12
+ if (typeof globalThis !== "undefined") return globalThis;
13
+ if (typeof self !== "undefined") return self;
14
+ if (typeof window !== "undefined") return window;
15
+ if (typeof global !== "undefined") return global;
16
+ throw "Unable to locate global object";
17
+ })();
18
+ var atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
19
+ function bytesFromBase64(b64) {
20
+ const bin = atob(b64);
21
+ const arr = new Uint8Array(bin.length);
22
+ for (let i = 0; i < bin.length; ++i) {
23
+ arr[i] = bin.charCodeAt(i);
24
+ }
25
+ return arr;
26
+ }
27
+ var btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
28
+ function base64FromBytes(arr) {
29
+ const bin = [];
30
+ arr.forEach((byte) => {
31
+ bin.push(String.fromCharCode(byte));
32
+ });
33
+ return btoa(bin.join(""));
34
+ }
35
+ function isSet(value) {
36
+ return value !== null && value !== void 0;
37
+ }
38
+ function toTimestamp(date) {
39
+ const seconds = numberToLong(date.getTime() / 1e3);
40
+ const nanos = date.getTime() % 1e3 * 1e6;
41
+ return {
42
+ seconds,
43
+ nanos
44
+ };
45
+ }
46
+ function fromTimestamp(t) {
47
+ let millis = t.seconds.toNumber() * 1e3;
48
+ millis += t.nanos / 1e6;
49
+ return new Date(millis);
50
+ }
51
+ var timestampFromJSON = (object) => {
52
+ return {
53
+ seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO,
54
+ nanos: isSet(object.nanos) ? Number(object.nanos) : 0
55
+ };
56
+ };
57
+ function fromJsonTimestamp(o) {
58
+ if (o instanceof Date) {
59
+ return toTimestamp(o);
60
+ } else if (typeof o === "string") {
61
+ return toTimestamp(new Date(o));
62
+ } else {
63
+ return timestampFromJSON(o);
64
+ }
65
+ }
66
+ function numberToLong(number) {
67
+ return Long.fromNumber(number);
68
+ }
69
+ function padDecimal(decStr) {
70
+ return decStr ? new Dec(decStr).toString() : decStr;
71
+ }
72
+ function createBaseAny() {
73
+ return {
74
+ $typeUrl: "/google.protobuf.Any",
75
+ typeUrl: "",
76
+ value: new Uint8Array()
77
+ };
78
+ }
79
+ var Any = {
80
+ typeUrl: "/google.protobuf.Any",
81
+ encode(message, writer = _m0.Writer.create()) {
82
+ if (message.typeUrl !== "") {
83
+ writer.uint32(10).string(message.typeUrl);
84
+ }
85
+ if (message.value.length !== 0) {
86
+ writer.uint32(18).bytes(message.value);
87
+ }
88
+ return writer;
89
+ },
90
+ decode(input, length) {
91
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
92
+ let end = length === void 0 ? reader.len : reader.pos + length;
93
+ const message = createBaseAny();
94
+ while (reader.pos < end) {
95
+ const tag = reader.uint32();
96
+ switch (tag >>> 3) {
97
+ case 1:
98
+ message.typeUrl = reader.string();
99
+ break;
100
+ case 2:
101
+ message.value = reader.bytes();
102
+ break;
103
+ default:
104
+ reader.skipType(tag & 7);
105
+ break;
106
+ }
107
+ }
108
+ return message;
109
+ },
110
+ fromJSON(object) {
111
+ return {
112
+ typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",
113
+ value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array()
114
+ };
115
+ },
116
+ toJSON(message) {
117
+ const obj = {};
118
+ message.typeUrl !== void 0 && (obj.typeUrl = message.typeUrl);
119
+ message.value !== void 0 && (obj.value = base64FromBytes(message.value !== void 0 ? message.value : new Uint8Array()));
120
+ return obj;
121
+ },
122
+ fromPartial(object) {
123
+ const message = createBaseAny();
124
+ message.typeUrl = object.typeUrl ?? "";
125
+ message.value = object.value ?? new Uint8Array();
126
+ return message;
127
+ },
128
+ fromAmino(object) {
129
+ return {
130
+ typeUrl: object.type,
131
+ value: object.value
132
+ };
133
+ },
134
+ toAmino(message) {
135
+ const obj = {};
136
+ obj.type = message.typeUrl;
137
+ obj.value = message.value;
138
+ return obj;
139
+ },
140
+ fromAminoMsg(object) {
141
+ return Any.fromAmino(object.value);
142
+ },
143
+ fromProtoMsg(message) {
144
+ return Any.decode(message.value);
145
+ },
146
+ toProto(message) {
147
+ return Any.encode(message).finish();
148
+ },
149
+ toProtoMsg(message) {
150
+ return {
151
+ typeUrl: "/google.protobuf.Any",
152
+ value: Any.encode(message).finish()
153
+ };
154
+ }
155
+ };
156
+ function createBaseBaseAccount() {
157
+ return {
158
+ address: "",
159
+ pubKey: void 0,
160
+ accountNumber: Long.UZERO,
161
+ sequence: Long.UZERO
162
+ };
163
+ }
164
+ var BaseAccount = {
165
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
166
+ encode(message, writer = _m0.Writer.create()) {
167
+ if (message.address !== "") {
168
+ writer.uint32(10).string(message.address);
169
+ }
170
+ if (message.pubKey !== void 0) {
171
+ Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim();
172
+ }
173
+ if (!message.accountNumber.isZero()) {
174
+ writer.uint32(24).uint64(message.accountNumber);
175
+ }
176
+ if (!message.sequence.isZero()) {
177
+ writer.uint32(32).uint64(message.sequence);
178
+ }
179
+ return writer;
180
+ },
181
+ decode(input, length) {
182
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
183
+ let end = length === void 0 ? reader.len : reader.pos + length;
184
+ const message = createBaseBaseAccount();
185
+ while (reader.pos < end) {
186
+ const tag = reader.uint32();
187
+ switch (tag >>> 3) {
188
+ case 1:
189
+ message.address = reader.string();
190
+ break;
191
+ case 2:
192
+ message.pubKey = Any.decode(reader, reader.uint32());
193
+ break;
194
+ case 3:
195
+ message.accountNumber = reader.uint64();
196
+ break;
197
+ case 4:
198
+ message.sequence = reader.uint64();
199
+ break;
200
+ default:
201
+ reader.skipType(tag & 7);
202
+ break;
203
+ }
204
+ }
205
+ return message;
206
+ },
207
+ fromJSON(object) {
208
+ return {
209
+ address: isSet(object.address) ? String(object.address) : "",
210
+ pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : void 0,
211
+ accountNumber: isSet(object.accountNumber) ? Long.fromValue(object.accountNumber) : Long.UZERO,
212
+ sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO
213
+ };
214
+ },
215
+ toJSON(message) {
216
+ const obj = {};
217
+ message.address !== void 0 && (obj.address = message.address);
218
+ message.pubKey !== void 0 && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : void 0);
219
+ message.accountNumber !== void 0 && (obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
220
+ message.sequence !== void 0 && (obj.sequence = (message.sequence || Long.UZERO).toString());
221
+ return obj;
222
+ },
223
+ fromPartial(object) {
224
+ const message = createBaseBaseAccount();
225
+ message.address = object.address ?? "";
226
+ message.pubKey = object.pubKey !== void 0 && object.pubKey !== null ? Any.fromPartial(object.pubKey) : void 0;
227
+ message.accountNumber = object.accountNumber !== void 0 && object.accountNumber !== null ? Long.fromValue(object.accountNumber) : Long.UZERO;
228
+ message.sequence = object.sequence !== void 0 && object.sequence !== null ? Long.fromValue(object.sequence) : Long.UZERO;
229
+ return message;
230
+ },
231
+ fromAmino(object) {
232
+ const message = createBaseBaseAccount();
233
+ if (object.address !== void 0 && object.address !== null) {
234
+ message.address = object.address;
235
+ }
236
+ if (object.pub_key !== void 0 && object.pub_key !== null) {
237
+ message.pubKey = Any.fromAmino(object.pub_key);
238
+ }
239
+ if (object.account_number !== void 0 && object.account_number !== null) {
240
+ message.accountNumber = Long.fromString(object.account_number);
241
+ }
242
+ if (object.sequence !== void 0 && object.sequence !== null) {
243
+ message.sequence = Long.fromString(object.sequence);
244
+ }
245
+ return message;
246
+ },
247
+ toAmino(message) {
248
+ const obj = {};
249
+ obj.address = message.address === "" ? void 0 : message.address;
250
+ obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : void 0;
251
+ obj.account_number = !message.accountNumber.isZero() ? message.accountNumber.toString() : void 0;
252
+ obj.sequence = !message.sequence.isZero() ? message.sequence.toString() : void 0;
253
+ return obj;
254
+ },
255
+ fromAminoMsg(object) {
256
+ return BaseAccount.fromAmino(object.value);
257
+ },
258
+ toAminoMsg(message) {
259
+ return {
260
+ type: "cosmos-sdk/BaseAccount",
261
+ value: BaseAccount.toAmino(message)
262
+ };
263
+ },
264
+ fromProtoMsg(message) {
265
+ return BaseAccount.decode(message.value);
266
+ },
267
+ toProto(message) {
268
+ return BaseAccount.encode(message).finish();
269
+ },
270
+ toProtoMsg(message) {
271
+ return {
272
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
273
+ value: BaseAccount.encode(message).finish()
274
+ };
275
+ }
276
+ };
277
+
278
+ export { BaseAccount, base64FromBytes, bytesFromBase64, fromJsonTimestamp, fromTimestamp, isSet, padDecimal, toTimestamp };
@@ -1,6 +1,7 @@
1
- import { MsgAcceptOwner, MsgAddRemoteTokenMessenger, MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgDisableAttester, MsgEnableAttester, MsgLinkTokenPair, MsgPauseBurningAndMinting, MsgPauseSendingAndReceivingMessages, MsgReceiveMessage, MsgRemoveRemoteTokenMessenger, MsgReplaceDepositForBurn, MsgReplaceMessage, MsgSendMessage, MsgSendMessageWithCaller, MsgUnlinkTokenPair, MsgUnpauseBurningAndMinting, MsgUnpauseSendingAndReceivingMessages, MsgUpdateOwner, MsgUpdateAttesterManager, MsgUpdateTokenController, MsgUpdatePauser, MsgUpdateMaxMessageBodySize, MsgSetMaxBurnAmountPerMessage, MsgUpdateSignatureThreshold, MsgExecute, MsgInitiateTokenDeposit, Coin, isSet, Long, Timestamp, toTimestamp, Period, fromTimestamp, fromJsonTimestamp, padDecimal } from './chunk-TD63P2AG.js';
2
- import { ClientState } from './chunk-2L7PKZDY.js';
3
- import { ApiState, createRequestClient } from './chunk-LZI7A4JI.js';
1
+ import { MsgAcceptOwner, MsgAddRemoteTokenMessenger, MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgDisableAttester, MsgEnableAttester, MsgLinkTokenPair, MsgPauseBurningAndMinting, MsgPauseSendingAndReceivingMessages, MsgReceiveMessage, MsgRemoveRemoteTokenMessenger, MsgReplaceDepositForBurn, MsgReplaceMessage, MsgSendMessage, MsgSendMessageWithCaller, MsgUnlinkTokenPair, MsgUnpauseBurningAndMinting, MsgUnpauseSendingAndReceivingMessages, MsgUpdateOwner, MsgUpdateAttesterManager, MsgUpdateTokenController, MsgUpdatePauser, MsgUpdateMaxMessageBodySize, MsgSetMaxBurnAmountPerMessage, MsgUpdateSignatureThreshold, MsgExecute, MsgInitiateTokenDeposit, Coin, Timestamp, Period } from './chunk-UIDIKXMB.js';
2
+ import { isSet, Long, toTimestamp, fromTimestamp, fromJsonTimestamp, padDecimal } from './chunk-QO2CYYF5.js';
3
+ import { ClientState } from './chunk-ZOUYAZU6.js';
4
+ import { ApiState, createRequestClient } from './chunk-A6KSECAH.js';
4
5
  import { AminoTypes, createDefaultAminoConverters, defaultRegistryTypes } from '@cosmjs/stargate';
5
6
  import { createWasmAminoConverters } from '@cosmjs/cosmwasm-stargate';
6
7
  import { Registry } from '@cosmjs/proto-signing';