@skip-go/client 1.5.3 → 1.5.5
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-3UPZIINE.cjs → chunk-4KPBBDLF.cjs} +6 -6
- package/dist/cjs/{chunk-QWQVTCKP.cjs → chunk-7CFJPJJ2.cjs} +10 -10
- package/dist/cjs/{chunk-GOQK63JP.cjs → chunk-7L4FYNDR.cjs} +2 -2
- package/dist/cjs/{chunk-BCX2D6TE.cjs → chunk-A3UNNRKD.cjs} +56 -23
- 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-BT6HQNBF.cjs → chunk-BB5QJRM4.cjs} +14 -14
- package/dist/cjs/{chunk-KWH6S7PB.cjs → chunk-CK6CQWQU.cjs} +6 -6
- 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-BFA7XKVT.cjs → chunk-JBGCVGJP.cjs} +80 -63
- 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-ND7SYSAP.cjs → chunk-NWHKDAJY.cjs} +8 -4
- 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-4RLEZ5DV.cjs → chunk-PHFHOXMV.cjs} +10 -10
- package/dist/cjs/{chunk-RBM66GW6.cjs → chunk-UXW4XVHF.cjs} +2 -2
- package/dist/cjs/{chunk-U2NZCNKX.cjs → chunk-WRTBZRHG.cjs} +8 -8
- package/dist/cjs/index.cjs +81 -82
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +13 -14
- package/dist/cjs/public-functions/executeRoute.cjs +13 -14
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +4 -5
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +5 -6
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +27 -28
- 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-426BGQ4K.js → chunk-32JIBODG.js} +2 -2
- package/dist/esm/{chunk-5IXH2QPF.js → chunk-3DIX6KRJ.js} +53 -20
- package/dist/esm/{chunk-YLVUKXLR.js → chunk-3JHLVPRG.js} +1 -1
- package/dist/esm/{chunk-SA4GETWP.js → chunk-6ERJCOUK.js} +5 -5
- package/dist/esm/{chunk-FNTPI2AV.js → chunk-A5NZMSTI.js} +1 -1
- package/dist/esm/{chunk-HZVXNDMH.js → chunk-ACRGYWFW.js} +1 -1
- package/dist/esm/{chunk-BBEFB277.js → chunk-DRWCXWGY.js} +4 -4
- package/dist/esm/chunk-E4NRDAVO.js +65 -0
- package/dist/esm/{chunk-QYIZGNWZ.js → chunk-ERN6U7FJ.js} +6 -2
- 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-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-3WFXBPS2.js → chunk-N4PTRCNT.js} +1 -1
- package/dist/esm/{chunk-IHSSWY3M.js → chunk-P36PE4CR.js} +1 -1
- package/dist/esm/{chunk-L233BZ4I.js → chunk-PBGKHTV4.js} +35 -18
- 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-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 +10 -10
- package/dist/esm/index.js +26 -27
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +4 -4
- package/dist/esm/public-functions/executeMultipleRoutes.js +12 -13
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +12 -13
- 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 -4
- package/dist/esm/public-functions/getRecommendedGasPrice.js +4 -5
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +1 -1
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +26 -27
- 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/cjs/chunk-KZOSEIWH.cjs +0 -10
- package/dist/esm/chunk-SWYON2RG.js +0 -7
- package/dist/esm/chunk-TNIGHYH2.js +0 -44
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkA3UNNRKD_cjs = require('./chunk-A3UNNRKD.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
|
-
var
|
|
9
|
-
var chunkQWQVTCKP_cjs = require('./chunk-QWQVTCKP.cjs');
|
|
8
|
+
var chunk7CFJPJJ2_cjs = require('./chunk-7CFJPJJ2.cjs');
|
|
10
9
|
var chunkUMBMSRZZ_cjs = require('./chunk-UMBMSRZZ.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
var chunkJRXPJ45U_cjs = require('./chunk-JRXPJ45U.cjs');
|
|
11
|
+
var chunkFCTBCHOT_cjs = require('./chunk-FCTBCHOT.cjs');
|
|
12
|
+
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
13
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
15
14
|
var stargate = require('@cosmjs/stargate');
|
|
16
15
|
var tx_js = require('cosmjs-types/cosmos/tx/v1beta1/tx.js');
|
|
17
16
|
var protoSigning = require('@cosmjs/proto-signing');
|
|
@@ -27,11 +26,11 @@ var bech32 = require('bech32');
|
|
|
27
26
|
|
|
28
27
|
// src/private-functions/getRestEndpointForChain.ts
|
|
29
28
|
var getRestEndpointForChain = async (chainId) => {
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
29
|
+
if (chunkATW6UNT5_cjs.ClientState.endpointOptions.getRestEndpointForChain) {
|
|
30
|
+
return chunkATW6UNT5_cjs.ClientState.endpointOptions.getRestEndpointForChain(chainId);
|
|
32
31
|
}
|
|
33
|
-
if (
|
|
34
|
-
const endpointOptions =
|
|
32
|
+
if (chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints && chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints[chainId]) {
|
|
33
|
+
const endpointOptions = chunkATW6UNT5_cjs.ClientState.endpointOptions.endpoints[chainId];
|
|
35
34
|
if (endpointOptions?.rest) {
|
|
36
35
|
return endpointOptions.rest;
|
|
37
36
|
}
|
|
@@ -62,9 +61,9 @@ var getAccountNumberAndSequence = async (address, chainId) => {
|
|
|
62
61
|
if (chainId.includes("dymension")) {
|
|
63
62
|
return getAccountNumberAndSequenceFromDymension(address, chainId);
|
|
64
63
|
}
|
|
65
|
-
const endpoint = await
|
|
66
|
-
const client =
|
|
67
|
-
accountParser:
|
|
64
|
+
const endpoint = await chunk7CFJPJJ2_cjs.getRpcEndpointForChain(chainId);
|
|
65
|
+
const client = chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId] ?? await stargate.StargateClient.connect(endpoint, {
|
|
66
|
+
accountParser: chunk7CFJPJJ2_cjs.accountParser
|
|
68
67
|
});
|
|
69
68
|
const account = await client.getAccount(address);
|
|
70
69
|
if (!account) {
|
|
@@ -90,7 +89,7 @@ var getAccountNumberAndSequenceFromDymension = async (address, chainId) => {
|
|
|
90
89
|
throw new Error(`Failed to fetch account data: ${res.statusText}`);
|
|
91
90
|
}
|
|
92
91
|
const jsonResponse = await res.json();
|
|
93
|
-
const response =
|
|
92
|
+
const response = chunk2QPPD3BB_cjs.toCamel(jsonResponse);
|
|
94
93
|
let sequence = 0;
|
|
95
94
|
let accountNumber = 0;
|
|
96
95
|
if (response.account.baseAccount) {
|
|
@@ -180,7 +179,7 @@ var signCosmosMessageDirect = async (options) => {
|
|
|
180
179
|
messages
|
|
181
180
|
}
|
|
182
181
|
};
|
|
183
|
-
const txBodyBytes =
|
|
182
|
+
const txBodyBytes = chunkATW6UNT5_cjs.ClientState.registry.encode(txBodyEncodeObject);
|
|
184
183
|
const gasLimit = math.Int53.fromString(fee.gas).toNumber();
|
|
185
184
|
const pubkeyAny = makePubkeyAnyFromAccount(accountFromSigner, chainId);
|
|
186
185
|
const authInfoBytes = protoSigning.makeAuthInfoBytes(
|
|
@@ -220,7 +219,7 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
220
219
|
(cosmosMsg) => chunk4TBONPD6_cjs.getEncodeObjectFromCosmosMessage(cosmosMsg)
|
|
221
220
|
);
|
|
222
221
|
const signMode = signing_js.SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
223
|
-
const msgs = messages.map((msg) =>
|
|
222
|
+
const msgs = messages.map((msg) => chunkATW6UNT5_cjs.ClientState.aminoTypes.toAmino(msg));
|
|
224
223
|
const signDoc = amino.makeSignDoc(
|
|
225
224
|
msgs,
|
|
226
225
|
fee,
|
|
@@ -231,7 +230,7 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
231
230
|
);
|
|
232
231
|
const { signature, signed } = await signer.signAmino(signerAddress, signDoc);
|
|
233
232
|
const signedTxBody = {
|
|
234
|
-
messages: signed.msgs.map((msg) =>
|
|
233
|
+
messages: signed.msgs.map((msg) => chunkATW6UNT5_cjs.ClientState.aminoTypes.fromAmino(msg)),
|
|
235
234
|
memo: signed.memo
|
|
236
235
|
};
|
|
237
236
|
signedTxBody.messages[0].value.memo = messages[0].value.memo;
|
|
@@ -239,7 +238,7 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
239
238
|
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
240
239
|
value: signedTxBody
|
|
241
240
|
};
|
|
242
|
-
const signedTxBodyBytes =
|
|
241
|
+
const signedTxBodyBytes = chunkATW6UNT5_cjs.ClientState.registry.encode(
|
|
243
242
|
signedTxBodyEncodeObject
|
|
244
243
|
);
|
|
245
244
|
const signedGasLimit = math.Int53.fromString(signed.fee.gas).toNumber();
|
|
@@ -274,7 +273,7 @@ var signCosmosTransaction = async ({
|
|
|
274
273
|
const chainId = tx.cosmosTx?.chainId;
|
|
275
274
|
const messages = tx.cosmosTx?.msgs;
|
|
276
275
|
const currentUserAddress = userAddresses.find((x) => x.chainId === tx.cosmosTx?.chainId)?.address;
|
|
277
|
-
const gasArray =
|
|
276
|
+
const gasArray = chunkATW6UNT5_cjs.ClientState.validateGasResults;
|
|
278
277
|
const gas = gasArray?.find((gas2) => gas2?.error !== null && gas2?.error !== void 0);
|
|
279
278
|
if (typeof gas?.error === "string") {
|
|
280
279
|
throw new Error(gas?.error);
|
|
@@ -289,7 +288,7 @@ var signCosmosTransaction = async ({
|
|
|
289
288
|
if (messages === void 0) {
|
|
290
289
|
throw new Error("no messages found for tx");
|
|
291
290
|
}
|
|
292
|
-
const { signer } = await
|
|
291
|
+
const { signer } = await chunk7CFJPJJ2_cjs.getSigningStargateClient({
|
|
293
292
|
chainId,
|
|
294
293
|
getOfflineSigner: options?.getCosmosSigner
|
|
295
294
|
});
|
|
@@ -328,7 +327,7 @@ var signCosmosTransaction = async ({
|
|
|
328
327
|
txIndex: index,
|
|
329
328
|
signerAddress: currentUserAddress
|
|
330
329
|
});
|
|
331
|
-
|
|
330
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
332
331
|
status: "signing",
|
|
333
332
|
routeId,
|
|
334
333
|
options
|
|
@@ -344,7 +343,7 @@ var signCosmosTransaction = async ({
|
|
|
344
343
|
options?.onTransactionSigned?.({
|
|
345
344
|
chainId
|
|
346
345
|
});
|
|
347
|
-
|
|
346
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
348
347
|
status: "pending",
|
|
349
348
|
routeId,
|
|
350
349
|
options
|
|
@@ -371,7 +370,7 @@ var executeCosmosTransaction = async ({
|
|
|
371
370
|
routeId
|
|
372
371
|
});
|
|
373
372
|
const chainId = tx.cosmosTx?.chainId;
|
|
374
|
-
const txResponse = await
|
|
373
|
+
const txResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
375
374
|
chainId,
|
|
376
375
|
tx: rawTxBase64
|
|
377
376
|
});
|
|
@@ -584,7 +583,7 @@ var erc20ABI = /* @__PURE__ */ createAbi([
|
|
|
584
583
|
|
|
585
584
|
// src/private-functions/evm/executeEvmTransaction.ts
|
|
586
585
|
var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
587
|
-
const gasArray =
|
|
586
|
+
const gasArray = chunkATW6UNT5_cjs.ClientState.validateGasResults;
|
|
588
587
|
const gas = gasArray?.find((gas2) => gas2?.error !== null && gas2?.error !== void 0);
|
|
589
588
|
if (typeof gas?.error === "string") {
|
|
590
589
|
throw new Error(gas?.error);
|
|
@@ -630,7 +629,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
630
629
|
status: "pending",
|
|
631
630
|
allowance: requiredApproval
|
|
632
631
|
});
|
|
633
|
-
|
|
632
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
634
633
|
status: "allowance",
|
|
635
634
|
routeId,
|
|
636
635
|
options
|
|
@@ -664,7 +663,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
664
663
|
signerAddress: evmSigner.account.address,
|
|
665
664
|
txIndex: index
|
|
666
665
|
});
|
|
667
|
-
|
|
666
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
668
667
|
status: "signing",
|
|
669
668
|
routeId,
|
|
670
669
|
options
|
|
@@ -676,7 +675,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
676
675
|
chain: evmSigner.chain,
|
|
677
676
|
value: evmTx.value === "" ? void 0 : BigInt(evmTx.value)
|
|
678
677
|
});
|
|
679
|
-
|
|
678
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
680
679
|
status: "pending",
|
|
681
680
|
routeId,
|
|
682
681
|
options
|
|
@@ -695,7 +694,7 @@ var signSvmTransaction = async ({
|
|
|
695
694
|
index,
|
|
696
695
|
routeId
|
|
697
696
|
}) => {
|
|
698
|
-
const gasArray =
|
|
697
|
+
const gasArray = chunkATW6UNT5_cjs.ClientState.validateGasResults;
|
|
699
698
|
if (tx === void 0) {
|
|
700
699
|
throw new Error("executeSvmTransaction error: tx is undefined");
|
|
701
700
|
}
|
|
@@ -732,14 +731,14 @@ var signSvmTransaction = async ({
|
|
|
732
731
|
signerAddress: signer.publicKey?.toBase58(),
|
|
733
732
|
txIndex: index
|
|
734
733
|
});
|
|
735
|
-
|
|
734
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
736
735
|
status: "signing",
|
|
737
736
|
routeId,
|
|
738
737
|
options
|
|
739
738
|
});
|
|
740
739
|
const signedTx = await signer.signTransaction(transaction);
|
|
741
740
|
options?.onTransactionSigned?.({ chainId: svmTx.chainId });
|
|
742
|
-
|
|
741
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
743
742
|
status: "pending",
|
|
744
743
|
routeId,
|
|
745
744
|
options
|
|
@@ -758,10 +757,10 @@ var executeSvmTransaction = async (tx, options, index, routeId) => {
|
|
|
758
757
|
if (!signedTx) {
|
|
759
758
|
throw new Error("executeSvmTransaction error: signedTx is undefined");
|
|
760
759
|
}
|
|
761
|
-
const endpoint = await
|
|
760
|
+
const endpoint = await chunk7CFJPJJ2_cjs.getRpcEndpointForChain(svmTx.chainId);
|
|
762
761
|
const connection = new web3_js.Connection(endpoint);
|
|
763
762
|
let signature;
|
|
764
|
-
const submitTxResponse = await
|
|
763
|
+
const submitTxResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
765
764
|
chainId: svmTx.chainId,
|
|
766
765
|
tx: signedTx.toString("base64")
|
|
767
766
|
});
|
|
@@ -789,13 +788,13 @@ var executeSvmTransaction = async (tx, options, index, routeId) => {
|
|
|
789
788
|
};
|
|
790
789
|
}
|
|
791
790
|
if (getStatusCount > 12) {
|
|
792
|
-
await
|
|
791
|
+
await chunk2QPPD3BB_cjs.wait(3e3);
|
|
793
792
|
throw new Error(
|
|
794
793
|
`executeSvmTransaction error: waiting finalized status timed out for ${signature}`
|
|
795
794
|
);
|
|
796
795
|
}
|
|
797
796
|
getStatusCount++;
|
|
798
|
-
await
|
|
797
|
+
await chunk2QPPD3BB_cjs.wait(3e3);
|
|
799
798
|
} catch (error) {
|
|
800
799
|
errorCount++;
|
|
801
800
|
if (errorCount > 12) {
|
|
@@ -810,7 +809,8 @@ var validateEvmTokenApproval = async ({
|
|
|
810
809
|
chain,
|
|
811
810
|
gasBalance,
|
|
812
811
|
tx,
|
|
813
|
-
|
|
812
|
+
routeId,
|
|
813
|
+
options
|
|
814
814
|
}) => {
|
|
815
815
|
if (!signer.account?.address) {
|
|
816
816
|
throw new Error("validateEvmGasBalance: Signer address not found");
|
|
@@ -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
|
);
|
|
@@ -864,6 +864,16 @@ var validateEvmTokenApproval = async ({
|
|
|
864
864
|
fee: null
|
|
865
865
|
};
|
|
866
866
|
}
|
|
867
|
+
const { onApproveAllowance, useUnlimitedApproval } = options;
|
|
868
|
+
onApproveAllowance?.({
|
|
869
|
+
status: "pending",
|
|
870
|
+
allowance: requiredApproval
|
|
871
|
+
});
|
|
872
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
873
|
+
status: "allowance",
|
|
874
|
+
routeId,
|
|
875
|
+
options
|
|
876
|
+
});
|
|
867
877
|
const txHash = await extendedSigner.writeContract({
|
|
868
878
|
account: signer.account,
|
|
869
879
|
address: requiredApproval.tokenContract,
|
|
@@ -883,6 +893,14 @@ var validateEvmTokenApproval = async ({
|
|
|
883
893
|
`executeEVMTransaction error: evm tx reverted for hash ${receipt.transactionHash}`
|
|
884
894
|
);
|
|
885
895
|
}
|
|
896
|
+
onApproveAllowance?.({
|
|
897
|
+
status: "completed"
|
|
898
|
+
});
|
|
899
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
900
|
+
status: "signing",
|
|
901
|
+
routeId,
|
|
902
|
+
options
|
|
903
|
+
});
|
|
886
904
|
}
|
|
887
905
|
};
|
|
888
906
|
|
|
@@ -891,12 +909,12 @@ var validateEvmGasBalance = async ({
|
|
|
891
909
|
signer,
|
|
892
910
|
tx,
|
|
893
911
|
getFallbackGasAmount,
|
|
894
|
-
|
|
895
|
-
|
|
912
|
+
options,
|
|
913
|
+
routeId
|
|
896
914
|
}) => {
|
|
897
915
|
const chainId = tx?.chainId ?? "";
|
|
898
|
-
const skipAssets = (await
|
|
899
|
-
const skipChains = await
|
|
916
|
+
const skipAssets = (await chunkATW6UNT5_cjs.ClientState.getSkipAssets({ chainId }))?.[chainId];
|
|
917
|
+
const skipChains = await chunkATW6UNT5_cjs.ClientState.getSkipChains();
|
|
900
918
|
const chain = skipChains?.find?.((chain2) => chain2.chainId === chainId);
|
|
901
919
|
if (!chain) {
|
|
902
920
|
throw new Error(`failed to find chain for chainId: '${chainId}'`);
|
|
@@ -904,7 +922,7 @@ var validateEvmGasBalance = async ({
|
|
|
904
922
|
if (!signer.account?.address) {
|
|
905
923
|
throw new Error("validateEvmGasBalance: Signer address not found");
|
|
906
924
|
}
|
|
907
|
-
const skipBalances = (await
|
|
925
|
+
const skipBalances = (await chunkATW6UNT5_cjs.balances({
|
|
908
926
|
chains: {
|
|
909
927
|
[tx?.chainId ?? ""]: {
|
|
910
928
|
address: signer.account?.address
|
|
@@ -917,6 +935,7 @@ var validateEvmGasBalance = async ({
|
|
|
917
935
|
)?.[1];
|
|
918
936
|
const gasBalance = nativeGasBalance || zeroAddressGasBalance;
|
|
919
937
|
const { requiredErc20Approvals } = tx;
|
|
938
|
+
const { bypassApprovalCheck } = options;
|
|
920
939
|
if (!bypassApprovalCheck && requiredErc20Approvals) {
|
|
921
940
|
try {
|
|
922
941
|
await validateEvmTokenApproval({
|
|
@@ -925,7 +944,8 @@ var validateEvmGasBalance = async ({
|
|
|
925
944
|
chain,
|
|
926
945
|
gasBalance,
|
|
927
946
|
tx,
|
|
928
|
-
|
|
947
|
+
routeId,
|
|
948
|
+
options
|
|
929
949
|
});
|
|
930
950
|
} catch (error) {
|
|
931
951
|
const err = error;
|
|
@@ -990,7 +1010,7 @@ var validateSvmGasBalance = async ({
|
|
|
990
1010
|
fee: null
|
|
991
1011
|
};
|
|
992
1012
|
}
|
|
993
|
-
const endpoint = await
|
|
1013
|
+
const endpoint = await chunk7CFJPJJ2_cjs.getRpcEndpointForChain(tx.chainId ?? "");
|
|
994
1014
|
const connection = new web3_js.Connection(endpoint);
|
|
995
1015
|
if (!connection) throw new Error(`Failed to connect to ${tx.chainId}`);
|
|
996
1016
|
if (!tx.tx) {
|
|
@@ -1068,7 +1088,7 @@ var validateGasBalances = async ({
|
|
|
1068
1088
|
onValidateGasBalance?.({
|
|
1069
1089
|
status: "pending"
|
|
1070
1090
|
});
|
|
1071
|
-
|
|
1091
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
1072
1092
|
status: "validating",
|
|
1073
1093
|
routeId,
|
|
1074
1094
|
options
|
|
@@ -1077,7 +1097,7 @@ var validateGasBalances = async ({
|
|
|
1077
1097
|
throw new Error(`invalid msgs ${tx?.cosmosTx?.msgs}`);
|
|
1078
1098
|
}
|
|
1079
1099
|
try {
|
|
1080
|
-
const res = await
|
|
1100
|
+
const res = await chunk3RPOC3AX_cjs.validateCosmosGasBalance({
|
|
1081
1101
|
chainId: tx.cosmosTx.chainId ?? "",
|
|
1082
1102
|
signerAddress: tx.cosmosTx.signerAddress ?? "",
|
|
1083
1103
|
messages: tx.cosmosTx.msgs,
|
|
@@ -1102,7 +1122,7 @@ var validateGasBalances = async ({
|
|
|
1102
1122
|
onValidateGasBalance?.({
|
|
1103
1123
|
status: "pending"
|
|
1104
1124
|
});
|
|
1105
|
-
|
|
1125
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
1106
1126
|
status: "validating",
|
|
1107
1127
|
routeId,
|
|
1108
1128
|
options
|
|
@@ -1118,8 +1138,8 @@ var validateGasBalances = async ({
|
|
|
1118
1138
|
tx: tx.evmTx,
|
|
1119
1139
|
signer,
|
|
1120
1140
|
getFallbackGasAmount,
|
|
1121
|
-
|
|
1122
|
-
|
|
1141
|
+
routeId,
|
|
1142
|
+
options
|
|
1123
1143
|
});
|
|
1124
1144
|
return res;
|
|
1125
1145
|
} catch (e) {
|
|
@@ -1135,7 +1155,7 @@ var validateGasBalances = async ({
|
|
|
1135
1155
|
onValidateGasBalance?.({
|
|
1136
1156
|
status: "pending"
|
|
1137
1157
|
});
|
|
1138
|
-
|
|
1158
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
1139
1159
|
status: "validating",
|
|
1140
1160
|
routeId,
|
|
1141
1161
|
options
|
|
@@ -1165,13 +1185,13 @@ var validateGasBalances = async ({
|
|
|
1165
1185
|
onValidateGasBalance?.({
|
|
1166
1186
|
status: "error"
|
|
1167
1187
|
});
|
|
1168
|
-
|
|
1188
|
+
chunkATW6UNT5_cjs.ClientState.validateGasResults = validateResult;
|
|
1169
1189
|
throw new Error(`${txError.error}`);
|
|
1170
1190
|
}
|
|
1171
1191
|
onValidateGasBalance?.({
|
|
1172
1192
|
status: "completed"
|
|
1173
1193
|
});
|
|
1174
|
-
|
|
1194
|
+
chunkATW6UNT5_cjs.ClientState.validateGasResults = validateResult;
|
|
1175
1195
|
};
|
|
1176
1196
|
|
|
1177
1197
|
// src/private-functions/getChainIdsFromTxs.ts
|
|
@@ -1231,16 +1251,13 @@ var executeTransactions = async (options) => {
|
|
|
1231
1251
|
throw new Error("executeRoute error: invalid message type");
|
|
1232
1252
|
}
|
|
1233
1253
|
});
|
|
1234
|
-
|
|
1254
|
+
chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
1235
1255
|
transactionDetails,
|
|
1236
1256
|
routeId,
|
|
1237
1257
|
options
|
|
1238
1258
|
});
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
});
|
|
1242
|
-
chunkQAHHTQ7V_cjs.ClientState.validateGasResults = void 0;
|
|
1243
|
-
const validateChainIds = !batchSimulate ? chainIds.map((x) => x?.chainId ?? "") : isGasStationSourceEVM ? chunkKZOSEIWH_cjs.GAS_STATION_CHAIN_IDS : [];
|
|
1259
|
+
chunkATW6UNT5_cjs.ClientState.validateGasResults = void 0;
|
|
1260
|
+
const validateChainIds = !batchSimulate ? chainIds.map((x) => x?.chainId ?? "") : [];
|
|
1244
1261
|
await validateGasBalances({
|
|
1245
1262
|
txs,
|
|
1246
1263
|
getFallbackGasAmount,
|
|
@@ -1342,7 +1359,7 @@ var executeTransactions = async (options) => {
|
|
|
1342
1359
|
let txResult;
|
|
1343
1360
|
const txSigned = signedTxs.find((item) => item.index === index);
|
|
1344
1361
|
if (txSigned) {
|
|
1345
|
-
const txResponse = await
|
|
1362
|
+
const txResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
1346
1363
|
chainId: txSigned.chainId,
|
|
1347
1364
|
tx: txSigned.tx
|
|
1348
1365
|
});
|
|
@@ -1398,7 +1415,7 @@ var getDefaultFallbackGasAmount = async (chainId, chainType) => {
|
|
|
1398
1415
|
return EVM_GAS_AMOUNT;
|
|
1399
1416
|
}
|
|
1400
1417
|
if (chainType !== "cosmos" /* Cosmos */) return void 0;
|
|
1401
|
-
const venuesResult = await
|
|
1418
|
+
const venuesResult = await chunkFCTBCHOT_cjs.venues();
|
|
1402
1419
|
const isSwapChain = venuesResult?.some(
|
|
1403
1420
|
(venue) => venue.chainId === chainId
|
|
1404
1421
|
) ?? false;
|
|
@@ -1411,7 +1428,7 @@ var getDefaultFallbackGasAmount = async (chainId, chainType) => {
|
|
|
1411
1428
|
return defaultGasAmount;
|
|
1412
1429
|
};
|
|
1413
1430
|
var validateUserAddresses = async (userAddresses) => {
|
|
1414
|
-
const chains2 = await
|
|
1431
|
+
const chains2 = await chunkATW6UNT5_cjs.ClientState.getSkipChains();
|
|
1415
1432
|
const validations = userAddresses.map((userAddress) => {
|
|
1416
1433
|
const chain = chains2.find((chain2) => chain2.chainId === userAddress.chainId);
|
|
1417
1434
|
switch (chain?.chainType) {
|
|
@@ -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"
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunkKZOSEIWH_cjs = require('./chunk-KZOSEIWH.cjs');
|
|
4
3
|
var chunkUMBMSRZZ_cjs = require('./chunk-UMBMSRZZ.cjs');
|
|
5
|
-
var
|
|
4
|
+
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
5
|
+
|
|
6
|
+
// src/constants/constants.ts
|
|
7
|
+
var DEFAULT_GAS_DENOM_OVERRIDES = {
|
|
8
|
+
"noble-1": "uusdc"
|
|
9
|
+
};
|
|
6
10
|
|
|
7
11
|
// src/private-functions/getDefaultGasTokenForChain.ts
|
|
8
12
|
var getDefaultGasTokenForChain = async (chainId) => {
|
|
9
|
-
const gasDenom =
|
|
13
|
+
const gasDenom = DEFAULT_GAS_DENOM_OVERRIDES[chainId];
|
|
10
14
|
if (gasDenom) {
|
|
11
15
|
return gasDenom;
|
|
12
16
|
}
|
|
@@ -53,7 +57,7 @@ var getStakingTokensForChain = (chainId) => {
|
|
|
53
57
|
|
|
54
58
|
// src/public-functions/getFeeInfoForChain.ts
|
|
55
59
|
var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
|
|
56
|
-
const skipChains = await
|
|
60
|
+
const skipChains = await chunkATW6UNT5_cjs.ClientState.getSkipChains({ apiUrl, apiKey });
|
|
57
61
|
const skipChain = skipChains.find((chain2) => chain2.chainId === chainId);
|
|
58
62
|
if (!skipChain) {
|
|
59
63
|
return void 0;
|
|
@@ -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/postIbcOriginAssets.ts
|
|
6
|
-
var ibcOriginAssets =
|
|
6
|
+
var ibcOriginAssets = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "ibcOriginAssets",
|
|
8
8
|
method: "post",
|
|
9
9
|
path: "v2/fungible/ibc_origin_assets",
|
|
@@ -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/postTransactionStatus.ts
|
|
6
|
-
var transactionStatus =
|
|
6
|
+
var transactionStatus = chunk2QPPD3BB_cjs.pollingApi({
|
|
7
7
|
methodName: "status",
|
|
8
8
|
path: "v2/tx/status",
|
|
9
9
|
method: "get",
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkJBGCVGJP_cjs = require('./chunk-JBGCVGJP.cjs');
|
|
4
|
+
var chunkA3UNNRKD_cjs = require('./chunk-A3UNNRKD.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 } = chunkA3UNNRKD_cjs.updateRouteDetails({
|
|
12
12
|
status: "unconfirmed",
|
|
13
13
|
options
|
|
14
14
|
});
|
|
15
|
-
const addressList = await
|
|
15
|
+
const addressList = await chunkJBGCVGJP_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 chunkJBGCVGJP_cjs.executeTransactions({ ...options, routeId, txs: response?.txs });
|
|
47
|
+
await chunkA3UNNRKD_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/postRecommendAssets.ts
|
|
6
|
-
var recommendAssets =
|
|
6
|
+
var recommendAssets = chunk2QPPD3BB_cjs.api({
|
|
7
7
|
methodName: "assetRecommendations",
|
|
8
8
|
method: "post",
|
|
9
9
|
path: "v2/fungible/recommend_assets",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkNM4PISTQ_cjs = require('./chunk-NM4PISTQ.cjs');
|
|
4
4
|
var chunkMUJBB64F_cjs = require('./chunk-MUJBB64F.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
6
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
7
7
|
var stargate = require('@cosmjs/stargate');
|
|
8
8
|
var cosmwasmStargate = require('@cosmjs/cosmwasm-stargate');
|
|
9
9
|
var protoSigning = require('@cosmjs/proto-signing');
|
|
@@ -2235,13 +2235,13 @@ var opinitAminoConverters = {
|
|
|
2235
2235
|
...AminoConverter7
|
|
2236
2236
|
};
|
|
2237
2237
|
var setClientOptions = (options = {}) => {
|
|
2238
|
-
|
|
2238
|
+
chunk2QPPD3BB_cjs.ApiState.client = chunk2QPPD3BB_cjs.createRequestClient({
|
|
2239
2239
|
apiUrl: options.apiUrl || "https://api.skip.build",
|
|
2240
2240
|
apiKey: options.apiKey,
|
|
2241
2241
|
apiHeaders: options.apiHeaders
|
|
2242
2242
|
});
|
|
2243
|
-
|
|
2244
|
-
|
|
2243
|
+
chunkATW6UNT5_cjs.ClientState.endpointOptions = options.endpointOptions ?? {};
|
|
2244
|
+
chunkATW6UNT5_cjs.ClientState.aminoTypes = new stargate.AminoTypes({
|
|
2245
2245
|
...stargate.createDefaultAminoConverters(),
|
|
2246
2246
|
...cosmwasmStargate.createWasmAminoConverters(),
|
|
2247
2247
|
...circleAminoConverters,
|
|
@@ -2250,7 +2250,7 @@ var setClientOptions = (options = {}) => {
|
|
|
2250
2250
|
...opinitAminoConverters,
|
|
2251
2251
|
...options.aminoTypes ?? {}
|
|
2252
2252
|
});
|
|
2253
|
-
|
|
2253
|
+
chunkATW6UNT5_cjs.ClientState.registry = new protoSigning.Registry([
|
|
2254
2254
|
...stargate.defaultRegistryTypes,
|
|
2255
2255
|
["/cosmwasm.wasm.v1.MsgExecuteContract", tx_js.MsgExecuteContract],
|
|
2256
2256
|
["/initia.move.v1.MsgExecute", chunkNM4PISTQ_cjs.MsgExecute],
|
|
@@ -2259,10 +2259,10 @@ var setClientOptions = (options = {}) => {
|
|
|
2259
2259
|
...evmosProtoRegistry,
|
|
2260
2260
|
...options.registryTypes ?? []
|
|
2261
2261
|
]);
|
|
2262
|
-
if (!options.allowOptionsUpdateAfterApiCall &&
|
|
2262
|
+
if (!options.allowOptionsUpdateAfterApiCall && chunk2QPPD3BB_cjs.ApiState.apiCalled && !chunk2QPPD3BB_cjs.ApiState.initialized) {
|
|
2263
2263
|
throw new Error("setClientOptions must be called before an api request is made");
|
|
2264
2264
|
}
|
|
2265
|
-
|
|
2265
|
+
chunk2QPPD3BB_cjs.ApiState.initialized = true;
|
|
2266
2266
|
};
|
|
2267
2267
|
|
|
2268
2268
|
exports.setClientOptions = setClientOptions;
|