@skip-go/client 1.1.5 → 1.1.7

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 (78) hide show
  1. package/dist/api/getAssets.d.ts +1 -1
  2. package/dist/api/getAssets.js +3 -2
  3. package/dist/api/getAssetsBetweenChains.d.ts +1 -1
  4. package/dist/api/getAssetsBetweenChains.js +3 -2
  5. package/dist/api/getBridges.d.ts +1 -1
  6. package/dist/api/getBridges.js +3 -2
  7. package/dist/api/getChains.d.ts +1 -1
  8. package/dist/api/getChains.js +3 -2
  9. package/dist/api/getVenues.js +3 -2
  10. package/dist/api/postAssetsFromSource.d.ts +1 -1
  11. package/dist/api/postAssetsFromSource.js +4 -3
  12. package/dist/api/postBalances.d.ts +2 -2
  13. package/dist/api/postBalances.js +3 -2
  14. package/dist/api/postIbcOriginAssets.js +3 -2
  15. package/dist/api/postMessages.d.ts +6 -473
  16. package/dist/api/postMessages.js +3 -2
  17. package/dist/api/postMessagesDirect.d.ts +5 -1
  18. package/dist/api/postMessagesDirect.js +3 -2
  19. package/dist/api/postRecommendAssets.d.ts +1 -1
  20. package/dist/api/postRecommendAssets.js +3 -2
  21. package/dist/api/postRoute.d.ts +6 -2
  22. package/dist/api/postRoute.js +3 -2
  23. package/dist/api/postSubmit.d.ts +17 -0
  24. package/dist/api/postSubmit.js +3 -0
  25. package/dist/api/postSubmitTransaction.js +3 -2
  26. package/dist/api/postTrackTransaction.js +3 -2
  27. package/dist/api/postTransactionStatus.d.ts +2 -2
  28. package/dist/api/postTransactionStatus.js +3 -2
  29. package/dist/{callbacks-BinMFSvp.d.ts → callbacks-BGRu2Ule.d.ts} +1 -1
  30. package/dist/chunk-25FJ6EBA.js +36 -0
  31. package/dist/{chunk-5KEBJTG2.js → chunk-2LKKFCUM.js} +2 -2
  32. package/dist/{chunk-P7QXKAUS.js → chunk-5WMPFEIQ.js} +1 -1
  33. package/dist/{chunk-FB32UNL7.js → chunk-7QEN4XCJ.js} +18 -321
  34. package/dist/{chunk-3G66QUIR.js → chunk-C4URP37X.js} +1 -1
  35. package/dist/{chunk-VYZE3SLF.js → chunk-CRTTBUO4.js} +1 -1
  36. package/dist/{chunk-WYKGBXPO.js → chunk-DU3RX43W.js} +3 -3
  37. package/dist/chunk-DV3I2S3T.js +181 -0
  38. package/dist/{chunk-KTCDTZCU.js → chunk-GOYJWJEC.js} +1 -1
  39. package/dist/chunk-GV2QOWB4.js +26 -0
  40. package/dist/{chunk-REIPMX4F.js → chunk-IWW34V4S.js} +1 -1
  41. package/dist/{chunk-DQJUP5YB.js → chunk-JZBFAMHE.js} +1 -1
  42. package/dist/{chunk-5G6WVH73.js → chunk-PPUUN7FI.js} +1 -1
  43. package/dist/{chunk-G3DPNB66.js → chunk-RFZBKQ35.js} +1 -1
  44. package/dist/{chunk-LJ5Y4YS2.js → chunk-RYOVQFZO.js} +1 -1
  45. package/dist/{chunk-I5V6BIOW.js → chunk-SYQHTXE7.js} +2 -2
  46. package/dist/{chunk-BYK77RST.js → chunk-T7GKUROO.js} +1 -1
  47. package/dist/chunk-TV2XPAIF.js +295 -0
  48. package/dist/{chunk-KEXKVEVT.js → chunk-U6XZFJW2.js} +1 -1
  49. package/dist/{chunk-SN5GGN5K.js → chunk-UXUJNZOA.js} +1 -181
  50. package/dist/{chunk-GHK24RZZ.js → chunk-VDEYJJZI.js} +2 -2
  51. package/dist/{chunk-ECFSAIIO.js → chunk-VTK34ED6.js} +1 -1
  52. package/dist/chunk-X67P5URV.js +10 -0
  53. package/dist/{chunk-C6EHVJEC.js → chunk-XXJUDZKJ.js} +1 -1
  54. package/dist/{chunk-YKWVCWO4.js → chunk-YMUVYT3O.js} +1 -1
  55. package/dist/{client-types-B_ihV5t6.d.ts → client-types-BkeR6R_z.d.ts} +1 -1
  56. package/dist/{generateApi-CpUxWvEf.d.ts → generateApi-8YPJU-Al.d.ts} +1 -1
  57. package/dist/index.d.ts +11 -5
  58. package/dist/index.js +26 -22
  59. package/dist/public-functions/executeRoute.d.ts +4 -4
  60. package/dist/public-functions/executeRoute.js +15 -11
  61. package/dist/public-functions/getCosmosGasAmountForMessage.d.ts +8 -0
  62. package/dist/public-functions/getCosmosGasAmountForMessage.js +2 -0
  63. package/dist/public-functions/getEvmGasAmountForMessage.d.ts +11 -0
  64. package/dist/public-functions/getEvmGasAmountForMessage.js +2 -0
  65. package/dist/public-functions/getFeeInfoForChain.d.ts +1 -1
  66. package/dist/public-functions/getFeeInfoForChain.js +4 -3
  67. package/dist/public-functions/getRecommendedGasPrice.js +5 -4
  68. package/dist/public-functions/getSigningStargateClient.js +4 -3
  69. package/dist/public-functions/setApiOptions.d.ts +1 -1
  70. package/dist/public-functions/setApiOptions.js +3 -2
  71. package/dist/public-functions/setClientOptions.d.ts +3 -3
  72. package/dist/public-functions/setClientOptions.js +4 -3
  73. package/dist/public-functions/waitForTransaction.d.ts +2 -2
  74. package/dist/public-functions/waitForTransaction.js +5 -4
  75. package/dist/{setClientOptions-C4rwBrB4.d.ts → setClientOptions-CI_7IPLT.d.ts} +1 -1
  76. package/dist/{swaggerTypes-sZ9ALP9m.d.ts → swaggerTypes-CAERZYPb.d.ts} +4 -1
  77. package/package.json +1 -1
  78. package/dist/chunk-27P5BVWA.js +0 -10
