@skip-go/client 1.0.0-alpha-4 → 1.0.1-alpha-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/api/getAssets.cjs +15 -0
  2. package/dist/api/getAssets.d.cts +19 -0
  3. package/dist/api/getAssets.js +2 -2
  4. package/dist/api/getAssetsBetweenChains.cjs +11 -0
  5. package/dist/api/getAssetsBetweenChains.d.cts +56 -0
  6. package/dist/api/getAssetsBetweenChains.js +2 -2
  7. package/dist/api/getBridges.cjs +11 -0
  8. package/dist/api/getBridges.d.cts +54 -0
  9. package/dist/api/getBridges.js +2 -2
  10. package/dist/api/getChains.cjs +11 -0
  11. package/dist/api/getChains.d.cts +41 -0
  12. package/dist/api/getChains.js +2 -2
  13. package/dist/api/getVenues.cjs +11 -0
  14. package/dist/api/getVenues.d.cts +13 -0
  15. package/dist/api/getVenues.js +2 -2
  16. package/dist/api/postAssetsFromSource.cjs +12 -0
  17. package/dist/api/postAssetsFromSource.d.cts +13 -0
  18. package/dist/api/postAssetsFromSource.js +3 -3
  19. package/dist/api/postBalances.cjs +11 -0
  20. package/dist/api/postBalances.d.cts +35 -0
  21. package/dist/api/postBalances.js +2 -2
  22. package/dist/api/postIbcOriginAssets.cjs +11 -0
  23. package/dist/api/postIbcOriginAssets.d.cts +32 -0
  24. package/dist/api/postIbcOriginAssets.js +2 -2
  25. package/dist/api/postMessages.cjs +11 -0
  26. package/dist/api/postMessages.d.cts +528 -0
  27. package/dist/api/postMessages.js +2 -2
  28. package/dist/api/postMessagesDirect.cjs +11 -0
  29. package/dist/api/postMessagesDirect.d.cts +568 -0
  30. package/dist/api/postMessagesDirect.js +2 -2
  31. package/dist/api/postRecommendAssets.cjs +11 -0
  32. package/dist/api/postRecommendAssets.d.cts +40 -0
  33. package/dist/api/postRecommendAssets.js +2 -2
  34. package/dist/api/postRoute.cjs +11 -0
  35. package/dist/api/postRoute.d.cts +460 -0
  36. package/dist/api/postRoute.js +2 -2
  37. package/dist/api/postSubmitTransaction.cjs +11 -0
  38. package/dist/api/postSubmitTransaction.d.cts +13 -0
  39. package/dist/api/postSubmitTransaction.js +2 -2
  40. package/dist/api/postTrackTransaction.cjs +11 -0
  41. package/dist/api/postTrackTransaction.d.cts +13 -0
  42. package/dist/api/postTrackTransaction.js +2 -2
  43. package/dist/api/postTransactionStatus.cjs +11 -0
  44. package/dist/api/postTransactionStatus.d.cts +559 -0
  45. package/dist/api/postTransactionStatus.js +2 -2
  46. package/dist/apiState-CdzxTxYd.d.cts +6 -0
  47. package/dist/chunk-32MRDO7V.cjs +12 -0
  48. package/dist/{chunk-MKEROBAQ.js → chunk-33K6EESX.js} +1 -1
  49. package/dist/{chunk-XOC57DJF.js → chunk-3N7XVGLX.js} +2 -2
  50. package/dist/chunk-44PBLFB5.cjs +24 -0
  51. package/dist/{chunk-2H4KT24S.js → chunk-4JJWOILI.js} +1 -1
  52. package/dist/chunk-4R6OCWRR.cjs +1346 -0
  53. package/dist/chunk-5IAEEEOQ.cjs +2251 -0
  54. package/dist/chunk-77ITCT75.cjs +15 -0
  55. package/dist/chunk-7OIZPQJB.cjs +3660 -0
  56. package/dist/chunk-7SK3IFXJ.cjs +188 -0
  57. package/dist/{chunk-HFWTLB35.js → chunk-BQTQJQ5E.js} +1 -1
  58. package/dist/{chunk-44YEAWRJ.js → chunk-BRJDNGYH.js} +1 -1
  59. package/dist/{chunk-Y325PIRY.js → chunk-BRMONS6A.js} +1 -1
  60. package/dist/{chunk-JBPMJE44.js → chunk-C2EDPY6J.js} +1 -1
  61. package/dist/chunk-DAMZSSOH.cjs +12 -0
  62. package/dist/{chunk-EAVQIWH7.js → chunk-DW4U6YI6.js} +1 -1
  63. package/dist/chunk-ED2OY55G.cjs +136 -0
  64. package/dist/{chunk-T3G7MVDN.js → chunk-GARVPN2H.js} +1 -1
  65. package/dist/chunk-HAR3IXDE.cjs +705 -0
  66. package/dist/chunk-ISHM4QWP.cjs +16 -0
  67. package/dist/chunk-J4LI33TK.cjs +95 -0
  68. package/dist/chunk-KDN7RCGP.cjs +13 -0
  69. package/dist/{chunk-QKCJUB43.js → chunk-KNV72XRZ.js} +1 -1
  70. package/dist/chunk-KZOSEIWH.cjs +10 -0
  71. package/dist/chunk-L5V5PASH.cjs +12 -0
  72. package/dist/chunk-LXYLWTNZ.cjs +12 -0
  73. package/dist/{chunk-6SEZNZJY.js → chunk-MGVXJ2U4.js} +1 -1
  74. package/dist/{chunk-XS6XFYYD.js → chunk-MTMPHY3Y.js} +1 -1
  75. package/dist/chunk-PNWIJSMA.cjs +12 -0
  76. package/dist/{chunk-LJ4RFN4L.js → chunk-PRQ2NHRZ.js} +1 -1
  77. package/dist/chunk-RDOSNDAQ.cjs +13 -0
  78. package/dist/{chunk-BQTWTYWD.js → chunk-RDRDFJQE.js} +1 -1
  79. package/dist/{chunk-6MCLH626.js → chunk-RMP3HM5N.js} +2 -2
  80. package/dist/chunk-SFMBRLUS.cjs +18 -0
  81. package/dist/{chunk-6JMGI4N7.js → chunk-SQGWZAUC.js} +2 -2
  82. package/dist/chunk-SW3SEQMJ.cjs +273 -0
  83. package/dist/{chunk-RSUFWUIE.js → chunk-TW77BXMT.js} +1 -1
  84. package/dist/chunk-URLFWBSC.cjs +11 -0
  85. package/dist/chunk-VI7UMBQ7.cjs +12 -0
  86. package/dist/{chunk-6IZXDY7U.js → chunk-VMPFHQ7U.js} +2 -2
  87. package/dist/{chunk-XEDYWBEU.js → chunk-W2U2UOFA.js} +13 -15
  88. package/dist/chunk-WWNTHZ6I.cjs +1812 -0
  89. package/dist/chunk-ZNXE6PUV.cjs +46 -0
  90. package/dist/client-types-qvyKvyFh.d.cts +60 -0
  91. package/dist/executeRoute-BKRpODCc.d.cts +69 -0
  92. package/dist/generateApi-C0amiydg.d.cts +22 -0
  93. package/dist/index.cjs +209 -0
  94. package/dist/index.d.cts +35 -0
  95. package/dist/index.js +21 -21
  96. package/dist/public-functions/executeRoute.cjs +21 -0
  97. package/dist/public-functions/executeRoute.d.cts +9 -0
  98. package/dist/public-functions/executeRoute.js +9 -9
  99. package/dist/public-functions/getFeeInfoForChain.cjs +14 -0
  100. package/dist/public-functions/getFeeInfoForChain.d.cts +9 -0
  101. package/dist/public-functions/getFeeInfoForChain.js +4 -4
  102. package/dist/public-functions/getRecommendedGasPrice.cjs +16 -0
  103. package/dist/public-functions/getRecommendedGasPrice.d.cts +9 -0
  104. package/dist/public-functions/getRecommendedGasPrice.js +5 -5
  105. package/dist/public-functions/getSigningStargateClient.cjs +13 -0
  106. package/dist/public-functions/getSigningStargateClient.d.cts +13 -0
  107. package/dist/public-functions/getSigningStargateClient.js +4 -4
  108. package/dist/public-functions/setApiOptions.cjs +11 -0
  109. package/dist/public-functions/setApiOptions.d.cts +9 -0
  110. package/dist/public-functions/setApiOptions.js +2 -2
  111. package/dist/public-functions/setClientOptions.cjs +13 -0
  112. package/dist/public-functions/setClientOptions.d.cts +9 -0
  113. package/dist/public-functions/setClientOptions.js +3 -3
  114. package/dist/setClientOptions-CT6CHI9I.d.cts +19 -0
  115. package/dist/swaggerTypes-O9-gvCT1.d.cts +1890 -0
  116. package/package.json +2 -34
  117. package/dist/{chunk-66DO7NZD.js → chunk-JTIHU43D.js} +0 -0
  118. package/dist/{chunk-DUCP65HQ.js → chunk-W6TBGBV3.js} +20 -20
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunkED2OY55G_cjs = require('./chunk-ED2OY55G.cjs');
4
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
5
+
6
+ // src/api/postAssetsFromSource.ts
7
+ var assetsFromSource = chunkHAR3IXDE_cjs.api({
8
+ methodName: "getAssetsFromSource",
9
+ method: "post",
10
+ path: "/v2/fungible/assets_from_source",
11
+ transformResponse(response) {
12
+ return chunkED2OY55G_cjs.transformAssetsMap(response.destAssets);
13
+ }
14
+ });
15
+
16
+ exports.assetsFromSource = assetsFromSource;
@@ -0,0 +1,95 @@
1
+ 'use strict';
2
+
3
+ var chunkKZOSEIWH_cjs = require('./chunk-KZOSEIWH.cjs');
4
+ var chunk7SK3IFXJ_cjs = require('./chunk-7SK3IFXJ.cjs');
5
+ var chunkED2OY55G_cjs = require('./chunk-ED2OY55G.cjs');
6
+
7
+ // src/private-functions/getDefaultGasTokenForChain.ts
8
+ var getDefaultGasTokenForChain = async (chainId) => {
9
+ const gasDenom = chunkKZOSEIWH_cjs.DEFAULT_GAS_DENOM_OVERRIDES[chainId];
10
+ if (gasDenom) {
11
+ return gasDenom;
12
+ }
13
+ const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
14
+ if (!chain) {
15
+ return void 0;
16
+ }
17
+ if (!chain.fees) {
18
+ return void 0;
19
+ }
20
+ const stakingTokens = getStakingTokensForChain(chainId);
21
+ if (stakingTokens && stakingTokens.length > 0) {
22
+ const feeAsset = chain.fees.fee_tokens.find(
23
+ (feeToken) => feeToken.denom === stakingTokens[0]?.denom
24
+ );
25
+ if (feeAsset) {
26
+ return feeAsset.denom;
27
+ }
28
+ }
29
+ const nonIBCAsset = chain.fees.fee_tokens.find(
30
+ (token) => !token.denom.startsWith("ibc/") && !token.denom.startsWith("l2/")
31
+ );
32
+ if (nonIBCAsset) {
33
+ return nonIBCAsset.denom;
34
+ }
35
+ const nonL2Asset = chain.fees.fee_tokens.find((token) => !token.denom.startsWith("l2/"));
36
+ if (nonL2Asset) {
37
+ return nonL2Asset.denom;
38
+ }
39
+ return chain.fees.fee_tokens[0]?.denom;
40
+ };
41
+ var getStakingTokensForChain = (chainId) => {
42
+ const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
43
+ if (!chain) {
44
+ throw new Error(
45
+ `getStakingTokensForChain error: failed to find chain id '${chainId}' in registry`
46
+ );
47
+ }
48
+ if (!chain.staking) {
49
+ return void 0;
50
+ }
51
+ return chain.staking.staking_tokens;
52
+ };
53
+
54
+ // src/public-functions/getFeeInfoForChain.ts
55
+ var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
56
+ const skipChains = await chunkED2OY55G_cjs.ClientState.getSkipChains({ apiUrl, apiKey });
57
+ const skipChain = skipChains.find((chain2) => chain2.chainId === chainId);
58
+ if (!skipChain) {
59
+ return void 0;
60
+ }
61
+ const defaultGasToken = await getDefaultGasTokenForChain(chainId);
62
+ if (!defaultGasToken && !skipChain.feeAssets) {
63
+ return void 0;
64
+ }
65
+ const skipFeeInfo = defaultGasToken ? skipChain.feeAssets?.find((skipFee) => skipFee.denom === defaultGasToken) : skipChain.feeAssets?.[0];
66
+ if (!skipFeeInfo && skipChain.feeAssets?.[0]?.gasPrice !== null) {
67
+ return skipChain.feeAssets?.[0];
68
+ }
69
+ if (skipFeeInfo && skipFeeInfo.gasPrice !== null) {
70
+ return skipFeeInfo;
71
+ }
72
+ const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
73
+ if (!chain) {
74
+ return void 0;
75
+ }
76
+ if (!chain.fees) {
77
+ return void 0;
78
+ }
79
+ const registryFeeInfo = chain.fees.fee_tokens.find(
80
+ (feeToken) => feeToken.denom === defaultGasToken
81
+ );
82
+ if (!registryFeeInfo) {
83
+ return void 0;
84
+ }
85
+ return {
86
+ denom: registryFeeInfo.denom,
87
+ gasPrice: {
88
+ low: registryFeeInfo.low_gas_price ? `${registryFeeInfo.low_gas_price}` : "",
89
+ average: registryFeeInfo.average_gas_price ? `${registryFeeInfo.average_gas_price}` : "",
90
+ high: registryFeeInfo.high_gas_price ? `${registryFeeInfo.high_gas_price}` : ""
91
+ }
92
+ };
93
+ };
94
+
95
+ exports.getFeeInfoForChain = getFeeInfoForChain;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/postTrackTransaction.ts
6
+ var trackTransaction = chunkHAR3IXDE_cjs.pollingApi({
7
+ methodName: "trackTransactionV2",
8
+ path: "/v2/tx/track",
9
+ method: "post",
10
+ backoffMultiplier: 2.5
11
+ });
12
+
13
+ exports.trackTransaction = trackTransaction;
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { api } from './chunk-W6TBGBV3.js';
2
2
 
