@skip-go/client 1.5.10 → 1.5.12
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-BQA7DW7X.cjs → chunk-223IDAKA.cjs} +2 -2
- package/dist/cjs/{chunk-D4WH536A.cjs → chunk-3GQO4X3O.cjs} +13 -13
- package/dist/cjs/{chunk-7NPXYEWD.cjs → chunk-AYNHU2OJ.cjs} +3 -3
- package/dist/cjs/{chunk-VAHQ7Z6F.cjs → chunk-BHIFZXOE.cjs} +3 -3
- package/dist/cjs/chunk-M7VZJWYO.cjs +185 -0
- package/dist/cjs/{chunk-YCEP26JD.cjs → chunk-MS6FADAW.cjs} +4 -4
- package/dist/cjs/{chunk-T3FJZY62.cjs → chunk-OWBHWXAC.cjs} +16 -12
- package/dist/cjs/{chunk-NRW7LIZP.cjs → chunk-XOI5GBXA.cjs} +2 -2
- 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-MX34RPR2.js → chunk-6KT3UDII.js} +1 -1
- package/dist/esm/{chunk-LCXLEGIY.js → chunk-B3GTS7VM.js} +1 -1
- package/dist/esm/{chunk-BDL2EYW6.js → chunk-K42V6DGK.js} +1 -1
- package/dist/esm/{chunk-5NDMKWQ5.js → chunk-LHH26KEJ.js} +14 -10
- package/dist/esm/chunk-P7Y53OGX.js +180 -0
- package/dist/esm/{chunk-372ICCFS.js → chunk-PBLRPGDI.js} +1 -1
- package/dist/esm/{chunk-6G4PYWTU.js → chunk-PSJSOR77.js} +3 -3
- package/dist/esm/{chunk-5FHOHRZP.js → chunk-TNSKHRI3.js} +1 -1
- 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-QCXACS5B.cjs +0 -185
- package/dist/esm/chunk-AUQYHQNV.js +0 -180
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMS6FADAW_cjs = require('./chunk-MS6FADAW.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 chunkMS6FADAW_cjs.getFeeInfoForChain(props);
|
|
10
10
|
if (!feeInfo || !feeInfo.gasPrice) {
|
|
11
11
|
return void 0;
|
|
12
12
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkA3UNNRKD_cjs = require('./chunk-A3UNNRKD.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkXOI5GBXA_cjs = require('./chunk-XOI5GBXA.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 chunkOWBHWXAC_cjs = require('./chunk-OWBHWXAC.cjs');
|
|
8
|
+
var chunkM7VZJWYO_cjs = require('./chunk-M7VZJWYO.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 = chunkM7VZJWYO_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 chunkM7VZJWYO_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 chunkOWBHWXAC_cjs.getRpcEndpointForChain(chainId);
|
|
65
65
|
const client = chunkATW6UNT5_cjs.ClientState.signingStargateClientByChainId[chainId] ?? await stargate.StargateClient.connect(endpoint, {
|
|
66
|
-
accountParser:
|
|
66
|
+
accountParser: chunkOWBHWXAC_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 = chunkM7VZJWYO_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 = chunkM7VZJWYO_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 chunkOWBHWXAC_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 chunkOWBHWXAC_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 chunkOWBHWXAC_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 chunkXOI5GBXA_cjs.validateCosmosGasBalance({
|
|
1101
1101
|
chainId: tx.cosmosTx.chainId ?? "",
|
|
1102
1102
|
signerAddress: tx.cosmosTx.signerAddress ?? "",
|
|
1103
1103
|
messages: tx.cosmosTx.msgs,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3GQO4X3O_cjs = require('./chunk-3GQO4X3O.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 chunk3GQO4X3O_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 chunk3GQO4X3O_cjs.executeTransactions({
|
|
136
136
|
...restOptions,
|
|
137
137
|
routeId,
|
|
138
138
|
txs: msgsResponse?.txs,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3GQO4X3O_cjs = require('./chunk-3GQO4X3O.cjs');
|
|
4
4
|
var chunkA3UNNRKD_cjs = require('./chunk-A3UNNRKD.cjs');
|
|
5
5
|
var chunkNCFH5MGF_cjs = require('./chunk-NCFH5MGF.cjs');
|
|
6
6
|
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
@@ -12,7 +12,7 @@ var executeRoute = async (options) => {
|
|
|
12
12
|
status: "unconfirmed",
|
|
13
13
|
options
|
|
14
14
|
});
|
|
15
|
-
const addressList = await
|
|
15
|
+
const addressList = await chunk3GQO4X3O_cjs.createValidAddressList({
|
|
16
16
|
userAddresses,
|
|
17
17
|
route
|
|
18
18
|
});
|
|
@@ -43,7 +43,7 @@ var executeRoute = async (options) => {
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
const { transactionDetails, executeTransaction } = await
|
|
46
|
+
const { transactionDetails, executeTransaction } = await chunk3GQO4X3O_cjs.executeTransactions({ ...options, routeId, txs: response?.txs });
|
|
47
47
|
await chunkA3UNNRKD_cjs.executeAndSubscribeToRouteStatus({
|
|
48
48
|
transactionDetails,
|
|
49
49
|
executeTransaction,
|