@@ -1,6 +1,6 @@
1
- import { J as BridgeType, ap as RoutePriceWarningType, b3 as FeeType } from '../swaggerTypes-sZ9ALP9m.js';
1
+ import { J as BridgeType, ap as RoutePriceWarningType, b3 as FeeType } from '../swaggerTypes-CAERZYPb.js';
2
2
  import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
- import { A as ApiRequest } from '../generateApi-CpUxWvEf.js';
3
+ import { A as ApiRequest } from '../generateApi-8YPJU-Al.js';
4
4
 
5
5
  declare const route: (request: RouteRequest) => Promise<{
6
6
  amountIn: string;
@@ -53,6 +53,8 @@ declare const route: (request: RouteRequest) => Promise<{
53
53
  denomIn?: string | undefined;
54
54
  denomOut?: string | undefined;
55
55
  feeAmount?: string | undefined;
56
+ toChainEntryContractAddress?: string | undefined;
57
+ toChainCallbackContractAddress?: string | undefined;
56
58
  usdFeeAmount?: string | undefined;
57
59
  feeAsset?: {
58
60
  chainId: string;
@@ -263,6 +265,8 @@ declare const route: (request: RouteRequest) => Promise<{
263
265
  denomIn?: string | undefined;
264
266
  denomOut?: string | undefined;
265
267
  feeAmount?: string | undefined;
268
+ toChainEntryContractAddress?: string | undefined;
269
+ toChainCallbackContractAddress?: string | undefined;
266
270
  usdFeeAmount?: string | undefined;
267
271
  feeAsset?: {
268
272
  chainId: string;
@@ -1,2 +1,3 @@
1
- export { route } from '../chunk-3G66QUIR.js';
2
- import '../chunk-SN5GGN5K.js';
1
+ export { route } from '../chunk-C4URP37X.js';
2
+ import '../chunk-DV3I2S3T.js';
3
+ import '../chunk-UXUJNZOA.js';
@@ -0,0 +1,17 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
+ import { A as ApiRequest, a as ApiResponse } from '../generateApi-8YPJU-Al.js';
3
+ import '../swaggerTypes-CAERZYPb.js';
4
+
5
+ declare const submit: (options?: ({
6
+ tx?: string | undefined;
7
+ chainId?: string | undefined;
8
+ } & SkipApiOptions & {
9
+ abortDuplicateRequests?: boolean | undefined;
10
+ }) | undefined) => Promise<{
11
+ txHash?: string | undefined;
12
+ explorerLink?: string | undefined;
13
+ } | undefined>;
14
+ type SubmitRequest = ApiRequest<"submit">;
15
+ type SubmitResponse = ApiResponse<"submit">;
16
+
17
+ export { type SubmitRequest, type SubmitResponse, submit };
@@ -0,0 +1,3 @@
1
+ export { submit } from '../chunk-X67P5URV.js';
2
+ import '../chunk-DV3I2S3T.js';
3
+ import '../chunk-UXUJNZOA.js';
@@ -1,2 +1,3 @@
1
- export { submitTransaction } from '../chunk-VYZE3SLF.js';
2
- import '../chunk-SN5GGN5K.js';
1
+ export { submitTransaction } from '../chunk-CRTTBUO4.js';
2
+ import '../chunk-DV3I2S3T.js';
3
+ import '../chunk-UXUJNZOA.js';
@@ -1,2 +1,3 @@
1
- export { trackTransaction } from '../chunk-BYK77RST.js';
2
- import '../chunk-SN5GGN5K.js';
1
+ export { trackTransaction } from '../chunk-T7GKUROO.js';
2
+ import '../chunk-DV3I2S3T.js';
3
+ import '../chunk-UXUJNZOA.js';
@@ -1,6 +1,6 @@
1
- import { av as StatusErrorType, aJ as TransactionState, al as PacketErrorType, aS as TransferState, k as AxelarTransferState, O as ContractCallWithTokenErrorType, as as SendTokenErrorType, l as AxelarTransferType, p as CCTPTransferState, a8 as HyperlaneTransferState, aO as OPInitTransferState, s as StargateTransferState, w as GoFastTransferState, aP as LayerZeroTransferState } from '../swaggerTypes-sZ9ALP9m.js';
1
+ import { av as StatusErrorType, aJ as TransactionState, al as PacketErrorType, aS as TransferState, k as AxelarTransferState, O as ContractCallWithTokenErrorType, as as SendTokenErrorType, l as AxelarTransferType, p as CCTPTransferState, a8 as HyperlaneTransferState, aO as OPInitTransferState, s as StargateTransferState, w as GoFastTransferState, aP as LayerZeroTransferState } from '../swaggerTypes-CAERZYPb.js';
2
2
  import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
- import { a as ApiResponse } from '../generateApi-CpUxWvEf.js';
3
+ import { a as ApiResponse } from '../generateApi-8YPJU-Al.js';
4
4
 
5
5
  declare const transactionStatus: (params?: ({
6
6
  txHash: string;
@@ -1,2 +1,3 @@
1
- export { transactionStatus } from '../chunk-5G6WVH73.js';
2
- import '../chunk-SN5GGN5K.js';
1
+ export { transactionStatus } from '../chunk-PPUUN7FI.js';
2
+ import '../chunk-DV3I2S3T.js';
3
+ import '../chunk-UXUJNZOA.js';
@@ -1,4 +1,4 @@
1
- import { aU as TransferStatus, T as Erc20Approval } from './swaggerTypes-sZ9ALP9m.js';
1
+ import { aU as TransferStatus, T as Erc20Approval } from './swaggerTypes-CAERZYPb.js';
2
2
 
3
3
  type CallbackStatus = "success" | "error" | "pending" | "completed";
4
4
  type TransactionCallbacks = {
@@ -0,0 +1,36 @@
1
+ import { api } from './chunk-DV3I2S3T.js';
2
+
3
+ // src/utils/filterMessagesRequest.ts
4
+ var filterMessagesRequest = (request) => {
5
+ const messagesRequest = {
6
+ sourceAssetDenom: request.sourceAssetDenom,
7
+ sourceAssetChainId: request.sourceAssetChainId,
8
+ destAssetDenom: request.destAssetDenom,
9
+ destAssetChainId: request.destAssetChainId,
10
+ amountIn: request.amountIn,
11
+ amountOut: request.amountOut,
12
+ addressList: request.addressList,
13
+ operations: request.operations,
14
+ estimatedAmountOut: request.estimatedAmountOut,
15
+ slippageTolerancePercent: request.slippageTolerancePercent,
16
+ timeoutSeconds: request.timeoutSeconds,
17
+ postRouteHandler: request.postRouteHandler,
18
+ chainIdsToAffiliates: request.chainIdsToAffiliates,
19
+ enableGasWarnings: request.enableGasWarnings,
20
+ apiUrl: request.apiUrl,
21
+ apiKey: request.apiKey,
22
+ abortDuplicateRequests: request.abortDuplicateRequests
23
+ };
24
+ return messagesRequest;
25
+ };
26
+
27
+ // src/api/postMessages.ts
28
+ var messages = async (request) => {
29
+ return api({
30
+ methodName: "msgs",
31
+ method: "post",
32
+ path: "/v2/fungible/msgs"
33
+ })(filterMessagesRequest(request));
34
+ };
35
+
36
+ export { messages };
@@ -1,5 +1,5 @@
1
- import { transformAssetsMap } from './chunk-I5V6BIOW.js';
2
- import { api } from './chunk-SN5GGN5K.js';
1
+ import { transformAssetsMap } from './chunk-SYQHTXE7.js';
2
+ import { api } from './chunk-DV3I2S3T.js';
3
3
 
4
4
  // src/api/postAssetsFromSource.ts
5
5
  var assetsFromSource = api({
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-SN5GGN5K.js';
1
+ import { api } from './chunk-DV3I2S3T.js';
2
2
 
3
3
  // src/api/postMessagesDirect.ts
4
4
  var messagesDirect = api({
@@ -1,25 +1,23 @@
1
+ import { waitForTransaction } from './chunk-DU3RX43W.js';
2
+ import { getEncodeObjectFromCosmosMessage, getCosmosGasAmountForMessage, getEncodeObjectFromCosmosMessageInjective } from './chunk-TV2XPAIF.js';
3
+ import { getEVMGasAmountForMessage } from './chunk-GV2QOWB4.js';
1
4
  import { BigNumber } from './chunk-VQ5SIQWU.js';
2
5
  import { GAS_STATION_CHAIN_IDS } from './chunk-SWYON2RG.js';
3
- import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-KTCDTZCU.js';
6
+ import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-GOYJWJEC.js';
4
7
  import { chains, findFirstWorkingEndpoint, getIsEthermint, getIsInitia } from './chunk-36MCR5DZ.js';
5
- import { MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgExecute, MsgInitiateTokenDeposit, BaseVestingAccount, Timestamp, toTimestamp, Period, fromTimestamp, isSet, fromJsonTimestamp } from './chunk-TD63P2AG.js';
6
- import { waitForTransaction } from './chunk-WYKGBXPO.js';
7
- import { messages } from './chunk-27P5BVWA.js';
8
- import { submitTransaction } from './chunk-VYZE3SLF.js';
9
- import { venues } from './chunk-C6EHVJEC.js';
10
- import { ClientState, balances } from './chunk-I5V6BIOW.js';
11
- import { ApiState, wait, createRequestClient, toCamel } from './chunk-SN5GGN5K.js';
8
+ import { messages } from './chunk-25FJ6EBA.js';
9
+ import { submit } from './chunk-X67P5URV.js';
10
+ import { submitTransaction } from './chunk-CRTTBUO4.js';
11
+ import { venues } from './chunk-XXJUDZKJ.js';
12
+ import { ClientState, balances } from './chunk-SYQHTXE7.js';
13
+ import { ApiState, wait, createRequestClient, toCamel } from './chunk-DV3I2S3T.js';
12
14
  import { PublicKey, Transaction, Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
13
15
  import { bech32m, bech32 } from 'bech32';
14
16
  import { StargateClient, GasPrice, calculateFee } from '@cosmjs/stargate';
15
17
  import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx.js';
16
18
  import { isOfflineDirectSigner, makeAuthInfoBytes, makeSignDoc, encodePubkey } from '@cosmjs/proto-signing';
17
- import { fromBase64, toUtf8, toBase64 } from '@cosmjs/encoding';
18
- import { ChainRestTendermintApi, MsgTransfer as MsgTransfer$1, MsgExecuteContractCompat, createTransactionWithSigners } from '@injectivelabs/sdk-ts';
19
- import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx.js';
20
- import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx.js';
21
- import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx.js';
22
- import _m0 from 'protobufjs/minimal.js';
19
+ import { fromBase64, toBase64 } from '@cosmjs/encoding';
20
+ import { ChainRestTendermintApi, createTransactionWithSigners } from '@injectivelabs/sdk-ts';
23
21
  import { BigNumberInBase, DEFAULT_BLOCK_TIMEOUT_HEIGHT, DEFAULT_STD_FEE } from '@injectivelabs/utils';
24
22
  import { pubkeyType as pubkeyType$1, makeSignDoc as makeSignDoc$1, encodeSecp256k1Pubkey } from '@cosmjs/amino';
25
23
  import { PubKey } from 'cosmjs-types/cosmos/crypto/secp256k1/keys.js';
@@ -99,268 +97,6 @@ var getAccountNumberAndSequenceFromDymension = async (address, chainId) => {
99
97
  sequence
100
98
  };
101
99
  };
102
- function createBaseClawbackVestingAccount() {
103
- return {
104
- baseVestingAccount: void 0,
105
- funderAddress: "",
106
- startTime: /* @__PURE__ */ new Date(),
107
- lockupPeriods: [],
108
- vestingPeriods: []
109
- };
110
- }
111
- var ClawbackVestingAccount = {
112
- typeUrl: "/evmos.vesting.v2.ClawbackVestingAccount",
113
- encode(message, writer = _m0.Writer.create()) {
114
- if (message.baseVestingAccount !== void 0) {
115
- BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim();
116
- }
117
- if (message.funderAddress !== "") {
118
- writer.uint32(18).string(message.funderAddress);
119
- }
120
- if (message.startTime !== void 0) {
121
- Timestamp.encode(toTimestamp(message.startTime), writer.uint32(26).fork()).ldelim();
122
- }
123
- for (const v of message.lockupPeriods) {
124
- Period.encode(v, writer.uint32(34).fork()).ldelim();
125
- }
126
- for (const v of message.vestingPeriods) {
127
- Period.encode(v, writer.uint32(42).fork()).ldelim();
128
- }
129
- return writer;
130
- },
131
- decode(input, length) {
132
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
133
- let end = length === void 0 ? reader.len : reader.pos + length;
134
- const message = createBaseClawbackVestingAccount();
135
- while (reader.pos < end) {
136
- const tag = reader.uint32();
137
- switch (tag >>> 3) {
138
- case 1:
139
- message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32());
140
- break;
141
- case 2:
142
- message.funderAddress = reader.string();
143
- break;
144
- case 3:
145
- message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
146
- break;
147
- case 4:
148
- message.lockupPeriods.push(Period.decode(reader, reader.uint32()));
149
- break;
150
- case 5:
151
- message.vestingPeriods.push(Period.decode(reader, reader.uint32()));
152
- break;
153
- default:
154
- reader.skipType(tag & 7);
155
- break;
156
- }
157
- }
158
- return message;
159
- },
160
- fromJSON(object) {
161
- return {
162
- baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : void 0,
163
- funderAddress: isSet(object.funderAddress) ? String(object.funderAddress) : "",
164
- startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : void 0,
165
- lockupPeriods: Array.isArray(object?.lockupPeriods) ? object.lockupPeriods.map((e) => Period.fromJSON(e)) : [],
166
- vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e) => Period.fromJSON(e)) : []
167
- };
168
- },
169
- toJSON(message) {
170
- const obj = {};
171
- message.baseVestingAccount !== void 0 && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : void 0);
172
- message.funderAddress !== void 0 && (obj.funderAddress = message.funderAddress);
173
- message.startTime !== void 0 && (obj.startTime = message.startTime.toISOString());
174
- if (message.lockupPeriods) {
175
- obj.lockupPeriods = message.lockupPeriods.map((e) => e ? Period.toJSON(e) : void 0);
176
- } else {
177
- obj.lockupPeriods = [];
178
- }
179
- if (message.vestingPeriods) {
180
- obj.vestingPeriods = message.vestingPeriods.map((e) => e ? Period.toJSON(e) : void 0);
181
- } else {
182
- obj.vestingPeriods = [];
183
- }
184
- return obj;
185
- },
186
- fromPartial(object) {
187
- const message = createBaseClawbackVestingAccount();
188
- message.baseVestingAccount = object.baseVestingAccount !== void 0 && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : void 0;
189
- message.funderAddress = object.funderAddress ?? "";
190
- message.startTime = object.startTime ?? void 0;
191
- message.lockupPeriods = object.lockupPeriods?.map((e) => Period.fromPartial(e)) || [];
192
- message.vestingPeriods = object.vestingPeriods?.map((e) => Period.fromPartial(e)) || [];
193
- return message;
194
- },
195
- fromAmino(object) {
196
- const message = createBaseClawbackVestingAccount();
197
- if (object.base_vesting_account !== void 0 && object.base_vesting_account !== null) {
198
- message.baseVestingAccount = BaseVestingAccount.fromAmino(object.base_vesting_account);
199
- }
200
- if (object.funder_address !== void 0 && object.funder_address !== null) {
201
- message.funderAddress = object.funder_address;
202
- }
203
- if (object.start_time !== void 0 && object.start_time !== null) {
204
- message.startTime = fromTimestamp(Timestamp.fromAmino(object.start_time));
205
- }
206
- message.lockupPeriods = object.lockup_periods?.map((e) => Period.fromAmino(e)) || [];
207
- message.vestingPeriods = object.vesting_periods?.map((e) => Period.fromAmino(e)) || [];
208
- return message;
209
- },
210
- toAmino(message) {
211
- const obj = {};
212
- obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : void 0;
213
- obj.funder_address = message.funderAddress === "" ? void 0 : message.funderAddress;
214
- obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : void 0;
215
- if (message.lockupPeriods) {
216
- obj.lockup_periods = message.lockupPeriods.map((e) => e ? Period.toAmino(e) : void 0);
217
- } else {
218
- obj.lockup_periods = message.lockupPeriods;
219
- }
220
- if (message.vestingPeriods) {
221
- obj.vesting_periods = message.vestingPeriods.map((e) => e ? Period.toAmino(e) : void 0);
222
- } else {
223
- obj.vesting_periods = message.vestingPeriods;
224
- }
225
- return obj;
226
- },
227
- fromAminoMsg(object) {
228
- return ClawbackVestingAccount.fromAmino(object.value);
229
- },
230
- toAminoMsg(message) {
231
- return {
232
- type: "vesting/ClawbackVestingAccount",
233
- value: ClawbackVestingAccount.toAmino(message)
234
- };
235
- },
236
- fromProtoMsg(message) {
237
- return ClawbackVestingAccount.decode(message.value);
238
- },
239
- toProto(message) {
240
- return ClawbackVestingAccount.encode(message).finish();
241
- },
242
- toProtoMsg(message) {
243
- return {
244
- typeUrl: "/evmos.vesting.v2.ClawbackVestingAccount",
245
- value: ClawbackVestingAccount.encode(message).finish()
246
- };
247
- }
248
- };
249
-
250
- // src/private-functions/cosmos/getEncodeObjectFromCosmosMessage.ts
251
- function getEncodeObjectFromCosmosMessage(message) {
252
- const msgJson = JSON.parse(message.msg ?? "");
253
- if (message.msgTypeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
254
- return {
255
- typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
256
- value: MsgTransfer.fromJSON({
257
- sourcePort: msgJson.source_port,
258
- sourceChannel: msgJson.source_channel,
259
- token: msgJson.token,
260
- sender: msgJson.sender,
261
- receiver: msgJson.receiver,
262
- timeoutHeight: msgJson.timeout_height,
263
- timeoutTimestamp: msgJson.timeout_timestamp,
264
- memo: msgJson.memo
265
- })
266
- };
267
- }
268
- if (message.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract") {
269
- return {
270
- typeUrl: message.msgTypeUrl,
271
- value: MsgExecuteContract.fromPartial({
272
- sender: msgJson.sender,
273
- contract: msgJson.contract,
274
- msg: toUtf8(JSON.stringify(msgJson.msg)),
275
- funds: msgJson.funds
276
- })
277
- };
278
- }
279
- if (message.msgTypeUrl === "/cosmos.bank.v1beta1.MsgSend") {
280
- return {
281
- typeUrl: message.msgTypeUrl,
282
- value: MsgSend.fromPartial({
283
- fromAddress: msgJson.from_address,
284
- toAddress: msgJson.to_address,
285
- amount: msgJson.amount
286
- })
287
- };
288
- }
289
- if (message.msgTypeUrl === "/circle.cctp.v1.MsgDepositForBurn") {
290
- return {
291
- typeUrl: message.msgTypeUrl,
292
- value: MsgDepositForBurn.fromAmino(msgJson)
293
- };
294
- }
295
- if (message.msgTypeUrl === "/circle.cctp.v1.MsgDepositForBurnWithCaller") {
296
- return {
297
- typeUrl: message.msgTypeUrl,
298
- value: MsgDepositForBurnWithCaller.fromAmino(msgJson)
299
- };
300
- }
301
- if (message.msgTypeUrl === "/initia.move.v1.MsgExecute") {
302
- return {
303
- typeUrl: message.msgTypeUrl,
304
- value: MsgExecute.fromPartial({
305
- sender: msgJson.sender,
306
- moduleAddress: msgJson.module_address,
307
- moduleName: msgJson.module_name,
308
- functionName: msgJson.function_name,
309
- args: msgJson.args
310
- })
311
- };
312
- }
313
- if (message.msgTypeUrl === "/opinit.ophost.v1.MsgInitiateTokenDeposit") {
314
- return {
315
- typeUrl: message.msgTypeUrl,
316
- value: MsgInitiateTokenDeposit.fromPartial({
317
- sender: msgJson.sender,
318
- to: msgJson.to,
319
- amount: msgJson.amount,
320
- bridgeId: msgJson.bridge_id
321
- })
322
- };
323
- }
324
- if (message.msgTypeUrl === "/evmos.vesting.v2.ClawbackVestingAccount") {
325
- return {
326
- typeUrl: message.msgTypeUrl,
327
- value: ClawbackVestingAccount.fromPartial({
328
- baseVestingAccount: msgJson.base_vesting_account,
329
- funderAddress: msgJson.funder_address,
330
- lockupPeriods: msgJson.lockup_periods,
331
- startTime: msgJson.start_time,
332
- vestingPeriods: msgJson.vesting_periods
333
- })
334
- };
335
- }
336
- return {
337
- typeUrl: message.msgTypeUrl ?? "",
338
- value: msgJson
339
- };
340
- }
341
- function getEncodeObjectFromCosmosMessageInjective(message) {
342
- const msgJson = JSON.parse(message.msg ?? "");
343
- if (message.msgTypeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
344
- return MsgTransfer$1.fromJSON({
345
- port: msgJson.source_port,
346
- channelId: msgJson.source_channel,
347
- amount: msgJson.token,
348
- sender: msgJson.sender,
349
- receiver: msgJson.receiver,
350
- timeout: msgJson.timeout_timestamp,
351
- memo: msgJson.memo
352
- });
353
- }
354
- if (message.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract") {
355
- return MsgExecuteContractCompat.fromJSON({
356
- sender: msgJson.sender,
357
- contractAddress: msgJson.contract,
358
- msg: msgJson.msg,
359
- funds: msgJson.funds
360
- });
361
- }
362
- throw new Error("Unsupported message type");
363
- }
364
100
  function createTransaction({
365
101
  chainId,
366
102
  message,
@@ -679,10 +415,14 @@ var executeCosmosTransaction = async ({
679
415
  chainId
680
416
  });
681
417
  const txBytes = TxRaw.encode(rawTx).finish();
682
- const txResponse = await stargateClient.broadcastTx(txBytes);
418
+ const rawTxBase64 = Buffer.from(txBytes).toString("base64");
419
+ const txResponse = await submit({
420
+ chainId,
421
+ tx: rawTxBase64
422
+ });
683
423
  return {
684
424
  chainId: tx?.cosmosTx?.chainId ?? "",
685
- txHash: txResponse.transactionHash
425
+ txHash: txResponse?.txHash ?? ""
686
426
  };
687
427
  };
688
428
  function createAbi(abi) {
@@ -1046,28 +786,6 @@ var executeSvmTransaction = async (tx, options) => {
1046
786
  }
1047
787
  }
1048
788
  };
1049
- var DEFAULT_GAS_MULTIPLIER = 1.5;
1050
- async function getCosmosGasAmountForMessage(client, signerAddress, chainId, messages2, encodedMsgs, multiplier = DEFAULT_GAS_MULTIPLIER) {
1051
- if (!messages2 && !encodedMsgs) {
1052
- throw new Error("Either message or encodedMsg must be provided");
1053
- }
1054
- const _encodedMsgs = messages2?.map((message) => getEncodeObjectFromCosmosMessage(message));
1055
- encodedMsgs = encodedMsgs || _encodedMsgs;
1056
- if (!encodedMsgs) {
1057
- throw new Error("Either message or encodedMsg must be provided");
1058
- }
1059
- if (chainId.includes("evmos") || chainId.includes("injective") || chainId.includes("dymension") || process?.env.NODE_ENV === "test") {
1060
- if (messages2?.find((i) => i.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract")) {
1061
- return "2400000";
1062
- }
1063
- return "280000";
1064
- }
1065
- const estimatedGas = await client.simulate(signerAddress, encodedMsgs, "");
1066
- const estimatedGasWithBuffer = estimatedGas * multiplier;
1067
- return Math.ceil(estimatedGasWithBuffer).toFixed(0);
1068
- }
1069
-
1070
- // src/private-functions/cosmos/validateCosmosGasBalance.ts
1071
789
  var validateCosmosGasBalance = async ({
1072
790
  chainId,
1073
791
  signerAddress,
@@ -1300,27 +1018,6 @@ var validateEvmTokenApproval = async ({
1300
1018
  }
1301
1019
  }
1302
1020
  };
1303
- async function getEVMGasAmountForMessage(signer, tx, getFallbackGasAmount) {
1304
- const { to, data, value } = tx;
1305
- if (!signer.account) throw new Error("estimateGasForEvmTx: No account found");
1306
- const extendedSigner = signer.extend(publicActions);
1307
- const fee = await extendedSigner.estimateFeesPerGas();
1308
- try {
1309
- const gasAmount = await extendedSigner.estimateGas({
1310
- account: signer.account,
1311
- to,
1312
- data: `0x${data}`,
1313
- value: value === "" ? void 0 : BigInt(value ?? "")
1314
- });
1315
- return gasAmount * fee.maxFeePerGas;
1316
- } catch (error) {
1317
- const fallbackGasAmount = await getFallbackGasAmount?.(tx.chainId ?? "", "evm" /* Evm */);
1318
- if (fallbackGasAmount) {
1319
- return BigInt(fallbackGasAmount) * fee.maxFeePerGas;
1320
- }
1321
- throw error;
1322
- }
1323
- }
1324
1021
 
1325
1022
  // src/private-functions/evm/validateEvmGasBalance.ts
1326
1023
  var validateEvmGasBalance = async ({
@@ -1,4 +1,4 @@
1
- import { ApiState, api } from './chunk-SN5GGN5K.js';
1
+ import { ApiState, api } from './chunk-DV3I2S3T.js';
2
2
 
3
3
  // src/api/postRoute.ts
4
4
  var route = async (request) => {
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-SN5GGN5K.js';
1
+ import { api } from './chunk-DV3I2S3T.js';
2
2
 
3
3
  // src/api/postSubmitTransaction.ts
4
4
  var submitTransaction = api({
@@ -1,6 +1,6 @@
1
- import { trackTransaction } from './chunk-BYK77RST.js';
2
- import { transactionStatus } from './chunk-5G6WVH73.js';
3
- import { wait } from './chunk-SN5GGN5K.js';
1
+ import { transactionStatus } from './chunk-PPUUN7FI.js';
2
+ import { trackTransaction } from './chunk-T7GKUROO.js';
3
+ import { wait } from './chunk-DV3I2S3T.js';
4
4
 
5
5
  // src/public-functions/waitForTransaction.ts
6
6
  var waitForTransaction = async ({