@skip-go/client 1.5.3 → 1.5.4
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.
- package/dist/cjs/api/getAssets.cjs +4 -4
- package/dist/cjs/api/getAssetsBetweenChains.cjs +3 -3
- package/dist/cjs/api/getBridges.cjs +3 -3
- package/dist/cjs/api/getChains.cjs +3 -3
- package/dist/cjs/api/getVenues.cjs +3 -3
- package/dist/cjs/api/postAssetsFromSource.cjs +4 -4
- package/dist/cjs/api/postBalances.cjs +3 -3
- package/dist/cjs/api/postIbcOriginAssets.cjs +3 -3
- package/dist/cjs/api/postMessages.cjs +3 -3
- package/dist/cjs/api/postMessagesDirect.cjs +3 -3
- package/dist/cjs/api/postRecommendAssets.cjs +3 -3
- package/dist/cjs/api/postRoute.cjs +3 -3
- package/dist/cjs/api/postSubmitTransaction.cjs +3 -3
- package/dist/cjs/api/postTrackTransaction.cjs +3 -3
- package/dist/cjs/api/postTransactionStatus.cjs +3 -3
- package/dist/cjs/{chunk-HFEMNOJS.cjs → chunk-2QPPD3BB.cjs} +3 -0
- package/dist/cjs/{chunk-7SZZBUBD.cjs → chunk-2SA3OAIJ.cjs} +3 -3
- package/dist/cjs/{chunk-DAPPFYGA.cjs → chunk-3RPOC3AX.cjs} +6 -6
- package/dist/cjs/chunk-4BWE7SOV.cjs +68 -0
- package/dist/cjs/{chunk-FF5UWES6.cjs → chunk-4GHUZDDP.cjs} +4 -4
- package/dist/cjs/{chunk-BT6HQNBF.cjs → chunk-5JS6DMVZ.cjs} +14 -14
- package/dist/cjs/{chunk-ND7SYSAP.cjs → chunk-5KWNKICM.cjs} +2 -2
- package/dist/cjs/{chunk-BFA7XKVT.cjs → chunk-67WZP4PA.cjs} +52 -52
- package/dist/cjs/{chunk-QWQVTCKP.cjs → chunk-7CFJPJJ2.cjs} +10 -10
- package/dist/cjs/{chunk-4RLEZ5DV.cjs → chunk-7HDLYDAS.cjs} +10 -10
- package/dist/cjs/{chunk-AW6IQ7JH.cjs → chunk-A5S6SIYN.cjs} +2 -2
- package/dist/cjs/{chunk-ZBJZTBIW.cjs → chunk-ASDMDYTC.cjs} +2 -2
- package/dist/cjs/{chunk-QAHHTQ7V.cjs → chunk-ATW6UNT5.cjs} +4 -4
- package/dist/cjs/{chunk-PLO5CVGN.cjs → chunk-AUTOIM57.cjs} +2 -2
- package/dist/cjs/{chunk-KWH6S7PB.cjs → chunk-CK6CQWQU.cjs} +6 -6
- package/dist/cjs/{chunk-GOQK63JP.cjs → chunk-EGFH6FEG.cjs} +2 -2
- package/dist/cjs/{chunk-T5EGKQAT.cjs → chunk-FCTBCHOT.cjs} +2 -2
- package/dist/cjs/{chunk-S3BKLN4L.cjs → chunk-IJIBMN2F.cjs} +2 -2
- package/dist/cjs/{chunk-262HFM6V.cjs → chunk-JRXPJ45U.cjs} +2 -2
- package/dist/cjs/{chunk-3NHW3XWK.cjs → chunk-NCFH5MGF.cjs} +2 -2
- package/dist/cjs/{chunk-4MV4GLIA.cjs → chunk-OJISEAMX.cjs} +2 -2
- package/dist/cjs/{chunk-JWWJIJUE.cjs → chunk-PDNKS5R2.cjs} +2 -2
- package/dist/cjs/{chunk-RBM66GW6.cjs → chunk-UXW4XVHF.cjs} +2 -2
- package/dist/cjs/{chunk-3UPZIINE.cjs → chunk-VEEDEDME.cjs} +6 -6
- package/dist/cjs/{chunk-U2NZCNKX.cjs → chunk-WRTBZRHG.cjs} +8 -8
- package/dist/cjs/{chunk-BCX2D6TE.cjs → chunk-ZHV4J6EM.cjs} +55 -23
- package/dist/cjs/index.cjs +81 -77
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +13 -13
- package/dist/cjs/public-functions/executeRoute.cjs +13 -13
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +4 -4
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +5 -5
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +27 -27
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +4 -4
- package/dist/cjs/public-functions/setApiOptions.cjs +3 -3
- package/dist/cjs/public-functions/setClientOptions.cjs +4 -4
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +8 -8
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +5 -5
- package/dist/cjs/public-functions/waitForTransaction.cjs +9 -5
- package/dist/esm/api/getAssets.d.ts +1 -1
- package/dist/esm/api/getAssets.js +2 -2
- package/dist/esm/api/getAssetsBetweenChains.d.ts +1 -1
- package/dist/esm/api/getAssetsBetweenChains.js +2 -2
- package/dist/esm/api/getBridges.d.ts +1 -1
- package/dist/esm/api/getBridges.js +2 -2
- package/dist/esm/api/getChains.d.ts +1 -1
- package/dist/esm/api/getChains.js +2 -2
- package/dist/esm/api/getVenues.js +2 -2
- package/dist/esm/api/postAssetsFromSource.d.ts +1 -1
- package/dist/esm/api/postAssetsFromSource.js +3 -3
- package/dist/esm/api/postBalances.d.ts +2 -2
- package/dist/esm/api/postBalances.js +2 -2
- package/dist/esm/api/postIbcOriginAssets.js +2 -2
- package/dist/esm/api/postMessages.d.ts +2 -2
- package/dist/esm/api/postMessages.js +2 -2
- package/dist/esm/api/postMessagesDirect.d.ts +1 -1
- package/dist/esm/api/postMessagesDirect.js +2 -2
- package/dist/esm/api/postRecommendAssets.d.ts +1 -1
- package/dist/esm/api/postRecommendAssets.js +2 -2
- package/dist/esm/api/postRoute.d.ts +2 -2
- package/dist/esm/api/postRoute.js +2 -2
- package/dist/esm/api/postSubmitTransaction.d.ts +2 -2
- package/dist/esm/api/postSubmitTransaction.js +2 -2
- package/dist/esm/api/postTrackTransaction.d.ts +2 -2
- package/dist/esm/api/postTrackTransaction.js +2 -2
- package/dist/esm/api/postTransactionStatus.d.ts +72 -68
- package/dist/esm/api/postTransactionStatus.js +2 -2
- package/dist/esm/{callbacks-CJ_p70xa.d.ts → callbacks-CZNSHCBb.d.ts} +5 -5
- package/dist/esm/{chunk-BBEFB277.js → chunk-22LYQHMA.js} +4 -4
- package/dist/esm/{chunk-YLVUKXLR.js → chunk-3JHLVPRG.js} +1 -1
- package/dist/esm/{chunk-426BGQ4K.js → chunk-763YPOJQ.js} +2 -2
- package/dist/esm/{chunk-SA4GETWP.js → chunk-7OHBD7I6.js} +5 -5
- package/dist/esm/{chunk-FNTPI2AV.js → chunk-A5NZMSTI.js} +1 -1
- package/dist/esm/{chunk-QYIZGNWZ.js → chunk-BJKCMEMJ.js} +1 -1
- package/dist/esm/chunk-E4NRDAVO.js +65 -0
- package/dist/esm/{chunk-HDW6XFWX.js → chunk-ETBJVFQP.js} +1 -1
- package/dist/esm/{chunk-VGCTTJO7.js → chunk-F66EKL3W.js} +3 -0
- package/dist/esm/{chunk-HZVXNDMH.js → chunk-G63PICMU.js} +1 -1
- package/dist/esm/{chunk-RFJYCJK4.js → chunk-HNU2Y3JI.js} +1 -1
- package/dist/esm/{chunk-MYGJGC62.js → chunk-J24LYWJE.js} +1 -1
- package/dist/esm/{chunk-H2TTIB5K.js → chunk-KXS5UH7E.js} +2 -2
- package/dist/esm/{chunk-VWOMKMH2.js → chunk-KZKAL5ZN.js} +1 -1
- package/dist/esm/{chunk-L233BZ4I.js → chunk-LAGER3PR.js} +7 -7
- package/dist/esm/{chunk-3WFXBPS2.js → chunk-N4PTRCNT.js} +1 -1
- package/dist/esm/{chunk-IHSSWY3M.js → chunk-P36PE4CR.js} +1 -1
- package/dist/esm/{chunk-UBVBVJPY.js → chunk-QYXGDTUU.js} +1 -1
- package/dist/esm/{chunk-AUNRER4I.js → chunk-SXBG57J3.js} +1 -1
- package/dist/esm/{chunk-HELQO7PA.js → chunk-TGTOO2ZQ.js} +2 -2
- package/dist/esm/{chunk-LBS7KX5I.js → chunk-TON3V7SK.js} +2 -2
- package/dist/esm/{chunk-KXQ2ASHQ.js → chunk-UHCKOKBM.js} +1 -1
- package/dist/esm/{chunk-YGQ4NKTM.js → chunk-UN46DUOV.js} +1 -1
- package/dist/esm/{chunk-GLM7QWYT.js → chunk-VMEHGKH7.js} +1 -1
- package/dist/esm/{chunk-5IXH2QPF.js → chunk-WRPS6WK2.js} +52 -20
- package/dist/esm/{chunk-44IX6KPJ.js → chunk-XNU3TKKM.js} +1 -1
- package/dist/esm/{client-types-uXKJQRqe.d.ts → client-types-BX_0924O.d.ts} +1 -1
- package/dist/esm/{generateApi-BMFrG4FZ.d.ts → generateApi-Clc85Kxw.d.ts} +1 -1
- package/dist/esm/index.d.ts +9 -7
- package/dist/esm/index.js +26 -26
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +4 -4
- package/dist/esm/public-functions/executeMultipleRoutes.js +12 -12
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +12 -12
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +1 -1
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +3 -3
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.js +3 -3
- package/dist/esm/public-functions/getRecommendedGasPrice.js +4 -4
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +1 -1
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +26 -26
- package/dist/esm/public-functions/getSigningStargateClient.js +3 -3
- package/dist/esm/public-functions/setApiOptions.d.ts +1 -1
- package/dist/esm/public-functions/setApiOptions.js +2 -2
- package/dist/esm/public-functions/setClientOptions.d.ts +4 -4
- package/dist/esm/public-functions/setClientOptions.js +3 -3
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.js +4 -4
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +4 -4
- package/dist/esm/public-functions/validateCosmosGasBalance.js +4 -4
- package/dist/esm/public-functions/waitForTransaction.d.ts +712 -74
- package/dist/esm/public-functions/waitForTransaction.js +4 -4
- package/dist/esm/{setClientOptions-D1qgaOqC.d.ts → setClientOptions-DD5Mzkw_.d.ts} +3 -3
- package/dist/esm/{swaggerTypes-Cop47I0X.d.ts → swaggerTypes-Dr4I6vW2.d.ts} +3 -1
- package/package.json +1 -1
- package/dist/cjs/chunk-4NGHNHAS.cjs +0 -46
- package/dist/esm/chunk-TNIGHYH2.js +0 -44
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZHV4J6EM_cjs = require('./chunk-ZHV4J6EM.cjs');
|
|
4
|
+
var chunk3RPOC3AX_cjs = require('./chunk-3RPOC3AX.cjs');
|
|
5
5
|
var chunk4TBONPD6_cjs = require('./chunk-4TBONPD6.cjs');
|
|
6
6
|
var chunkF3EB2AQG_cjs = require('./chunk-F3EB2AQG.cjs');
|
|
7
7
|
var chunk6W2OIU3O_cjs = require('./chunk-6W2OIU3O.cjs');
|
|
8
8
|
var chunkKZOSEIWH_cjs = require('./chunk-KZOSEIWH.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunk7CFJPJJ2_cjs = require('./chunk-7CFJPJJ2.cjs');
|
|
10
10
|
var chunkUMBMSRZZ_cjs = require('./chunk-UMBMSRZZ.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
11
|
+
var chunkJRXPJ45U_cjs = require('./chunk-JRXPJ45U.cjs');
|
|
12
|
+
var chunkFCTBCHOT_cjs = require('./chunk-FCTBCHOT.cjs');
|
|
13
|
+
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
14
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
15
15
|
var stargate = require('@cosmjs/stargate');
|
|
16
16
|
var tx_js = require('cosmjs-types/cosmos/tx/v1beta1/tx.js');
|
|
17
17
|
var protoSigning = require('@cosmjs/proto-signing');
|
|
@@ -27,11 +27,11 @@ var bech32 = require('bech32');
|
|
|
27
27
|
|
|
28
28
|
// src/private-functions/getRestEndpointForChain.ts
|
|
29
29
|
var getRestEndpointForChain = async (chainId) => {
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
30
|
+
if (chunkATW6UNT5_cjs.ClientState.endpointOptions.getRestEndpointForChain) {
|
|
31
|
+
return chunkATW6UNT5_cjs.ClientState.endpointOptions.getRestEndpointForChain(chainId);
|
|
32
32
|
}
|
|
33
|
-
if (
|
|
34
|
-
const endpointOptions =
|
|
33
|
+
if (chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints && chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints[chainId]) {
|
|
34
|
+
const endpointOptions = chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints[chainId];
|
|
35
35
|
if (endpointOptions?.rest) {
|
|
36
36
|
return endpointOptions.rest;
|
|
37
37
|
}
|
|
@@ -62,9 +62,9 @@ var getAccountNumberAndSequence = async (address, chainId) => {
|
|
|
62
62
|
if (chainId.includes("dymension")) {
|
|
63
63
|
return getAccountNumberAndSequenceFromDymension(address, chainId);
|
|
64
64
|
}
|
|
65
|
-
const endpoint = await
|
|
66
|
-
const client =
|
|
67
|
-
accountParser:
|
|
65
|
+
const endpoint = await chunk7CFJPJJ2_cjs.getRpcEndpointForChain(chainId);
|
|
66
|
+
const client = chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId] ?? await stargate.StargateClient.connect(endpoint, {
|
|
67
|
+
accountParser: chunk7CFJPJJ2_cjs.accountParser
|
|
68
68
|
});
|
|
69
69
|
const account = await client.getAccount(address);
|
|
70
70
|
if (!account) {
|
|
@@ -90,7 +90,7 @@ var getAccountNumberAndSequenceFromDymension = async (address, chainId) => {
|
|
|
90
90
|
throw new Error(`Failed to fetch account data: ${res.statusText}`);
|
|
91
91
|
}
|
|
92
92
|
const jsonResponse = await res.json();
|
|
93
|
-
const response =
|
|
93
|
+
const response = chunk2QPPD3BB_cjs.toCamel(jsonResponse);
|
|
94
94
|
let sequence = 0;
|
|
95
95
|
let accountNumber = 0;
|
|
96
96
|
if (response.account.baseAccount) {
|
|
@@ -180,7 +180,7 @@ var signCosmosMessageDirect = async (options) => {
|
|
|
180
180
|
messages
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
|
-
const txBodyBytes =
|
|
183
|
+
const txBodyBytes = chunkATW6UNT5_cjs.ClientState.registry.encode(txBodyEncodeObject);
|
|
184
184
|
const gasLimit = math.Int53.fromString(fee.gas).toNumber();
|
|
185
185
|
const pubkeyAny = makePubkeyAnyFromAccount(accountFromSigner, chainId);
|
|
186
186
|
const authInfoBytes = protoSigning.makeAuthInfoBytes(
|
|
@@ -220,7 +220,7 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
220
220
|
(cosmosMsg) => chunk4TBONPD6_cjs.getEncodeObjectFromCosmosMessage(cosmosMsg)
|
|
221
221
|
);
|
|
222
222
|
const signMode = signing_js.SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
223
|
-
const msgs = messages.map((msg) =>
|
|
223
|
+
const msgs = messages.map((msg) => chunkATW6UNT5_cjs.ClientState.aminoTypes.toAmino(msg));
|
|
224
224
|
const signDoc = amino.makeSignDoc(
|
|
225
225
|
msgs,
|
|
226
226
|
fee,
|
|
@@ -231,7 +231,7 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
231
231
|
);
|
|
232
232
|
const { signature, signed } = await signer.signAmino(signerAddress, signDoc);
|
|
233
233
|
const signedTxBody = {
|
|
234
|
-
messages: signed.msgs.map((msg) =>
|
|
234
|
+
messages: signed.msgs.map((msg) => chunkATW6UNT5_cjs.ClientState.aminoTypes.fromAmino(msg)),
|
|
235
235
|
memo: signed.memo
|
|
236
236
|
};
|
|
237
237
|
signedTxBody.messages[0].value.memo = messages[0].value.memo;
|
|
@@ -239,7 +239,7 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
239
239
|
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
240
240
|
value: signedTxBody
|
|
241
241
|
};
|
|
242
|
-
const signedTxBodyBytes =
|
|
242
|
+
const signedTxBodyBytes = chunkATW6UNT5_cjs.ClientState.registry.encode(
|
|
243
243
|
signedTxBodyEncodeObject
|
|
244
244
|
);
|
|
245
245
|
const signedGasLimit = math.Int53.fromString(signed.fee.gas).toNumber();
|
|
@@ -274,7 +274,7 @@ var signCosmosTransaction = async ({
|
|
|
274
274
|
const chainId = tx.cosmosTx?.chainId;
|
|
275
275
|
const messages = tx.cosmosTx?.msgs;
|
|
276
276
|
const currentUserAddress = userAddresses.find((x) => x.chainId === tx.cosmosTx?.chainId)?.address;
|
|
277
|
-
const gasArray =
|
|
277
|
+
const gasArray = chunkATW6UNT5_cjs.ClientState.validateGasResults;
|
|
278
278
|
const gas = gasArray?.find((gas2) => gas2?.error !== null && gas2?.error !== void 0);
|
|
279
279
|
if (typeof gas?.error === "string") {
|
|
280
280
|
throw new Error(gas?.error);
|
|
@@ -289,7 +289,7 @@ var signCosmosTransaction = async ({
|
|
|
289
289
|
if (messages === void 0) {
|
|
290
290
|
throw new Error("no messages found for tx");
|
|
291
291
|
}
|
|
292
|
-
const { signer } = await
|
|
292
|
+
const { signer } = await chunk7CFJPJJ2_cjs.getSigningStargateClient({
|
|
293
293
|
chainId,
|
|
294
294
|
getOfflineSigner: options?.getCosmosSigner
|
|
295
295
|
});
|
|
@@ -328,7 +328,7 @@ var signCosmosTransaction = async ({
|
|
|
328
328
|
txIndex: index,
|
|
329
329
|
signerAddress: currentUserAddress
|
|
330
330
|
});
|
|
331
|
-
|
|
331
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
332
332
|
status: "signing",
|
|
333
333
|
routeId,
|
|
334
334
|
options
|
|
@@ -344,7 +344,7 @@ var signCosmosTransaction = async ({
|
|
|
344
344
|
options?.onTransactionSigned?.({
|
|
345
345
|
chainId
|
|
346
346
|
});
|
|
347
|
-
|
|
347
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
348
348
|
status: "pending",
|
|
349
349
|
routeId,
|
|
350
350
|
options
|
|
@@ -371,7 +371,7 @@ var executeCosmosTransaction = async ({
|
|
|
371
371
|
routeId
|
|
372
372
|
});
|
|
373
373
|
const chainId = tx.cosmosTx?.chainId;
|
|
374
|
-
const txResponse = await
|
|
374
|
+
const txResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
375
375
|
chainId,
|
|
376
376
|
tx: rawTxBase64
|
|
377
377
|
});
|
|
@@ -584,7 +584,7 @@ var erc20ABI = /* @__PURE__ */ createAbi([
|
|
|
584
584
|
|
|
585
585
|
// src/private-functions/evm/executeEvmTransaction.ts
|
|
586
586
|
var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
587
|
-
const gasArray =
|
|
587
|
+
const gasArray = chunkATW6UNT5_cjs.ClientState.validateGasResults;
|
|
588
588
|
const gas = gasArray?.find((gas2) => gas2?.error !== null && gas2?.error !== void 0);
|
|
589
589
|
if (typeof gas?.error === "string") {
|
|
590
590
|
throw new Error(gas?.error);
|
|
@@ -630,7 +630,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
630
630
|
status: "pending",
|
|
631
631
|
allowance: requiredApproval
|
|
632
632
|
});
|
|
633
|
-
|
|
633
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
634
634
|
status: "allowance",
|
|
635
635
|
routeId,
|
|
636
636
|
options
|
|
@@ -664,7 +664,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
664
664
|
signerAddress: evmSigner.account.address,
|
|
665
665
|
txIndex: index
|
|
666
666
|
});
|
|
667
|
-
|
|
667
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
668
668
|
status: "signing",
|
|
669
669
|
routeId,
|
|
670
670
|
options
|
|
@@ -676,7 +676,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
676
676
|
chain: evmSigner.chain,
|
|
677
677
|
value: evmTx.value === "" ? void 0 : BigInt(evmTx.value)
|
|
678
678
|
});
|
|
679
|
-
|
|
679
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
680
680
|
status: "pending",
|
|
681
681
|
routeId,
|
|
682
682
|
options
|
|
@@ -695,7 +695,7 @@ var signSvmTransaction = async ({
|
|
|
695
695
|
index,
|
|
696
696
|
routeId
|
|
697
697
|
}) => {
|
|
698
|
-
const gasArray =
|
|
698
|
+
const gasArray = chunkATW6UNT5_cjs.ClientState.validateGasResults;
|
|
699
699
|
if (tx === void 0) {
|
|
700
700
|
throw new Error("executeSvmTransaction error: tx is undefined");
|
|
701
701
|
}
|
|
@@ -732,14 +732,14 @@ var signSvmTransaction = async ({
|
|
|
732
732
|
signerAddress: signer.publicKey?.toBase58(),
|
|
733
733
|
txIndex: index
|
|
734
734
|
});
|
|
735
|
-
|
|
735
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
736
736
|
status: "signing",
|
|
737
737
|
routeId,
|
|
738
738
|
options
|
|
739
739
|
});
|
|
740
740
|
const signedTx = await signer.signTransaction(transaction);
|
|
741
741
|
options?.onTransactionSigned?.({ chainId: svmTx.chainId });
|
|
742
|
-
|
|
742
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
743
743
|
status: "pending",
|
|
744
744
|
routeId,
|
|
745
745
|
options
|
|
@@ -758,10 +758,10 @@ var executeSvmTransaction = async (tx, options, index, routeId) => {
|
|
|
758
758
|
if (!signedTx) {
|
|
759
759
|
throw new Error("executeSvmTransaction error: signedTx is undefined");
|
|
760
760
|
}
|
|
761
|
-
const endpoint = await
|
|
761
|
+
const endpoint = await chunk7CFJPJJ2_cjs.getRpcEndpointForChain(svmTx.chainId);
|
|
762
762
|
const connection = new web3_js.Connection(endpoint);
|
|
763
763
|
let signature;
|
|
764
|
-
const submitTxResponse = await
|
|
764
|
+
const submitTxResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
765
765
|
chainId: svmTx.chainId,
|
|
766
766
|
tx: signedTx.toString("base64")
|
|
767
767
|
});
|
|
@@ -789,13 +789,13 @@ var executeSvmTransaction = async (tx, options, index, routeId) => {
|
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
791
|
if (getStatusCount > 12) {
|
|
792
|
-
await
|
|
792
|
+
await chunk2QPPD3BB_cjs.wait(3e3);
|
|
793
793
|
throw new Error(
|
|
794
794
|
`executeSvmTransaction error: waiting finalized status timed out for ${signature}`
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
797
|
getStatusCount++;
|
|
798
|
-
await
|
|
798
|
+
await chunk2QPPD3BB_cjs.wait(3e3);
|
|
799
799
|
} catch (error) {
|
|
800
800
|
errorCount++;
|
|
801
801
|
if (errorCount > 12) {
|
|
@@ -829,7 +829,7 @@ var validateEvmTokenApproval = async ({
|
|
|
829
829
|
const fee = await extendedSigner.estimateFeesPerGas();
|
|
830
830
|
const allowanceGasFee = BigInt(fee.maxFeePerGas) * BigInt(1e5);
|
|
831
831
|
if (!gasBalance) {
|
|
832
|
-
const chainAssets = (await
|
|
832
|
+
const chainAssets = (await chunkATW6UNT5_cjs.ClientState.getSkipAssets({ chainId: tx.chainId }))[tx.chainId];
|
|
833
833
|
const nativeAsset = chainAssets?.find((x) => x.denom.includes("-native"));
|
|
834
834
|
const zeroAddressAsset = chainAssets?.find(
|
|
835
835
|
(x) => x.denom.toLowerCase() === "0x0000000000000000000000000000000000000000"
|
|
@@ -846,7 +846,7 @@ var validateEvmTokenApproval = async ({
|
|
|
846
846
|
);
|
|
847
847
|
}
|
|
848
848
|
if (chunk6W2OIU3O_cjs.BigNumber(gasBalance.amount).lt(Number(allowanceGasFee))) {
|
|
849
|
-
const chainAssets = (await
|
|
849
|
+
const chainAssets = (await chunkATW6UNT5_cjs.ClientState.getSkipAssets({ chainId: tx.chainId }))[tx.chainId];
|
|
850
850
|
const asset = chainAssets?.find(
|
|
851
851
|
(x) => x.denom.includes("-native") || x.denom.toLowerCase() === "0x0000000000000000000000000000000000000000"
|
|
852
852
|
);
|
|
@@ -895,8 +895,8 @@ var validateEvmGasBalance = async ({
|
|
|
895
895
|
bypassApprovalCheck
|
|
896
896
|
}) => {
|
|
897
897
|
const chainId = tx?.chainId ?? "";
|
|
898
|
-
const skipAssets = (await
|
|
899
|
-
const skipChains = await
|
|
898
|
+
const skipAssets = (await chunkATW6UNT5_cjs.ClientState.getSkipAssets({ chainId }))?.[chainId];
|
|
899
|
+
const skipChains = await chunkATW6UNT5_cjs.ClientState.getSkipChains();
|
|
900
900
|
const chain = skipChains?.find?.((chain2) => chain2.chainId === chainId);
|
|
901
901
|
if (!chain) {
|
|
902
902
|
throw new Error(`failed to find chain for chainId: '${chainId}'`);
|
|
@@ -904,7 +904,7 @@ var validateEvmGasBalance = async ({
|
|
|
904
904
|
if (!signer.account?.address) {
|
|
905
905
|
throw new Error("validateEvmGasBalance: Signer address not found");
|
|
906
906
|
}
|
|
907
|
-
const skipBalances = (await
|
|
907
|
+
const skipBalances = (await chunkATW6UNT5_cjs.balances({
|
|
908
908
|
chains: {
|
|
909
909
|
[tx?.chainId ?? ""]: {
|
|
910
910
|
address: signer.account?.address
|
|
@@ -990,7 +990,7 @@ var validateSvmGasBalance = async ({
|
|
|
990
990
|
fee: null
|
|
991
991
|
};
|
|
992
992
|
}
|
|
993
|
-
const endpoint = await
|
|
993
|
+
const endpoint = await chunk7CFJPJJ2_cjs.getRpcEndpointForChain(tx.chainId ?? "");
|
|
994
994
|
const connection = new web3_js.Connection(endpoint);
|
|
995
995
|
if (!connection) throw new Error(`Failed to connect to ${tx.chainId}`);
|
|
996
996
|
if (!tx.tx) {
|
|
@@ -1068,7 +1068,7 @@ var validateGasBalances = async ({
|
|
|
1068
1068
|
onValidateGasBalance?.({
|
|
1069
1069
|
status: "pending"
|
|
1070
1070
|
});
|
|
1071
|
-
|
|
1071
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
1072
1072
|
status: "validating",
|
|
1073
1073
|
routeId,
|
|
1074
1074
|
options
|
|
@@ -1077,7 +1077,7 @@ var validateGasBalances = async ({
|
|
|
1077
1077
|
throw new Error(`invalid msgs ${tx?.cosmosTx?.msgs}`);
|
|
1078
1078
|
}
|
|
1079
1079
|
try {
|
|
1080
|
-
const res = await
|
|
1080
|
+
const res = await chunk3RPOC3AX_cjs.validateCosmosGasBalance({
|
|
1081
1081
|
chainId: tx.cosmosTx.chainId ?? "",
|
|
1082
1082
|
signerAddress: tx.cosmosTx.signerAddress ?? "",
|
|
1083
1083
|
messages: tx.cosmosTx.msgs,
|
|
@@ -1102,7 +1102,7 @@ var validateGasBalances = async ({
|
|
|
1102
1102
|
onValidateGasBalance?.({
|
|
1103
1103
|
status: "pending"
|
|
1104
1104
|
});
|
|
1105
|
-
|
|
1105
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
1106
1106
|
status: "validating",
|
|
1107
1107
|
routeId,
|
|
1108
1108
|
options
|
|
@@ -1135,7 +1135,7 @@ var validateGasBalances = async ({
|
|
|
1135
1135
|
onValidateGasBalance?.({
|
|
1136
1136
|
status: "pending"
|
|
1137
1137
|
});
|
|
1138
|
-
|
|
1138
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
1139
1139
|
status: "validating",
|
|
1140
1140
|
routeId,
|
|
1141
1141
|
options
|
|
@@ -1165,13 +1165,13 @@ var validateGasBalances = async ({
|
|
|
1165
1165
|
onValidateGasBalance?.({
|
|
1166
1166
|
status: "error"
|
|
1167
1167
|
});
|
|
1168
|
-
|
|
1168
|
+
chunkATW6UNT5_cjs.ClientState.validateGasResults = validateResult;
|
|
1169
1169
|
throw new Error(`${txError.error}`);
|
|
1170
1170
|
}
|
|
1171
1171
|
onValidateGasBalance?.({
|
|
1172
1172
|
status: "completed"
|
|
1173
1173
|
});
|
|
1174
|
-
|
|
1174
|
+
chunkATW6UNT5_cjs.ClientState.validateGasResults = validateResult;
|
|
1175
1175
|
};
|
|
1176
1176
|
|
|
1177
1177
|
// src/private-functions/getChainIdsFromTxs.ts
|
|
@@ -1231,7 +1231,7 @@ var executeTransactions = async (options) => {
|
|
|
1231
1231
|
throw new Error("executeRoute error: invalid message type");
|
|
1232
1232
|
}
|
|
1233
1233
|
});
|
|
1234
|
-
|
|
1234
|
+
chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
1235
1235
|
transactionDetails,
|
|
1236
1236
|
routeId,
|
|
1237
1237
|
options
|
|
@@ -1239,7 +1239,7 @@ var executeTransactions = async (options) => {
|
|
|
1239
1239
|
const isGasStationSourceEVM = chainIds.find((item, i, array) => {
|
|
1240
1240
|
return chunkKZOSEIWH_cjs.GAS_STATION_CHAIN_IDS.includes(item?.chainId ?? "") && array[i - 1]?.chainType === "evm" /* Evm */;
|
|
1241
1241
|
});
|
|
1242
|
-
|
|
1242
|
+
chunkATW6UNT5_cjs.ClientState.validateGasResults = void 0;
|
|
1243
1243
|
const validateChainIds = !batchSimulate ? chainIds.map((x) => x?.chainId ?? "") : isGasStationSourceEVM ? chunkKZOSEIWH_cjs.GAS_STATION_CHAIN_IDS : [];
|
|
1244
1244
|
await validateGasBalances({
|
|
1245
1245
|
txs,
|
|
@@ -1342,7 +1342,7 @@ var executeTransactions = async (options) => {
|
|
|
1342
1342
|
let txResult;
|
|
1343
1343
|
const txSigned = signedTxs.find((item) => item.index === index);
|
|
1344
1344
|
if (txSigned) {
|
|
1345
|
-
const txResponse = await
|
|
1345
|
+
const txResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
1346
1346
|
chainId: txSigned.chainId,
|
|
1347
1347
|
tx: txSigned.tx
|
|
1348
1348
|
});
|
|
@@ -1398,7 +1398,7 @@ var getDefaultFallbackGasAmount = async (chainId, chainType) => {
|
|
|
1398
1398
|
return EVM_GAS_AMOUNT;
|
|
1399
1399
|
}
|
|
1400
1400
|
if (chainType !== "cosmos" /* Cosmos */) return void 0;
|
|
1401
|
-
const venuesResult = await
|
|
1401
|
+
const venuesResult = await chunkFCTBCHOT_cjs.venues();
|
|
1402
1402
|
const isSwapChain = venuesResult?.some(
|
|
1403
1403
|
(venue) => venue.chainId === chainId
|
|
1404
1404
|
) ?? false;
|
|
@@ -1411,7 +1411,7 @@ var getDefaultFallbackGasAmount = async (chainId, chainType) => {
|
|
|
1411
1411
|
return defaultGasAmount;
|
|
1412
1412
|
};
|
|
1413
1413
|
var validateUserAddresses = async (userAddresses) => {
|
|
1414
|
-
const chains2 = await
|
|
1414
|
+
const chains2 = await chunkATW6UNT5_cjs.ClientState.getSkipChains();
|
|
1415
1415
|
const validations = userAddresses.map((userAddress) => {
|
|
1416
1416
|
const chain = chains2.find((chain2) => chain2.chainId === userAddress.chainId);
|
|
1417
1417
|
switch (chain?.chainType) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkMUJBB64F_cjs = require('./chunk-MUJBB64F.cjs');
|
|
4
4
|
var chunkUMBMSRZZ_cjs = require('./chunk-UMBMSRZZ.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
6
6
|
var stargate = require('@cosmjs/stargate');
|
|
7
7
|
var utils = require('@cosmjs/utils');
|
|
8
8
|
var binary_js = require('cosmjs-types/binary.js');
|
|
@@ -322,11 +322,11 @@ var accountEthParser = (ethAccount, pubKeyTypeUrl = "/injective.crypto.v1beta1.e
|
|
|
322
322
|
|
|
323
323
|
// src/private-functions/getRpcEndpointForChain.ts
|
|
324
324
|
var getRpcEndpointForChain = async (chainId) => {
|
|
325
|
-
if (
|
|
326
|
-
return
|
|
325
|
+
if (chunkATW6UNT5_cjs.ClientState.endpointOptions.getRpcEndpointForChain) {
|
|
326
|
+
return chunkATW6UNT5_cjs.ClientState.endpointOptions.getRpcEndpointForChain(chainId);
|
|
327
327
|
}
|
|
328
|
-
if (
|
|
329
|
-
const endpointOptions =
|
|
328
|
+
if (chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints && chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints[chainId]) {
|
|
329
|
+
const endpointOptions = chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints[chainId];
|
|
330
330
|
if (endpointOptions?.rpc) {
|
|
331
331
|
return endpointOptions.rpc;
|
|
332
332
|
}
|
|
@@ -361,19 +361,19 @@ var getSigningStargateClient = async ({
|
|
|
361
361
|
if (!getOfflineSigner) {
|
|
362
362
|
throw new Error("'getCosmosSigner' is not provided or configured in skip router");
|
|
363
363
|
}
|
|
364
|
-
if (!
|
|
364
|
+
if (!chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId?.[chainId]) {
|
|
365
365
|
const [signer, endpoint] = await Promise.all([
|
|
366
366
|
getOfflineSigner(chainId),
|
|
367
367
|
getRpcEndpointForChain(chainId)
|
|
368
368
|
]);
|
|
369
|
-
|
|
370
|
-
aminoTypes:
|
|
371
|
-
registry:
|
|
369
|
+
chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId] = await stargate.SigningStargateClient.connectWithSigner(endpoint, signer, {
|
|
370
|
+
aminoTypes: chunkATW6UNT5_cjs.ClientState.aminoTypes,
|
|
371
|
+
registry: chunkATW6UNT5_cjs.ClientState.registry,
|
|
372
372
|
accountParser
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
return {
|
|
376
|
-
stargateClient:
|
|
376
|
+
stargateClient: chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId],
|
|
377
377
|
signer: await getOfflineSigner(chainId)
|
|
378
378
|
};
|
|
379
379
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunk67WZP4PA_cjs = require('./chunk-67WZP4PA.cjs');
|
|
4
|
+
var chunkZHV4J6EM_cjs = require('./chunk-ZHV4J6EM.cjs');
|
|
5
|
+
var chunkNCFH5MGF_cjs = require('./chunk-NCFH5MGF.cjs');
|
|
6
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
7
7
|
|
|
8
8
|
// src/public-functions/executeRoute.ts
|
|
9
9
|
var executeRoute = async (options) => {
|
|
10
10
|
const { route, userAddresses, appendCosmosMsgs, timeoutSeconds } = options;
|
|
11
|
-
const { id: routeId } =
|
|
11
|
+
const { id: routeId } = chunkZHV4J6EM_cjs.updateRouteDetails({
|
|
12
12
|
status: "unconfirmed",
|
|
13
13
|
options
|
|
14
14
|
});
|
|
15
|
-
const addressList = await
|
|
15
|
+
const addressList = await chunk67WZP4PA_cjs.createValidAddressList({
|
|
16
16
|
userAddresses,
|
|
17
17
|
route
|
|
18
18
|
});
|
|
19
|
-
const response = await
|
|
19
|
+
const response = await chunkNCFH5MGF_cjs.messages({
|
|
20
20
|
timeoutSeconds,
|
|
21
21
|
amountIn: route?.amountIn,
|
|
22
22
|
amountOut: route.estimatedAmountOut || "0",
|
|
@@ -27,7 +27,7 @@ var executeRoute = async (options) => {
|
|
|
27
27
|
operations: route?.operations,
|
|
28
28
|
addressList,
|
|
29
29
|
slippageTolerancePercent: options.slippageTolerancePercent || "1",
|
|
30
|
-
chainIdsToAffiliates:
|
|
30
|
+
chainIdsToAffiliates: chunk2QPPD3BB_cjs.ApiState.chainIdsToAffiliates,
|
|
31
31
|
postRouteHandler: options.postRouteHandler,
|
|
32
32
|
feePayerAddress: options.svmFeePayer?.address
|
|
33
33
|
});
|
|
@@ -43,8 +43,8 @@ var executeRoute = async (options) => {
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
const { transactionDetails, executeTransaction } = await
|
|
47
|
-
await
|
|
46
|
+
const { transactionDetails, executeTransaction } = await chunk67WZP4PA_cjs.executeTransactions({ ...options, routeId, txs: response?.txs });
|
|
47
|
+
await chunkZHV4J6EM_cjs.executeAndSubscribeToRouteStatus({
|
|
48
48
|
transactionDetails,
|
|
49
49
|
executeTransaction,
|
|
50
50
|
routeId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/postMessagesDirect.ts
|
|
6
|
-
var messagesDirect =
|
|
6
|
+
var messagesDirect = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "msgsDirect",
|
|
8
8
|
method: "post",
|
|
9
9
|
path: "v2/fungible/msgs_direct"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/getAssetsBetweenChains.ts
|
|
6
|
-
var assetsBetweenChains =
|
|
6
|
+
var assetsBetweenChains = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "fungibleAssetsBetweenChainsCreate",
|
|
8
8
|
path: "v2/fungible/assets_between_chains"
|
|
9
9
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/private-functions/getMainnetAndTestnetChains.ts
|
|
6
6
|
var getMainnetAndTestnetChains = async (apiOptions) => {
|
|
@@ -23,7 +23,7 @@ var getMainnetAndTestnetChains = async (apiOptions) => {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
// src/api/getAssets.ts
|
|
26
|
-
var assets =
|
|
26
|
+
var assets = chunk2QPPD3BB_cjs.api({
|
|
27
27
|
methodName: "assets",
|
|
28
28
|
path: "v2/fungible/assets",
|
|
29
29
|
transformResponse: (response) => {
|
|
@@ -70,7 +70,7 @@ var getMainnetAndTestnetAssets = async ({
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// src/api/postBalances.ts
|
|
73
|
-
var balances =
|
|
73
|
+
var balances = chunk2QPPD3BB_cjs.api({
|
|
74
74
|
methodName: "balances",
|
|
75
75
|
method: "post",
|
|
76
76
|
path: "v2/info/balances",
|
|
@@ -118,7 +118,7 @@ var ClientState = class {
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
// src/api/getChains.ts
|
|
121
|
-
var chains =
|
|
121
|
+
var chains = chunk2QPPD3BB_cjs.api({
|
|
122
122
|
methodName: "chains",
|
|
123
123
|
path: "v2/info/chains",
|
|
124
124
|
transformResponse: (response) => response.chains,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/postTrackTransaction.ts
|
|
6
6
|
var trackTransaction = ({
|
|
@@ -9,7 +9,7 @@ var trackTransaction = ({
|
|
|
9
9
|
backoffMultiplier = 2.5,
|
|
10
10
|
...trackTxRequest
|
|
11
11
|
}) => {
|
|
12
|
-
return
|
|
12
|
+
return chunk2QPPD3BB_cjs.pollingApi({
|
|
13
13
|
methodName: "track",
|
|
14
14
|
path: "v2/tx/track",
|
|
15
15
|
method: "post",
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/public-functions/setApiOptions.ts
|
|
6
6
|
var setApiOptions = (options = {}) => {
|
|
7
|
-
|
|
7
|
+
chunk2QPPD3BB_cjs.ApiState.client = chunk2QPPD3BB_cjs.createRequestClient({
|
|
8
8
|
apiUrl: options.apiUrl || "https://api.skip.build",
|
|
9
9
|
apiKey: options.apiKey,
|
|
10
10
|
apiHeaders: options.apiHeaders
|
|
11
11
|
});
|
|
12
12
|
if (options.chainIdsToAffiliates) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
chunk2QPPD3BB_cjs.ApiState.cumulativeAffiliateFeeBPS = validateChainIdsToAffiliates(options.chainIdsToAffiliates);
|
|
14
|
+
chunk2QPPD3BB_cjs.ApiState.chainIdsToAffiliates = options.chainIdsToAffiliates;
|
|
15
15
|
}
|
|
16
|
-
if (!options.allowOptionsUpdateAfterApiCall &&
|
|
16
|
+
if (!options.allowOptionsUpdateAfterApiCall && chunk2QPPD3BB_cjs.ApiState.apiCalled && !chunk2QPPD3BB_cjs.ApiState.initialized) {
|
|
17
17
|
throw new Error("setApiOptions must be called before an api request is made");
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
chunk2QPPD3BB_cjs.ApiState.initialized = true;
|
|
20
20
|
};
|
|
21
21
|
function validateChainIdsToAffiliates(chainIdsToAffiliates) {
|
|
22
22
|
const affiliatesArray = Object.values(chainIdsToAffiliates).map((chain) => chain.affiliates).filter((a) => a !== void 0);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk6W2OIU3O_cjs = require('./chunk-6W2OIU3O.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk5KWNKICM_cjs = require('./chunk-5KWNKICM.cjs');
|
|
5
5
|
var math = require('@cosmjs/math');
|
|
6
6
|
var stargate = require('@cosmjs/stargate');
|
|
7
7
|
|
|
8
8
|
var getRecommendedGasPrice = async (props) => {
|
|
9
|
-
const feeInfo = await
|
|
9
|
+
const feeInfo = await chunk5KWNKICM_cjs.getFeeInfoForChain(props);
|
|
10
10
|
if (!feeInfo || !feeInfo.gasPrice) {
|
|
11
11
|
return void 0;
|
|
12
12
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/getVenues.ts
|
|
6
|
-
var venues =
|
|
6
|
+
var venues = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "venues",
|
|
8
8
|
path: "v2/fungible/venues",
|
|
9
9
|
transformResponse: (response) => response.venues
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/getBridges.ts
|
|
6
|
-
var bridges =
|
|
6
|
+
var bridges = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "bridges",
|
|
8
8
|
path: "v2/info/bridges",
|
|
9
9
|
transformResponse: (response) => response.bridges
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/api/postSubmitTransaction.ts
|
|
6
|
-
var submitTransaction =
|
|
6
|
+
var submitTransaction = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "submit",
|
|
8
8
|
method: "post",
|
|
9
9
|
path: "v2/tx/submit"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utils/filterMessagesRequest.ts
|
|
6
6
|
var filterMessagesRequest = (request) => {
|
|
@@ -29,7 +29,7 @@ var filterMessagesRequest = (request) => {
|
|
|
29
29
|
|
|
30
30
|
// src/api/postMessages.ts
|
|
31
31
|
var messages = async (request) => {
|
|
32
|
-
return
|
|
32
|
+
return chunk2QPPD3BB_cjs.api({
|
|
33
33
|
methodName: "msgs",
|
|
34
34
|
method: "post",
|
|
35
35
|
path: "v2/fungible/msgs"
|