@skip-go/client 1.6.0-alpha.5 → 1.6.1
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/{chunk-6T4SBY5H.cjs → chunk-3NPG3IJC.cjs} +8 -8
- package/dist/cjs/{chunk-OVKHTOBP.cjs → chunk-4BCG2K6O.cjs} +4 -4
- package/dist/cjs/{chunk-TELXDMYL.cjs → chunk-77NJD7SH.cjs} +6 -6
- package/dist/cjs/{chunk-EAZQ2ECA.cjs → chunk-7VBQWNW6.cjs} +10 -73
- package/dist/cjs/{chunk-IUMMXFGP.cjs → chunk-ERKGQBNL.cjs} +2 -2
- package/dist/cjs/{chunk-3KO2DHFX.cjs → chunk-KGK6P2R2.cjs} +53 -33
- package/dist/cjs/{chunk-4ZIVDKQN.cjs → chunk-PPDPKCRT.cjs} +3 -3
- package/dist/cjs/{chunk-A3UNNRKD.cjs → chunk-X2ASEG4P.cjs} +5 -0
- package/dist/cjs/{chunk-CIZTNJ3K.cjs → chunk-ZOZQTMOC.cjs} +2 -2
- package/dist/cjs/index.cjs +19 -19
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +7 -7
- package/dist/cjs/public-functions/executeRoute.cjs +7 -7
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +3 -3
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +4 -4
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +9 -9
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +3 -3
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +5 -5
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +4 -4
- package/dist/esm/api/getAssets.d.ts +1 -1
- package/dist/esm/api/getAssetsBetweenChains.d.ts +1 -1
- package/dist/esm/api/getBridges.d.ts +1 -1
- package/dist/esm/api/getChains.d.ts +1 -1
- package/dist/esm/api/postAssetsFromSource.d.ts +1 -1
- package/dist/esm/api/postBalances.d.ts +2 -2
- package/dist/esm/api/postMessages.d.ts +2 -2
- package/dist/esm/api/postMessagesDirect.d.ts +1 -1
- package/dist/esm/api/postRecommendAssets.d.ts +1 -1
- package/dist/esm/api/postRoute.d.ts +2 -2
- package/dist/esm/api/postSubmitTransaction.d.ts +2 -2
- package/dist/esm/api/postTrackTransaction.d.ts +2 -2
- package/dist/esm/api/postTransactionStatus.d.ts +40 -2
- package/dist/esm/{callbacks-DdC6QMlE.d.ts → callbacks-Dpy_Kgln.d.ts} +4 -3
- package/dist/esm/{chunk-BU5RCZQH.js → chunk-CRKF5WSW.js} +1 -1
- package/dist/esm/{chunk-CGJRRAFS.js → chunk-FILH5L5T.js} +1 -1
- package/dist/esm/{chunk-5WYMRZIO.js → chunk-J2UCWYYM.js} +1 -1
- package/dist/esm/{chunk-3DIX6KRJ.js → chunk-QCGHODGV.js} +5 -0
- package/dist/esm/{chunk-DMJMN4J3.js → chunk-QMW5AP42.js} +1 -1
- package/dist/esm/{chunk-IZUHXTBP.js → chunk-R2AIIQDV.js} +2 -2
- package/dist/esm/{chunk-XIVAEU6S.js → chunk-W4ZLRWOX.js} +31 -11
- package/dist/esm/{chunk-G665WTT3.js → chunk-YLO3LH4B.js} +2 -2
- package/dist/esm/{chunk-NUHMTWHP.js → chunk-YPMWO6P2.js} +10 -73
- package/dist/esm/{client-types-D03Tellv.d.ts → client-types-B5U1JCIL.d.ts} +1 -1
- package/dist/esm/{generateApi-Bv02Xt5y.d.ts → generateApi-BcCeQt_X.d.ts} +1 -1
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +9 -9
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +4 -4
- package/dist/esm/public-functions/executeMultipleRoutes.js +6 -6
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +6 -6
- 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 +2 -2
- package/dist/esm/public-functions/getRecommendedGasPrice.js +3 -3
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +1 -1
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +9 -9
- package/dist/esm/public-functions/getSigningStargateClient.js +2 -2
- package/dist/esm/public-functions/setApiOptions.d.ts +1 -1
- package/dist/esm/public-functions/setClientOptions.d.ts +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.js +1 -1
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +4 -4
- package/dist/esm/public-functions/validateCosmosGasBalance.js +3 -3
- package/dist/esm/public-functions/waitForTransaction.d.ts +80 -4
- package/dist/esm/{setClientOptions-CTwe8YVX.d.ts → setClientOptions-D1FsRXBJ.d.ts} +3 -3
- package/dist/esm/{swaggerTypes-CzGbnX_b.d.ts → swaggerTypes-BCOa1382.d.ts} +2 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk477CU2G2_cjs = require('./chunk-477CU2G2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkPPDPKCRT_cjs = require('./chunk-PPDPKCRT.cjs');
|
|
5
5
|
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
6
6
|
var bignumber_js = require('bignumber.js');
|
|
7
7
|
var stargate = require('@cosmjs/stargate');
|
|
@@ -35,7 +35,7 @@ var validateCosmosGasBalance = async ({
|
|
|
35
35
|
if (txIndex !== 0 && chainId === "noble-1") {
|
|
36
36
|
return "0";
|
|
37
37
|
}
|
|
38
|
-
const { stargateClient } = await
|
|
38
|
+
const { stargateClient } = await chunkPPDPKCRT_cjs.getSigningStargateClient({
|
|
39
39
|
chainId,
|
|
40
40
|
getOfflineSigner
|
|
41
41
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkX2ASEG4P_cjs = require('./chunk-X2ASEG4P.cjs');
|
|
4
|
+
var chunkERKGQBNL_cjs = require('./chunk-ERKGQBNL.cjs');
|
|
5
5
|
var chunk477CU2G2_cjs = require('./chunk-477CU2G2.cjs');
|
|
6
6
|
var chunkF3EB2AQG_cjs = require('./chunk-F3EB2AQG.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkPPDPKCRT_cjs = require('./chunk-PPDPKCRT.cjs');
|
|
8
|
+
var chunk7VBQWNW6_cjs = require('./chunk-7VBQWNW6.cjs');
|
|
9
9
|
var chunkJRXPJ45U_cjs = require('./chunk-JRXPJ45U.cjs');
|
|
10
10
|
var chunkFCTBCHOT_cjs = require('./chunk-FCTBCHOT.cjs');
|
|
11
11
|
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
@@ -35,7 +35,7 @@ var getRestEndpointForChain = async (chainId) => {
|
|
|
35
35
|
return endpointOptions.rest;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
const chain =
|
|
38
|
+
const chain = chunk7VBQWNW6_cjs.chains().find((chain2) => chain2.chainId === chainId);
|
|
39
39
|
if (!chain) {
|
|
40
40
|
throw new Error(
|
|
41
41
|
`getRestEndpointForChain error: failed to find chain id '${chainId}' in registry`
|
|
@@ -47,7 +47,7 @@ var getRestEndpointForChain = async (chainId) => {
|
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
const endpoints = chain.apis?.rest?.map((api) => api.address);
|
|
50
|
-
const endpoint = await
|
|
50
|
+
const endpoint = await chunk7VBQWNW6_cjs.findFirstWorkingEndpoint(endpoints, "rest");
|
|
51
51
|
if (!endpoint) {
|
|
52
52
|
throw new Error(
|
|
53
53
|
`getRestEndpointForChain error: failed to find REST endpoint for chain id '${chainId}'`
|
|
@@ -61,9 +61,9 @@ var getAccountNumberAndSequence = async (address, chainId) => {
|
|
|
61
61
|
if (chainId.includes("dymension")) {
|
|
62
62
|
return getAccountNumberAndSequenceFromDymension(address, chainId);
|
|
63
63
|
}
|
|
64
|
-
const endpoint = await
|
|
64
|
+
const endpoint = await chunkPPDPKCRT_cjs.getRpcEndpointForChain(chainId);
|
|
65
65
|
const client = chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId] ?? await stargate.StargateClient.connect(endpoint, {
|
|
66
|
-
accountParser:
|
|
66
|
+
accountParser: chunkPPDPKCRT_cjs.accountParser
|
|
67
67
|
});
|
|
68
68
|
const account = await client.getAccount(address);
|
|
69
69
|
if (!account) {
|
|
@@ -124,7 +124,7 @@ function encodeEthSecp256k1Pubkey(pubkey) {
|
|
|
124
124
|
|
|
125
125
|
// src/proto-signing/pubkey.ts
|
|
126
126
|
function makePubkeyAnyFromAccount(account, chainId) {
|
|
127
|
-
const isEthermint =
|
|
127
|
+
const isEthermint = chunk7VBQWNW6_cjs.getIsEthermint(chainId);
|
|
128
128
|
const pubkey = isEthermint ? encodeEthSecp256k1Pubkey(account.pubkey) : amino.encodeSecp256k1Pubkey(account.pubkey);
|
|
129
129
|
const pubkeyAny = encodePubkeyToAny(pubkey, chainId, isEthermint);
|
|
130
130
|
return pubkeyAny;
|
|
@@ -145,7 +145,7 @@ function encodePubkeyToAny(pubkey, chainId, isEthermint) {
|
|
|
145
145
|
value: Uint8Array.from(keys_js.PubKey.encode(pubkeyProto).finish())
|
|
146
146
|
});
|
|
147
147
|
} else {
|
|
148
|
-
const isInitia =
|
|
148
|
+
const isInitia = chunk7VBQWNW6_cjs.getIsInitia(chainId);
|
|
149
149
|
const pubkeyProto = keys_js.PubKey.fromPartial({
|
|
150
150
|
key: encoding.fromBase64(pubkey.value)
|
|
151
151
|
});
|
|
@@ -288,7 +288,7 @@ var signCosmosTransaction = async ({
|
|
|
288
288
|
if (messages === void 0) {
|
|
289
289
|
throw new Error("no messages found for tx");
|
|
290
290
|
}
|
|
291
|
-
const { signer } = await
|
|
291
|
+
const { signer } = await chunkPPDPKCRT_cjs.getSigningStargateClient({
|
|
292
292
|
chainId,
|
|
293
293
|
getOfflineSigner: options?.getCosmosSigner
|
|
294
294
|
});
|
|
@@ -327,7 +327,7 @@ var signCosmosTransaction = async ({
|
|
|
327
327
|
txIndex: index,
|
|
328
328
|
signerAddress: currentUserAddress
|
|
329
329
|
});
|
|
330
|
-
|
|
330
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
331
331
|
status: "signing",
|
|
332
332
|
routeId,
|
|
333
333
|
options
|
|
@@ -343,7 +343,7 @@ var signCosmosTransaction = async ({
|
|
|
343
343
|
options?.onTransactionSigned?.({
|
|
344
344
|
chainId
|
|
345
345
|
});
|
|
346
|
-
|
|
346
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
347
347
|
status: "pending",
|
|
348
348
|
routeId,
|
|
349
349
|
options
|
|
@@ -629,7 +629,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
629
629
|
status: "pending",
|
|
630
630
|
allowance: requiredApproval
|
|
631
631
|
});
|
|
632
|
-
|
|
632
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
633
633
|
status: "allowance",
|
|
634
634
|
routeId,
|
|
635
635
|
options
|
|
@@ -663,7 +663,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
663
663
|
signerAddress: evmSigner.account.address,
|
|
664
664
|
txIndex: index
|
|
665
665
|
});
|
|
666
|
-
|
|
666
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
667
667
|
status: "signing",
|
|
668
668
|
routeId,
|
|
669
669
|
options
|
|
@@ -675,7 +675,7 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
675
675
|
chain: evmSigner.chain,
|
|
676
676
|
value: evmTx.value === "" ? void 0 : BigInt(evmTx.value)
|
|
677
677
|
});
|
|
678
|
-
|
|
678
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
679
679
|
status: "pending",
|
|
680
680
|
routeId,
|
|
681
681
|
options
|
|
@@ -688,6 +688,24 @@ var executeEvmTransaction = async (message, options, index, routeId) => {
|
|
|
688
688
|
});
|
|
689
689
|
return receipt;
|
|
690
690
|
};
|
|
691
|
+
function deserializeSvmTransaction(txBuffer) {
|
|
692
|
+
const probe = web3_js.VersionedTransaction.deserialize(txBuffer);
|
|
693
|
+
if (probe.version === "legacy") {
|
|
694
|
+
return web3_js.Transaction.from(txBuffer);
|
|
695
|
+
}
|
|
696
|
+
return probe;
|
|
697
|
+
}
|
|
698
|
+
function isVersionedTransaction(tx) {
|
|
699
|
+
return "version" in tx;
|
|
700
|
+
}
|
|
701
|
+
function serializeSvmMessage(tx) {
|
|
702
|
+
return isVersionedTransaction(tx) ? tx.message.serialize() : tx.serializeMessage();
|
|
703
|
+
}
|
|
704
|
+
function simulateSvmTransaction(connection, tx) {
|
|
705
|
+
return isVersionedTransaction(tx) ? connection.simulateTransaction(tx) : connection.simulateTransaction(tx);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// src/private-functions/svm/signSvmTransaction.ts
|
|
691
709
|
var signSvmTransaction = async ({
|
|
692
710
|
tx,
|
|
693
711
|
options,
|
|
@@ -716,10 +734,12 @@ var signSvmTransaction = async ({
|
|
|
716
734
|
throw new Error("executeSvmTransaction error: chainId not found in svmTx");
|
|
717
735
|
}
|
|
718
736
|
const txBuffer = Buffer.from(svmTx.tx ?? "", "base64");
|
|
719
|
-
const transaction =
|
|
737
|
+
const transaction = deserializeSvmTransaction(txBuffer);
|
|
720
738
|
if (options.svmFeePayer) {
|
|
721
|
-
const message = transaction
|
|
722
|
-
const resSignTx = await options.svmFeePayer.signTransaction(
|
|
739
|
+
const message = serializeSvmMessage(transaction);
|
|
740
|
+
const resSignTx = await options.svmFeePayer.signTransaction(
|
|
741
|
+
Buffer.from(message)
|
|
742
|
+
);
|
|
723
743
|
transaction.addSignature(
|
|
724
744
|
new web3_js.PublicKey(options.svmFeePayer.address),
|
|
725
745
|
Buffer.from(resSignTx)
|
|
@@ -731,19 +751,19 @@ var signSvmTransaction = async ({
|
|
|
731
751
|
signerAddress: signer.publicKey?.toBase58(),
|
|
732
752
|
txIndex: index
|
|
733
753
|
});
|
|
734
|
-
|
|
754
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
735
755
|
status: "signing",
|
|
736
756
|
routeId,
|
|
737
757
|
options
|
|
738
758
|
});
|
|
739
759
|
const signedTx = await signer.signTransaction(transaction);
|
|
740
760
|
options?.onTransactionSigned?.({ chainId: svmTx.chainId });
|
|
741
|
-
|
|
761
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
742
762
|
status: "pending",
|
|
743
763
|
routeId,
|
|
744
764
|
options
|
|
745
765
|
});
|
|
746
|
-
const serializedTx = signedTx.serialize();
|
|
766
|
+
const serializedTx = Buffer.from(signedTx.serialize());
|
|
747
767
|
return serializedTx;
|
|
748
768
|
};
|
|
749
769
|
|
|
@@ -757,7 +777,7 @@ var executeSvmTransaction = async (tx, options, index, routeId) => {
|
|
|
757
777
|
if (!signedTx) {
|
|
758
778
|
throw new Error("executeSvmTransaction error: signedTx is undefined");
|
|
759
779
|
}
|
|
760
|
-
const endpoint = await
|
|
780
|
+
const endpoint = await chunkPPDPKCRT_cjs.getRpcEndpointForChain(svmTx.chainId);
|
|
761
781
|
const connection = new web3_js.Connection(endpoint);
|
|
762
782
|
let signature;
|
|
763
783
|
const submitTxResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
@@ -869,7 +889,7 @@ var validateEvmTokenApproval = async ({
|
|
|
869
889
|
status: "pending",
|
|
870
890
|
allowance: requiredApproval
|
|
871
891
|
});
|
|
872
|
-
|
|
892
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
873
893
|
status: "allowance",
|
|
874
894
|
routeId,
|
|
875
895
|
options
|
|
@@ -896,7 +916,7 @@ var validateEvmTokenApproval = async ({
|
|
|
896
916
|
onApproveAllowance?.({
|
|
897
917
|
status: "completed"
|
|
898
918
|
});
|
|
899
|
-
|
|
919
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
900
920
|
status: "signing",
|
|
901
921
|
routeId,
|
|
902
922
|
options
|
|
@@ -1010,7 +1030,7 @@ var validateSvmGasBalance = async ({
|
|
|
1010
1030
|
fee: null
|
|
1011
1031
|
};
|
|
1012
1032
|
}
|
|
1013
|
-
const endpoint = await
|
|
1033
|
+
const endpoint = await chunkPPDPKCRT_cjs.getRpcEndpointForChain(tx.chainId ?? "");
|
|
1014
1034
|
const connection = new web3_js.Connection(endpoint);
|
|
1015
1035
|
if (!connection) throw new Error(`Failed to connect to ${tx.chainId}`);
|
|
1016
1036
|
if (!tx.tx) {
|
|
@@ -1019,7 +1039,7 @@ var validateSvmGasBalance = async ({
|
|
|
1019
1039
|
const txBuffer = Buffer.from(tx.tx, "base64");
|
|
1020
1040
|
let transaction;
|
|
1021
1041
|
try {
|
|
1022
|
-
transaction =
|
|
1042
|
+
transaction = deserializeSvmTransaction(txBuffer);
|
|
1023
1043
|
} catch (decodeError) {
|
|
1024
1044
|
return {
|
|
1025
1045
|
success: false,
|
|
@@ -1028,7 +1048,7 @@ var validateSvmGasBalance = async ({
|
|
|
1028
1048
|
fee: null
|
|
1029
1049
|
};
|
|
1030
1050
|
}
|
|
1031
|
-
const simulation = await connection
|
|
1051
|
+
const simulation = await simulateSvmTransaction(connection, transaction);
|
|
1032
1052
|
if (simulation.value.err) {
|
|
1033
1053
|
const logs = simulation.value.logs ?? [];
|
|
1034
1054
|
const shortfall = getSolShortfall(logs);
|
|
@@ -1088,7 +1108,7 @@ var validateGasBalances = async ({
|
|
|
1088
1108
|
onValidateGasBalance?.({
|
|
1089
1109
|
status: "pending"
|
|
1090
1110
|
});
|
|
1091
|
-
|
|
1111
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
1092
1112
|
status: "validating",
|
|
1093
1113
|
routeId,
|
|
1094
1114
|
options
|
|
@@ -1097,7 +1117,7 @@ var validateGasBalances = async ({
|
|
|
1097
1117
|
throw new Error(`invalid msgs ${tx?.cosmosTx?.msgs}`);
|
|
1098
1118
|
}
|
|
1099
1119
|
try {
|
|
1100
|
-
const res = await
|
|
1120
|
+
const res = await chunkERKGQBNL_cjs.validateCosmosGasBalance({
|
|
1101
1121
|
chainId: tx.cosmosTx.chainId ?? "",
|
|
1102
1122
|
signerAddress: tx.cosmosTx.signerAddress ?? "",
|
|
1103
1123
|
messages: tx.cosmosTx.msgs,
|
|
@@ -1122,7 +1142,7 @@ var validateGasBalances = async ({
|
|
|
1122
1142
|
onValidateGasBalance?.({
|
|
1123
1143
|
status: "pending"
|
|
1124
1144
|
});
|
|
1125
|
-
|
|
1145
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
1126
1146
|
status: "validating",
|
|
1127
1147
|
routeId,
|
|
1128
1148
|
options
|
|
@@ -1155,7 +1175,7 @@ var validateGasBalances = async ({
|
|
|
1155
1175
|
onValidateGasBalance?.({
|
|
1156
1176
|
status: "pending"
|
|
1157
1177
|
});
|
|
1158
|
-
|
|
1178
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
1159
1179
|
status: "validating",
|
|
1160
1180
|
routeId,
|
|
1161
1181
|
options
|
|
@@ -1251,7 +1271,7 @@ var executeTransactions = async (options) => {
|
|
|
1251
1271
|
throw new Error("executeRoute error: invalid message type");
|
|
1252
1272
|
}
|
|
1253
1273
|
});
|
|
1254
|
-
|
|
1274
|
+
chunkX2ASEG4P_cjs.updateRouteDetails({
|
|
1255
1275
|
transactionDetails,
|
|
1256
1276
|
routeId,
|
|
1257
1277
|
options
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkMUJBB64F_cjs = require('./chunk-MUJBB64F.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk7VBQWNW6_cjs = require('./chunk-7VBQWNW6.cjs');
|
|
5
5
|
var chunkATW6UNT5_cjs = require('./chunk-ATW6UNT5.cjs');
|
|
6
6
|
var stargate = require('@cosmjs/stargate');
|
|
7
7
|
var utils = require('@cosmjs/utils');
|
|
@@ -338,7 +338,7 @@ var getRpcEndpointForChain = async (chainId) => {
|
|
|
338
338
|
console.warn(
|
|
339
339
|
"Warning: You are using unreliable public endpoints. We strongly recommend overriding them via endpointOptions for use beyond development settings."
|
|
340
340
|
);
|
|
341
|
-
const chain =
|
|
341
|
+
const chain = chunk7VBQWNW6_cjs.chains().find((chain2) => chain2.chainId === chainId);
|
|
342
342
|
if (!chain) {
|
|
343
343
|
throw new Error(`getRpcEndpointForChain: failed to find chain id '${chainId}' in registry`);
|
|
344
344
|
}
|
|
@@ -348,7 +348,7 @@ var getRpcEndpointForChain = async (chainId) => {
|
|
|
348
348
|
);
|
|
349
349
|
}
|
|
350
350
|
const endpoints = chain.apis?.rpc?.map((api) => api.address);
|
|
351
|
-
const endpoint = await
|
|
351
|
+
const endpoint = await chunk7VBQWNW6_cjs.findFirstWorkingEndpoint(endpoints, "rpc");
|
|
352
352
|
if (!endpoint) {
|
|
353
353
|
throw new Error(
|
|
354
354
|
`getRpcEndpointForChain error: failed to find RPC endpoint for chain id '${chainId}'`
|
|
@@ -11,6 +11,7 @@ function getClientTransferEvent(transferEvent) {
|
|
|
11
11
|
const axelarTransfer = combinedTransferEvent?.axelarTransfer;
|
|
12
12
|
const ibcTransfer = combinedTransferEvent?.ibcTransfer;
|
|
13
13
|
const cctpTransfer = combinedTransferEvent?.cctpTransfer;
|
|
14
|
+
const cctpTransferV2 = combinedTransferEvent?.cctpTransferV2;
|
|
14
15
|
const hyperlaneTransfer = combinedTransferEvent?.hyperlaneTransfer;
|
|
15
16
|
const opInitTransfer = combinedTransferEvent?.opInitTransfer;
|
|
16
17
|
const goFastTransfer = combinedTransferEvent?.goFastTransfer;
|
|
@@ -24,6 +25,8 @@ function getClientTransferEvent(transferEvent) {
|
|
|
24
25
|
transferType = "ibcTransfer" /* ibcTransfer */;
|
|
25
26
|
} else if (cctpTransfer) {
|
|
26
27
|
transferType = "cctpTransfer" /* cctpTransfer */;
|
|
28
|
+
} else if (cctpTransferV2) {
|
|
29
|
+
transferType = "cctpTransferV2" /* cctpTransferV2 */;
|
|
27
30
|
} else if (hyperlaneTransfer) {
|
|
28
31
|
transferType = "hyperlaneTransfer" /* hyperlaneTransfer */;
|
|
29
32
|
} else if (opInitTransfer) {
|
|
@@ -139,6 +142,7 @@ function getClientTransferEvent(transferEvent) {
|
|
|
139
142
|
...ibcTransfer,
|
|
140
143
|
...axelarTransfer,
|
|
141
144
|
...cctpTransfer,
|
|
145
|
+
...cctpTransferV2,
|
|
142
146
|
...hyperlaneTransfer,
|
|
143
147
|
...stargateTransfer,
|
|
144
148
|
...hyperlaneTransfer,
|
|
@@ -215,6 +219,7 @@ var TransferType = /* @__PURE__ */ ((TransferType2) => {
|
|
|
215
219
|
TransferType2["ibcTransfer"] = "ibcTransfer";
|
|
216
220
|
TransferType2["axelarTransfer"] = "axelarTransfer";
|
|
217
221
|
TransferType2["cctpTransfer"] = "cctpTransfer";
|
|
222
|
+
TransferType2["cctpTransferV2"] = "cctpTransferV2";
|
|
218
223
|
TransferType2["hyperlaneTransfer"] = "hyperlaneTransfer";
|
|
219
224
|
TransferType2["opInitTransfer"] = "opInitTransfer";
|
|
220
225
|
TransferType2["goFastTransfer"] = "goFastTransfer";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4BCG2K6O_cjs = require('./chunk-4BCG2K6O.cjs');
|
|
4
4
|
var math = require('@cosmjs/math');
|
|
5
5
|
var stargate = require('@cosmjs/stargate');
|
|
6
6
|
var bignumber_js = require('bignumber.js');
|
|
7
7
|
|
|
8
8
|
var getRecommendedGasPrice = async (props) => {
|
|
9
|
-
const feeInfo = await
|
|
9
|
+
const feeInfo = await chunk4BCG2K6O_cjs.getFeeInfoForChain(props);
|
|
10
10
|
if (!feeInfo || !feeInfo.gasPrice) {
|
|
11
11
|
return void 0;
|
|
12
12
|
}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -4,19 +4,19 @@ var chunk25TA7Z7R_cjs = require('./chunk-25TA7Z7R.cjs');
|
|
|
4
4
|
var chunkAVWWCQ5P_cjs = require('./chunk-AVWWCQ5P.cjs');
|
|
5
5
|
var chunkCK6CQWQU_cjs = require('./chunk-CK6CQWQU.cjs');
|
|
6
6
|
var chunk4BWE7SOV_cjs = require('./chunk-4BWE7SOV.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
var
|
|
11
|
-
var
|
|
7
|
+
var chunk3NPG3IJC_cjs = require('./chunk-3NPG3IJC.cjs');
|
|
8
|
+
var chunk77NJD7SH_cjs = require('./chunk-77NJD7SH.cjs');
|
|
9
|
+
require('./chunk-KGK6P2R2.cjs');
|
|
10
|
+
var chunkX2ASEG4P_cjs = require('./chunk-X2ASEG4P.cjs');
|
|
11
|
+
var chunkERKGQBNL_cjs = require('./chunk-ERKGQBNL.cjs');
|
|
12
12
|
var chunk477CU2G2_cjs = require('./chunk-477CU2G2.cjs');
|
|
13
13
|
require('./chunk-NM4PISTQ.cjs');
|
|
14
14
|
var chunkF3EB2AQG_cjs = require('./chunk-F3EB2AQG.cjs');
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
15
|
+
var chunkZOZQTMOC_cjs = require('./chunk-ZOZQTMOC.cjs');
|
|
16
|
+
var chunk4BCG2K6O_cjs = require('./chunk-4BCG2K6O.cjs');
|
|
17
|
+
var chunkPPDPKCRT_cjs = require('./chunk-PPDPKCRT.cjs');
|
|
18
18
|
require('./chunk-MUJBB64F.cjs');
|
|
19
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-7VBQWNW6.cjs');
|
|
20
20
|
var chunkOJISEAMX_cjs = require('./chunk-OJISEAMX.cjs');
|
|
21
21
|
var chunkNCFH5MGF_cjs = require('./chunk-NCFH5MGF.cjs');
|
|
22
22
|
var chunkA5S6SIYN_cjs = require('./chunk-A5S6SIYN.cjs');
|
|
@@ -141,31 +141,31 @@ Object.defineProperty(exports, "waitForTransactionWithCancel", {
|
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "executeMultipleRoutes", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunk3NPG3IJC_cjs.executeMultipleRoutes; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "executeRoute", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunk77NJD7SH_cjs.executeRoute; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "TransferType", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkX2ASEG4P_cjs.TransferType; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "getSimpleOverallStatus", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkX2ASEG4P_cjs.getSimpleOverallStatus; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "getTransferEventsFromTxStatusResponse", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkX2ASEG4P_cjs.getTransferEventsFromTxStatusResponse; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "subscribeToRouteStatus", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkX2ASEG4P_cjs.subscribeToRouteStatus; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "validateCosmosGasBalance", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkERKGQBNL_cjs.validateCosmosGasBalance; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "getCosmosGasAmountForMessage", {
|
|
171
171
|
enumerable: true,
|
|
@@ -177,15 +177,15 @@ Object.defineProperty(exports, "getEVMGasAmountForMessage", {
|
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "getRecommendedGasPrice", {
|
|
179
179
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkZOZQTMOC_cjs.getRecommendedGasPrice; }
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "getFeeInfoForChain", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunk4BCG2K6O_cjs.getFeeInfoForChain; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "getSigningStargateClient", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkPPDPKCRT_cjs.getSigningStargateClient; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "ibcOriginAssets", {
|
|
191
191
|
enumerable: true,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunk3NPG3IJC_cjs = require('../chunk-3NPG3IJC.cjs');
|
|
4
|
+
require('../chunk-KGK6P2R2.cjs');
|
|
5
|
+
require('../chunk-X2ASEG4P.cjs');
|
|
6
|
+
require('../chunk-ERKGQBNL.cjs');
|
|
7
7
|
require('../chunk-477CU2G2.cjs');
|
|
8
8
|
require('../chunk-NM4PISTQ.cjs');
|
|
9
9
|
require('../chunk-F3EB2AQG.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-PPDPKCRT.cjs');
|
|
11
11
|
require('../chunk-MUJBB64F.cjs');
|
|
12
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
13
13
|
require('../chunk-NCFH5MGF.cjs');
|
|
14
14
|
require('../chunk-JRXPJ45U.cjs');
|
|
15
15
|
require('../chunk-AUTOIM57.cjs');
|
|
@@ -23,5 +23,5 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "executeMultipleRoutes", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk3NPG3IJC_cjs.executeMultipleRoutes; }
|
|
27
27
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunk77NJD7SH_cjs = require('../chunk-77NJD7SH.cjs');
|
|
4
|
+
require('../chunk-KGK6P2R2.cjs');
|
|
5
|
+
require('../chunk-X2ASEG4P.cjs');
|
|
6
|
+
require('../chunk-ERKGQBNL.cjs');
|
|
7
7
|
require('../chunk-477CU2G2.cjs');
|
|
8
8
|
require('../chunk-NM4PISTQ.cjs');
|
|
9
9
|
require('../chunk-F3EB2AQG.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-PPDPKCRT.cjs');
|
|
11
11
|
require('../chunk-MUJBB64F.cjs');
|
|
12
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
13
13
|
require('../chunk-NCFH5MGF.cjs');
|
|
14
14
|
require('../chunk-JRXPJ45U.cjs');
|
|
15
15
|
require('../chunk-AUTOIM57.cjs');
|
|
@@ -23,5 +23,5 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "executeRoute", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk77NJD7SH_cjs.executeRoute; }
|
|
27
27
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk4BCG2K6O_cjs = require('../chunk-4BCG2K6O.cjs');
|
|
4
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
5
5
|
require('../chunk-ATW6UNT5.cjs');
|
|
6
6
|
require('../chunk-2QPPD3BB.cjs');
|
|
7
7
|
require('../chunk-LJV45UGL.cjs');
|
|
@@ -10,5 +10,5 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "getFeeInfoForChain", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk4BCG2K6O_cjs.getFeeInfoForChain; }
|
|
14
14
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunkZOZQTMOC_cjs = require('../chunk-ZOZQTMOC.cjs');
|
|
4
|
+
require('../chunk-4BCG2K6O.cjs');
|
|
5
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
6
6
|
require('../chunk-ATW6UNT5.cjs');
|
|
7
7
|
require('../chunk-2QPPD3BB.cjs');
|
|
8
8
|
require('../chunk-LJV45UGL.cjs');
|
|
@@ -11,5 +11,5 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "getRecommendedGasPrice", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkZOZQTMOC_cjs.getRecommendedGasPrice; }
|
|
15
15
|
});
|
|
@@ -4,19 +4,19 @@ var chunk25TA7Z7R_cjs = require('../chunk-25TA7Z7R.cjs');
|
|
|
4
4
|
require('../chunk-AVWWCQ5P.cjs');
|
|
5
5
|
require('../chunk-CK6CQWQU.cjs');
|
|
6
6
|
require('../chunk-4BWE7SOV.cjs');
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
11
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-3NPG3IJC.cjs');
|
|
8
|
+
require('../chunk-77NJD7SH.cjs');
|
|
9
|
+
require('../chunk-KGK6P2R2.cjs');
|
|
10
|
+
require('../chunk-X2ASEG4P.cjs');
|
|
11
|
+
require('../chunk-ERKGQBNL.cjs');
|
|
12
12
|
require('../chunk-477CU2G2.cjs');
|
|
13
13
|
require('../chunk-NM4PISTQ.cjs');
|
|
14
14
|
require('../chunk-F3EB2AQG.cjs');
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-ZOZQTMOC.cjs');
|
|
16
|
+
require('../chunk-4BCG2K6O.cjs');
|
|
17
|
+
require('../chunk-PPDPKCRT.cjs');
|
|
18
18
|
require('../chunk-MUJBB64F.cjs');
|
|
19
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
20
20
|
require('../chunk-OJISEAMX.cjs');
|
|
21
21
|
require('../chunk-NCFH5MGF.cjs');
|
|
22
22
|
require('../chunk-A5S6SIYN.cjs');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPPDPKCRT_cjs = require('../chunk-PPDPKCRT.cjs');
|
|
4
4
|
require('../chunk-MUJBB64F.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
6
6
|
require('../chunk-ATW6UNT5.cjs');
|
|
7
7
|
require('../chunk-2QPPD3BB.cjs');
|
|
8
8
|
require('../chunk-LJV45UGL.cjs');
|
|
@@ -11,5 +11,5 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "getSigningStargateClient", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkPPDPKCRT_cjs.getSigningStargateClient; }
|
|
15
15
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkX2ASEG4P_cjs = require('../chunk-X2ASEG4P.cjs');
|
|
4
4
|
require('../chunk-AUTOIM57.cjs');
|
|
5
5
|
require('../chunk-PDNKS5R2.cjs');
|
|
6
6
|
require('../chunk-2QPPD3BB.cjs');
|
|
@@ -10,17 +10,17 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "executeAndSubscribeToRouteStatus", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkX2ASEG4P_cjs.executeAndSubscribeToRouteStatus; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "getTransactionStatus", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkX2ASEG4P_cjs.getTransactionStatus; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "subscribeToRouteStatus", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkX2ASEG4P_cjs.subscribeToRouteStatus; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "updateRouteDetails", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkX2ASEG4P_cjs.updateRouteDetails; }
|
|
26
26
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkERKGQBNL_cjs = require('../chunk-ERKGQBNL.cjs');
|
|
4
4
|
require('../chunk-477CU2G2.cjs');
|
|
5
5
|
require('../chunk-NM4PISTQ.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-PPDPKCRT.cjs');
|
|
7
7
|
require('../chunk-MUJBB64F.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-7VBQWNW6.cjs');
|
|
9
9
|
require('../chunk-ATW6UNT5.cjs');
|
|
10
10
|
require('../chunk-2QPPD3BB.cjs');
|
|
11
11
|
require('../chunk-LJV45UGL.cjs');
|
|
@@ -14,5 +14,5 @@ require('../chunk-LJV45UGL.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "validateCosmosGasBalance", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkERKGQBNL_cjs.validateCosmosGasBalance; }
|
|
18
18
|
});
|