@skip-go/client 1.5.11 → 1.5.13
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-IZCPMKCR.cjs → chunk-4A4Z6FCH.cjs} +2 -2
- package/dist/cjs/{chunk-W2GCOCFQ.cjs → chunk-6ONNZVFR.cjs} +3 -3
- package/dist/cjs/{chunk-BS6XBIIO.cjs → chunk-7WZFFHVP.cjs} +13 -13
- package/dist/cjs/chunk-FN5BOI3Y.cjs +185 -0
- package/dist/cjs/{chunk-YOAOD4VP.cjs → chunk-LCN52TNO.cjs} +3 -3
- package/dist/cjs/{chunk-DW2KVVD7.cjs → chunk-NBE6XGOK.cjs} +2 -2
- package/dist/cjs/{chunk-OKEBQTOQ.cjs → chunk-NNPPDQLQ.cjs} +3 -3
- package/dist/cjs/{chunk-NIGXM2PR.cjs → chunk-SJGIEBXM.cjs} +4 -4
- package/dist/cjs/index.cjs +14 -14
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +6 -6
- package/dist/cjs/public-functions/executeRoute.cjs +6 -6
- 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 +8 -8
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +3 -3
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +4 -4
- package/dist/esm/{chunk-GW5R5PMO.js → chunk-5KEIMKHB.js} +3 -3
- package/dist/esm/{chunk-MZWZBLD7.js → chunk-6L7OKRPA.js} +1 -1
- package/dist/esm/{chunk-LHFDXQ3O.js → chunk-EWST66FR.js} +1 -1
- package/dist/esm/{chunk-3VNI3UKI.js → chunk-FNHK7U4A.js} +1 -1
- package/dist/esm/{chunk-ZZ4KTG27.js → chunk-HXT5I3PY.js} +1 -1
- package/dist/esm/{chunk-UAEC42RB.js → chunk-LFZEMPKE.js} +1 -1
- package/dist/esm/{chunk-N3MX3ON6.js → chunk-TCC6ZSWN.js} +1 -1
- package/dist/esm/chunk-YGL2QAY7.js +180 -0
- package/dist/esm/index.js +8 -8
- package/dist/esm/public-functions/executeMultipleRoutes.js +5 -5
- package/dist/esm/public-functions/executeRoute.js +5 -5
- package/dist/esm/public-functions/getFeeInfoForChain.js +2 -2
- package/dist/esm/public-functions/getRecommendedGasPrice.js +3 -3
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +8 -8
- package/dist/esm/public-functions/getSigningStargateClient.js +2 -2
- package/dist/esm/public-functions/validateCosmosGasBalance.js +3 -3
- package/package.json +1 -1
- package/dist/cjs/chunk-DYCASYGY.cjs +0 -185
- package/dist/esm/chunk-QYXBHD75.js +0 -180
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkSJGIEBXM_cjs = require('./chunk-SJGIEBXM.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 chunkSJGIEBXM_cjs.getFeeInfoForChain(props);
|
|
10
10
|
if (!feeInfo || !feeInfo.gasPrice) {
|
|
11
11
|
return void 0;
|
|
12
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7WZFFHVP_cjs = require('./chunk-7WZFFHVP.cjs');
|
|
4
4
|
var chunkA3UNNRKD_cjs = require('./chunk-A3UNNRKD.cjs');
|
|
5
5
|
var chunkNCFH5MGF_cjs = require('./chunk-NCFH5MGF.cjs');
|
|
6
6
|
var chunkAUTOIM57_cjs = require('./chunk-AUTOIM57.cjs');
|
|
@@ -24,7 +24,7 @@ var executeMultipleRoutes = async (options) => {
|
|
|
24
24
|
`executeMultipleRoutes error: no user addresses found for route: ${routeKey}`
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
const routeAddressList = await
|
|
27
|
+
const routeAddressList = await chunk7WZFFHVP_cjs.createValidAddressList({
|
|
28
28
|
userAddresses: _userAddresses,
|
|
29
29
|
route: routeValue
|
|
30
30
|
});
|
|
@@ -132,7 +132,7 @@ var executeMultipleRoutes = async (options) => {
|
|
|
132
132
|
if (routeKey === "mainRoute") {
|
|
133
133
|
mainRouteId = routeId;
|
|
134
134
|
}
|
|
135
|
-
const { transactionDetails, executeTransaction: _executeTransaction } = await
|
|
135
|
+
const { transactionDetails, executeTransaction: _executeTransaction } = await chunk7WZFFHVP_cjs.executeTransactions({
|
|
136
136
|
...restOptions,
|
|
137
137
|
routeId,
|
|
138
138
|
txs: msgsResponse?.txs,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkA3UNNRKD_cjs = require('./chunk-A3UNNRKD.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkNBE6XGOK_cjs = require('./chunk-NBE6XGOK.cjs');
|
|
5
5
|
var chunkTEH6UMUR_cjs = require('./chunk-TEH6UMUR.cjs');
|
|
6
6
|
var chunkF3EB2AQG_cjs = require('./chunk-F3EB2AQG.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkLCN52TNO_cjs = require('./chunk-LCN52TNO.cjs');
|
|
8
|
+
var chunkFN5BOI3Y_cjs = require('./chunk-FN5BOI3Y.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 = chunkFN5BOI3Y_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 chunkFN5BOI3Y_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 chunkLCN52TNO_cjs.getRpcEndpointForChain(chainId);
|
|
65
65
|
const client = chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId] ?? await stargate.StargateClient.connect(endpoint, {
|
|
66
|
-
accountParser:
|
|
66
|
+
accountParser: chunkLCN52TNO_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 = chunkFN5BOI3Y_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 = chunkFN5BOI3Y_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 chunkLCN52TNO_cjs.getSigningStargateClient({
|
|
292
292
|
chainId,
|
|
293
293
|
getOfflineSigner: options?.getCosmosSigner
|
|
294
294
|
});
|
|
@@ -757,7 +757,7 @@ var executeSvmTransaction = async (tx, options, index, routeId) => {
|
|
|
757
757
|
if (!signedTx) {
|
|
758
758
|
throw new Error("executeSvmTransaction error: signedTx is undefined");
|
|
759
759
|
}
|
|
760
|
-
const endpoint = await
|
|
760
|
+
const endpoint = await chunkLCN52TNO_cjs.getRpcEndpointForChain(svmTx.chainId);
|
|
761
761
|
const connection = new web3_js.Connection(endpoint);
|
|
762
762
|
let signature;
|
|
763
763
|
const submitTxResponse = await chunkJRXPJ45U_cjs.submitTransaction({
|
|
@@ -1010,7 +1010,7 @@ var validateSvmGasBalance = async ({
|
|
|
1010
1010
|
fee: null
|
|
1011
1011
|
};
|
|
1012
1012
|
}
|
|
1013
|
-
const endpoint = await
|
|
1013
|
+
const endpoint = await chunkLCN52TNO_cjs.getRpcEndpointForChain(tx.chainId ?? "");
|
|
1014
1014
|
const connection = new web3_js.Connection(endpoint);
|
|
1015
1015
|
if (!connection) throw new Error(`Failed to connect to ${tx.chainId}`);
|
|
1016
1016
|
if (!tx.tx) {
|
|
@@ -1097,7 +1097,7 @@ var validateGasBalances = async ({
|
|
|
1097
1097
|
throw new Error(`invalid msgs ${tx?.cosmosTx?.msgs}`);
|
|
1098
1098
|
}
|
|
1099
1099
|
try {
|
|
1100
|
-
const res = await
|
|
1100
|
+
const res = await chunkNBE6XGOK_cjs.validateCosmosGasBalance({
|
|
1101
1101
|
chainId: tx.cosmosTx.chainId ?? "",
|
|
1102
1102
|
signerAddress: tx.cosmosTx.signerAddress ?? "",
|
|
1103
1103
|
messages: tx.cosmosTx.msgs,
|