@skip-go/client 1.0.3 → 1.0.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/api/{getAssets.d.cts → getAssets.d.ts} +2 -2
- package/dist/api/getAssets.js +2 -0
- package/dist/api/{getAssetsBetweenChains.d.cts → getAssetsBetweenChains.d.ts} +2 -2
- package/dist/api/getAssetsBetweenChains.js +2 -0
- package/dist/api/{getBridges.d.cts → getBridges.d.ts} +2 -2
- package/dist/api/getBridges.js +2 -0
- package/dist/api/{getChains.d.cts → getChains.d.ts} +2 -2
- package/dist/api/getChains.js +2 -0
- package/dist/api/{getVenues.d.cts → getVenues.d.ts} +1 -1
- package/dist/api/getVenues.js +2 -0
- package/dist/api/{postAssetsFromSource.d.cts → postAssetsFromSource.d.ts} +2 -2
- package/dist/api/postAssetsFromSource.js +3 -0
- package/dist/api/{postBalances.d.cts → postBalances.d.ts} +3 -3
- package/dist/api/postBalances.js +2 -0
- package/dist/api/{postIbcOriginAssets.d.cts → postIbcOriginAssets.d.ts} +1 -1
- package/dist/api/postIbcOriginAssets.js +2 -0
- package/dist/api/{postMessages.d.cts → postMessages.d.ts} +186 -186
- package/dist/api/postMessages.js +2 -0
- package/dist/api/{postMessagesDirect.d.cts → postMessagesDirect.d.ts} +185 -185
- package/dist/api/postMessagesDirect.js +2 -0
- package/dist/api/{postRecommendAssets.d.cts → postRecommendAssets.d.ts} +2 -2
- package/dist/api/postRecommendAssets.js +2 -0
- package/dist/api/{postRoute.d.cts → postRoute.d.ts} +163 -163
- package/dist/api/postRoute.js +2 -0
- package/dist/api/{postSubmitTransaction.d.cts → postSubmitTransaction.d.ts} +1 -1
- package/dist/api/postSubmitTransaction.js +2 -0
- package/dist/api/{postTrackTransaction.d.cts → postTrackTransaction.d.ts} +1 -1
- package/dist/api/postTrackTransaction.js +2 -0
- package/dist/api/{postTransactionStatus.d.cts → postTransactionStatus.d.ts} +3 -3
- package/dist/api/postTransactionStatus.js +2 -0
- package/dist/chunk-33K6EESX.js +10 -0
- package/dist/{chunk-77ITCT75.cjs → chunk-4JJWOILI.js} +3 -5
- package/dist/chunk-BQTQJQ5E.js +10 -0
- package/dist/{chunk-ED2OY55G.cjs → chunk-BRMONS6A.js} +5 -11
- package/dist/{chunk-PNWIJSMA.cjs → chunk-C2EDPY6J.js} +3 -5
- package/dist/chunk-DW4U6YI6.js +10 -0
- package/dist/{chunk-G7BBDZ7C.cjs → chunk-F75DC5RW.js} +182 -208
- package/dist/{chunk-SFMBRLUS.cjs → chunk-GARVPN2H.js} +4 -6
- package/dist/{chunk-7SK3IFXJ.cjs → chunk-JTIHU43D.js} +1 -6
- package/dist/{chunk-VI7UMBQ7.cjs → chunk-KNV72XRZ.js} +3 -5
- package/dist/chunk-MGVXJ2U4.js +11 -0
- package/dist/chunk-MTMPHY3Y.js +9 -0
- package/dist/{chunk-5IAEEEOQ.cjs → chunk-PHTQQIAH.js} +220 -243
- package/dist/{chunk-RDOSNDAQ.cjs → chunk-PRQ2NHRZ.js} +3 -5
- package/dist/chunk-RDRDFJQE.js +10 -0
- package/dist/chunk-RMP3HM5N.js +14 -0
- package/dist/{chunk-SW3SEQMJ.cjs → chunk-SONZJVQM.js} +47 -51
- package/dist/{chunk-KZOSEIWH.cjs → chunk-SWYON2RG.js} +1 -4
- package/dist/{chunk-7OIZPQJB.cjs → chunk-TD63P2AG.js} +111 -174
- package/dist/{chunk-ZNXE6PUV.cjs → chunk-TW77BXMT.js} +7 -9
- package/dist/chunk-UNF72WYO.js +22 -0
- package/dist/{chunk-J4LI33TK.cjs → chunk-VMPFHQ7U.js} +9 -11
- package/dist/{chunk-4R6OCWRR.cjs → chunk-VQ5SIQWU.js} +1 -3
- package/dist/{chunk-HAR3IXDE.cjs → chunk-W6TBGBV3.js} +1 -31
- package/dist/{client-types-qvyKvyFh.d.cts → client-types-CxjtffyG.d.ts} +1 -1
- package/dist/{executeRoute-BKRpODCc.d.cts → executeRoute-BKvMVd1I.d.ts} +3 -3
- package/dist/{generateApi-C0amiydg.d.cts → generateApi-DqCp36fX.d.ts} +1 -1
- package/dist/{index.d.cts → index.d.ts} +25 -26
- package/dist/index.js +24 -0
- package/dist/public-functions/{executeRoute.d.cts → executeRoute.d.ts} +4 -4
- package/dist/public-functions/executeRoute.js +12 -0
- package/dist/public-functions/{getFeeInfoForChain.d.cts → getFeeInfoForChain.d.ts} +2 -2
- package/dist/public-functions/getFeeInfoForChain.js +5 -0
- package/dist/public-functions/{getRecommendedGasPrice.d.cts → getRecommendedGasPrice.d.ts} +1 -1
- package/dist/public-functions/getRecommendedGasPrice.js +7 -0
- package/dist/public-functions/{getSigningStargateClient.d.cts → getSigningStargateClient.d.ts} +1 -1
- package/dist/public-functions/getSigningStargateClient.js +4 -0
- package/dist/public-functions/{setApiOptions.d.cts → setApiOptions.d.ts} +2 -2
- package/dist/public-functions/setApiOptions.js +2 -0
- package/dist/public-functions/setClientOptions.d.ts +9 -0
- package/dist/public-functions/setClientOptions.js +4 -0
- package/dist/{setClientOptions-CT6CHI9I.d.cts → setClientOptions-DbanEIwL.d.ts} +2 -2
- package/package.json +6 -6
- package/dist/api/getAssets.cjs +0 -15
- package/dist/api/getAssetsBetweenChains.cjs +0 -11
- package/dist/api/getBridges.cjs +0 -11
- package/dist/api/getChains.cjs +0 -11
- package/dist/api/getVenues.cjs +0 -11
- package/dist/api/postAssetsFromSource.cjs +0 -12
- package/dist/api/postBalances.cjs +0 -11
- package/dist/api/postIbcOriginAssets.cjs +0 -11
- package/dist/api/postMessages.cjs +0 -11
- package/dist/api/postMessagesDirect.cjs +0 -11
- package/dist/api/postRecommendAssets.cjs +0 -11
- package/dist/api/postRoute.cjs +0 -11
- package/dist/api/postSubmitTransaction.cjs +0 -11
- package/dist/api/postTrackTransaction.cjs +0 -11
- package/dist/api/postTransactionStatus.cjs +0 -11
- package/dist/chunk-32MRDO7V.cjs +0 -12
- package/dist/chunk-44PBLFB5.cjs +0 -24
- package/dist/chunk-DAMZSSOH.cjs +0 -12
- package/dist/chunk-ISHM4QWP.cjs +0 -16
- package/dist/chunk-KDN7RCGP.cjs +0 -13
- package/dist/chunk-L5V5PASH.cjs +0 -12
- package/dist/chunk-LXYLWTNZ.cjs +0 -12
- package/dist/chunk-URLFWBSC.cjs +0 -11
- package/dist/index.cjs +0 -209
- package/dist/public-functions/executeRoute.cjs +0 -21
- package/dist/public-functions/getFeeInfoForChain.cjs +0 -14
- package/dist/public-functions/getRecommendedGasPrice.cjs +0 -16
- package/dist/public-functions/getSigningStargateClient.cjs +0 -13
- package/dist/public-functions/setApiOptions.cjs +0 -11
- package/dist/public-functions/setClientOptions.cjs +0 -13
- package/dist/public-functions/setClientOptions.d.cts +0 -9
- /package/dist/{apiState-CdzxTxYd.d.cts → apiState-CdzxTxYd.d.ts} +0 -0
- /package/dist/{swaggerTypes-O9-gvCT1.d.cts → swaggerTypes-O9-gvCT1.d.ts} +0 -0
|
@@ -1,71 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var keys = require('cosmjs-types/cosmos/crypto/secp256k1/keys');
|
|
31
|
-
var any = require('cosmjs-types/google/protobuf/any');
|
|
32
|
-
var integers = require('@cosmjs/math/build/integers');
|
|
33
|
-
var signing$1 = require('cosmjs-types/cosmos/tx/signing/v1beta1/signing');
|
|
34
|
-
var viem = require('viem');
|
|
35
|
-
var decimal = require('@cosmjs/math/build/decimal');
|
|
36
|
-
|
|
37
|
-
function _interopNamespace(e) {
|
|
38
|
-
if (e && e.__esModule) return e;
|
|
39
|
-
var n = Object.create(null);
|
|
40
|
-
if (e) {
|
|
41
|
-
Object.keys(e).forEach(function (k) {
|
|
42
|
-
if (k !== 'default') {
|
|
43
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
44
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () { return e[k]; }
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
n.default = e;
|
|
52
|
-
return Object.freeze(n);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var _m0__namespace = /*#__PURE__*/_interopNamespace(_m0);
|
|
1
|
+
import { BigNumber } from './chunk-VQ5SIQWU.js';
|
|
2
|
+
import { GAS_STATION_CHAIN_IDS } from './chunk-SWYON2RG.js';
|
|
3
|
+
import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-SONZJVQM.js';
|
|
4
|
+
import { chains, findFirstWorkingEndpoint, getIsEthermint, getIsInitia } from './chunk-JTIHU43D.js';
|
|
5
|
+
import { MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgExecute, MsgInitiateTokenDeposit, BaseVestingAccount, Timestamp, toTimestamp, Period, fromTimestamp, isSet, fromJsonTimestamp } from './chunk-TD63P2AG.js';
|
|
6
|
+
import { messages } from './chunk-DW4U6YI6.js';
|
|
7
|
+
import { submitTransaction } from './chunk-RDRDFJQE.js';
|
|
8
|
+
import { trackTransaction } from './chunk-MGVXJ2U4.js';
|
|
9
|
+
import { transactionStatus } from './chunk-33K6EESX.js';
|
|
10
|
+
import { ClientState, balances } from './chunk-BRMONS6A.js';
|
|
11
|
+
import { ApiState, wait, createRequestClient, toCamel } from './chunk-W6TBGBV3.js';
|
|
12
|
+
import { PublicKey, Transaction, Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
|
|
13
|
+
import { bech32m, bech32 } from 'bech32';
|
|
14
|
+
import { StargateClient, GasPrice, calculateFee } from '@cosmjs/stargate';
|
|
15
|
+
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx.js';
|
|
16
|
+
import { isOfflineDirectSigner, makeAuthInfoBytes, makeSignDoc, encodePubkey } from '@cosmjs/proto-signing';
|
|
17
|
+
import { fromBase64, toUtf8, toBase64 } from '@cosmjs/encoding';
|
|
18
|
+
import { ChainRestTendermintApi, MsgTransfer as MsgTransfer$1, MsgExecuteContractCompat, createTransactionWithSigners } from '@injectivelabs/sdk-ts';
|
|
19
|
+
import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx.js';
|
|
20
|
+
import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx.js';
|
|
21
|
+
import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx.js';
|
|
22
|
+
import _m0 from 'protobufjs/minimal.js';
|
|
23
|
+
import { BigNumberInBase, DEFAULT_BLOCK_TIMEOUT_HEIGHT, DEFAULT_STD_FEE } from '@injectivelabs/utils';
|
|
24
|
+
import { pubkeyType as pubkeyType$1, makeSignDoc as makeSignDoc$1, encodeSecp256k1Pubkey } from '@cosmjs/amino';
|
|
25
|
+
import { PubKey } from 'cosmjs-types/cosmos/crypto/secp256k1/keys.js';
|
|
26
|
+
import { Any } from 'cosmjs-types/google/protobuf/any.js';
|
|
27
|
+
import { Int53, Decimal } from '@cosmjs/math';
|
|
28
|
+
import { SignMode } from 'cosmjs-types/cosmos/tx/signing/v1beta1/signing.js';
|
|
29
|
+
import { isAddress, publicActions, maxUint256, formatUnits } from 'viem';
|
|
56
30
|
|
|
57
31
|
// src/private-functions/getRestEndpointForChain.ts
|
|
58
32
|
var getRestEndpointForChain = async (chainId) => {
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
33
|
+
if (ClientState.endpointOptions.getRestEndpointForChain) {
|
|
34
|
+
return ClientState.endpointOptions.getRestEndpointForChain(chainId);
|
|
61
35
|
}
|
|
62
|
-
if (
|
|
63
|
-
const endpointOptions =
|
|
36
|
+
if (ClientState.endpointOptions.endpoints && ClientState.endpointOptions.endpoints[chainId]) {
|
|
37
|
+
const endpointOptions = ClientState.endpointOptions.endpoints[chainId];
|
|
64
38
|
if (endpointOptions?.rest) {
|
|
65
39
|
return endpointOptions.rest;
|
|
66
40
|
}
|
|
67
41
|
}
|
|
68
|
-
const chain =
|
|
42
|
+
const chain = chains().find((chain2) => chain2.chain_id === chainId);
|
|
69
43
|
if (!chain) {
|
|
70
44
|
throw new Error(
|
|
71
45
|
`getRestEndpointForChain error: failed to find chain id '${chainId}' in registry`
|
|
@@ -77,7 +51,7 @@ var getRestEndpointForChain = async (chainId) => {
|
|
|
77
51
|
);
|
|
78
52
|
}
|
|
79
53
|
const endpoints = chain.apis?.rest?.map((api) => api.address);
|
|
80
|
-
const endpoint = await
|
|
54
|
+
const endpoint = await findFirstWorkingEndpoint(endpoints, "rest");
|
|
81
55
|
if (!endpoint) {
|
|
82
56
|
throw new Error(
|
|
83
57
|
`getRestEndpointForChain error: failed to find REST endpoint for chain '${chainId}'`
|
|
@@ -91,9 +65,9 @@ var getAccountNumberAndSequence = async (address, chainId) => {
|
|
|
91
65
|
if (chainId.includes("dymension")) {
|
|
92
66
|
return getAccountNumberAndSequenceFromDymension(address, chainId);
|
|
93
67
|
}
|
|
94
|
-
const endpoint = await
|
|
95
|
-
const client =
|
|
96
|
-
accountParser
|
|
68
|
+
const endpoint = await getRpcEndpointForChain(chainId);
|
|
69
|
+
const client = ClientState.signingStargateClientByChainId[chainId] ?? await StargateClient.connect(endpoint, {
|
|
70
|
+
accountParser
|
|
97
71
|
});
|
|
98
72
|
const account = await client.getAccount(address);
|
|
99
73
|
if (!account) {
|
|
@@ -107,10 +81,10 @@ var getAccountNumberAndSequence = async (address, chainId) => {
|
|
|
107
81
|
};
|
|
108
82
|
var getAccountNumberAndSequenceFromDymension = async (address, chainId) => {
|
|
109
83
|
const endpoint = await getRestEndpointForChain(chainId);
|
|
110
|
-
const jsonResponse = await
|
|
84
|
+
const jsonResponse = await createRequestClient({
|
|
111
85
|
baseUrl: `${endpoint}/cosmos/auth/v1beta1/accounts/${address}`
|
|
112
86
|
}).get();
|
|
113
|
-
const response =
|
|
87
|
+
const response = toCamel(jsonResponse);
|
|
114
88
|
let sequence = 0;
|
|
115
89
|
let accountNumber = 0;
|
|
116
90
|
if (response.account.baseAccount) {
|
|
@@ -136,45 +110,45 @@ function createBaseClawbackVestingAccount() {
|
|
|
136
110
|
}
|
|
137
111
|
var ClawbackVestingAccount = {
|
|
138
112
|
typeUrl: "/evmos.vesting.v2.ClawbackVestingAccount",
|
|
139
|
-
encode(message, writer =
|
|
113
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
140
114
|
if (message.baseVestingAccount !== void 0) {
|
|
141
|
-
|
|
115
|
+
BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim();
|
|
142
116
|
}
|
|
143
117
|
if (message.funderAddress !== "") {
|
|
144
118
|
writer.uint32(18).string(message.funderAddress);
|
|
145
119
|
}
|
|
146
120
|
if (message.startTime !== void 0) {
|
|
147
|
-
|
|
121
|
+
Timestamp.encode(toTimestamp(message.startTime), writer.uint32(26).fork()).ldelim();
|
|
148
122
|
}
|
|
149
123
|
for (const v of message.lockupPeriods) {
|
|
150
|
-
|
|
124
|
+
Period.encode(v, writer.uint32(34).fork()).ldelim();
|
|
151
125
|
}
|
|
152
126
|
for (const v of message.vestingPeriods) {
|
|
153
|
-
|
|
127
|
+
Period.encode(v, writer.uint32(42).fork()).ldelim();
|
|
154
128
|
}
|
|
155
129
|
return writer;
|
|
156
130
|
},
|
|
157
131
|
decode(input, length) {
|
|
158
|
-
const reader = input instanceof
|
|
132
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
159
133
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
160
134
|
const message = createBaseClawbackVestingAccount();
|
|
161
135
|
while (reader.pos < end) {
|
|
162
136
|
const tag = reader.uint32();
|
|
163
137
|
switch (tag >>> 3) {
|
|
164
138
|
case 1:
|
|
165
|
-
message.baseVestingAccount =
|
|
139
|
+
message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32());
|
|
166
140
|
break;
|
|
167
141
|
case 2:
|
|
168
142
|
message.funderAddress = reader.string();
|
|
169
143
|
break;
|
|
170
144
|
case 3:
|
|
171
|
-
message.startTime =
|
|
145
|
+
message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
172
146
|
break;
|
|
173
147
|
case 4:
|
|
174
|
-
message.lockupPeriods.push(
|
|
148
|
+
message.lockupPeriods.push(Period.decode(reader, reader.uint32()));
|
|
175
149
|
break;
|
|
176
150
|
case 5:
|
|
177
|
-
message.vestingPeriods.push(
|
|
151
|
+
message.vestingPeriods.push(Period.decode(reader, reader.uint32()));
|
|
178
152
|
break;
|
|
179
153
|
default:
|
|
180
154
|
reader.skipType(tag & 7);
|
|
@@ -185,25 +159,25 @@ var ClawbackVestingAccount = {
|
|
|
185
159
|
},
|
|
186
160
|
fromJSON(object) {
|
|
187
161
|
return {
|
|
188
|
-
baseVestingAccount:
|
|
189
|
-
funderAddress:
|
|
190
|
-
startTime:
|
|
191
|
-
lockupPeriods: Array.isArray(object?.lockupPeriods) ? object.lockupPeriods.map((e) =>
|
|
192
|
-
vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e) =>
|
|
162
|
+
baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : void 0,
|
|
163
|
+
funderAddress: isSet(object.funderAddress) ? String(object.funderAddress) : "",
|
|
164
|
+
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : void 0,
|
|
165
|
+
lockupPeriods: Array.isArray(object?.lockupPeriods) ? object.lockupPeriods.map((e) => Period.fromJSON(e)) : [],
|
|
166
|
+
vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e) => Period.fromJSON(e)) : []
|
|
193
167
|
};
|
|
194
168
|
},
|
|
195
169
|
toJSON(message) {
|
|
196
170
|
const obj = {};
|
|
197
|
-
message.baseVestingAccount !== void 0 && (obj.baseVestingAccount = message.baseVestingAccount ?
|
|
171
|
+
message.baseVestingAccount !== void 0 && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : void 0);
|
|
198
172
|
message.funderAddress !== void 0 && (obj.funderAddress = message.funderAddress);
|
|
199
173
|
message.startTime !== void 0 && (obj.startTime = message.startTime.toISOString());
|
|
200
174
|
if (message.lockupPeriods) {
|
|
201
|
-
obj.lockupPeriods = message.lockupPeriods.map((e) => e ?
|
|
175
|
+
obj.lockupPeriods = message.lockupPeriods.map((e) => e ? Period.toJSON(e) : void 0);
|
|
202
176
|
} else {
|
|
203
177
|
obj.lockupPeriods = [];
|
|
204
178
|
}
|
|
205
179
|
if (message.vestingPeriods) {
|
|
206
|
-
obj.vestingPeriods = message.vestingPeriods.map((e) => e ?
|
|
180
|
+
obj.vestingPeriods = message.vestingPeriods.map((e) => e ? Period.toJSON(e) : void 0);
|
|
207
181
|
} else {
|
|
208
182
|
obj.vestingPeriods = [];
|
|
209
183
|
}
|
|
@@ -211,40 +185,40 @@ var ClawbackVestingAccount = {
|
|
|
211
185
|
},
|
|
212
186
|
fromPartial(object) {
|
|
213
187
|
const message = createBaseClawbackVestingAccount();
|
|
214
|
-
message.baseVestingAccount = object.baseVestingAccount !== void 0 && object.baseVestingAccount !== null ?
|
|
188
|
+
message.baseVestingAccount = object.baseVestingAccount !== void 0 && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : void 0;
|
|
215
189
|
message.funderAddress = object.funderAddress ?? "";
|
|
216
190
|
message.startTime = object.startTime ?? void 0;
|
|
217
|
-
message.lockupPeriods = object.lockupPeriods?.map((e) =>
|
|
218
|
-
message.vestingPeriods = object.vestingPeriods?.map((e) =>
|
|
191
|
+
message.lockupPeriods = object.lockupPeriods?.map((e) => Period.fromPartial(e)) || [];
|
|
192
|
+
message.vestingPeriods = object.vestingPeriods?.map((e) => Period.fromPartial(e)) || [];
|
|
219
193
|
return message;
|
|
220
194
|
},
|
|
221
195
|
fromAmino(object) {
|
|
222
196
|
const message = createBaseClawbackVestingAccount();
|
|
223
197
|
if (object.base_vesting_account !== void 0 && object.base_vesting_account !== null) {
|
|
224
|
-
message.baseVestingAccount =
|
|
198
|
+
message.baseVestingAccount = BaseVestingAccount.fromAmino(object.base_vesting_account);
|
|
225
199
|
}
|
|
226
200
|
if (object.funder_address !== void 0 && object.funder_address !== null) {
|
|
227
201
|
message.funderAddress = object.funder_address;
|
|
228
202
|
}
|
|
229
203
|
if (object.start_time !== void 0 && object.start_time !== null) {
|
|
230
|
-
message.startTime =
|
|
204
|
+
message.startTime = fromTimestamp(Timestamp.fromAmino(object.start_time));
|
|
231
205
|
}
|
|
232
|
-
message.lockupPeriods = object.lockup_periods?.map((e) =>
|
|
233
|
-
message.vestingPeriods = object.vesting_periods?.map((e) =>
|
|
206
|
+
message.lockupPeriods = object.lockup_periods?.map((e) => Period.fromAmino(e)) || [];
|
|
207
|
+
message.vestingPeriods = object.vesting_periods?.map((e) => Period.fromAmino(e)) || [];
|
|
234
208
|
return message;
|
|
235
209
|
},
|
|
236
210
|
toAmino(message) {
|
|
237
211
|
const obj = {};
|
|
238
|
-
obj.base_vesting_account = message.baseVestingAccount ?
|
|
212
|
+
obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : void 0;
|
|
239
213
|
obj.funder_address = message.funderAddress === "" ? void 0 : message.funderAddress;
|
|
240
|
-
obj.start_time = message.startTime ?
|
|
214
|
+
obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : void 0;
|
|
241
215
|
if (message.lockupPeriods) {
|
|
242
|
-
obj.lockup_periods = message.lockupPeriods.map((e) => e ?
|
|
216
|
+
obj.lockup_periods = message.lockupPeriods.map((e) => e ? Period.toAmino(e) : void 0);
|
|
243
217
|
} else {
|
|
244
218
|
obj.lockup_periods = message.lockupPeriods;
|
|
245
219
|
}
|
|
246
220
|
if (message.vestingPeriods) {
|
|
247
|
-
obj.vesting_periods = message.vestingPeriods.map((e) => e ?
|
|
221
|
+
obj.vesting_periods = message.vestingPeriods.map((e) => e ? Period.toAmino(e) : void 0);
|
|
248
222
|
} else {
|
|
249
223
|
obj.vesting_periods = message.vestingPeriods;
|
|
250
224
|
}
|
|
@@ -279,7 +253,7 @@ function getEncodeObjectFromCosmosMessage(message) {
|
|
|
279
253
|
if (message.msgTypeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
|
|
280
254
|
return {
|
|
281
255
|
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
|
|
282
|
-
value:
|
|
256
|
+
value: MsgTransfer.fromJSON({
|
|
283
257
|
sourcePort: msgJson.source_port,
|
|
284
258
|
sourceChannel: msgJson.source_channel,
|
|
285
259
|
token: msgJson.token,
|
|
@@ -294,10 +268,10 @@ function getEncodeObjectFromCosmosMessage(message) {
|
|
|
294
268
|
if (message.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract") {
|
|
295
269
|
return {
|
|
296
270
|
typeUrl: message.msgTypeUrl,
|
|
297
|
-
value:
|
|
271
|
+
value: MsgExecuteContract.fromPartial({
|
|
298
272
|
sender: msgJson.sender,
|
|
299
273
|
contract: msgJson.contract,
|
|
300
|
-
msg:
|
|
274
|
+
msg: toUtf8(JSON.stringify(msgJson.msg)),
|
|
301
275
|
funds: msgJson.funds
|
|
302
276
|
})
|
|
303
277
|
};
|
|
@@ -305,7 +279,7 @@ function getEncodeObjectFromCosmosMessage(message) {
|
|
|
305
279
|
if (message.msgTypeUrl === "/cosmos.bank.v1beta1.MsgSend") {
|
|
306
280
|
return {
|
|
307
281
|
typeUrl: message.msgTypeUrl,
|
|
308
|
-
value:
|
|
282
|
+
value: MsgSend.fromPartial({
|
|
309
283
|
fromAddress: msgJson.from_address,
|
|
310
284
|
toAddress: msgJson.to_address,
|
|
311
285
|
amount: msgJson.amount
|
|
@@ -315,19 +289,19 @@ function getEncodeObjectFromCosmosMessage(message) {
|
|
|
315
289
|
if (message.msgTypeUrl === "/circle.cctp.v1.MsgDepositForBurn") {
|
|
316
290
|
return {
|
|
317
291
|
typeUrl: message.msgTypeUrl,
|
|
318
|
-
value:
|
|
292
|
+
value: MsgDepositForBurn.fromAmino(msgJson)
|
|
319
293
|
};
|
|
320
294
|
}
|
|
321
295
|
if (message.msgTypeUrl === "/circle.cctp.v1.MsgDepositForBurnWithCaller") {
|
|
322
296
|
return {
|
|
323
297
|
typeUrl: message.msgTypeUrl,
|
|
324
|
-
value:
|
|
298
|
+
value: MsgDepositForBurnWithCaller.fromAmino(msgJson)
|
|
325
299
|
};
|
|
326
300
|
}
|
|
327
301
|
if (message.msgTypeUrl === "/initia.move.v1.MsgExecute") {
|
|
328
302
|
return {
|
|
329
303
|
typeUrl: message.msgTypeUrl,
|
|
330
|
-
value:
|
|
304
|
+
value: MsgExecute.fromPartial({
|
|
331
305
|
sender: msgJson.sender,
|
|
332
306
|
moduleAddress: msgJson.module_address,
|
|
333
307
|
moduleName: msgJson.module_name,
|
|
@@ -339,7 +313,7 @@ function getEncodeObjectFromCosmosMessage(message) {
|
|
|
339
313
|
if (message.msgTypeUrl === "/opinit.ophost.v1.MsgInitiateTokenDeposit") {
|
|
340
314
|
return {
|
|
341
315
|
typeUrl: message.msgTypeUrl,
|
|
342
|
-
value:
|
|
316
|
+
value: MsgInitiateTokenDeposit.fromPartial({
|
|
343
317
|
sender: msgJson.sender,
|
|
344
318
|
to: msgJson.to,
|
|
345
319
|
amount: msgJson.amount,
|
|
@@ -367,7 +341,7 @@ function getEncodeObjectFromCosmosMessage(message) {
|
|
|
367
341
|
function getEncodeObjectFromCosmosMessageInjective(message) {
|
|
368
342
|
const msgJson = JSON.parse(message.msg ?? "");
|
|
369
343
|
if (message.msgTypeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
|
|
370
|
-
return
|
|
344
|
+
return MsgTransfer$1.fromJSON({
|
|
371
345
|
port: msgJson.source_port,
|
|
372
346
|
channelId: msgJson.source_channel,
|
|
373
347
|
amount: msgJson.token,
|
|
@@ -378,7 +352,7 @@ function getEncodeObjectFromCosmosMessageInjective(message) {
|
|
|
378
352
|
});
|
|
379
353
|
}
|
|
380
354
|
if (message.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract") {
|
|
381
|
-
return
|
|
355
|
+
return MsgExecuteContractCompat.fromJSON({
|
|
382
356
|
sender: msgJson.sender,
|
|
383
357
|
contractAddress: msgJson.contract,
|
|
384
358
|
msg: msgJson.msg,
|
|
@@ -392,7 +366,7 @@ function createTransaction({
|
|
|
392
366
|
message,
|
|
393
367
|
timeoutHeight,
|
|
394
368
|
memo = "",
|
|
395
|
-
fee =
|
|
369
|
+
fee = DEFAULT_STD_FEE,
|
|
396
370
|
signMode = 1,
|
|
397
371
|
pubKey,
|
|
398
372
|
accountNumber,
|
|
@@ -403,7 +377,7 @@ function createTransaction({
|
|
|
403
377
|
accountNumber,
|
|
404
378
|
sequence
|
|
405
379
|
};
|
|
406
|
-
return
|
|
380
|
+
return createTransactionWithSigners({
|
|
407
381
|
fee,
|
|
408
382
|
memo,
|
|
409
383
|
message,
|
|
@@ -435,10 +409,10 @@ var signCosmosMessageDirectEvmos = async (signerAddress, signer, cosmosMsgs, fee
|
|
|
435
409
|
fee
|
|
436
410
|
});
|
|
437
411
|
const directSignResponse = await signer.signDirect(signerAddress, signDoc);
|
|
438
|
-
return
|
|
412
|
+
return TxRaw.fromPartial({
|
|
439
413
|
bodyBytes: directSignResponse.signed.bodyBytes,
|
|
440
414
|
authInfoBytes: directSignResponse.signed.authInfoBytes,
|
|
441
|
-
signatures: [
|
|
415
|
+
signatures: [fromBase64(directSignResponse.signature.signature)]
|
|
442
416
|
});
|
|
443
417
|
};
|
|
444
418
|
var signCosmosMessageDirectInjective = async (signerAddress, signer, cosmosMsgs, fee, { accountNumber, sequence, chainId }) => {
|
|
@@ -448,10 +422,10 @@ var signCosmosMessageDirectInjective = async (signerAddress, signer, cosmosMsgs,
|
|
|
448
422
|
throw new Error("signCosmosMessageDirectInjective: failed to retrieve account from signer");
|
|
449
423
|
}
|
|
450
424
|
const restEndpoint = await getRestEndpointForChain(chainId);
|
|
451
|
-
const chainRestTendermintApi = new
|
|
425
|
+
const chainRestTendermintApi = new ChainRestTendermintApi(restEndpoint);
|
|
452
426
|
const latestBlock = await chainRestTendermintApi.fetchLatestBlock();
|
|
453
427
|
const latestHeight = latestBlock.header.height;
|
|
454
|
-
const timeoutHeight = new
|
|
428
|
+
const timeoutHeight = new BigNumberInBase(latestHeight).plus(DEFAULT_BLOCK_TIMEOUT_HEIGHT);
|
|
455
429
|
const pk = Buffer.from(accountFromSigner.pubkey).toString("base64");
|
|
456
430
|
const messages2 = cosmosMsgs.map(
|
|
457
431
|
(cosmosMsg) => getEncodeObjectFromCosmosMessageInjective(cosmosMsg)
|
|
@@ -470,15 +444,15 @@ var signCosmosMessageDirectInjective = async (signerAddress, signer, cosmosMsgs,
|
|
|
470
444
|
// @ts-expect-error TODO: Fix this
|
|
471
445
|
signDoc
|
|
472
446
|
);
|
|
473
|
-
return
|
|
447
|
+
return TxRaw.fromPartial({
|
|
474
448
|
bodyBytes: directSignResponse.signed.bodyBytes,
|
|
475
449
|
authInfoBytes: directSignResponse.signed.authInfoBytes,
|
|
476
|
-
signatures: [
|
|
450
|
+
signatures: [fromBase64(directSignResponse.signature.signature)]
|
|
477
451
|
});
|
|
478
452
|
};
|
|
479
453
|
var pubkeyType = {
|
|
480
454
|
ethsecp256k1: "ethermint/PubKeyEthSecp256k1",
|
|
481
|
-
...
|
|
455
|
+
...pubkeyType$1
|
|
482
456
|
};
|
|
483
457
|
|
|
484
458
|
// src/amino/encoding.ts
|
|
@@ -490,21 +464,21 @@ function encodeEthSecp256k1Pubkey(pubkey) {
|
|
|
490
464
|
}
|
|
491
465
|
return {
|
|
492
466
|
type: pubkeyType.ethsecp256k1,
|
|
493
|
-
value:
|
|
467
|
+
value: toBase64(pubkey)
|
|
494
468
|
};
|
|
495
469
|
}
|
|
496
470
|
|
|
497
471
|
// src/proto-signing/pubkey.ts
|
|
498
472
|
function makePubkeyAnyFromAccount(account, chainId) {
|
|
499
|
-
const isEthermint =
|
|
500
|
-
const pubkey = isEthermint ? encodeEthSecp256k1Pubkey(account.pubkey) :
|
|
473
|
+
const isEthermint = getIsEthermint(chainId);
|
|
474
|
+
const pubkey = isEthermint ? encodeEthSecp256k1Pubkey(account.pubkey) : encodeSecp256k1Pubkey(account.pubkey);
|
|
501
475
|
const pubkeyAny = encodePubkeyToAny(pubkey, chainId, isEthermint);
|
|
502
476
|
return pubkeyAny;
|
|
503
477
|
}
|
|
504
478
|
function encodePubkeyToAny(pubkey, chainId, isEthermint) {
|
|
505
479
|
if (isEthermint) {
|
|
506
|
-
const pubkeyProto =
|
|
507
|
-
key:
|
|
480
|
+
const pubkeyProto = PubKey.fromPartial({
|
|
481
|
+
key: fromBase64(pubkey.value)
|
|
508
482
|
});
|
|
509
483
|
let typeUrl = "";
|
|
510
484
|
if (chainId?.includes("injective")) {
|
|
@@ -512,22 +486,22 @@ function encodePubkeyToAny(pubkey, chainId, isEthermint) {
|
|
|
512
486
|
} else {
|
|
513
487
|
typeUrl = "/ethermint.crypto.v1.ethsecp256k1.PubKey";
|
|
514
488
|
}
|
|
515
|
-
return
|
|
489
|
+
return Any.fromPartial({
|
|
516
490
|
typeUrl,
|
|
517
|
-
value: Uint8Array.from(
|
|
491
|
+
value: Uint8Array.from(PubKey.encode(pubkeyProto).finish())
|
|
518
492
|
});
|
|
519
493
|
} else {
|
|
520
|
-
const isInitia =
|
|
521
|
-
const pubkeyProto =
|
|
522
|
-
key:
|
|
494
|
+
const isInitia = getIsInitia(chainId);
|
|
495
|
+
const pubkeyProto = PubKey.fromPartial({
|
|
496
|
+
key: fromBase64(pubkey.value)
|
|
523
497
|
});
|
|
524
498
|
if (isInitia) {
|
|
525
|
-
return
|
|
499
|
+
return Any.fromPartial({
|
|
526
500
|
typeUrl: "/initia.crypto.v1beta1.ethsecp256k1.PubKey",
|
|
527
|
-
value: Uint8Array.from(
|
|
501
|
+
value: Uint8Array.from(PubKey.encode(pubkeyProto).finish())
|
|
528
502
|
});
|
|
529
503
|
}
|
|
530
|
-
return
|
|
504
|
+
return encodePubkey(pubkey);
|
|
531
505
|
}
|
|
532
506
|
}
|
|
533
507
|
var signCosmosMessageDirect = async (options) => {
|
|
@@ -565,22 +539,22 @@ var signCosmosMessageDirect = async (options) => {
|
|
|
565
539
|
messages: messages2
|
|
566
540
|
}
|
|
567
541
|
};
|
|
568
|
-
const txBodyBytes =
|
|
569
|
-
const gasLimit =
|
|
542
|
+
const txBodyBytes = ClientState.registry.encode(txBodyEncodeObject);
|
|
543
|
+
const gasLimit = Int53.fromString(fee.gas).toNumber();
|
|
570
544
|
const pubkeyAny = makePubkeyAnyFromAccount(accountFromSigner, chainId);
|
|
571
|
-
const authInfoBytes =
|
|
545
|
+
const authInfoBytes = makeAuthInfoBytes(
|
|
572
546
|
[{ pubkey: pubkeyAny, sequence }],
|
|
573
547
|
fee.amount,
|
|
574
548
|
gasLimit,
|
|
575
549
|
fee.granter,
|
|
576
550
|
fee.payer
|
|
577
551
|
);
|
|
578
|
-
const signDoc =
|
|
552
|
+
const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
|
579
553
|
const { signature, signed } = await signer.signDirect(signerAddress, signDoc);
|
|
580
|
-
return
|
|
554
|
+
return TxRaw.fromPartial({
|
|
581
555
|
bodyBytes: signed.bodyBytes,
|
|
582
556
|
authInfoBytes: signed.authInfoBytes,
|
|
583
|
-
signatures: [
|
|
557
|
+
signatures: [fromBase64(signature.signature)]
|
|
584
558
|
});
|
|
585
559
|
};
|
|
586
560
|
var signCosmosMessageAmino = async (options) => {
|
|
@@ -598,13 +572,13 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
598
572
|
throw new Error("signCosmosMessageAmino: failed to retrieve account from signer");
|
|
599
573
|
}
|
|
600
574
|
const messages2 = cosmosMsgs.map((cosmosMsg) => getEncodeObjectFromCosmosMessage(cosmosMsg));
|
|
601
|
-
const signMode =
|
|
602
|
-
const msgs = messages2.map((msg) =>
|
|
575
|
+
const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
576
|
+
const msgs = messages2.map((msg) => ClientState.aminoTypes.toAmino(msg));
|
|
603
577
|
console.log("sign cosmos message amino", msgs, fee, signerChainId, "", accountNumber, sequence);
|
|
604
|
-
const signDoc =
|
|
578
|
+
const signDoc = makeSignDoc$1(msgs, fee, signerChainId, "", accountNumber, sequence);
|
|
605
579
|
const { signature, signed } = await signer.signAmino(signerAddress, signDoc);
|
|
606
580
|
const signedTxBody = {
|
|
607
|
-
messages: signed.msgs.map((msg) =>
|
|
581
|
+
messages: signed.msgs.map((msg) => ClientState.aminoTypes.fromAmino(msg)),
|
|
608
582
|
memo: signed.memo
|
|
609
583
|
};
|
|
610
584
|
signedTxBody.messages[0].value.memo = messages2[0].value.memo;
|
|
@@ -612,11 +586,11 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
612
586
|
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
613
587
|
value: signedTxBody
|
|
614
588
|
};
|
|
615
|
-
const signedTxBodyBytes =
|
|
616
|
-
const signedGasLimit =
|
|
617
|
-
const signedSequence =
|
|
589
|
+
const signedTxBodyBytes = ClientState.registry.encode(signedTxBodyEncodeObject);
|
|
590
|
+
const signedGasLimit = Int53.fromString(signed.fee.gas).toNumber();
|
|
591
|
+
const signedSequence = Int53.fromString(signed.sequence).toNumber();
|
|
618
592
|
const pubkeyAny = makePubkeyAnyFromAccount(accountFromSigner, chainId);
|
|
619
|
-
const signedAuthInfoBytes =
|
|
593
|
+
const signedAuthInfoBytes = makeAuthInfoBytes(
|
|
620
594
|
[{ pubkey: pubkeyAny, sequence: signedSequence }],
|
|
621
595
|
signed.fee.amount,
|
|
622
596
|
signedGasLimit,
|
|
@@ -624,10 +598,10 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
624
598
|
signed.fee.payer,
|
|
625
599
|
signMode
|
|
626
600
|
);
|
|
627
|
-
return
|
|
601
|
+
return TxRaw.fromPartial({
|
|
628
602
|
bodyBytes: signedTxBodyBytes,
|
|
629
603
|
authInfoBytes: signedAuthInfoBytes,
|
|
630
|
-
signatures: [
|
|
604
|
+
signatures: [fromBase64(signature.signature)]
|
|
631
605
|
});
|
|
632
606
|
};
|
|
633
607
|
|
|
@@ -644,7 +618,7 @@ var executeCosmosTransaction = async ({
|
|
|
644
618
|
const chainId = tx.cosmosTx?.chainId;
|
|
645
619
|
const messages2 = tx.cosmosTx?.msgs;
|
|
646
620
|
const currentUserAddress = userAddresses.find((x) => x.chainId === tx.cosmosTx?.chainId)?.address;
|
|
647
|
-
const gasArray =
|
|
621
|
+
const gasArray = ClientState.validateGasResults;
|
|
648
622
|
const gas = gasArray?.find((gas2) => gas2?.error !== null && gas2?.error !== void 0);
|
|
649
623
|
if (typeof gas?.error === "string") {
|
|
650
624
|
throw new Error(gas?.error);
|
|
@@ -659,7 +633,7 @@ var executeCosmosTransaction = async ({
|
|
|
659
633
|
if (messages2 === void 0) {
|
|
660
634
|
throw new Error("no messages found for tx");
|
|
661
635
|
}
|
|
662
|
-
const { stargateClient, signer
|
|
636
|
+
const { stargateClient, signer } = await getSigningStargateClient({
|
|
663
637
|
chainId,
|
|
664
638
|
getOfflineSigner: options?.getCosmosSigner
|
|
665
639
|
});
|
|
@@ -668,7 +642,7 @@ var executeCosmosTransaction = async ({
|
|
|
668
642
|
`executeCosmosTransaction error: invalid address for chain '${tx.cosmosTx?.chainId}'`
|
|
669
643
|
);
|
|
670
644
|
}
|
|
671
|
-
const accounts = await signer
|
|
645
|
+
const accounts = await signer.getAccounts();
|
|
672
646
|
const accountFromSigner = accounts.find((account) => account.address === currentUserAddress);
|
|
673
647
|
if (!accountFromSigner) {
|
|
674
648
|
throw new Error("executeCosmosTransaction error: failed to retrieve account from signer");
|
|
@@ -693,18 +667,18 @@ var executeCosmosTransaction = async ({
|
|
|
693
667
|
chainId
|
|
694
668
|
}
|
|
695
669
|
};
|
|
696
|
-
if (
|
|
670
|
+
if (isOfflineDirectSigner(signer)) {
|
|
697
671
|
rawTx = await signCosmosMessageDirect({
|
|
698
672
|
...commonRawTxBody,
|
|
699
|
-
signer
|
|
673
|
+
signer
|
|
700
674
|
});
|
|
701
675
|
} else {
|
|
702
|
-
rawTx = await signCosmosMessageAmino({ ...commonRawTxBody, signer
|
|
676
|
+
rawTx = await signCosmosMessageAmino({ ...commonRawTxBody, signer });
|
|
703
677
|
}
|
|
704
678
|
options?.onTransactionSigned?.({
|
|
705
679
|
chainId
|
|
706
680
|
});
|
|
707
|
-
const txBytes =
|
|
681
|
+
const txBytes = TxRaw.encode(rawTx).finish();
|
|
708
682
|
const txResponse = await stargateClient.broadcastTx(txBytes);
|
|
709
683
|
return {
|
|
710
684
|
chainId: tx?.cosmosTx?.chainId ?? "",
|
|
@@ -914,13 +888,13 @@ var erc20ABI = /* @__PURE__ */ createAbi([
|
|
|
914
888
|
|
|
915
889
|
// src/private-functions/evm/executeEvmTransaction.ts
|
|
916
890
|
var executeEvmTransaction = async (message, options) => {
|
|
917
|
-
const gasArray =
|
|
891
|
+
const gasArray = ClientState.validateGasResults;
|
|
918
892
|
const gas = gasArray?.find((gas2) => gas2?.error !== null && gas2?.error !== void 0);
|
|
919
893
|
if (typeof gas?.error === "string") {
|
|
920
894
|
throw new Error(gas?.error);
|
|
921
895
|
}
|
|
922
896
|
const { evmTx } = message;
|
|
923
|
-
const getEvmSigner = options.getEvmSigner ||
|
|
897
|
+
const getEvmSigner = options.getEvmSigner || ClientState.getEvmSigner;
|
|
924
898
|
if (!getEvmSigner) {
|
|
925
899
|
throw new Error("Unable to get EVM signer");
|
|
926
900
|
}
|
|
@@ -938,7 +912,7 @@ var executeEvmTransaction = async (message, options) => {
|
|
|
938
912
|
throw new Error("executeEVMTransaction error: no value found in evmTx");
|
|
939
913
|
}
|
|
940
914
|
const { onApproveAllowance, onTransactionSigned, bypassApprovalCheck, useUnlimitedApproval } = options;
|
|
941
|
-
const extendedSigner = evmSigner.extend(
|
|
915
|
+
const extendedSigner = evmSigner.extend(publicActions);
|
|
942
916
|
if (!bypassApprovalCheck && evmTx.requiredErc20Approvals) {
|
|
943
917
|
for (const requiredApproval of evmTx.requiredErc20Approvals) {
|
|
944
918
|
const allowance = await extendedSigner.readContract({
|
|
@@ -967,7 +941,7 @@ var executeEvmTransaction = async (message, options) => {
|
|
|
967
941
|
functionName: "approve",
|
|
968
942
|
args: [
|
|
969
943
|
requiredApproval.spender,
|
|
970
|
-
useUnlimitedApproval ?
|
|
944
|
+
useUnlimitedApproval ? maxUint256 : BigInt(requiredApproval.amount) + BigInt(1e3)
|
|
971
945
|
],
|
|
972
946
|
chain: evmSigner.chain
|
|
973
947
|
});
|
|
@@ -1000,7 +974,7 @@ var executeEvmTransaction = async (message, options) => {
|
|
|
1000
974
|
return receipt;
|
|
1001
975
|
};
|
|
1002
976
|
var executeSvmTransaction = async (tx, options) => {
|
|
1003
|
-
const gasArray =
|
|
977
|
+
const gasArray = ClientState.validateGasResults;
|
|
1004
978
|
if (tx === void 0) {
|
|
1005
979
|
throw new Error("executeSvmTransaction error: tx is undefined");
|
|
1006
980
|
}
|
|
@@ -1009,7 +983,7 @@ var executeSvmTransaction = async (tx, options) => {
|
|
|
1009
983
|
throw new Error(gas?.error);
|
|
1010
984
|
}
|
|
1011
985
|
const svmTx = tx?.svmTx;
|
|
1012
|
-
const getSvmSigner = options?.getSvmSigner ||
|
|
986
|
+
const getSvmSigner = options?.getSvmSigner || ClientState.getSvmSigner;
|
|
1013
987
|
if (!getSvmSigner) {
|
|
1014
988
|
throw new Error(
|
|
1015
989
|
"executeRoute error: 'getSVMSigner' is not provided or configured in skip router"
|
|
@@ -1020,15 +994,15 @@ var executeSvmTransaction = async (tx, options) => {
|
|
|
1020
994
|
throw new Error("executeSvmTransaction error: chainId not found in svmTx");
|
|
1021
995
|
}
|
|
1022
996
|
const txBuffer = Buffer.from(svmTx.tx ?? "", "base64");
|
|
1023
|
-
const transaction =
|
|
1024
|
-
const endpoint = await
|
|
1025
|
-
const connection = new
|
|
997
|
+
const transaction = Transaction.from(txBuffer);
|
|
998
|
+
const endpoint = await getRpcEndpointForChain(svmTx.chainId);
|
|
999
|
+
const connection = new Connection(endpoint);
|
|
1026
1000
|
let signature;
|
|
1027
1001
|
if ("signTransaction" in signer) {
|
|
1028
1002
|
const signedTx = await signer.signTransaction(transaction);
|
|
1029
1003
|
options?.onTransactionSigned?.({ chainId: svmTx.chainId });
|
|
1030
1004
|
const serializedTx = signedTx.serialize();
|
|
1031
|
-
await
|
|
1005
|
+
await submitTransaction({
|
|
1032
1006
|
chainId: svmTx.chainId,
|
|
1033
1007
|
tx: serializedTx.toString("base64")
|
|
1034
1008
|
}).then((res) => {
|
|
@@ -1057,13 +1031,13 @@ var executeSvmTransaction = async (tx, options) => {
|
|
|
1057
1031
|
};
|
|
1058
1032
|
}
|
|
1059
1033
|
if (getStatusCount > 12) {
|
|
1060
|
-
await
|
|
1034
|
+
await wait(3e3);
|
|
1061
1035
|
throw new Error(
|
|
1062
1036
|
`executeSvmTransaction error: waiting finalized status timed out for ${signature}`
|
|
1063
1037
|
);
|
|
1064
1038
|
}
|
|
1065
1039
|
getStatusCount++;
|
|
1066
|
-
await
|
|
1040
|
+
await wait(3e3);
|
|
1067
1041
|
} catch (error) {
|
|
1068
1042
|
errorCount++;
|
|
1069
1043
|
if (errorCount > 12) {
|
|
@@ -1103,8 +1077,8 @@ var validateCosmosGasBalance = async ({
|
|
|
1103
1077
|
txIndex,
|
|
1104
1078
|
simulate
|
|
1105
1079
|
}) => {
|
|
1106
|
-
const skipAssets = (await
|
|
1107
|
-
const skipChains = await
|
|
1080
|
+
const skipAssets = (await ClientState.getSkipAssets({ chainId }))?.[chainId];
|
|
1081
|
+
const skipChains = await ClientState.getSkipChains();
|
|
1108
1082
|
const chain = skipChains?.find((c) => c.chainId === chainId);
|
|
1109
1083
|
if (!chain) {
|
|
1110
1084
|
throw new Error(`failed to find chain id for '${chainId}'`);
|
|
@@ -1119,7 +1093,7 @@ var validateCosmosGasBalance = async ({
|
|
|
1119
1093
|
if (txIndex !== 0 && chainId === "noble-1") {
|
|
1120
1094
|
return "0";
|
|
1121
1095
|
}
|
|
1122
|
-
const { stargateClient } = await
|
|
1096
|
+
const { stargateClient } = await getSigningStargateClient({
|
|
1123
1097
|
chainId,
|
|
1124
1098
|
getOfflineSigner
|
|
1125
1099
|
});
|
|
@@ -1156,8 +1130,8 @@ var validateCosmosGasBalance = async ({
|
|
|
1156
1130
|
price = asset.gasPrice.low;
|
|
1157
1131
|
}
|
|
1158
1132
|
if (!price) return;
|
|
1159
|
-
return new
|
|
1160
|
-
|
|
1133
|
+
return new GasPrice(
|
|
1134
|
+
Decimal.fromUserInput(BigNumber(price).toFixed(), 18),
|
|
1161
1135
|
asset?.denom ?? ""
|
|
1162
1136
|
);
|
|
1163
1137
|
})();
|
|
@@ -1165,12 +1139,12 @@ var validateCosmosGasBalance = async ({
|
|
|
1165
1139
|
return null;
|
|
1166
1140
|
}
|
|
1167
1141
|
if (chainId === "noble-1") {
|
|
1168
|
-
const fee =
|
|
1142
|
+
const fee = calculateFee(2e5, gasPrice);
|
|
1169
1143
|
return fee;
|
|
1170
1144
|
}
|
|
1171
|
-
return
|
|
1145
|
+
return calculateFee(Math.ceil(parseFloat(estimatedGasAmount)), gasPrice);
|
|
1172
1146
|
});
|
|
1173
|
-
const feeBalance = await
|
|
1147
|
+
const feeBalance = await balances({
|
|
1174
1148
|
chains: {
|
|
1175
1149
|
[chainId]: {
|
|
1176
1150
|
address: signerAddress,
|
|
@@ -1219,8 +1193,8 @@ var validateCosmosGasBalance = async ({
|
|
|
1219
1193
|
};
|
|
1220
1194
|
}
|
|
1221
1195
|
if (parseInt(balance?.amount ?? "") < parseInt(fee.amount[0]?.amount)) {
|
|
1222
|
-
const userAmount = new
|
|
1223
|
-
const feeAmount = new
|
|
1196
|
+
const userAmount = new BigNumber(parseFloat(balance?.amount ?? "")).shiftedBy(-decimal).toFixed(decimal);
|
|
1197
|
+
const feeAmount = new BigNumber(parseFloat(fee.amount[0]?.amount)).shiftedBy(-decimal).toFixed(decimal);
|
|
1224
1198
|
return {
|
|
1225
1199
|
error: `Insufficient balance for gas on ${chain?.prettyName}. Need ${feeAmount} ${symbol} but only have ${userAmount} ${symbol}.`,
|
|
1226
1200
|
asset
|
|
@@ -1257,7 +1231,7 @@ var validateEvmTokenApproval = async ({
|
|
|
1257
1231
|
throw new Error("validateEvmGasBalance: Signer address not found");
|
|
1258
1232
|
}
|
|
1259
1233
|
for (const requiredApproval of requiredErc20Approvals) {
|
|
1260
|
-
const extendedSigner = signer.extend(
|
|
1234
|
+
const extendedSigner = signer.extend(publicActions);
|
|
1261
1235
|
const allowance = await extendedSigner.readContract({
|
|
1262
1236
|
address: requiredApproval.tokenContract,
|
|
1263
1237
|
abi: erc20ABI,
|
|
@@ -1270,7 +1244,7 @@ var validateEvmTokenApproval = async ({
|
|
|
1270
1244
|
const fee = await extendedSigner.estimateFeesPerGas();
|
|
1271
1245
|
const allowanceGasFee = BigInt(fee.maxFeePerGas) * BigInt(1e5);
|
|
1272
1246
|
if (!gasBalance) {
|
|
1273
|
-
const chainAssets = (await
|
|
1247
|
+
const chainAssets = (await ClientState.getSkipAssets({ chainId: tx.chainId }))[tx.chainId];
|
|
1274
1248
|
const nativeAsset = chainAssets?.find((x) => x.denom.includes("-native"));
|
|
1275
1249
|
const zeroAddressAsset = chainAssets?.find(
|
|
1276
1250
|
(x) => x.denom.toLowerCase() === "0x0000000000000000000000000000000000000000"
|
|
@@ -1281,13 +1255,13 @@ var validateEvmTokenApproval = async ({
|
|
|
1281
1255
|
`Insufficient balance for gas on ${chain.prettyName}. Need ${allowanceGasFee} gwei.`
|
|
1282
1256
|
);
|
|
1283
1257
|
}
|
|
1284
|
-
const formattedGasAmount =
|
|
1258
|
+
const formattedGasAmount = formatUnits(allowanceGasFee, asset?.decimals);
|
|
1285
1259
|
throw new Error(
|
|
1286
1260
|
`Insufficient balance for gas on ${chain.prettyName}. Need ${formattedGasAmount} ${asset.symbol}.`
|
|
1287
1261
|
);
|
|
1288
1262
|
}
|
|
1289
|
-
if (
|
|
1290
|
-
const chainAssets = (await
|
|
1263
|
+
if (BigNumber(gasBalance.amount).lt(Number(allowanceGasFee))) {
|
|
1264
|
+
const chainAssets = (await ClientState.getSkipAssets({ chainId: tx.chainId }))[tx.chainId];
|
|
1291
1265
|
const asset = chainAssets?.find(
|
|
1292
1266
|
(x) => x.denom.includes("-native") || x.denom.toLowerCase() === "0x0000000000000000000000000000000000000000"
|
|
1293
1267
|
);
|
|
@@ -1298,7 +1272,7 @@ var validateEvmTokenApproval = async ({
|
|
|
1298
1272
|
fee: null
|
|
1299
1273
|
};
|
|
1300
1274
|
}
|
|
1301
|
-
const formattedGasAmount =
|
|
1275
|
+
const formattedGasAmount = formatUnits(allowanceGasFee, asset?.decimals);
|
|
1302
1276
|
return {
|
|
1303
1277
|
error: `Insufficient balance for gas on ${chain.prettyName}. Need ${formattedGasAmount} ${asset.symbol} but only have ${gasBalance.formattedAmount} ${asset.symbol}.`,
|
|
1304
1278
|
asset: null,
|
|
@@ -1312,7 +1286,7 @@ var validateEvmTokenApproval = async ({
|
|
|
1312
1286
|
functionName: "approve",
|
|
1313
1287
|
args: [
|
|
1314
1288
|
requiredApproval.spender,
|
|
1315
|
-
useUnlimitedApproval ?
|
|
1289
|
+
useUnlimitedApproval ? maxUint256 : BigInt(requiredApproval.amount) + BigInt(1e3)
|
|
1316
1290
|
],
|
|
1317
1291
|
chain: signer.chain
|
|
1318
1292
|
});
|
|
@@ -1329,7 +1303,7 @@ var validateEvmTokenApproval = async ({
|
|
|
1329
1303
|
async function getEVMGasAmountForMessage(signer, tx, getFallbackGasAmount) {
|
|
1330
1304
|
const { to, data, value } = tx;
|
|
1331
1305
|
if (!signer.account) throw new Error("estimateGasForEvmTx: No account found");
|
|
1332
|
-
const extendedSigner = signer.extend(
|
|
1306
|
+
const extendedSigner = signer.extend(publicActions);
|
|
1333
1307
|
const fee = await extendedSigner.estimateFeesPerGas();
|
|
1334
1308
|
try {
|
|
1335
1309
|
const gasAmount = await extendedSigner.estimateGas({
|
|
@@ -1356,8 +1330,8 @@ var validateEvmGasBalance = async ({
|
|
|
1356
1330
|
useUnlimitedApproval
|
|
1357
1331
|
}) => {
|
|
1358
1332
|
const chainId = tx?.chainId ?? "";
|
|
1359
|
-
const skipAssets = (await
|
|
1360
|
-
const skipChains = await
|
|
1333
|
+
const skipAssets = (await ClientState.getSkipAssets({ chainId }))?.[chainId];
|
|
1334
|
+
const skipChains = await ClientState.getSkipChains();
|
|
1361
1335
|
const chain = skipChains?.find?.((chain2) => chain2.chainId === chainId);
|
|
1362
1336
|
if (!chain) {
|
|
1363
1337
|
throw new Error(`failed to find chain for chainId: '${chainId}'`);
|
|
@@ -1365,7 +1339,7 @@ var validateEvmGasBalance = async ({
|
|
|
1365
1339
|
if (!signer.account?.address) {
|
|
1366
1340
|
throw new Error("validateEvmGasBalance: Signer address not found");
|
|
1367
1341
|
}
|
|
1368
|
-
const skipBalances = (await
|
|
1342
|
+
const skipBalances = (await balances({
|
|
1369
1343
|
chains: {
|
|
1370
1344
|
[tx?.chainId ?? ""]: {
|
|
1371
1345
|
address: signer.account?.address
|
|
@@ -1411,14 +1385,14 @@ var validateEvmGasBalance = async ({
|
|
|
1411
1385
|
fee: null
|
|
1412
1386
|
};
|
|
1413
1387
|
}
|
|
1414
|
-
const formattedGasAmount =
|
|
1388
|
+
const formattedGasAmount = formatUnits(gasAmount, asset?.decimals);
|
|
1415
1389
|
return {
|
|
1416
1390
|
error: `Insufficient balance for gas on ${chain.prettyName}. Need ${formattedGasAmount} ${asset.symbol}.`,
|
|
1417
1391
|
asset: null,
|
|
1418
1392
|
fee: null
|
|
1419
1393
|
};
|
|
1420
1394
|
}
|
|
1421
|
-
if (
|
|
1395
|
+
if (BigNumber(gasBalance.amount ?? "").lt(Number(gasAmount))) {
|
|
1422
1396
|
const asset = skipAssets?.find(
|
|
1423
1397
|
(x) => x.denom?.includes("-native") || x.denom?.toLowerCase() === "0x0000000000000000000000000000000000000000"
|
|
1424
1398
|
);
|
|
@@ -1429,7 +1403,7 @@ var validateEvmGasBalance = async ({
|
|
|
1429
1403
|
fee: null
|
|
1430
1404
|
};
|
|
1431
1405
|
}
|
|
1432
|
-
const formattedGasAmount =
|
|
1406
|
+
const formattedGasAmount = formatUnits(gasAmount, asset?.decimals);
|
|
1433
1407
|
return {
|
|
1434
1408
|
error: `Insufficient balance for gas on ${chain.prettyName}. Need ${formattedGasAmount} ${asset.symbol} but only have ${gasBalance.formattedAmount} ${asset.symbol}.`,
|
|
1435
1409
|
asset: null,
|
|
@@ -1441,8 +1415,8 @@ var validateSvmGasBalance = async ({
|
|
|
1441
1415
|
tx
|
|
1442
1416
|
}) => {
|
|
1443
1417
|
if (!tx) throw new Error("Transaction is required");
|
|
1444
|
-
const endpoint = await
|
|
1445
|
-
const connection = new
|
|
1418
|
+
const endpoint = await getRpcEndpointForChain(tx.chainId ?? "");
|
|
1419
|
+
const connection = new Connection(endpoint);
|
|
1446
1420
|
if (!connection) throw new Error(`Failed to connect to ${tx.chainId}`);
|
|
1447
1421
|
if (!tx.tx) {
|
|
1448
1422
|
throw new Error("Transaction is required");
|
|
@@ -1450,7 +1424,7 @@ var validateSvmGasBalance = async ({
|
|
|
1450
1424
|
const txBuffer = Buffer.from(tx.tx, "base64");
|
|
1451
1425
|
let transaction;
|
|
1452
1426
|
try {
|
|
1453
|
-
transaction =
|
|
1427
|
+
transaction = Transaction.from(txBuffer);
|
|
1454
1428
|
} catch (decodeError) {
|
|
1455
1429
|
return {
|
|
1456
1430
|
success: false,
|
|
@@ -1492,7 +1466,7 @@ function getSolShortfall(logs) {
|
|
|
1492
1466
|
const have = parseInt(m[1] ?? "0", 10);
|
|
1493
1467
|
const need = parseInt(m[2] ?? "0", 10);
|
|
1494
1468
|
const shortfallLamports = need - have;
|
|
1495
|
-
return shortfallLamports /
|
|
1469
|
+
return shortfallLamports / LAMPORTS_PER_SOL;
|
|
1496
1470
|
}
|
|
1497
1471
|
|
|
1498
1472
|
// src/private-functions/validateGasBalances.ts
|
|
@@ -1589,13 +1563,13 @@ var validateGasBalances = async ({
|
|
|
1589
1563
|
onValidateGasBalance?.({
|
|
1590
1564
|
status: "error"
|
|
1591
1565
|
});
|
|
1592
|
-
|
|
1566
|
+
ClientState.validateGasResults = validateResult;
|
|
1593
1567
|
throw new Error(`${txError.error}`);
|
|
1594
1568
|
}
|
|
1595
1569
|
onValidateGasBalance?.({
|
|
1596
1570
|
status: "completed"
|
|
1597
1571
|
});
|
|
1598
|
-
|
|
1572
|
+
ClientState.validateGasResults = validateResult;
|
|
1599
1573
|
};
|
|
1600
1574
|
|
|
1601
1575
|
// src/private-functions/waitForTransaction.ts
|
|
@@ -1604,13 +1578,13 @@ var waitForTransaction = async ({
|
|
|
1604
1578
|
txHash,
|
|
1605
1579
|
onTransactionTracked
|
|
1606
1580
|
}) => {
|
|
1607
|
-
const { explorerLink } = await
|
|
1581
|
+
const { explorerLink } = await trackTransaction({
|
|
1608
1582
|
chainId,
|
|
1609
1583
|
txHash
|
|
1610
1584
|
});
|
|
1611
1585
|
await onTransactionTracked?.({ txHash, chainId, explorerLink });
|
|
1612
1586
|
while (true) {
|
|
1613
|
-
const txStatusResponse = await
|
|
1587
|
+
const txStatusResponse = await transactionStatus({
|
|
1614
1588
|
chainId,
|
|
1615
1589
|
txHash
|
|
1616
1590
|
});
|
|
@@ -1623,7 +1597,7 @@ var waitForTransaction = async ({
|
|
|
1623
1597
|
if (txStatusResponse.state === "STATE_ABANDONED") {
|
|
1624
1598
|
throw new Error("Tracking for the transaction has been abandoned");
|
|
1625
1599
|
}
|
|
1626
|
-
await
|
|
1600
|
+
await wait(1e3);
|
|
1627
1601
|
}
|
|
1628
1602
|
};
|
|
1629
1603
|
|
|
@@ -1660,10 +1634,10 @@ var executeTransactions = async (options) => {
|
|
|
1660
1634
|
}
|
|
1661
1635
|
});
|
|
1662
1636
|
const isGasStationSourceEVM = chainIds.find((item, i, array) => {
|
|
1663
|
-
return
|
|
1637
|
+
return GAS_STATION_CHAIN_IDS.includes(item?.chainId ?? "") && array[i - 1]?.chainType === "evm";
|
|
1664
1638
|
});
|
|
1665
|
-
|
|
1666
|
-
const validateChainIds = !batchSimulate ? chainIds.map((x) => x?.chainId ?? "") : isGasStationSourceEVM ?
|
|
1639
|
+
ClientState.validateGasResults = void 0;
|
|
1640
|
+
const validateChainIds = !batchSimulate ? chainIds.map((x) => x?.chainId ?? "") : isGasStationSourceEVM ? GAS_STATION_CHAIN_IDS : [];
|
|
1667
1641
|
await validateGasBalances({
|
|
1668
1642
|
txs,
|
|
1669
1643
|
getFallbackGasAmount: options.getFallbackGasAmount,
|
|
@@ -1742,7 +1716,7 @@ var executeRoute = async (options) => {
|
|
|
1742
1716
|
if (!isUserAddressesValid) {
|
|
1743
1717
|
throw new Error("executeRoute error: invalid user addresses");
|
|
1744
1718
|
}
|
|
1745
|
-
const response = await
|
|
1719
|
+
const response = await messages({
|
|
1746
1720
|
timeoutSeconds,
|
|
1747
1721
|
amountIn: route?.amountIn,
|
|
1748
1722
|
amountOut: route.estimatedAmountOut || "0",
|
|
@@ -1753,7 +1727,7 @@ var executeRoute = async (options) => {
|
|
|
1753
1727
|
operations: route?.operations,
|
|
1754
1728
|
addressList,
|
|
1755
1729
|
slippageTolerancePercent: options.slippageTolerancePercent || "1",
|
|
1756
|
-
chainIdsToAffiliates:
|
|
1730
|
+
chainIdsToAffiliates: ApiState.chainIdsToAffiliates
|
|
1757
1731
|
});
|
|
1758
1732
|
if (beforeMsg && (response?.txs?.length ?? 0) > 0) {
|
|
1759
1733
|
const firstTx = response?.txs?.[0];
|
|
@@ -1770,7 +1744,7 @@ var executeRoute = async (options) => {
|
|
|
1770
1744
|
await executeTransactions({ ...options, txs: response?.txs });
|
|
1771
1745
|
};
|
|
1772
1746
|
var validateUserAddresses = async (userAddresses) => {
|
|
1773
|
-
const chains2 = await
|
|
1747
|
+
const chains2 = await ClientState.getSkipChains();
|
|
1774
1748
|
const validations = userAddresses.map((userAddress) => {
|
|
1775
1749
|
const chain = chains2.find((chain2) => chain2.chainId === userAddress.chainId);
|
|
1776
1750
|
switch (chain?.chainType) {
|
|
@@ -1778,27 +1752,27 @@ var validateUserAddresses = async (userAddresses) => {
|
|
|
1778
1752
|
try {
|
|
1779
1753
|
if (chain.chainId?.includes("penumbra")) {
|
|
1780
1754
|
try {
|
|
1781
|
-
return chain.bech32Prefix ===
|
|
1755
|
+
return chain.bech32Prefix === bech32m.decode(userAddress.address, 143)?.prefix;
|
|
1782
1756
|
} catch {
|
|
1783
1757
|
return ["penumbracompat1", "tpenumbra"].includes(
|
|
1784
|
-
bech32.
|
|
1758
|
+
bech32.decode(userAddress.address, 1023).prefix
|
|
1785
1759
|
);
|
|
1786
1760
|
}
|
|
1787
1761
|
}
|
|
1788
|
-
return chain.bech32Prefix === bech32.
|
|
1762
|
+
return chain.bech32Prefix === bech32.decode(userAddress.address, 1023).prefix;
|
|
1789
1763
|
} catch {
|
|
1790
1764
|
return false;
|
|
1791
1765
|
}
|
|
1792
1766
|
case "evm" /* Evm */:
|
|
1793
1767
|
try {
|
|
1794
|
-
return
|
|
1768
|
+
return isAddress(userAddress.address);
|
|
1795
1769
|
} catch (_error) {
|
|
1796
1770
|
return false;
|
|
1797
1771
|
}
|
|
1798
1772
|
case "svm" /* Svm */:
|
|
1799
1773
|
try {
|
|
1800
|
-
const publicKey = new
|
|
1801
|
-
return
|
|
1774
|
+
const publicKey = new PublicKey(userAddress.address);
|
|
1775
|
+
return PublicKey.isOnCurve(publicKey);
|
|
1802
1776
|
} catch (_error) {
|
|
1803
1777
|
return false;
|
|
1804
1778
|
}
|
|
@@ -1809,4 +1783,4 @@ var validateUserAddresses = async (userAddresses) => {
|
|
|
1809
1783
|
return validations.every((validation) => validation);
|
|
1810
1784
|
};
|
|
1811
1785
|
|
|
1812
|
-
|
|
1786
|
+
export { executeRoute };
|