3
3
  // src/api/getBridges.ts
4
4
  var bridges = api({
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ // src/constants/constants.ts
4
+ var DEFAULT_GAS_DENOM_OVERRIDES = {
5
+ "noble-1": "uusdc"
6
+ };
7
+ var GAS_STATION_CHAIN_IDS = ["bbn-test-5", "bbn-1"];
8
+
9
+ exports.DEFAULT_GAS_DENOM_OVERRIDES = DEFAULT_GAS_DENOM_OVERRIDES;
10
+ exports.GAS_STATION_CHAIN_IDS = GAS_STATION_CHAIN_IDS;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/postSubmitTransaction.ts
6
+ var submitTransaction = chunkHAR3IXDE_cjs.api({
7
+ methodName: "submitTransactionV2",
8
+ method: "post",
9
+ path: "/v2/tx/submit"
10
+ });
11
+
12
+ exports.submitTransaction = submitTransaction;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/postMessagesDirect.ts
6
+ var messagesDirect = chunkHAR3IXDE_cjs.api({
7
+ methodName: "getMsgsDirectV2",
8
+ method: "post",
9
+ path: "/v2/fungible/msgs_direct"
10
+ });
11
+
12
+ exports.messagesDirect = messagesDirect;
@@ -1,4 +1,4 @@
1
- import { pollingApi } from './chunk-DUCP65HQ.js';
1
+ import { pollingApi } from './chunk-W6TBGBV3.js';
2
2
 
3
3
  // src/api/postTrackTransaction.ts
4
4
  var trackTransaction = pollingApi({
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { api } from './chunk-W6TBGBV3.js';
2
2
 
3
3
  // src/api/getAssetsBetweenChains.ts
4
4
  var assetsBetweenChains = api({
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/getVenues.ts
6
+ var venues = chunkHAR3IXDE_cjs.api({
7
+ methodName: "getVenues",
8
+ path: "/v2/fungible/venues",
9
+ transformResponse: (response) => response.venues
10
+ });
11
+
12
+ exports.venues = venues;
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { api } from './chunk-W6TBGBV3.js';
2
2
 
3
3
  // src/api/postIbcOriginAssets.ts
4
4
  var ibcOriginAssets = api({
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/postIbcOriginAssets.ts
6
+ var ibcOriginAssets = chunkHAR3IXDE_cjs.api({
7
+ methodName: "getOriginAssets",
8
+ method: "post",
9
+ path: "/v2/fungible/ibc_origin_assets",
10
+ transformResponse: (response) => response.originAssets
11
+ });
12
+
13
+ exports.ibcOriginAssets = ibcOriginAssets;
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { api } from './chunk-W6TBGBV3.js';
2
2
 
3
3
  // src/api/postSubmitTransaction.ts
4
4
  var submitTransaction = api({
@@ -1,5 +1,5 @@
1
- import { transformAssetsMap } from './chunk-Y325PIRY.js';
2
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { transformAssetsMap } from './chunk-BRMONS6A.js';
2
+ import { api } from './chunk-W6TBGBV3.js';
3
3
 
4
4
  // src/api/postAssetsFromSource.ts
5
5
  var assetsFromSource = api({
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/postRoute.ts
6
+ var route = async (request) => {
7
+ const requestWithAffiliateFeeBps = {
8
+ ...request,
9
+ cumulativeAffiliateFeeBps: chunkHAR3IXDE_cjs.ApiState.cumulativeAffiliateFeeBPS
10
+ };
11
+ return chunkHAR3IXDE_cjs.api({
12
+ methodName: "getRouteV2",
13
+ method: "post",
14
+ path: "/v2/fungible/route"
15
+ })(requestWithAffiliateFeeBps);
16
+ };
17
+
18
+ exports.route = route;
@@ -1,6 +1,6 @@
1
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-3OZQ35X3.js';
2
- import { ClientState } from './chunk-Y325PIRY.js';
3
- import { ApiState, createRequestClient } from './chunk-DUCP65HQ.js';
2
+ import { ClientState } from './chunk-BRMONS6A.js';
3
+ import { ApiState, createRequestClient } from './chunk-W6TBGBV3.js';
4
4
  import { AminoTypes, createDefaultAminoConverters, defaultRegistryTypes } from '@cosmjs/stargate';
5
5
  import { createWasmAminoConverters } from '@cosmjs/cosmwasm-stargate/build/modules/wasm/aminomessages';
6
6
  import '@cosmjs/proto-signing';
@@ -0,0 +1,273 @@
1
+ 'use strict';
2
+
3
+ var chunk7SK3IFXJ_cjs = require('./chunk-7SK3IFXJ.cjs');
4
+ var chunkED2OY55G_cjs = require('./chunk-ED2OY55G.cjs');
5
+ var stargate = require('@cosmjs/stargate');
6
+ var utils = require('@cosmjs/utils');
7
+ var binary = require('cosmjs-types/binary');
8
+ var auth = require('cosmjs-types/cosmos/auth/v1beta1/auth');
9
+ var coin = require('cosmjs-types/cosmos/base/v1beta1/coin');
10
+ var protoSigning = require('@cosmjs/proto-signing');
11
+ var sdkTs = require('@injectivelabs/sdk-ts');
12
+ var keys = require('cosmjs-types/cosmos/crypto/secp256k1/keys');
13
+ var amino = require('@cosmjs/amino');
14
+
15
+ var createBaseVestingAccount = () => {
16
+ return {
17
+ // @ts-expect-error
18
+ baseAccount: void 0,
19
+ originalVesting: [],
20
+ delegatedFree: [],
21
+ delegatedVesting: [],
22
+ endTime: BigInt(0)
23
+ };
24
+ };
25
+ var BaseVestingAccount = {
26
+ encode(message, writer = binary.BinaryWriter.create()) {
27
+ if (message.baseAccount !== void 0) {
28
+ auth.BaseAccount.encode(
29
+ message.baseAccount,
30
+ writer.uint32(10).fork()
31
+ ).ldelim();
32
+ }
33
+ for (const v of message.originalVesting) {
34
+ coin.Coin.encode(v, writer.uint32(18).fork()).ldelim();
35
+ }
36
+ for (const v of message.delegatedFree) {
37
+ coin.Coin.encode(v, writer.uint32(26).fork()).ldelim();
38
+ }
39
+ for (const v of message.delegatedVesting) {
40
+ coin.Coin.encode(v, writer.uint32(34).fork()).ldelim();
41
+ }
42
+ if (message.endTime !== BigInt(0)) {
43
+ writer.uint32(40).int64(message.endTime);
44
+ }
45
+ return writer;
46
+ },
47
+ decode(input, length) {
48
+ const reader = input instanceof binary.BinaryReader ? input : new binary.BinaryReader(input);
49
+ const end = length === void 0 ? reader.len : reader.pos + length;
50
+ const message = createBaseVestingAccount();
51
+ while (reader.pos < end) {
52
+ const tag = reader.uint32();
53
+ switch (tag >>> 3) {
54
+ case 1:
55
+ message.baseAccount = auth.BaseAccount.decode(reader, reader.uint32());
56
+ break;
57
+ case 2:
58
+ message.originalVesting.push(coin.Coin.decode(reader, reader.uint32()));
59
+ break;
60
+ case 3:
61
+ message.delegatedFree.push(coin.Coin.decode(reader, reader.uint32()));
62
+ break;
63
+ case 4:
64
+ message.delegatedVesting.push(coin.Coin.decode(reader, reader.uint32()));
65
+ break;
66
+ case 5:
67
+ message.endTime = reader.int64();
68
+ break;
69
+ default:
70
+ reader.skipType(tag & 7);
71
+ break;
72
+ }
73
+ }
74
+ return message;
75
+ }
76
+ };
77
+ function createBasePeriod() {
78
+ return {
79
+ startTime: BigInt(0),
80
+ length: BigInt(0),
81
+ amount: [],
82
+ actionType: 0
83
+ };
84
+ }
85
+ var Period = {
86
+ encode(message, writer = binary.BinaryWriter.create()) {
87
+ if (message.startTime !== BigInt(0)) {
88
+ writer.uint32(8).int64(message.startTime);
89
+ }
90
+ if (message.length !== BigInt(0)) {
91
+ writer.uint32(16).int64(message.length);
92
+ }
93
+ for (const v of message.amount) {
94
+ coin.Coin.encode(v, writer.uint32(26).fork()).ldelim();
95
+ }
96
+ if (message.actionType !== 0) {
97
+ writer.uint32(32).int32(message.actionType);
98
+ }
99
+ return writer;
100
+ },
101
+ decode(input, length) {
102
+ const reader = input instanceof binary.BinaryReader ? input : new binary.BinaryReader(input);
103
+ const end = length === void 0 ? reader.len : reader.pos + length;
104
+ const message = createBasePeriod();
105
+ while (reader.pos < end) {
106
+ const tag = reader.uint32();
107
+ switch (tag >>> 3) {
108
+ case 1:
109
+ message.startTime = reader.int64();
110
+ break;
111
+ case 2:
112
+ message.length = reader.int64();
113
+ break;
114
+ case 3:
115
+ message.amount.push(coin.Coin.decode(reader, reader.uint32()));
116
+ break;
117
+ case 4:
118
+ message.actionType = reader.int32();
119
+ break;
120
+ default:
121
+ reader.skipType(tag & 7);
122
+ break;
123
+ }
124
+ }
125
+ return message;
126
+ }
127
+ };
128
+ function createBaseStridePeriodicVestingAccount() {
129
+ return {
130
+ //eslint-disable-next-line @typescript-eslint/ban-ts-comment
131
+ //@ts-ignore
132
+ baseVestingAccount: void 0,
133
+ vestingPeriods: []
134
+ };
135
+ }
136
+ var StridePeriodicVestingAccount = {
137
+ encode(message, writer = binary.BinaryWriter.create()) {
138
+ if (message.baseVestingAccount !== void 0) {
139
+ BaseVestingAccount.encode(
140
+ message.baseVestingAccount,
141
+ writer.uint32(10).fork()
142
+ ).ldelim();
143
+ }
144
+ for (const v of message.vestingPeriods) {
145
+ Period.encode(v, writer.uint32(26).fork()).ldelim();
146
+ }
147
+ return writer;
148
+ },
149
+ decode(input, length) {
150
+ const reader = input instanceof binary.BinaryReader ? input : new binary.BinaryReader(input);
151
+ const end = length === void 0 ? reader.len : reader.pos + length;
152
+ const message = createBaseStridePeriodicVestingAccount();
153
+ while (reader.pos < end) {
154
+ const tag = reader.uint32();
155
+ switch (tag >>> 3) {
156
+ case 1:
157
+ message.baseVestingAccount = BaseVestingAccount.decode(
158
+ reader,
159
+ reader.uint32()
160
+ );
161
+ break;
162
+ case 3:
163
+ message.vestingPeriods.push(Period.decode(reader, reader.uint32()));
164
+ break;
165
+ default:
166
+ reader.skipType(tag & 7);
167
+ break;
168
+ }
169
+ }
170
+ return message;
171
+ }
172
+ };
173
+ var accountParser = (acc) => {
174
+ switch (acc.typeUrl) {
175
+ case "/stride.vesting.StridePeriodicVestingAccount": {
176
+ const baseAccount = StridePeriodicVestingAccount.decode(acc.value).baseVestingAccount?.baseAccount;
177
+ utils.assertDefinedAndNotNull(baseAccount);
178
+ return {
179
+ address: baseAccount.address,
180
+ pubkey: baseAccount.pubKey ? protoSigning.decodePubkey(baseAccount.pubKey) : null,
181
+ accountNumber: Number(baseAccount.accountNumber),
182
+ sequence: Number(baseAccount.sequence)
183
+ };
184
+ }
185
+ case "/injective.types.v1beta1.EthAccount":
186
+ return sdkTs.accountEthParser(
187
+ acc,
188
+ "/injective.crypto.v1beta1.ethsecp256k1.PubKey"
189
+ );
190
+ case "/ethermint.types.v1.EthAccount":
191
+ return sdkTs.accountEthParser(acc, "/ethermint.crypto.v1.ethsecp256k1.PubKey");
192
+ default: {
193
+ if (acc.typeUrl === "/cosmos.auth.v1beta1.BaseAccount") {
194
+ const { address, pubKey, accountNumber, sequence } = auth.BaseAccount.decode(
195
+ acc.value
196
+ );
197
+ if (pubKey?.typeUrl === "/initia.crypto.v1beta1.ethsecp256k1.PubKey") {
198
+ const { key } = keys.PubKey.decode(pubKey.value);
199
+ const pk = amino.encodeSecp256k1Pubkey(key);
200
+ return {
201
+ address,
202
+ pubkey: pk,
203
+ accountNumber: Number(accountNumber),
204
+ sequence: Number(sequence)
205
+ };
206
+ }
207
+ }
208
+ return stargate.accountFromAny(acc);
209
+ }
210
+ }
211
+ };
212
+
213
+ // src/private-functions/getRpcEndpointForChain.ts
214
+ var getRpcEndpointForChain = async (chainId) => {
215
+ if (chunkED2OY55G_cjs.ClientState.endpointOptions.getRpcEndpointForChain) {
216
+ return chunkED2OY55G_cjs.ClientState.endpointOptions.getRpcEndpointForChain(chainId);
217
+ }
218
+ if (chunkED2OY55G_cjs.ClientState.endpointOptions.endpoints && chunkED2OY55G_cjs.ClientState.endpointOptions.endpoints[chainId]) {
219
+ const endpointOptions = chunkED2OY55G_cjs.ClientState.endpointOptions.endpoints[chainId];
220
+ if (endpointOptions?.rpc) {
221
+ return endpointOptions.rpc;
222
+ }
223
+ }
224
+ console.warn(
225
+ "Warning: You are using unreliable public endpoints. We strongly recommend overriding them via endpointOptions for use beyond development settings."
226
+ );
227
+ const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
228
+ if (!chain) {
229
+ throw new Error(`getRpcEndpointForChain: failed to find chain id '${chainId}' in registry`);
230
+ }
231
+ if (chain.apis?.rpc?.length === 0 || !chain.apis?.rpc) {
232
+ throw new Error(
233
+ `getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
234
+ );
235
+ }
236
+ const endpoints = chain.apis?.rpc?.map((api) => api.address);
237
+ const endpoint = await chunk7SK3IFXJ_cjs.findFirstWorkingEndpoint(endpoints, "rpc");
238
+ if (!endpoint) {
239
+ throw new Error(
240
+ `getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
241
+ );
242
+ }
243
+ return endpoint;
244
+ };
245
+
246
+ // src/public-functions/getSigningStargateClient.ts
247
+ var getSigningStargateClient = async ({
248
+ chainId,
249
+ getOfflineSigner
250
+ }) => {
251
+ if (!getOfflineSigner) {
252
+ throw new Error("'getCosmosSigner' is not provided or configured in skip router");
253
+ }
254
+ if (!chunkED2OY55G_cjs.ClientState.signingStargateClientByChainId?.[chainId]) {
255
+ const [signer, endpoint] = await Promise.all([
256
+ getOfflineSigner(chainId),
257
+ getRpcEndpointForChain(chainId)
258
+ ]);
259
+ chunkED2OY55G_cjs.ClientState.signingStargateClientByChainId[chainId] = await stargate.SigningStargateClient.connectWithSigner(endpoint, signer, {
260
+ aminoTypes: chunkED2OY55G_cjs.ClientState.aminoTypes,
261
+ registry: chunkED2OY55G_cjs.ClientState.registry,
262
+ accountParser
263
+ });
264
+ }
265
+ return {
266
+ stargateClient: chunkED2OY55G_cjs.ClientState.signingStargateClientByChainId[chainId],
267
+ signer: await getOfflineSigner(chainId)
268
+ };
269
+ };
270
+
271
+ exports.accountParser = accountParser;
272
+ exports.getRpcEndpointForChain = getRpcEndpointForChain;
273
+ exports.getSigningStargateClient = getSigningStargateClient;
@@ -1,4 +1,4 @@
1
- import { ApiState, createRequestClient } from './chunk-DUCP65HQ.js';
1
+ import { ApiState, createRequestClient } from './chunk-W6TBGBV3.js';
2
2
 
3
3
  // src/public-functions/setApiOptions.ts
4
4
  var setApiOptions = (options = {}) => {
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/getAssetsBetweenChains.ts
6
+ var assetsBetweenChains = chunkHAR3IXDE_cjs.api({
7
+ methodName: "fungibleAssetsBetweenChainsCreate",
8
+ path: "/v2/fungible/assets_between_chains"
9
+ });
10
+
11
+ exports.assetsBetweenChains = assetsBetweenChains;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
4
+
5
+ // src/api/getBridges.ts
6
+ var bridges = chunkHAR3IXDE_cjs.api({
7
+ methodName: "getBridges",
8
+ path: "/v2/info/bridges",
9
+ transformResponse: (response) => response.bridges
10
+ });
11
+
12
+ exports.bridges = bridges;
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_GAS_DENOM_OVERRIDES } from './chunk-SWYON2RG.js';
2
- import { chains } from './chunk-66DO7NZD.js';
3
- import { ClientState } from './chunk-Y325PIRY.js';
2
+ import { chains } from './chunk-JTIHU43D.js';
3
+ import { ClientState } from './chunk-BRMONS6A.js';
4
4
 
5
5
  // src/private-functions/getDefaultGasTokenForChain.ts
6
6
  var getDefaultGasTokenForChain = async (chainId) => {
@@ -1,32 +1,30 @@
1
1
  import { BigNumber } from './chunk-VQ5SIQWU.js';
2
2
  import { GAS_STATION_CHAIN_IDS } from './chunk-SWYON2RG.js';
3
- import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-XOC57DJF.js';
4
- import { chains, findFirstWorkingEndpoint, getIsEthermint, getIsInitia } from './chunk-66DO7NZD.js';
3
+ import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-3N7XVGLX.js';
4
+ import { chains, findFirstWorkingEndpoint, getIsEthermint, getIsInitia } from './chunk-JTIHU43D.js';
5
5
  import { MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgExecute, MsgInitiateTokenDeposit, BaseVestingAccount, Timestamp, toTimestamp, Period, fromTimestamp, isSet, fromJsonTimestamp } from './chunk-3OZQ35X3.js';
6
- import { messages } from './chunk-EAVQIWH7.js';
7
- import { submitTransaction } from './chunk-BQTWTYWD.js';
8
- import { trackTransaction } from './chunk-6SEZNZJY.js';
9
- import { transactionStatus } from './chunk-MKEROBAQ.js';
10
- import { ClientState, balances } from './chunk-Y325PIRY.js';
11
- import { ApiState, wait, createRequestClient, toCamel } from './chunk-DUCP65HQ.js';
6
+ import { messages } from './chunk-DW4U6YI6.js';
7
+ import { submitTransaction } from './chunk-RDRDFJQE.js';
8
+ import { trackTransaction } from './chunk-MGVXJ2U4.js';
9
+ import { transactionStatus } from './chunk-33K6EESX.js';
10
+ import { ClientState, balances } from './chunk-BRMONS6A.js';
11
+ import { ApiState, wait, createRequestClient, toCamel } from './chunk-W6TBGBV3.js';
12
12
  import { PublicKey, Transaction, Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
13
13
  import { bech32m, bech32 } from 'bech32';
14
14
  import { StargateClient, GasPrice, calculateFee } from '@cosmjs/stargate';
15
- import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
15
+ import { TxRaw as TxRaw$1 } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
16
16
  import { isOfflineDirectSigner } from '@cosmjs/proto-signing/build/signer';
17
- import '@cosmjs/amino/build/signdoc';
18
17
  import { fromBase64 } from '@cosmjs/encoding/build/base64';
19
18
  import { toUtf8, fromBase64 as fromBase64$1, toBase64 } from '@cosmjs/encoding';
20
- import { encodePubkey } from '@cosmjs/proto-signing';
21
19
  import { ChainRestTendermintApi, MsgTransfer as MsgTransfer$1, MsgExecuteContractCompat, createTransactionWithSigners } from '@injectivelabs/sdk-ts';
22
20
  import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx';
23
21
  import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx';
24
22
  import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx';
25
23
  import * as _m0 from 'protobufjs/minimal';
26
24
  import { BigNumberInBase, DEFAULT_BLOCK_TIMEOUT_HEIGHT, DEFAULT_STD_FEE } from '@injectivelabs/utils';
27
- import '@cosmjs/proto-signing/build/registry';
28
25
  import { makeAuthInfoBytes, makeSignDoc } from '@cosmjs/proto-signing/build/signing';
29
26
  import { pubkeyType as pubkeyType$1, makeSignDoc as makeSignDoc$1, encodeSecp256k1Pubkey } from '@cosmjs/amino';
27
+ import { encodePubkey } from '@cosmjs/proto-signing';
30
28
  import { PubKey } from 'cosmjs-types/cosmos/crypto/secp256k1/keys';
31
29
  import { Any } from 'cosmjs-types/google/protobuf/any';
32
30
  import { Int53 } from '@cosmjs/math/build/integers';
@@ -557,7 +555,7 @@ var signCosmosMessageDirect = async (options) => {
557
555
  );
558
556
  const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
559
557
  const { signature, signed } = await signer.signDirect(signerAddress, signDoc);
560
- return TxRaw.fromPartial({
558
+ return TxRaw$1.fromPartial({
561
559
  bodyBytes: signed.bodyBytes,
562
560
  authInfoBytes: signed.authInfoBytes,
563
561
  signatures: [fromBase64(signature.signature)]
@@ -604,7 +602,7 @@ var signCosmosMessageAmino = async (options) => {
604
602
  signed.fee.payer,
605
603
  signMode
606
604
  );
607
- return TxRaw.fromPartial({
605
+ return TxRaw$1.fromPartial({
608
606
  bodyBytes: signedTxBodyBytes,
609
607
  authInfoBytes: signedAuthInfoBytes,
610
608
  signatures: [fromBase64(signature.signature)]
@@ -684,7 +682,7 @@ var executeCosmosTransaction = async ({
684
682
  options?.onTransactionSigned?.({
685
683
  chainId
686
684
  });
687
- const txBytes = TxRaw.encode(rawTx).finish();
685
+ const txBytes = TxRaw$1.encode(rawTx).finish();
688
686
  const txResponse = await stargateClient.broadcastTx(txBytes);
689
687
  return {
690
688
  chainId: tx?.cosmosTx?.chainId ?? "",