@skip-go/client 0.4.3 → 0.4.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/package.json +1 -1
- package/dist/chunk-6AMBIQDN.js +0 -1868
- package/dist/chunk-6FNC3XMI.js +0 -45
- package/dist/chunk-JRIEAGIQ.js +0 -10
- package/dist/chunk-PV2ELBDQ.js +0 -3248
- package/dist/index.d.ts +0 -307
- package/dist/index.js +0 -2874
- package/dist/parser.d.ts +0 -1
- package/dist/parser.js +0 -11
- package/dist/shared-UW-rSz3r.d.ts +0 -943
- package/dist/transactions.d.ts +0 -11
- package/dist/transactions.js +0 -23
- package/dist/types.d.ts +0 -565
- package/dist/types.js +0 -639
package/dist/index.js
DELETED
|
@@ -1,2874 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkJRIEAGIQ_js = require('./chunk-JRIEAGIQ.js');
|
|
4
|
-
var chunkPV2ELBDQ_js = require('./chunk-PV2ELBDQ.js');
|
|
5
|
-
var chunk6AMBIQDN_js = require('./chunk-6AMBIQDN.js');
|
|
6
|
-
var chunk6FNC3XMI_js = require('./chunk-6FNC3XMI.js');
|
|
7
|
-
var amino = require('@cosmjs/amino');
|
|
8
|
-
var cosmwasmStargate = require('@cosmjs/cosmwasm-stargate');
|
|
9
|
-
var encoding = require('@cosmjs/encoding');
|
|
10
|
-
var math = require('@cosmjs/math');
|
|
11
|
-
var protoSigning = require('@cosmjs/proto-signing');
|
|
12
|
-
require('cosmjs-types/cosmos/crypto/multisig/keys');
|
|
13
|
-
var keys = require('cosmjs-types/cosmos/crypto/secp256k1/keys');
|
|
14
|
-
var any = require('cosmjs-types/google/protobuf/any');
|
|
15
|
-
var stargate = require('@cosmjs/stargate');
|
|
16
|
-
var rest = require('@injectivelabs/sdk-ts/dist/cjs/client/chain/rest');
|
|
17
|
-
var utils = require('@injectivelabs/utils');
|
|
18
|
-
var axios2 = require('axios');
|
|
19
|
-
var signing = require('cosmjs-types/cosmos/tx/signing/v1beta1/signing');
|
|
20
|
-
var tx$1 = require('cosmjs-types/cosmos/tx/v1beta1/tx');
|
|
21
|
-
var tx = require('cosmjs-types/cosmwasm/wasm/v1/tx');
|
|
22
|
-
var viem = require('viem');
|
|
23
|
-
var chainRegistry = require('chain-registry');
|
|
24
|
-
var initiaRegistry = require('@initia/initia-registry');
|
|
25
|
-
var coreProtoTs = require('@injectivelabs/core-proto-ts');
|
|
26
|
-
var tx$2 = require('@injectivelabs/sdk-ts/dist/cjs/core/modules/tx/utils/tx');
|
|
27
|
-
var keccak256 = require('keccak256');
|
|
28
|
-
var web3_js = require('@solana/web3.js');
|
|
29
|
-
|
|
30
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
31
|
-
|
|
32
|
-
function _interopNamespace(e) {
|
|
33
|
-
if (e && e.__esModule) return e;
|
|
34
|
-
var n = Object.create(null);
|
|
35
|
-
if (e) {
|
|
36
|
-
Object.keys(e).forEach(function (k) {
|
|
37
|
-
if (k !== 'default') {
|
|
38
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
39
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () { return e[k]; }
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
n.default = e;
|
|
47
|
-
return Object.freeze(n);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var axios2__default = /*#__PURE__*/_interopDefault(axios2);
|
|
51
|
-
var chainRegistry__namespace = /*#__PURE__*/_interopNamespace(chainRegistry);
|
|
52
|
-
var initiaRegistry__namespace = /*#__PURE__*/_interopNamespace(initiaRegistry);
|
|
53
|
-
var keccak256__default = /*#__PURE__*/_interopDefault(keccak256);
|
|
54
|
-
|
|
55
|
-
function isEthSecp256k1Pubkey(pubkey) {
|
|
56
|
-
return pubkey.type === "ethermint/PubKeyEthSecp256k1";
|
|
57
|
-
}
|
|
58
|
-
var pubkeyType = chunk6FNC3XMI_js.__spreadValues({
|
|
59
|
-
ethsecp256k1: "ethermint/PubKeyEthSecp256k1"
|
|
60
|
-
}, amino.pubkeyType);
|
|
61
|
-
|
|
62
|
-
// src/amino/encoding.ts
|
|
63
|
-
function encodeEthSecp256k1Pubkey(pubkey) {
|
|
64
|
-
if (pubkey.length !== 33 || pubkey[0] !== 2 && pubkey[0] !== 3) {
|
|
65
|
-
throw new Error(
|
|
66
|
-
"Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03"
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
type: pubkeyType.ethsecp256k1,
|
|
71
|
-
value: encoding.toBase64(pubkey)
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// src/proto-signing/pubkey.ts
|
|
76
|
-
function makePubkeyAnyFromAccount(account, chainId) {
|
|
77
|
-
const algo = `${account.algo}`;
|
|
78
|
-
const isEthSecp256k1 = algo === "eth_secp256k1" || algo === "ethsecp256k1";
|
|
79
|
-
const pubkey = isEthSecp256k1 ? encodeEthSecp256k1Pubkey(account.pubkey) : amino.encodeSecp256k1Pubkey(account.pubkey);
|
|
80
|
-
const pubkeyAny = encodePubkeyToAny(pubkey, chainId);
|
|
81
|
-
return pubkeyAny;
|
|
82
|
-
}
|
|
83
|
-
function encodePubkeyToAny(pubkey, chainId) {
|
|
84
|
-
if (isEthSecp256k1Pubkey(pubkey)) {
|
|
85
|
-
const pubkeyProto = keys.PubKey.fromPartial({
|
|
86
|
-
key: encoding.fromBase64(pubkey.value)
|
|
87
|
-
});
|
|
88
|
-
let typeUrl = "";
|
|
89
|
-
if (chainId == null ? void 0 : chainId.includes("injective")) {
|
|
90
|
-
typeUrl = "/injective.crypto.v1beta1.ethsecp256k1.PubKey";
|
|
91
|
-
} else {
|
|
92
|
-
typeUrl = "/ethermint.crypto.v1.ethsecp256k1.PubKey";
|
|
93
|
-
}
|
|
94
|
-
return any.Any.fromPartial({
|
|
95
|
-
typeUrl,
|
|
96
|
-
value: Uint8Array.from(keys.PubKey.encode(pubkeyProto).finish())
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
return protoSigning.encodePubkey(pubkey);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
var DYDX_CHAIN = {
|
|
103
|
-
$schema: "../chain.schema.json",
|
|
104
|
-
chain_name: "dydx",
|
|
105
|
-
status: "live",
|
|
106
|
-
website: "https://dydx.exchange/",
|
|
107
|
-
network_type: "mainnet",
|
|
108
|
-
pretty_name: "dYdX Protocol",
|
|
109
|
-
chain_id: "dydx-mainnet-1",
|
|
110
|
-
bech32_prefix: "dydx",
|
|
111
|
-
daemon_name: "dydxprotocold",
|
|
112
|
-
node_home: "$HOME/.dydxprotocol",
|
|
113
|
-
key_algos: ["secp256k1"],
|
|
114
|
-
slip44: 118,
|
|
115
|
-
fees: {
|
|
116
|
-
fee_tokens: [
|
|
117
|
-
{
|
|
118
|
-
denom: "adydx",
|
|
119
|
-
fixed_min_gas_price: 125e8,
|
|
120
|
-
low_gas_price: 125e8,
|
|
121
|
-
average_gas_price: 125e8,
|
|
122
|
-
high_gas_price: 2e10
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
denom: "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
|
|
126
|
-
fixed_min_gas_price: 0.025,
|
|
127
|
-
low_gas_price: 0.025,
|
|
128
|
-
average_gas_price: 0.025,
|
|
129
|
-
high_gas_price: 0.03
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
staking: {
|
|
134
|
-
staking_tokens: [
|
|
135
|
-
{
|
|
136
|
-
denom: "adydx"
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
codebase: {
|
|
141
|
-
git_repo: "https://github.com/dydxprotocol/v4-chain/",
|
|
142
|
-
recommended_version: "v1.0.0",
|
|
143
|
-
compatible_versions: ["v1.0.0"],
|
|
144
|
-
cosmos_sdk_version: "v0.47.4",
|
|
145
|
-
cosmwasm_enabled: false,
|
|
146
|
-
genesis: {
|
|
147
|
-
genesis_url: "https://raw.githubusercontent.com/dydxopsdao/networks/main/dydx-mainnet-1/genesis.json"
|
|
148
|
-
},
|
|
149
|
-
versions: [
|
|
150
|
-
{
|
|
151
|
-
name: "v1",
|
|
152
|
-
recommended_version: "v1.0.0",
|
|
153
|
-
compatible_versions: ["v1.0.0"],
|
|
154
|
-
cosmos_sdk_version: "v0.47.4"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
logo_URIs: {
|
|
159
|
-
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/dydx/images/dydx.png",
|
|
160
|
-
svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/dydx/images/dydx.svg"
|
|
161
|
-
},
|
|
162
|
-
peers: {
|
|
163
|
-
seeds: [
|
|
164
|
-
{
|
|
165
|
-
id: "20e1000e88125698264454a884812746c2eb4807",
|
|
166
|
-
address: "seeds.lavenderfive.com:23856",
|
|
167
|
-
provider: "Lavender.Five Nodes \u{1F41D}"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
id: "ebc272824924ea1a27ea3183dd0b9ba713494f83",
|
|
171
|
-
address: "dydx-mainnet-seed.autostake.com:27366",
|
|
172
|
-
provider: "AutoStake \u{1F6E1}\uFE0F Slash Protected"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
id: "65b740ee326c9260c30af1f044e9cda63c73f7c1",
|
|
176
|
-
address: "seeds.kingnodes.net:23856",
|
|
177
|
-
provider: "Kingnodes"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
id: "4c30c8a95e26b07b249813b677caab28bf0c54eb",
|
|
181
|
-
address: "rpc.dydx.nodestake.top:666",
|
|
182
|
-
provider: "NodeStake"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
id: "400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc",
|
|
186
|
-
address: "dydx.rpc.kjnodes.com:17059",
|
|
187
|
-
provider: "kjnodes"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: "e1b058e5cfa2b836ddaa496b10911da62dcf182e",
|
|
191
|
-
address: "dydx-seed-de.allnodes.me:26656",
|
|
192
|
-
provider: "Allnodes \u26A1\uFE0F Nodes & Staking"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
id: "e726816f42831689eab9378d5d577f1d06d25716",
|
|
196
|
-
address: "dydx-seed-us.allnodes.me:26656",
|
|
197
|
-
provider: "Allnodes \u26A1\uFE0F Nodes & Staking"
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
persistent_peers: [
|
|
201
|
-
{
|
|
202
|
-
id: "ebc272824924ea1a27ea3183dd0b9ba713494f83",
|
|
203
|
-
address: "dydx-mainnet-peer.autostake.com:27366",
|
|
204
|
-
provider: "AutoStake \u{1F6E1}\uFE0F Slash Protected"
|
|
205
|
-
}
|
|
206
|
-
]
|
|
207
|
-
},
|
|
208
|
-
apis: {
|
|
209
|
-
rpc: [
|
|
210
|
-
{
|
|
211
|
-
address: "https://dydx-rpc.lavenderfive.com:443",
|
|
212
|
-
provider: "Lavender.Five Nodes \u{1F41D}"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
address: "https://dydx-mainnet-rpc.autostake.com:443",
|
|
216
|
-
provider: "AutoStake \u{1F6E1}\uFE0F Slash Protected"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
address: "https://rpc-dydx.ecostake.com:443",
|
|
220
|
-
provider: "ecostake"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
address: "https://rpc.dydx.nodestake.top:443",
|
|
224
|
-
provider: "NodeStake"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
address: "https://dydx.rpc.kjnodes.com:443",
|
|
228
|
-
provider: "kjnodes"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
address: "https://dydx-rpc.publicnode.com:443",
|
|
232
|
-
provider: "Allnodes \u26A1\uFE0F Nodes & Staking"
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
rest: [
|
|
236
|
-
{
|
|
237
|
-
address: "https://dydx-api.lavenderfive.com:443",
|
|
238
|
-
provider: "Lavender.Five Nodes \u{1F41D}"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
address: "https://dydx-mainnet-lcd.autostake.com:443",
|
|
242
|
-
provider: "AutoStake \u{1F6E1}\uFE0F Slash Protected"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
address: "https://rest-dydx.ecostake.com:443",
|
|
246
|
-
provider: "ecostake"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
address: "https://api.dydx.nodestake.top:443",
|
|
250
|
-
provider: "NodeStake"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
address: "https://dydx.api.kjnodes.com:443",
|
|
254
|
-
provider: "kjnodes"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
address: "https://dydx-rest.publicnode.com",
|
|
258
|
-
provider: "Allnodes \u26A1\uFE0F Nodes & Staking"
|
|
259
|
-
}
|
|
260
|
-
],
|
|
261
|
-
grpc: [
|
|
262
|
-
{
|
|
263
|
-
address: "https://dydx-grpc.lavenderfive.com",
|
|
264
|
-
provider: "Lavender.Five Nodes \u{1F41D}"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
address: "dydx-mainnet-grpc.autostake.com:443",
|
|
268
|
-
provider: "AutoStake \u{1F6E1}\uFE0F Slash Protected"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
address: "https://grpc.dydx.nodestake.top",
|
|
272
|
-
provider: "NodeStake"
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
address: "dydx.grpc.kjnodes.com:443",
|
|
276
|
-
provider: "kjnodes"
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
address: "dydx-grpc.publicnode.com:443",
|
|
280
|
-
provider: "Allnodes \u26A1\uFE0F Nodes & Staking"
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
|
-
},
|
|
284
|
-
explorers: [
|
|
285
|
-
{
|
|
286
|
-
kind: "mintscan",
|
|
287
|
-
url: "https://www.mintscan.io/dydx",
|
|
288
|
-
tx_page: "https://www.mintscan.io/dydx/txs/${txHash}",
|
|
289
|
-
account_page: "https://www.mintscan.io/dydx/account/${accountAddress}"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
kind: "NodeStake",
|
|
293
|
-
url: "https://explorer.nodestake.top/dydx/",
|
|
294
|
-
tx_page: "https://explorer.nodestake.top/dydx/txs/${txHash}",
|
|
295
|
-
account_page: "https://explorer.nodestake.top/dydx/account/${accountAddress}"
|
|
296
|
-
}
|
|
297
|
-
],
|
|
298
|
-
images: [
|
|
299
|
-
{
|
|
300
|
-
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/dydx/images/dydx.png",
|
|
301
|
-
svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/dydx/images/dydx.svg"
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
};
|
|
305
|
-
var CELESTIA_CHAIN = {
|
|
306
|
-
$schema: "../chain.schema.json",
|
|
307
|
-
chain_name: "celestia",
|
|
308
|
-
chain_id: "celestia",
|
|
309
|
-
pretty_name: "Celestia",
|
|
310
|
-
status: "live",
|
|
311
|
-
network_type: "mainnet",
|
|
312
|
-
bech32_prefix: "celestia",
|
|
313
|
-
daemon_name: "celestia-appd",
|
|
314
|
-
node_home: "$HOME/.celestia-app",
|
|
315
|
-
key_algos: ["secp256k1"],
|
|
316
|
-
slip44: 118,
|
|
317
|
-
fees: {
|
|
318
|
-
fee_tokens: [
|
|
319
|
-
{
|
|
320
|
-
denom: "utia",
|
|
321
|
-
fixed_min_gas_price: 0,
|
|
322
|
-
low_gas_price: 0.1,
|
|
323
|
-
average_gas_price: 0.2,
|
|
324
|
-
high_gas_price: 0.4
|
|
325
|
-
}
|
|
326
|
-
]
|
|
327
|
-
},
|
|
328
|
-
codebase: {
|
|
329
|
-
git_repo: "https://github.com/celestiaorg/celestia-app",
|
|
330
|
-
recommended_version: "v1.3.0",
|
|
331
|
-
compatible_versions: ["v1.3.0"],
|
|
332
|
-
genesis: {
|
|
333
|
-
genesis_url: "https://raw.githubusercontent.com/celestiaorg/networks/master/celestia/genesis.json"
|
|
334
|
-
},
|
|
335
|
-
versions: [
|
|
336
|
-
{
|
|
337
|
-
name: "v1.3.0",
|
|
338
|
-
recommended_version: "v1.3.0",
|
|
339
|
-
compatible_versions: ["v1.3.0"]
|
|
340
|
-
}
|
|
341
|
-
]
|
|
342
|
-
},
|
|
343
|
-
peers: {
|
|
344
|
-
seeds: [
|
|
345
|
-
{
|
|
346
|
-
id: "e6116822e1a5e283d8a85d3ec38f4d232274eaf3",
|
|
347
|
-
address: "consensus-full-seed-1.celestia-bootstrap.net:26656",
|
|
348
|
-
provider: "Celestia Foundation"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
id: "cf7ac8b19ff56a9d47c75551bd4864883d1e24b5",
|
|
352
|
-
address: "consensus-full-seed-1.celestia-bootstrap.net:26656",
|
|
353
|
-
provider: "Celestia Foundation"
|
|
354
|
-
}
|
|
355
|
-
]
|
|
356
|
-
},
|
|
357
|
-
apis: {
|
|
358
|
-
rpc: [
|
|
359
|
-
{
|
|
360
|
-
address: "https://public-celestia-rpc.numia.xyz",
|
|
361
|
-
provider: "Numia"
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
address: "https://celestia-rpc.mesa.newmetric.xyz",
|
|
365
|
-
provider: "Newmetric"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
address: "https://rpc.lunaroasis.net",
|
|
369
|
-
provider: "Lunar Oasis"
|
|
370
|
-
}
|
|
371
|
-
],
|
|
372
|
-
rest: [
|
|
373
|
-
{
|
|
374
|
-
address: "https://public-celestia-lcd.numia.xyz",
|
|
375
|
-
provider: "Numia"
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
address: "https://celestia-rest.mesa.newmetric.xyz",
|
|
379
|
-
provider: "Newmetric"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
address: "https://api.lunaroasis.net",
|
|
383
|
-
provider: "Lunar Oasis"
|
|
384
|
-
}
|
|
385
|
-
]
|
|
386
|
-
},
|
|
387
|
-
explorers: [
|
|
388
|
-
{
|
|
389
|
-
kind: "Mintscan",
|
|
390
|
-
url: "https://mintscan.io/celestia",
|
|
391
|
-
tx_page: "https://mintscan.io/celestia/txs/${txHash}"
|
|
392
|
-
}
|
|
393
|
-
]
|
|
394
|
-
};
|
|
395
|
-
function chains3() {
|
|
396
|
-
const chains4 = chainRegistry__namespace.chains;
|
|
397
|
-
if (chains4.findIndex((chain) => chain.chain_id === "dydx-mainnet-1") === -1) {
|
|
398
|
-
chains4.push(DYDX_CHAIN);
|
|
399
|
-
}
|
|
400
|
-
if (chains4.findIndex((chain) => chain.chain_id === "celestia") === -1) {
|
|
401
|
-
chains4.push(CELESTIA_CHAIN);
|
|
402
|
-
}
|
|
403
|
-
return chains4;
|
|
404
|
-
}
|
|
405
|
-
function initiaChains() {
|
|
406
|
-
const chains4 = initiaRegistry__namespace.chains;
|
|
407
|
-
return chains4;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// src/codegen/circle/cctp/v1/tx.registry.ts
|
|
411
|
-
var registry = [["/circle.cctp.v1.MsgAcceptOwner", chunkPV2ELBDQ_js.MsgAcceptOwner], ["/circle.cctp.v1.MsgAddRemoteTokenMessenger", chunkPV2ELBDQ_js.MsgAddRemoteTokenMessenger], ["/circle.cctp.v1.MsgDepositForBurn", chunkPV2ELBDQ_js.MsgDepositForBurn], ["/circle.cctp.v1.MsgDepositForBurnWithCaller", chunkPV2ELBDQ_js.MsgDepositForBurnWithCaller], ["/circle.cctp.v1.MsgDisableAttester", chunkPV2ELBDQ_js.MsgDisableAttester], ["/circle.cctp.v1.MsgEnableAttester", chunkPV2ELBDQ_js.MsgEnableAttester], ["/circle.cctp.v1.MsgLinkTokenPair", chunkPV2ELBDQ_js.MsgLinkTokenPair], ["/circle.cctp.v1.MsgPauseBurningAndMinting", chunkPV2ELBDQ_js.MsgPauseBurningAndMinting], ["/circle.cctp.v1.MsgPauseSendingAndReceivingMessages", chunkPV2ELBDQ_js.MsgPauseSendingAndReceivingMessages], ["/circle.cctp.v1.MsgReceiveMessage", chunkPV2ELBDQ_js.MsgReceiveMessage], ["/circle.cctp.v1.MsgRemoveRemoteTokenMessenger", chunkPV2ELBDQ_js.MsgRemoveRemoteTokenMessenger], ["/circle.cctp.v1.MsgReplaceDepositForBurn", chunkPV2ELBDQ_js.MsgReplaceDepositForBurn], ["/circle.cctp.v1.MsgReplaceMessage", chunkPV2ELBDQ_js.MsgReplaceMessage], ["/circle.cctp.v1.MsgSendMessage", chunkPV2ELBDQ_js.MsgSendMessage], ["/circle.cctp.v1.MsgSendMessageWithCaller", chunkPV2ELBDQ_js.MsgSendMessageWithCaller], ["/circle.cctp.v1.MsgUnlinkTokenPair", chunkPV2ELBDQ_js.MsgUnlinkTokenPair], ["/circle.cctp.v1.MsgUnpauseBurningAndMinting", chunkPV2ELBDQ_js.MsgUnpauseBurningAndMinting], ["/circle.cctp.v1.MsgUnpauseSendingAndReceivingMessages", chunkPV2ELBDQ_js.MsgUnpauseSendingAndReceivingMessages], ["/circle.cctp.v1.MsgUpdateOwner", chunkPV2ELBDQ_js.MsgUpdateOwner], ["/circle.cctp.v1.MsgUpdateAttesterManager", chunkPV2ELBDQ_js.MsgUpdateAttesterManager], ["/circle.cctp.v1.MsgUpdateTokenController", chunkPV2ELBDQ_js.MsgUpdateTokenController], ["/circle.cctp.v1.MsgUpdatePauser", chunkPV2ELBDQ_js.MsgUpdatePauser], ["/circle.cctp.v1.MsgUpdateMaxMessageBodySize", chunkPV2ELBDQ_js.MsgUpdateMaxMessageBodySize], ["/circle.cctp.v1.MsgSetMaxBurnAmountPerMessage", chunkPV2ELBDQ_js.MsgSetMaxBurnAmountPerMessage], ["/circle.cctp.v1.MsgUpdateSignatureThreshold", chunkPV2ELBDQ_js.MsgUpdateSignatureThreshold]];
|
|
412
|
-
|
|
413
|
-
// src/codegen/circle/cctp/v1/tx.amino.ts
|
|
414
|
-
var AminoConverter = {
|
|
415
|
-
"/circle.cctp.v1.MsgAcceptOwner": {
|
|
416
|
-
aminoType: "cctp/AcceptOwner",
|
|
417
|
-
toAmino: chunkPV2ELBDQ_js.MsgAcceptOwner.toAmino,
|
|
418
|
-
fromAmino: chunkPV2ELBDQ_js.MsgAcceptOwner.fromAmino
|
|
419
|
-
},
|
|
420
|
-
"/circle.cctp.v1.MsgAddRemoteTokenMessenger": {
|
|
421
|
-
aminoType: "cctp/AddRemoteTokenMessenger",
|
|
422
|
-
toAmino: chunkPV2ELBDQ_js.MsgAddRemoteTokenMessenger.toAmino,
|
|
423
|
-
fromAmino: chunkPV2ELBDQ_js.MsgAddRemoteTokenMessenger.fromAmino
|
|
424
|
-
},
|
|
425
|
-
"/circle.cctp.v1.MsgDepositForBurn": {
|
|
426
|
-
aminoType: "cctp/DepositForBurn",
|
|
427
|
-
toAmino: chunkPV2ELBDQ_js.MsgDepositForBurn.toAmino,
|
|
428
|
-
fromAmino: chunkPV2ELBDQ_js.MsgDepositForBurn.fromAmino
|
|
429
|
-
},
|
|
430
|
-
"/circle.cctp.v1.MsgDepositForBurnWithCaller": {
|
|
431
|
-
aminoType: "cctp/DepositForBurnWithCaller",
|
|
432
|
-
toAmino: chunkPV2ELBDQ_js.MsgDepositForBurnWithCaller.toAmino,
|
|
433
|
-
fromAmino: chunkPV2ELBDQ_js.MsgDepositForBurnWithCaller.fromAmino
|
|
434
|
-
},
|
|
435
|
-
"/circle.cctp.v1.MsgDisableAttester": {
|
|
436
|
-
aminoType: "cctp/DisableAttester",
|
|
437
|
-
toAmino: chunkPV2ELBDQ_js.MsgDisableAttester.toAmino,
|
|
438
|
-
fromAmino: chunkPV2ELBDQ_js.MsgDisableAttester.fromAmino
|
|
439
|
-
},
|
|
440
|
-
"/circle.cctp.v1.MsgEnableAttester": {
|
|
441
|
-
aminoType: "cctp/EnableAttester",
|
|
442
|
-
toAmino: chunkPV2ELBDQ_js.MsgEnableAttester.toAmino,
|
|
443
|
-
fromAmino: chunkPV2ELBDQ_js.MsgEnableAttester.fromAmino
|
|
444
|
-
},
|
|
445
|
-
"/circle.cctp.v1.MsgLinkTokenPair": {
|
|
446
|
-
aminoType: "cctp/LinkTokenPair",
|
|
447
|
-
toAmino: chunkPV2ELBDQ_js.MsgLinkTokenPair.toAmino,
|
|
448
|
-
fromAmino: chunkPV2ELBDQ_js.MsgLinkTokenPair.fromAmino
|
|
449
|
-
},
|
|
450
|
-
"/circle.cctp.v1.MsgPauseBurningAndMinting": {
|
|
451
|
-
aminoType: "cctp/PauseBurningAndMinting",
|
|
452
|
-
toAmino: chunkPV2ELBDQ_js.MsgPauseBurningAndMinting.toAmino,
|
|
453
|
-
fromAmino: chunkPV2ELBDQ_js.MsgPauseBurningAndMinting.fromAmino
|
|
454
|
-
},
|
|
455
|
-
"/circle.cctp.v1.MsgPauseSendingAndReceivingMessages": {
|
|
456
|
-
aminoType: "cctp/PauseSendingAndReceivingMessages",
|
|
457
|
-
toAmino: chunkPV2ELBDQ_js.MsgPauseSendingAndReceivingMessages.toAmino,
|
|
458
|
-
fromAmino: chunkPV2ELBDQ_js.MsgPauseSendingAndReceivingMessages.fromAmino
|
|
459
|
-
},
|
|
460
|
-
"/circle.cctp.v1.MsgReceiveMessage": {
|
|
461
|
-
aminoType: "cctp/ReceiveMessage",
|
|
462
|
-
toAmino: chunkPV2ELBDQ_js.MsgReceiveMessage.toAmino,
|
|
463
|
-
fromAmino: chunkPV2ELBDQ_js.MsgReceiveMessage.fromAmino
|
|
464
|
-
},
|
|
465
|
-
"/circle.cctp.v1.MsgRemoveRemoteTokenMessenger": {
|
|
466
|
-
aminoType: "cctp/RemoveRemoteTokenMessenger",
|
|
467
|
-
toAmino: chunkPV2ELBDQ_js.MsgRemoveRemoteTokenMessenger.toAmino,
|
|
468
|
-
fromAmino: chunkPV2ELBDQ_js.MsgRemoveRemoteTokenMessenger.fromAmino
|
|
469
|
-
},
|
|
470
|
-
"/circle.cctp.v1.MsgReplaceDepositForBurn": {
|
|
471
|
-
aminoType: "cctp/ReplaceDepositForBurn",
|
|
472
|
-
toAmino: chunkPV2ELBDQ_js.MsgReplaceDepositForBurn.toAmino,
|
|
473
|
-
fromAmino: chunkPV2ELBDQ_js.MsgReplaceDepositForBurn.fromAmino
|
|
474
|
-
},
|
|
475
|
-
"/circle.cctp.v1.MsgReplaceMessage": {
|
|
476
|
-
aminoType: "cctp/ReplaceMessage",
|
|
477
|
-
toAmino: chunkPV2ELBDQ_js.MsgReplaceMessage.toAmino,
|
|
478
|
-
fromAmino: chunkPV2ELBDQ_js.MsgReplaceMessage.fromAmino
|
|
479
|
-
},
|
|
480
|
-
"/circle.cctp.v1.MsgSendMessage": {
|
|
481
|
-
aminoType: "cctp/SendMessage",
|
|
482
|
-
toAmino: chunkPV2ELBDQ_js.MsgSendMessage.toAmino,
|
|
483
|
-
fromAmino: chunkPV2ELBDQ_js.MsgSendMessage.fromAmino
|
|
484
|
-
},
|
|
485
|
-
"/circle.cctp.v1.MsgSendMessageWithCaller": {
|
|
486
|
-
aminoType: "cctp/SendMessageWithCaller",
|
|
487
|
-
toAmino: chunkPV2ELBDQ_js.MsgSendMessageWithCaller.toAmino,
|
|
488
|
-
fromAmino: chunkPV2ELBDQ_js.MsgSendMessageWithCaller.fromAmino
|
|
489
|
-
},
|
|
490
|
-
"/circle.cctp.v1.MsgUnlinkTokenPair": {
|
|
491
|
-
aminoType: "cctp/UnlinkTokenPair",
|
|
492
|
-
toAmino: chunkPV2ELBDQ_js.MsgUnlinkTokenPair.toAmino,
|
|
493
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUnlinkTokenPair.fromAmino
|
|
494
|
-
},
|
|
495
|
-
"/circle.cctp.v1.MsgUnpauseBurningAndMinting": {
|
|
496
|
-
aminoType: "cctp/UnpauseBurningAndMinting",
|
|
497
|
-
toAmino: chunkPV2ELBDQ_js.MsgUnpauseBurningAndMinting.toAmino,
|
|
498
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUnpauseBurningAndMinting.fromAmino
|
|
499
|
-
},
|
|
500
|
-
"/circle.cctp.v1.MsgUnpauseSendingAndReceivingMessages": {
|
|
501
|
-
aminoType: "cctp/UnpauseSendingAndReceivingMessages",
|
|
502
|
-
toAmino: chunkPV2ELBDQ_js.MsgUnpauseSendingAndReceivingMessages.toAmino,
|
|
503
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUnpauseSendingAndReceivingMessages.fromAmino
|
|
504
|
-
},
|
|
505
|
-
"/circle.cctp.v1.MsgUpdateOwner": {
|
|
506
|
-
aminoType: "cctp/UpdateOwner",
|
|
507
|
-
toAmino: chunkPV2ELBDQ_js.MsgUpdateOwner.toAmino,
|
|
508
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUpdateOwner.fromAmino
|
|
509
|
-
},
|
|
510
|
-
"/circle.cctp.v1.MsgUpdateAttesterManager": {
|
|
511
|
-
aminoType: "cctp/UpdateAttesterManager",
|
|
512
|
-
toAmino: chunkPV2ELBDQ_js.MsgUpdateAttesterManager.toAmino,
|
|
513
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUpdateAttesterManager.fromAmino
|
|
514
|
-
},
|
|
515
|
-
"/circle.cctp.v1.MsgUpdateTokenController": {
|
|
516
|
-
aminoType: "cctp/UpdateTokenController",
|
|
517
|
-
toAmino: chunkPV2ELBDQ_js.MsgUpdateTokenController.toAmino,
|
|
518
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUpdateTokenController.fromAmino
|
|
519
|
-
},
|
|
520
|
-
"/circle.cctp.v1.MsgUpdatePauser": {
|
|
521
|
-
aminoType: "cctp/UpdatePauser",
|
|
522
|
-
toAmino: chunkPV2ELBDQ_js.MsgUpdatePauser.toAmino,
|
|
523
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUpdatePauser.fromAmino
|
|
524
|
-
},
|
|
525
|
-
"/circle.cctp.v1.MsgUpdateMaxMessageBodySize": {
|
|
526
|
-
aminoType: "cctp/UpdateMaxMessageBodySize",
|
|
527
|
-
toAmino: chunkPV2ELBDQ_js.MsgUpdateMaxMessageBodySize.toAmino,
|
|
528
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUpdateMaxMessageBodySize.fromAmino
|
|
529
|
-
},
|
|
530
|
-
"/circle.cctp.v1.MsgSetMaxBurnAmountPerMessage": {
|
|
531
|
-
aminoType: "cctp/SetMaxBurnAmountPerMessage",
|
|
532
|
-
toAmino: chunkPV2ELBDQ_js.MsgSetMaxBurnAmountPerMessage.toAmino,
|
|
533
|
-
fromAmino: chunkPV2ELBDQ_js.MsgSetMaxBurnAmountPerMessage.fromAmino
|
|
534
|
-
},
|
|
535
|
-
"/circle.cctp.v1.MsgUpdateSignatureThreshold": {
|
|
536
|
-
aminoType: "cctp/UpdateSignatureThreshold",
|
|
537
|
-
toAmino: chunkPV2ELBDQ_js.MsgUpdateSignatureThreshold.toAmino,
|
|
538
|
-
fromAmino: chunkPV2ELBDQ_js.MsgUpdateSignatureThreshold.fromAmino
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
// src/codegen/circle/client.ts
|
|
543
|
-
var circleAminoConverters = chunk6FNC3XMI_js.__spreadValues({}, AminoConverter);
|
|
544
|
-
var circleProtoRegistry = [...registry];
|
|
545
|
-
|
|
546
|
-
// src/constants/abis.ts
|
|
547
|
-
function createAbi(abi) {
|
|
548
|
-
return abi;
|
|
549
|
-
}
|
|
550
|
-
var erc20ABI = /* @__PURE__ */ createAbi([
|
|
551
|
-
{
|
|
552
|
-
type: "event",
|
|
553
|
-
name: "Approval",
|
|
554
|
-
inputs: [
|
|
555
|
-
{
|
|
556
|
-
indexed: true,
|
|
557
|
-
name: "owner",
|
|
558
|
-
type: "address"
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
indexed: true,
|
|
562
|
-
name: "spender",
|
|
563
|
-
type: "address"
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
indexed: false,
|
|
567
|
-
name: "value",
|
|
568
|
-
type: "uint256"
|
|
569
|
-
}
|
|
570
|
-
]
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
type: "event",
|
|
574
|
-
name: "Transfer",
|
|
575
|
-
inputs: [
|
|
576
|
-
{
|
|
577
|
-
indexed: true,
|
|
578
|
-
name: "from",
|
|
579
|
-
type: "address"
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
indexed: true,
|
|
583
|
-
name: "to",
|
|
584
|
-
type: "address"
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
indexed: false,
|
|
588
|
-
name: "value",
|
|
589
|
-
type: "uint256"
|
|
590
|
-
}
|
|
591
|
-
]
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
type: "function",
|
|
595
|
-
name: "allowance",
|
|
596
|
-
stateMutability: "view",
|
|
597
|
-
inputs: [
|
|
598
|
-
{
|
|
599
|
-
name: "owner",
|
|
600
|
-
type: "address"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
name: "spender",
|
|
604
|
-
type: "address"
|
|
605
|
-
}
|
|
606
|
-
],
|
|
607
|
-
outputs: [
|
|
608
|
-
{
|
|
609
|
-
name: "",
|
|
610
|
-
type: "uint256"
|
|
611
|
-
}
|
|
612
|
-
]
|
|
613
|
-
},
|
|
614
|
-
{
|
|
615
|
-
type: "function",
|
|
616
|
-
name: "approve",
|
|
617
|
-
stateMutability: "nonpayable",
|
|
618
|
-
inputs: [
|
|
619
|
-
{
|
|
620
|
-
name: "spender",
|
|
621
|
-
type: "address"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
name: "amount",
|
|
625
|
-
type: "uint256"
|
|
626
|
-
}
|
|
627
|
-
],
|
|
628
|
-
outputs: [
|
|
629
|
-
{
|
|
630
|
-
name: "",
|
|
631
|
-
type: "bool"
|
|
632
|
-
}
|
|
633
|
-
]
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
type: "function",
|
|
637
|
-
name: "balanceOf",
|
|
638
|
-
stateMutability: "view",
|
|
639
|
-
inputs: [
|
|
640
|
-
{
|
|
641
|
-
name: "account",
|
|
642
|
-
type: "address"
|
|
643
|
-
}
|
|
644
|
-
],
|
|
645
|
-
outputs: [
|
|
646
|
-
{
|
|
647
|
-
name: "",
|
|
648
|
-
type: "uint256"
|
|
649
|
-
}
|
|
650
|
-
]
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
type: "function",
|
|
654
|
-
name: "decimals",
|
|
655
|
-
stateMutability: "view",
|
|
656
|
-
inputs: [],
|
|
657
|
-
outputs: [
|
|
658
|
-
{
|
|
659
|
-
name: "",
|
|
660
|
-
type: "uint8"
|
|
661
|
-
}
|
|
662
|
-
]
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
type: "function",
|
|
666
|
-
name: "name",
|
|
667
|
-
stateMutability: "view",
|
|
668
|
-
inputs: [],
|
|
669
|
-
outputs: [
|
|
670
|
-
{
|
|
671
|
-
name: "",
|
|
672
|
-
type: "string"
|
|
673
|
-
}
|
|
674
|
-
]
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
type: "function",
|
|
678
|
-
name: "symbol",
|
|
679
|
-
stateMutability: "view",
|
|
680
|
-
inputs: [],
|
|
681
|
-
outputs: [
|
|
682
|
-
{
|
|
683
|
-
name: "",
|
|
684
|
-
type: "string"
|
|
685
|
-
}
|
|
686
|
-
]
|
|
687
|
-
},
|
|
688
|
-
{
|
|
689
|
-
type: "function",
|
|
690
|
-
name: "totalSupply",
|
|
691
|
-
stateMutability: "view",
|
|
692
|
-
inputs: [],
|
|
693
|
-
outputs: [
|
|
694
|
-
{
|
|
695
|
-
name: "",
|
|
696
|
-
type: "uint256"
|
|
697
|
-
}
|
|
698
|
-
]
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
type: "function",
|
|
702
|
-
name: "transfer",
|
|
703
|
-
stateMutability: "nonpayable",
|
|
704
|
-
inputs: [
|
|
705
|
-
{
|
|
706
|
-
name: "recipient",
|
|
707
|
-
type: "address"
|
|
708
|
-
},
|
|
709
|
-
{
|
|
710
|
-
name: "amount",
|
|
711
|
-
type: "uint256"
|
|
712
|
-
}
|
|
713
|
-
],
|
|
714
|
-
outputs: [
|
|
715
|
-
{
|
|
716
|
-
name: "",
|
|
717
|
-
type: "bool"
|
|
718
|
-
}
|
|
719
|
-
]
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
type: "function",
|
|
723
|
-
name: "transferFrom",
|
|
724
|
-
stateMutability: "nonpayable",
|
|
725
|
-
inputs: [
|
|
726
|
-
{
|
|
727
|
-
name: "sender",
|
|
728
|
-
type: "address"
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
name: "recipient",
|
|
732
|
-
type: "address"
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
name: "amount",
|
|
736
|
-
type: "uint256"
|
|
737
|
-
}
|
|
738
|
-
],
|
|
739
|
-
outputs: [
|
|
740
|
-
{
|
|
741
|
-
name: "",
|
|
742
|
-
type: "bool"
|
|
743
|
-
}
|
|
744
|
-
]
|
|
745
|
-
}
|
|
746
|
-
]);
|
|
747
|
-
|
|
748
|
-
// src/constants/constants.ts
|
|
749
|
-
var DEFAULT_GAS_DENOM_OVERRIDES = {
|
|
750
|
-
"noble-1": "uusdc"
|
|
751
|
-
};
|
|
752
|
-
function createTransaction({
|
|
753
|
-
chainId,
|
|
754
|
-
message,
|
|
755
|
-
timeoutHeight,
|
|
756
|
-
memo = "",
|
|
757
|
-
fee = utils.DEFAULT_STD_FEE,
|
|
758
|
-
signMode = 1,
|
|
759
|
-
pubKey,
|
|
760
|
-
accountNumber,
|
|
761
|
-
sequence
|
|
762
|
-
}) {
|
|
763
|
-
const signers = {
|
|
764
|
-
pubKey,
|
|
765
|
-
accountNumber,
|
|
766
|
-
sequence
|
|
767
|
-
};
|
|
768
|
-
const actualSigners = Array.isArray(signers) ? signers : [signers];
|
|
769
|
-
const [signer] = actualSigners;
|
|
770
|
-
const body = tx$2.createBody({ message, memo, timeoutHeight });
|
|
771
|
-
if (!fee.amount[0]) {
|
|
772
|
-
throw new Error("createTransaction error: unable to get fee amount");
|
|
773
|
-
}
|
|
774
|
-
const feeMessage = tx$2.createFee({
|
|
775
|
-
fee: fee.amount[0],
|
|
776
|
-
payer: fee.payer,
|
|
777
|
-
granter: fee.granter,
|
|
778
|
-
gasLimit: parseInt(fee.gas, 10)
|
|
779
|
-
});
|
|
780
|
-
const signInfo = tx$2.createSigners({
|
|
781
|
-
chainId,
|
|
782
|
-
mode: signMode,
|
|
783
|
-
signers: actualSigners
|
|
784
|
-
});
|
|
785
|
-
const authInfo = tx$2.createAuthInfo({
|
|
786
|
-
signerInfo: signInfo,
|
|
787
|
-
fee: feeMessage
|
|
788
|
-
});
|
|
789
|
-
const bodyBytes = coreProtoTs.CosmosTxV1Beta1Tx.TxBody.encode(body).finish();
|
|
790
|
-
const authInfoBytes = coreProtoTs.CosmosTxV1Beta1Tx.AuthInfo.encode(authInfo).finish();
|
|
791
|
-
const signDoc = tx$2.createSignDoc({
|
|
792
|
-
chainId,
|
|
793
|
-
bodyBytes,
|
|
794
|
-
authInfoBytes,
|
|
795
|
-
accountNumber: signer.accountNumber
|
|
796
|
-
});
|
|
797
|
-
const signDocBytes = coreProtoTs.CosmosTxV1Beta1Tx.SignDoc.encode(signDoc).finish();
|
|
798
|
-
const toSignBytes = Buffer.from(signDocBytes);
|
|
799
|
-
const toSignHash = keccak256__default.default(Buffer.from(signDocBytes));
|
|
800
|
-
const txRaw = coreProtoTs.CosmosTxV1Beta1Tx.TxRaw.create();
|
|
801
|
-
txRaw.authInfoBytes = authInfoBytes;
|
|
802
|
-
txRaw.bodyBytes = bodyBytes;
|
|
803
|
-
return {
|
|
804
|
-
txRaw,
|
|
805
|
-
signDoc,
|
|
806
|
-
signers,
|
|
807
|
-
signer,
|
|
808
|
-
signBytes: toSignBytes,
|
|
809
|
-
signHashedBytes: toSignHash,
|
|
810
|
-
bodyBytes,
|
|
811
|
-
authInfoBytes
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
var RequestClient = class {
|
|
815
|
-
constructor({ baseURL, apiKey }) {
|
|
816
|
-
this.httpClient = axios2__default.default.create({
|
|
817
|
-
baseURL,
|
|
818
|
-
headers: apiKey ? {
|
|
819
|
-
authorization: apiKey
|
|
820
|
-
} : void 0
|
|
821
|
-
});
|
|
822
|
-
}
|
|
823
|
-
get(path, params) {
|
|
824
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
825
|
-
var _a, _b;
|
|
826
|
-
try {
|
|
827
|
-
const response = yield this.httpClient.get(path, {
|
|
828
|
-
params
|
|
829
|
-
});
|
|
830
|
-
return response.data;
|
|
831
|
-
} catch (error) {
|
|
832
|
-
if (error instanceof axios2.AxiosError && ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message)) {
|
|
833
|
-
throw new Error(error.response.data.message);
|
|
834
|
-
}
|
|
835
|
-
throw error;
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
post(_0) {
|
|
840
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* (path, data = {}) {
|
|
841
|
-
var _a, _b;
|
|
842
|
-
try {
|
|
843
|
-
const response = yield this.httpClient.post(path, data);
|
|
844
|
-
return response.data;
|
|
845
|
-
} catch (error) {
|
|
846
|
-
if (error instanceof axios2.AxiosError && ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message)) {
|
|
847
|
-
throw new Error(error.response.data.message);
|
|
848
|
-
}
|
|
849
|
-
throw error;
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
};
|
|
854
|
-
var SKIP_API_URL = "https://api.skip.build";
|
|
855
|
-
var SkipRouter = class {
|
|
856
|
-
constructor(options = {}) {
|
|
857
|
-
var _a, _b, _c;
|
|
858
|
-
this.requestClient = new RequestClient({
|
|
859
|
-
baseURL: options.apiURL || SKIP_API_URL,
|
|
860
|
-
apiKey: options.apiKey
|
|
861
|
-
});
|
|
862
|
-
this.aminoTypes = new stargate.AminoTypes(chunk6FNC3XMI_js.__spreadValues(chunk6FNC3XMI_js.__spreadValues(chunk6FNC3XMI_js.__spreadValues(chunk6FNC3XMI_js.__spreadValues({}, stargate.createDefaultAminoConverters()), cosmwasmStargate.createWasmAminoConverters()), circleAminoConverters), (_a = options.aminoTypes) != null ? _a : {}));
|
|
863
|
-
this.registry = new protoSigning.Registry([
|
|
864
|
-
...stargate.defaultRegistryTypes,
|
|
865
|
-
["/cosmwasm.wasm.v1.MsgExecuteContract", tx.MsgExecuteContract],
|
|
866
|
-
["/initia.move.v1.MsgExecute", chunkPV2ELBDQ_js.MsgExecute],
|
|
867
|
-
["/opinit.ophost.v1.MsgInitiateTokenDeposit", chunkPV2ELBDQ_js.MsgInitiateTokenDeposit],
|
|
868
|
-
...circleProtoRegistry,
|
|
869
|
-
...(_b = options.registryTypes) != null ? _b : []
|
|
870
|
-
]);
|
|
871
|
-
this.endpointOptions = (_c = options.endpointOptions) != null ? _c : {};
|
|
872
|
-
this.getCosmosSigner = options.getCosmosSigner;
|
|
873
|
-
this.getEVMSigner = options.getEVMSigner;
|
|
874
|
-
this.getSVMSigner = options.getSVMSigner;
|
|
875
|
-
}
|
|
876
|
-
assets() {
|
|
877
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* (options = {}) {
|
|
878
|
-
const response = yield this.requestClient.get(
|
|
879
|
-
"/v2/fungible/assets",
|
|
880
|
-
chunk6AMBIQDN_js.assetsRequestToJSON(chunk6FNC3XMI_js.__spreadValues({}, options))
|
|
881
|
-
);
|
|
882
|
-
return Object.entries(response.chain_to_assets_map).reduce(
|
|
883
|
-
(acc, [chainID, { assets }]) => {
|
|
884
|
-
acc[chainID] = assets.map((asset) => chunk6AMBIQDN_js.assetFromJSON(asset));
|
|
885
|
-
return acc;
|
|
886
|
-
},
|
|
887
|
-
{}
|
|
888
|
-
);
|
|
889
|
-
});
|
|
890
|
-
}
|
|
891
|
-
assetsFromSource(options) {
|
|
892
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
893
|
-
const response = yield this.requestClient.post(
|
|
894
|
-
"/v2/fungible/assets_from_source",
|
|
895
|
-
chunk6AMBIQDN_js.assetsFromSourceRequestToJSON(chunk6FNC3XMI_js.__spreadValues({}, options))
|
|
896
|
-
);
|
|
897
|
-
return Object.entries(response.dest_assets).reduce(
|
|
898
|
-
(acc, [chainID, { assets }]) => {
|
|
899
|
-
acc[chainID] = assets.map((asset) => chunk6AMBIQDN_js.assetFromJSON(asset));
|
|
900
|
-
return acc;
|
|
901
|
-
},
|
|
902
|
-
{}
|
|
903
|
-
);
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
assetsBetweenChains(options) {
|
|
907
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
908
|
-
const response = yield this.requestClient.post(
|
|
909
|
-
"/v2/fungible/assets_between_chains",
|
|
910
|
-
chunk6AMBIQDN_js.assetsBetweenChainsRequestToJSON(options)
|
|
911
|
-
);
|
|
912
|
-
return chunk6AMBIQDN_js.assetsBetweenChainsResponseFromJSON(response).assetsBetweenChains;
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
bridges() {
|
|
916
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
917
|
-
const response = yield this.requestClient.get(
|
|
918
|
-
"/v2/info/bridges"
|
|
919
|
-
);
|
|
920
|
-
return chunk6AMBIQDN_js.bridgesResponseFromJSON(response).bridges;
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
chains() {
|
|
924
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
925
|
-
includeEVM,
|
|
926
|
-
includeSVM,
|
|
927
|
-
onlyTestnets,
|
|
928
|
-
chainIDs
|
|
929
|
-
} = { includeEVM: false, includeSVM: false }) {
|
|
930
|
-
const response = yield this.requestClient.get("/v2/info/chains", {
|
|
931
|
-
include_evm: includeEVM,
|
|
932
|
-
include_svm: includeSVM,
|
|
933
|
-
only_testnets: onlyTestnets,
|
|
934
|
-
chain_ids: chainIDs
|
|
935
|
-
});
|
|
936
|
-
return response.chains.map((chain) => chunk6AMBIQDN_js.chainFromJSON(chain));
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
executeRoute(options) {
|
|
940
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
941
|
-
var _a;
|
|
942
|
-
const { route, userAddresses } = options;
|
|
943
|
-
let addressList = [];
|
|
944
|
-
let i = 0;
|
|
945
|
-
for (let j = 0; j < userAddresses.length; j++) {
|
|
946
|
-
if (route.requiredChainAddresses[i] !== ((_a = userAddresses[j]) == null ? void 0 : _a.chainID)) {
|
|
947
|
-
i = j;
|
|
948
|
-
continue;
|
|
949
|
-
}
|
|
950
|
-
addressList.push(userAddresses[j].address);
|
|
951
|
-
i++;
|
|
952
|
-
}
|
|
953
|
-
if (addressList.length !== route.requiredChainAddresses.length) {
|
|
954
|
-
addressList = userAddresses.map((x) => x.address);
|
|
955
|
-
}
|
|
956
|
-
const validLength = addressList.length === route.requiredChainAddresses.length || addressList.length === route.chainIDs.length;
|
|
957
|
-
if (!validLength) {
|
|
958
|
-
raise("executeRoute error: invalid address list");
|
|
959
|
-
}
|
|
960
|
-
const messages = yield this.messages({
|
|
961
|
-
sourceAssetDenom: route.sourceAssetDenom,
|
|
962
|
-
sourceAssetChainID: route.sourceAssetChainID,
|
|
963
|
-
destAssetDenom: route.destAssetDenom,
|
|
964
|
-
destAssetChainID: route.destAssetChainID,
|
|
965
|
-
amountIn: route.amountIn,
|
|
966
|
-
amountOut: route.estimatedAmountOut || "0",
|
|
967
|
-
addressList,
|
|
968
|
-
operations: route.operations,
|
|
969
|
-
slippageTolerancePercent: options.slippageTolerancePercent || "1"
|
|
970
|
-
});
|
|
971
|
-
yield this.executeTxs(chunk6FNC3XMI_js.__spreadProps(chunk6FNC3XMI_js.__spreadValues({}, options), { txs: messages.txs }));
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
executeTxs(options) {
|
|
975
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
976
|
-
var _a;
|
|
977
|
-
const {
|
|
978
|
-
txs,
|
|
979
|
-
userAddresses,
|
|
980
|
-
validateGasBalance,
|
|
981
|
-
getGasPrice,
|
|
982
|
-
gasAmountMultiplier = chunkPV2ELBDQ_js.DEFAULT_GAS_MULTIPLIER,
|
|
983
|
-
getFallbackGasAmount
|
|
984
|
-
} = options;
|
|
985
|
-
let gasTokenUsed;
|
|
986
|
-
if (validateGasBalance) {
|
|
987
|
-
gasTokenUsed = yield this.validateGasBalances({
|
|
988
|
-
txs,
|
|
989
|
-
userAddresses,
|
|
990
|
-
getOfflineSigner: options.getCosmosSigner,
|
|
991
|
-
getGasPrice,
|
|
992
|
-
gasAmountMultiplier,
|
|
993
|
-
getFallbackGasAmount
|
|
994
|
-
});
|
|
995
|
-
}
|
|
996
|
-
for (let i = 0; i < txs.length; i++) {
|
|
997
|
-
const tx = txs[i];
|
|
998
|
-
if (!tx) {
|
|
999
|
-
raise(`executeRoute error: invalid message at index ${i}`);
|
|
1000
|
-
}
|
|
1001
|
-
let txResult;
|
|
1002
|
-
if ("cosmosTx" in tx) {
|
|
1003
|
-
const cosmosTx = tx.cosmosTx;
|
|
1004
|
-
const currentUserAddress = (_a = userAddresses.find(
|
|
1005
|
-
(x) => x.chainID === cosmosTx.chainID
|
|
1006
|
-
)) == null ? void 0 : _a.address;
|
|
1007
|
-
if (!currentUserAddress) {
|
|
1008
|
-
raise(
|
|
1009
|
-
`executeRoute error: invalid address for chain '${cosmosTx.chainID}'`
|
|
1010
|
-
);
|
|
1011
|
-
}
|
|
1012
|
-
if (cosmosTx.chainID === "stride-1" && !gasTokenUsed) {
|
|
1013
|
-
const getOfflineSigner = options.getCosmosSigner || this.getCosmosSigner;
|
|
1014
|
-
if (!getOfflineSigner) {
|
|
1015
|
-
throw new Error(
|
|
1016
|
-
"executeRoute error: 'getCosmosSigner' is not provided or configured in skip router"
|
|
1017
|
-
);
|
|
1018
|
-
}
|
|
1019
|
-
const signer = yield getOfflineSigner(tx.cosmosTx.chainID);
|
|
1020
|
-
const endpoint = yield this.getRpcEndpointForChain(
|
|
1021
|
-
tx.cosmosTx.chainID
|
|
1022
|
-
);
|
|
1023
|
-
const client = yield stargate.SigningStargateClient.connectWithSigner(
|
|
1024
|
-
endpoint,
|
|
1025
|
-
signer,
|
|
1026
|
-
{
|
|
1027
|
-
aminoTypes: this.aminoTypes,
|
|
1028
|
-
registry: this.registry,
|
|
1029
|
-
accountParser: chunkJRIEAGIQ_js.accountParser
|
|
1030
|
-
}
|
|
1031
|
-
);
|
|
1032
|
-
gasTokenUsed = yield this.validateCosmosGasBalance({
|
|
1033
|
-
chainID: cosmosTx.chainID,
|
|
1034
|
-
messages: cosmosTx.msgs,
|
|
1035
|
-
signerAddress: currentUserAddress,
|
|
1036
|
-
getGasPrice,
|
|
1037
|
-
gasAmountMultiplier,
|
|
1038
|
-
getFallbackGasAmount,
|
|
1039
|
-
client
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
const txResponse = yield this.executeCosmosMessage({
|
|
1043
|
-
messages: cosmosTx.msgs,
|
|
1044
|
-
chainID: cosmosTx.chainID,
|
|
1045
|
-
getCosmosSigner: options.getCosmosSigner,
|
|
1046
|
-
getGasPrice,
|
|
1047
|
-
gasAmountMultiplier,
|
|
1048
|
-
signerAddress: currentUserAddress,
|
|
1049
|
-
getFallbackGasAmount,
|
|
1050
|
-
gasTokenUsed
|
|
1051
|
-
});
|
|
1052
|
-
txResult = {
|
|
1053
|
-
chainID: cosmosTx.chainID,
|
|
1054
|
-
txHash: txResponse.transactionHash
|
|
1055
|
-
};
|
|
1056
|
-
} else if ("evmTx" in tx) {
|
|
1057
|
-
const txResponse = yield this.executeEvmMsg(tx, options);
|
|
1058
|
-
txResult = {
|
|
1059
|
-
chainID: tx.evmTx.chainID,
|
|
1060
|
-
txHash: txResponse.transactionHash
|
|
1061
|
-
};
|
|
1062
|
-
} else if ("svmTx" in tx) {
|
|
1063
|
-
const { svmTx } = tx;
|
|
1064
|
-
const getSVMSigner = options.getSVMSigner || this.getSVMSigner;
|
|
1065
|
-
if (!getSVMSigner) {
|
|
1066
|
-
throw new Error(
|
|
1067
|
-
"executeRoute error: 'getSVMSigner' is not provided or configured in skip router"
|
|
1068
|
-
);
|
|
1069
|
-
}
|
|
1070
|
-
const svmSigner = yield getSVMSigner();
|
|
1071
|
-
const txReceipt = yield this.executeSVMTransaction({
|
|
1072
|
-
signer: svmSigner,
|
|
1073
|
-
message: svmTx
|
|
1074
|
-
});
|
|
1075
|
-
txResult = {
|
|
1076
|
-
chainID: svmTx.chainID,
|
|
1077
|
-
txHash: txReceipt
|
|
1078
|
-
};
|
|
1079
|
-
} else {
|
|
1080
|
-
raise(`executeRoute error: invalid message type`);
|
|
1081
|
-
}
|
|
1082
|
-
if (options.onTransactionBroadcast) {
|
|
1083
|
-
yield options.onTransactionBroadcast(chunk6FNC3XMI_js.__spreadValues({}, txResult));
|
|
1084
|
-
}
|
|
1085
|
-
const txStatusResponse = yield this.waitForTransaction(chunk6FNC3XMI_js.__spreadProps(chunk6FNC3XMI_js.__spreadValues({}, txResult), {
|
|
1086
|
-
onTransactionTracked: options.onTransactionTracked
|
|
1087
|
-
}));
|
|
1088
|
-
if (options.onTransactionCompleted) {
|
|
1089
|
-
yield options.onTransactionCompleted(
|
|
1090
|
-
txResult.chainID,
|
|
1091
|
-
txResult.txHash,
|
|
1092
|
-
txStatusResponse
|
|
1093
|
-
);
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
executeEvmMsg(message, options) {
|
|
1099
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1100
|
-
const { evmTx } = message;
|
|
1101
|
-
const getEVMSigner = options.getEVMSigner || this.getEVMSigner;
|
|
1102
|
-
if (!getEVMSigner) {
|
|
1103
|
-
throw new Error("Unable to get EVM signer");
|
|
1104
|
-
}
|
|
1105
|
-
const evmSigner = yield getEVMSigner(evmTx.chainID);
|
|
1106
|
-
return yield this.executeEVMTransaction({
|
|
1107
|
-
message: evmTx,
|
|
1108
|
-
signer: evmSigner
|
|
1109
|
-
});
|
|
1110
|
-
});
|
|
1111
|
-
}
|
|
1112
|
-
executeCosmosMessage(options) {
|
|
1113
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1114
|
-
const {
|
|
1115
|
-
signerAddress,
|
|
1116
|
-
getCosmosSigner,
|
|
1117
|
-
chainID,
|
|
1118
|
-
messages,
|
|
1119
|
-
getGasPrice,
|
|
1120
|
-
gasAmountMultiplier,
|
|
1121
|
-
getFallbackGasAmount,
|
|
1122
|
-
gasTokenUsed
|
|
1123
|
-
} = options;
|
|
1124
|
-
const getOfflineSigner = this.getCosmosSigner || getCosmosSigner || raise(
|
|
1125
|
-
"executeRoute error: 'getCosmosSigner' is not provided or configured in skip router"
|
|
1126
|
-
);
|
|
1127
|
-
const signer = yield getOfflineSigner(chainID);
|
|
1128
|
-
const accounts = yield signer.getAccounts();
|
|
1129
|
-
const accountFromSigner = accounts.find(
|
|
1130
|
-
(account) => account.address === signerAddress
|
|
1131
|
-
);
|
|
1132
|
-
if (!accountFromSigner) {
|
|
1133
|
-
throw new Error(
|
|
1134
|
-
"executeMultiChainMessage error: failed to retrieve account from signer"
|
|
1135
|
-
);
|
|
1136
|
-
}
|
|
1137
|
-
const endpoint = yield this.getRpcEndpointForChain(chainID);
|
|
1138
|
-
const stargateClient = yield stargate.SigningStargateClient.connectWithSigner(
|
|
1139
|
-
endpoint,
|
|
1140
|
-
signer,
|
|
1141
|
-
{
|
|
1142
|
-
aminoTypes: this.aminoTypes,
|
|
1143
|
-
registry: this.registry,
|
|
1144
|
-
accountParser: chunkJRIEAGIQ_js.accountParser
|
|
1145
|
-
}
|
|
1146
|
-
);
|
|
1147
|
-
const fee = yield this.estimateGasForMessage({
|
|
1148
|
-
stargateClient,
|
|
1149
|
-
chainID,
|
|
1150
|
-
signerAddress,
|
|
1151
|
-
gasAmountMultiplier,
|
|
1152
|
-
getGasPrice,
|
|
1153
|
-
messages,
|
|
1154
|
-
getFallbackGasAmount
|
|
1155
|
-
});
|
|
1156
|
-
if (gasTokenUsed) {
|
|
1157
|
-
const _fee = fee.amount.find((x) => x.denom === gasTokenUsed.denom);
|
|
1158
|
-
if (_fee) {
|
|
1159
|
-
fee.amount = [_fee];
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
if (fee.amount.length > 1) {
|
|
1163
|
-
fee.amount = [fee.amount[0]];
|
|
1164
|
-
}
|
|
1165
|
-
const { accountNumber, sequence } = yield this.getAccountNumberAndSequence(
|
|
1166
|
-
signerAddress,
|
|
1167
|
-
chainID
|
|
1168
|
-
);
|
|
1169
|
-
let rawTx;
|
|
1170
|
-
if (protoSigning.isOfflineDirectSigner(signer)) {
|
|
1171
|
-
rawTx = yield this.signCosmosMessageDirect({
|
|
1172
|
-
signerAddress,
|
|
1173
|
-
signer,
|
|
1174
|
-
chainID,
|
|
1175
|
-
cosmosMsgs: messages,
|
|
1176
|
-
fee,
|
|
1177
|
-
signerData: {
|
|
1178
|
-
accountNumber,
|
|
1179
|
-
sequence,
|
|
1180
|
-
chainId: chainID
|
|
1181
|
-
}
|
|
1182
|
-
});
|
|
1183
|
-
} else {
|
|
1184
|
-
rawTx = yield this.signCosmosMessageAmino({
|
|
1185
|
-
signerAddress,
|
|
1186
|
-
signer,
|
|
1187
|
-
chainID,
|
|
1188
|
-
cosmosMsgs: messages,
|
|
1189
|
-
fee,
|
|
1190
|
-
signerData: {
|
|
1191
|
-
accountNumber,
|
|
1192
|
-
sequence,
|
|
1193
|
-
chainId: chainID
|
|
1194
|
-
}
|
|
1195
|
-
});
|
|
1196
|
-
}
|
|
1197
|
-
const txBytes = tx$1.TxRaw.encode(rawTx).finish();
|
|
1198
|
-
const tx = yield stargateClient.broadcastTx(txBytes);
|
|
1199
|
-
return tx;
|
|
1200
|
-
});
|
|
1201
|
-
}
|
|
1202
|
-
estimateGasForMessage(_0) {
|
|
1203
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1204
|
-
stargateClient,
|
|
1205
|
-
chainID,
|
|
1206
|
-
signerAddress,
|
|
1207
|
-
gasAmountMultiplier,
|
|
1208
|
-
getGasPrice,
|
|
1209
|
-
messages,
|
|
1210
|
-
encodedMsgs,
|
|
1211
|
-
getFallbackGasAmount
|
|
1212
|
-
}) {
|
|
1213
|
-
var _a;
|
|
1214
|
-
const estimatedGasAmount = yield (() => chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1215
|
-
try {
|
|
1216
|
-
const estimatedGas = yield chunkPV2ELBDQ_js.getCosmosGasAmountForMessage(
|
|
1217
|
-
stargateClient,
|
|
1218
|
-
signerAddress,
|
|
1219
|
-
chainID,
|
|
1220
|
-
messages,
|
|
1221
|
-
encodedMsgs,
|
|
1222
|
-
gasAmountMultiplier
|
|
1223
|
-
);
|
|
1224
|
-
return estimatedGas;
|
|
1225
|
-
} catch (error) {
|
|
1226
|
-
if (getFallbackGasAmount) {
|
|
1227
|
-
const fallbackGasAmount = yield getFallbackGasAmount(
|
|
1228
|
-
chainID,
|
|
1229
|
-
"cosmos"
|
|
1230
|
-
);
|
|
1231
|
-
if (!fallbackGasAmount) {
|
|
1232
|
-
raise(
|
|
1233
|
-
`executeRoute error: unable to estimate gas for message(s) ${messages || encodedMsgs}`
|
|
1234
|
-
);
|
|
1235
|
-
}
|
|
1236
|
-
return String(fallbackGasAmount);
|
|
1237
|
-
}
|
|
1238
|
-
raise(
|
|
1239
|
-
`executeRoute error: unable to estimate gas for message(s) ${messages || encodedMsgs}`
|
|
1240
|
-
);
|
|
1241
|
-
}
|
|
1242
|
-
}))();
|
|
1243
|
-
const gasPrice = (getGasPrice ? yield getGasPrice(chainID, "cosmos") : yield this.getRecommendedGasPrice(chainID)) || raise(
|
|
1244
|
-
`executeRoute error: unable to get gas prices for chain '${chainID}'`
|
|
1245
|
-
);
|
|
1246
|
-
const fee = stargate.calculateFee(
|
|
1247
|
-
Math.ceil(parseFloat(estimatedGasAmount)),
|
|
1248
|
-
gasPrice
|
|
1249
|
-
);
|
|
1250
|
-
if (chainID === "stride-1") {
|
|
1251
|
-
const chains4 = yield this.chains();
|
|
1252
|
-
const tiaOnStride = (_a = chains4.find((x) => x.chainID === chainID)) == null ? void 0 : _a.feeAssets.find(
|
|
1253
|
-
(item) => item.denom.toLowerCase() === "ibc/BF3B4F53F3694B66E13C23107C84B6485BD2B96296BB7EC680EA77BBA75B4801".toLowerCase()
|
|
1254
|
-
);
|
|
1255
|
-
if (tiaOnStride && tiaOnStride.gasPrice) {
|
|
1256
|
-
let price = tiaOnStride.gasPrice.average;
|
|
1257
|
-
if (price === "") {
|
|
1258
|
-
price = tiaOnStride.gasPrice.high;
|
|
1259
|
-
}
|
|
1260
|
-
if (price === "") {
|
|
1261
|
-
price = tiaOnStride.gasPrice.low;
|
|
1262
|
-
}
|
|
1263
|
-
const tiaOnStrideGasPrice = new stargate.GasPrice(
|
|
1264
|
-
math.Decimal.fromUserInput(price, 18),
|
|
1265
|
-
tiaOnStride.denom
|
|
1266
|
-
);
|
|
1267
|
-
const tiaOnStrideFee = stargate.calculateFee(
|
|
1268
|
-
Math.ceil(parseFloat(estimatedGasAmount)),
|
|
1269
|
-
tiaOnStrideGasPrice
|
|
1270
|
-
);
|
|
1271
|
-
if (tiaOnStrideFee.amount[0]) {
|
|
1272
|
-
fee.amount.push(tiaOnStrideFee.amount[0]);
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
if (!fee) {
|
|
1277
|
-
raise(
|
|
1278
|
-
`executeRoute error: unable to get fee for message(s) ${messages || encodedMsgs}`
|
|
1279
|
-
);
|
|
1280
|
-
}
|
|
1281
|
-
return fee;
|
|
1282
|
-
});
|
|
1283
|
-
}
|
|
1284
|
-
executeEVMTransaction(_0) {
|
|
1285
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1286
|
-
message,
|
|
1287
|
-
signer
|
|
1288
|
-
}) {
|
|
1289
|
-
if (!signer.account) {
|
|
1290
|
-
throw new Error(
|
|
1291
|
-
"executeEVMTransaction error: failed to retrieve account from signer"
|
|
1292
|
-
);
|
|
1293
|
-
}
|
|
1294
|
-
const extendedSigner = signer.extend(viem.publicActions);
|
|
1295
|
-
for (const requiredApproval of message.requiredERC20Approvals) {
|
|
1296
|
-
const allowance = yield extendedSigner.readContract({
|
|
1297
|
-
address: requiredApproval.tokenContract,
|
|
1298
|
-
abi: erc20ABI,
|
|
1299
|
-
functionName: "allowance",
|
|
1300
|
-
args: [
|
|
1301
|
-
signer.account.address,
|
|
1302
|
-
requiredApproval.spender
|
|
1303
|
-
]
|
|
1304
|
-
});
|
|
1305
|
-
if (allowance > BigInt(requiredApproval.amount)) {
|
|
1306
|
-
continue;
|
|
1307
|
-
}
|
|
1308
|
-
const txHash2 = yield extendedSigner.writeContract({
|
|
1309
|
-
account: signer.account,
|
|
1310
|
-
address: requiredApproval.tokenContract,
|
|
1311
|
-
abi: erc20ABI,
|
|
1312
|
-
functionName: "approve",
|
|
1313
|
-
args: [requiredApproval.spender, viem.maxUint256],
|
|
1314
|
-
chain: signer.chain
|
|
1315
|
-
});
|
|
1316
|
-
const receipt2 = yield extendedSigner.waitForTransactionReceipt({
|
|
1317
|
-
hash: txHash2
|
|
1318
|
-
});
|
|
1319
|
-
if (receipt2.status === "reverted") {
|
|
1320
|
-
throw new Error(
|
|
1321
|
-
`executeEVMTransaction error: evm tx reverted for hash ${receipt2.transactionHash}`
|
|
1322
|
-
);
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
const txHash = yield extendedSigner.sendTransaction({
|
|
1326
|
-
account: signer.account,
|
|
1327
|
-
to: message.to,
|
|
1328
|
-
data: `0x${message.data}`,
|
|
1329
|
-
chain: signer.chain,
|
|
1330
|
-
value: message.value === "" ? void 0 : BigInt(message.value)
|
|
1331
|
-
});
|
|
1332
|
-
const receipt = yield extendedSigner.waitForTransactionReceipt({
|
|
1333
|
-
hash: txHash
|
|
1334
|
-
});
|
|
1335
|
-
return receipt;
|
|
1336
|
-
});
|
|
1337
|
-
}
|
|
1338
|
-
executeSVMTransaction(_0) {
|
|
1339
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1340
|
-
signer,
|
|
1341
|
-
message
|
|
1342
|
-
}) {
|
|
1343
|
-
var _a;
|
|
1344
|
-
const _tx = Buffer.from(message.tx, "base64");
|
|
1345
|
-
const transaction = web3_js.Transaction.from(_tx);
|
|
1346
|
-
const endpoint = yield this.getRpcEndpointForChain(message.chainID);
|
|
1347
|
-
const connection = new web3_js.Connection(endpoint);
|
|
1348
|
-
let signature;
|
|
1349
|
-
if ("signTransaction" in signer) {
|
|
1350
|
-
const tx = yield signer.signTransaction(transaction);
|
|
1351
|
-
const serializedTx = tx.serialize();
|
|
1352
|
-
yield this.submitTransaction({
|
|
1353
|
-
chainID: message.chainID,
|
|
1354
|
-
tx: Buffer.from(serializedTx).toString("base64")
|
|
1355
|
-
});
|
|
1356
|
-
const sig = yield connection.sendRawTransaction(serializedTx, {
|
|
1357
|
-
preflightCommitment: "confirmed",
|
|
1358
|
-
maxRetries: 5
|
|
1359
|
-
});
|
|
1360
|
-
signature = sig;
|
|
1361
|
-
}
|
|
1362
|
-
if (!signature) {
|
|
1363
|
-
throw new Error("executeSVMTransaction error: signature not found");
|
|
1364
|
-
}
|
|
1365
|
-
let getStatusCount = 0;
|
|
1366
|
-
let errorCount = 0;
|
|
1367
|
-
while (true) {
|
|
1368
|
-
try {
|
|
1369
|
-
const result = yield connection.getSignatureStatus(signature, {
|
|
1370
|
-
searchTransactionHistory: true
|
|
1371
|
-
});
|
|
1372
|
-
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.confirmationStatus) === "confirmed") {
|
|
1373
|
-
return signature;
|
|
1374
|
-
} else if (getStatusCount > 12) {
|
|
1375
|
-
yield wait(3e3);
|
|
1376
|
-
throw new Error(
|
|
1377
|
-
`executeSVMTransaction error: waiting finalized status timed out for ${signature}`
|
|
1378
|
-
);
|
|
1379
|
-
}
|
|
1380
|
-
getStatusCount++;
|
|
1381
|
-
yield wait(3e3);
|
|
1382
|
-
} catch (error) {
|
|
1383
|
-
errorCount++;
|
|
1384
|
-
if (errorCount > 12) {
|
|
1385
|
-
throw error;
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
}
|
|
1391
|
-
signCosmosMessageDirect(options) {
|
|
1392
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1393
|
-
const {
|
|
1394
|
-
signer,
|
|
1395
|
-
signerAddress,
|
|
1396
|
-
chainID,
|
|
1397
|
-
cosmosMsgs,
|
|
1398
|
-
fee,
|
|
1399
|
-
signerData: { accountNumber, sequence, chainId }
|
|
1400
|
-
} = options;
|
|
1401
|
-
if (chainID.includes("evmos")) {
|
|
1402
|
-
return this.signCosmosMessageDirectEvmos(
|
|
1403
|
-
signerAddress,
|
|
1404
|
-
signer,
|
|
1405
|
-
cosmosMsgs,
|
|
1406
|
-
fee,
|
|
1407
|
-
{ accountNumber, sequence, chainId }
|
|
1408
|
-
);
|
|
1409
|
-
}
|
|
1410
|
-
if (chainID.includes("injective")) {
|
|
1411
|
-
return this.signCosmosMessageDirectInjective(
|
|
1412
|
-
signerAddress,
|
|
1413
|
-
signer,
|
|
1414
|
-
cosmosMsgs,
|
|
1415
|
-
fee,
|
|
1416
|
-
{ accountNumber, sequence, chainId }
|
|
1417
|
-
);
|
|
1418
|
-
}
|
|
1419
|
-
const accounts = yield signer.getAccounts();
|
|
1420
|
-
const accountFromSigner = accounts.find(
|
|
1421
|
-
(account) => account.address === signerAddress
|
|
1422
|
-
);
|
|
1423
|
-
if (!accountFromSigner) {
|
|
1424
|
-
throw new Error(
|
|
1425
|
-
"signCosmosMessageDirect error: failed to retrieve account from signer"
|
|
1426
|
-
);
|
|
1427
|
-
}
|
|
1428
|
-
const messages = cosmosMsgs.map(
|
|
1429
|
-
(cosmosMsg) => chunkPV2ELBDQ_js.getEncodeObjectFromCosmosMessage(cosmosMsg)
|
|
1430
|
-
);
|
|
1431
|
-
const txBodyEncodeObject = {
|
|
1432
|
-
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
1433
|
-
value: {
|
|
1434
|
-
messages
|
|
1435
|
-
}
|
|
1436
|
-
};
|
|
1437
|
-
const txBodyBytes = this.registry.encode(txBodyEncodeObject);
|
|
1438
|
-
const gasLimit = math.Int53.fromString(fee.gas).toNumber();
|
|
1439
|
-
const pubkeyAny = makePubkeyAnyFromAccount(accountFromSigner, chainID);
|
|
1440
|
-
const authInfoBytes = protoSigning.makeAuthInfoBytes(
|
|
1441
|
-
[{ pubkey: pubkeyAny, sequence }],
|
|
1442
|
-
fee.amount,
|
|
1443
|
-
gasLimit,
|
|
1444
|
-
fee.granter,
|
|
1445
|
-
fee.payer
|
|
1446
|
-
);
|
|
1447
|
-
const signDoc = protoSigning.makeSignDoc(
|
|
1448
|
-
txBodyBytes,
|
|
1449
|
-
authInfoBytes,
|
|
1450
|
-
chainId,
|
|
1451
|
-
accountNumber
|
|
1452
|
-
);
|
|
1453
|
-
const { signature, signed } = yield signer.signDirect(
|
|
1454
|
-
signerAddress,
|
|
1455
|
-
signDoc
|
|
1456
|
-
);
|
|
1457
|
-
return tx$1.TxRaw.fromPartial({
|
|
1458
|
-
bodyBytes: signed.bodyBytes,
|
|
1459
|
-
authInfoBytes: signed.authInfoBytes,
|
|
1460
|
-
signatures: [encoding.fromBase64(signature.signature)]
|
|
1461
|
-
});
|
|
1462
|
-
});
|
|
1463
|
-
}
|
|
1464
|
-
// TODO: This is previously existing code, just moved to a new function.
|
|
1465
|
-
// Using signCosmosMessageDirectEvmos on evmos DOES currently fail.
|
|
1466
|
-
// I need to investigate what exactly is even different about this and hopefully remove it all together.
|
|
1467
|
-
signCosmosMessageDirectEvmos(_0, _1, _2, _3, _4) {
|
|
1468
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* (signerAddress, signer, cosmosMsgs, fee, { accountNumber, sequence, chainId }) {
|
|
1469
|
-
const accounts = yield signer.getAccounts();
|
|
1470
|
-
const accountFromSigner = accounts.find(
|
|
1471
|
-
(account) => account.address === signerAddress
|
|
1472
|
-
);
|
|
1473
|
-
if (!accountFromSigner) {
|
|
1474
|
-
throw new Error(
|
|
1475
|
-
"signCosmosMessageDirectEvmos: failed to retrieve account from signer"
|
|
1476
|
-
);
|
|
1477
|
-
}
|
|
1478
|
-
const messages = cosmosMsgs.map(
|
|
1479
|
-
(cosmosMsg) => chunkPV2ELBDQ_js.getEncodeObjectFromCosmosMessageInjective(cosmosMsg)
|
|
1480
|
-
);
|
|
1481
|
-
const pk = Buffer.from(accountFromSigner.pubkey).toString("base64");
|
|
1482
|
-
const { signDoc } = createTransaction({
|
|
1483
|
-
pubKey: pk,
|
|
1484
|
-
chainId,
|
|
1485
|
-
message: messages,
|
|
1486
|
-
sequence,
|
|
1487
|
-
accountNumber,
|
|
1488
|
-
timeoutHeight: 0,
|
|
1489
|
-
fee
|
|
1490
|
-
});
|
|
1491
|
-
const directSignResponse = yield signer.signDirect(
|
|
1492
|
-
signerAddress,
|
|
1493
|
-
// @ts-expect-error TODO: Fix this
|
|
1494
|
-
signDoc
|
|
1495
|
-
);
|
|
1496
|
-
return tx$1.TxRaw.fromPartial({
|
|
1497
|
-
bodyBytes: directSignResponse.signed.bodyBytes,
|
|
1498
|
-
authInfoBytes: directSignResponse.signed.authInfoBytes,
|
|
1499
|
-
signatures: [encoding.fromBase64(directSignResponse.signature.signature)]
|
|
1500
|
-
});
|
|
1501
|
-
});
|
|
1502
|
-
}
|
|
1503
|
-
// TODO: This is previously existing code, just moved to a new function.
|
|
1504
|
-
// Using signCosmosMessageDirectInjective on injective DOES currently fail.
|
|
1505
|
-
// I need to investigate what exactly is even different about this and hopefully remove it all together.
|
|
1506
|
-
signCosmosMessageDirectInjective(_0, _1, _2, _3, _4) {
|
|
1507
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* (signerAddress, signer, cosmosMsgs, fee, { accountNumber, sequence, chainId }) {
|
|
1508
|
-
const accounts = yield signer.getAccounts();
|
|
1509
|
-
const accountFromSigner = accounts.find(
|
|
1510
|
-
(account) => account.address === signerAddress
|
|
1511
|
-
);
|
|
1512
|
-
if (!accountFromSigner) {
|
|
1513
|
-
throw new Error(
|
|
1514
|
-
"signCosmosMessageDirectInjective: failed to retrieve account from signer"
|
|
1515
|
-
);
|
|
1516
|
-
}
|
|
1517
|
-
const restEndpoint = yield this.getRestEndpointForChain(chainId);
|
|
1518
|
-
const chainRestTendermintApi = new rest.ChainRestTendermintApi(restEndpoint);
|
|
1519
|
-
const latestBlock = yield chainRestTendermintApi.fetchLatestBlock();
|
|
1520
|
-
const latestHeight = latestBlock.header.height;
|
|
1521
|
-
const timeoutHeight = new utils.BigNumberInBase(latestHeight).plus(
|
|
1522
|
-
utils.DEFAULT_BLOCK_TIMEOUT_HEIGHT
|
|
1523
|
-
);
|
|
1524
|
-
const pk = Buffer.from(accountFromSigner.pubkey).toString("base64");
|
|
1525
|
-
const messages = cosmosMsgs.map(
|
|
1526
|
-
(cosmosMsg) => chunkPV2ELBDQ_js.getEncodeObjectFromCosmosMessageInjective(cosmosMsg)
|
|
1527
|
-
);
|
|
1528
|
-
const { signDoc } = createTransaction({
|
|
1529
|
-
pubKey: pk,
|
|
1530
|
-
chainId,
|
|
1531
|
-
message: messages,
|
|
1532
|
-
sequence,
|
|
1533
|
-
accountNumber,
|
|
1534
|
-
timeoutHeight: timeoutHeight.toNumber(),
|
|
1535
|
-
fee
|
|
1536
|
-
});
|
|
1537
|
-
const directSignResponse = yield signer.signDirect(
|
|
1538
|
-
signerAddress,
|
|
1539
|
-
// @ts-expect-error TODO: Fix this
|
|
1540
|
-
signDoc
|
|
1541
|
-
);
|
|
1542
|
-
return tx$1.TxRaw.fromPartial({
|
|
1543
|
-
bodyBytes: directSignResponse.signed.bodyBytes,
|
|
1544
|
-
authInfoBytes: directSignResponse.signed.authInfoBytes,
|
|
1545
|
-
signatures: [encoding.fromBase64(directSignResponse.signature.signature)]
|
|
1546
|
-
});
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
signCosmosMessageAmino(options) {
|
|
1550
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1551
|
-
const {
|
|
1552
|
-
signer,
|
|
1553
|
-
signerAddress,
|
|
1554
|
-
chainID,
|
|
1555
|
-
cosmosMsgs,
|
|
1556
|
-
fee,
|
|
1557
|
-
signerData: { accountNumber, sequence, chainId }
|
|
1558
|
-
} = options;
|
|
1559
|
-
const accounts = yield signer.getAccounts();
|
|
1560
|
-
const accountFromSigner = accounts.find(
|
|
1561
|
-
(account) => account.address === signerAddress
|
|
1562
|
-
);
|
|
1563
|
-
if (!accountFromSigner) {
|
|
1564
|
-
throw new Error(
|
|
1565
|
-
"signCosmosMessageAmino: failed to retrieve account from signer"
|
|
1566
|
-
);
|
|
1567
|
-
}
|
|
1568
|
-
const messages = cosmosMsgs.map(
|
|
1569
|
-
(cosmosMsg) => chunkPV2ELBDQ_js.getEncodeObjectFromCosmosMessage(cosmosMsg)
|
|
1570
|
-
);
|
|
1571
|
-
const aminoMsgTransferIndex = messages.findIndex(
|
|
1572
|
-
(x) => x.typeUrl === "/ibc.applications.transfer.v1.MsgTransfer"
|
|
1573
|
-
);
|
|
1574
|
-
if (aminoMsgTransferIndex !== -1) {
|
|
1575
|
-
const endpoint = yield this.getRpcEndpointForChain(chainID);
|
|
1576
|
-
const client = yield stargate.StargateClient.connect(endpoint, {
|
|
1577
|
-
accountParser: chunkJRIEAGIQ_js.accountParser
|
|
1578
|
-
});
|
|
1579
|
-
const currentHeight = yield client.getHeight();
|
|
1580
|
-
messages[aminoMsgTransferIndex].value.timeoutHeight = {
|
|
1581
|
-
revisionHeight: currentHeight + 100,
|
|
1582
|
-
revisionNumber: currentHeight + 100
|
|
1583
|
-
};
|
|
1584
|
-
messages[aminoMsgTransferIndex].value.timeoutTimestamp = 0;
|
|
1585
|
-
}
|
|
1586
|
-
const signMode = signing.SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
1587
|
-
const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));
|
|
1588
|
-
const signDoc = amino.makeSignDoc(
|
|
1589
|
-
msgs,
|
|
1590
|
-
fee,
|
|
1591
|
-
chainId,
|
|
1592
|
-
"",
|
|
1593
|
-
accountNumber,
|
|
1594
|
-
sequence
|
|
1595
|
-
);
|
|
1596
|
-
const { signature, signed } = yield signer.signAmino(
|
|
1597
|
-
signerAddress,
|
|
1598
|
-
signDoc
|
|
1599
|
-
);
|
|
1600
|
-
const signedTxBody = {
|
|
1601
|
-
messages: signed.msgs.map((msg) => this.aminoTypes.fromAmino(msg)),
|
|
1602
|
-
memo: signed.memo
|
|
1603
|
-
};
|
|
1604
|
-
signedTxBody.messages[0].value.memo = messages[0].value.memo;
|
|
1605
|
-
const signedTxBodyEncodeObject = {
|
|
1606
|
-
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
1607
|
-
value: signedTxBody
|
|
1608
|
-
};
|
|
1609
|
-
const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject);
|
|
1610
|
-
const signedGasLimit = math.Int53.fromString(signed.fee.gas).toNumber();
|
|
1611
|
-
const signedSequence = math.Int53.fromString(signed.sequence).toNumber();
|
|
1612
|
-
const pubkeyAny = makePubkeyAnyFromAccount(accountFromSigner, chainID);
|
|
1613
|
-
const signedAuthInfoBytes = protoSigning.makeAuthInfoBytes(
|
|
1614
|
-
[{ pubkey: pubkeyAny, sequence: signedSequence }],
|
|
1615
|
-
signed.fee.amount,
|
|
1616
|
-
signedGasLimit,
|
|
1617
|
-
signed.fee.granter,
|
|
1618
|
-
signed.fee.payer,
|
|
1619
|
-
signMode
|
|
1620
|
-
);
|
|
1621
|
-
return tx$1.TxRaw.fromPartial({
|
|
1622
|
-
bodyBytes: signedTxBodyBytes,
|
|
1623
|
-
authInfoBytes: signedAuthInfoBytes,
|
|
1624
|
-
signatures: [encoding.fromBase64(signature.signature)]
|
|
1625
|
-
});
|
|
1626
|
-
});
|
|
1627
|
-
}
|
|
1628
|
-
messages(options) {
|
|
1629
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1630
|
-
const response = yield this.requestClient.post("/v2/fungible/msgs", chunk6FNC3XMI_js.__spreadProps(chunk6FNC3XMI_js.__spreadValues({}, chunk6AMBIQDN_js.msgsRequestToJSON(options)), {
|
|
1631
|
-
slippage_tolerance_percent: options.slippageTolerancePercent || "0"
|
|
1632
|
-
}));
|
|
1633
|
-
return chunk6AMBIQDN_js.messageResponseFromJSON(response);
|
|
1634
|
-
});
|
|
1635
|
-
}
|
|
1636
|
-
route(options) {
|
|
1637
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1638
|
-
const response = yield this.requestClient.post("/v2/fungible/route", chunk6FNC3XMI_js.__spreadProps(chunk6FNC3XMI_js.__spreadValues({}, chunk6AMBIQDN_js.routeRequestToJSON(options)), {
|
|
1639
|
-
cumulative_affiliate_fee_bps: options.cumulativeAffiliateFeeBPS || "0"
|
|
1640
|
-
}));
|
|
1641
|
-
return chunk6AMBIQDN_js.routeResponseFromJSON(response);
|
|
1642
|
-
});
|
|
1643
|
-
}
|
|
1644
|
-
msgsDirect(options) {
|
|
1645
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1646
|
-
const response = yield this.requestClient.post("/v2/fungible/msgs_direct", chunk6FNC3XMI_js.__spreadValues({}, chunk6AMBIQDN_js.msgsDirectRequestToJSON(options)));
|
|
1647
|
-
return {
|
|
1648
|
-
msgs: response.msgs.map((msg) => chunk6AMBIQDN_js.msgFromJSON(msg)),
|
|
1649
|
-
txs: response.txs.map((tx) => chunk6AMBIQDN_js.txFromJSON(tx)),
|
|
1650
|
-
route: chunk6AMBIQDN_js.routeResponseFromJSON(response.route)
|
|
1651
|
-
};
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
recommendAssets(request) {
|
|
1655
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1656
|
-
const options = chunk6AMBIQDN_js.recommendAssetsRequestToJSON({
|
|
1657
|
-
requests: Array.isArray(request) ? request : [request]
|
|
1658
|
-
});
|
|
1659
|
-
const response = yield this.requestClient.post(
|
|
1660
|
-
"/v2/fungible/recommend_assets",
|
|
1661
|
-
options
|
|
1662
|
-
);
|
|
1663
|
-
return chunk6AMBIQDN_js.recommendAssetsResponseFromJSON(response).recommendationEntries;
|
|
1664
|
-
});
|
|
1665
|
-
}
|
|
1666
|
-
ibcOriginAssets(assets) {
|
|
1667
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1668
|
-
const response = yield this.requestClient.post(
|
|
1669
|
-
"/v2/fungible/ibc_origin_assets",
|
|
1670
|
-
chunk6AMBIQDN_js.originAssetsRequestToJSON({
|
|
1671
|
-
assets
|
|
1672
|
-
})
|
|
1673
|
-
);
|
|
1674
|
-
return chunk6AMBIQDN_js.originAssetsResponseFromJSON(response).originAssets;
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1677
|
-
submitTransaction(_0) {
|
|
1678
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1679
|
-
chainID,
|
|
1680
|
-
tx
|
|
1681
|
-
}) {
|
|
1682
|
-
const response = yield this.requestClient.post("/v2/tx/submit", {
|
|
1683
|
-
chain_id: chainID,
|
|
1684
|
-
tx
|
|
1685
|
-
});
|
|
1686
|
-
return chunk6AMBIQDN_js.submitTxResponseFromJSON(response);
|
|
1687
|
-
});
|
|
1688
|
-
}
|
|
1689
|
-
trackTransaction(_0) {
|
|
1690
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1691
|
-
chainID,
|
|
1692
|
-
txHash,
|
|
1693
|
-
options
|
|
1694
|
-
}) {
|
|
1695
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1696
|
-
const maxRetries = (_b = (_a = options == null ? void 0 : options.retry) == null ? void 0 : _a.maxRetries) != null ? _b : 5;
|
|
1697
|
-
const retryInterval = (_d = (_c = options == null ? void 0 : options.retry) == null ? void 0 : _c.retryInterval) != null ? _d : 1e3;
|
|
1698
|
-
const backoffMultiplier = (_f = (_e = options == null ? void 0 : options.retry) == null ? void 0 : _e.backoffMultiplier) != null ? _f : 2;
|
|
1699
|
-
let retries = 0;
|
|
1700
|
-
let lastError;
|
|
1701
|
-
while (retries < maxRetries) {
|
|
1702
|
-
try {
|
|
1703
|
-
const response = yield this.requestClient.post("/v2/tx/track", {
|
|
1704
|
-
chain_id: chainID,
|
|
1705
|
-
tx_hash: txHash
|
|
1706
|
-
});
|
|
1707
|
-
return chunk6AMBIQDN_js.trackTxResponseFromJSON(response);
|
|
1708
|
-
} catch (error) {
|
|
1709
|
-
lastError = error;
|
|
1710
|
-
retries++;
|
|
1711
|
-
yield wait(retryInterval * Math.pow(backoffMultiplier, retries - 1));
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
throw lastError;
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
transactionStatus(_0) {
|
|
1718
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1719
|
-
chainID,
|
|
1720
|
-
txHash,
|
|
1721
|
-
options
|
|
1722
|
-
}) {
|
|
1723
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1724
|
-
const maxRetries = (_b = (_a = options == null ? void 0 : options.retry) == null ? void 0 : _a.maxRetries) != null ? _b : 5;
|
|
1725
|
-
const retryInterval = (_d = (_c = options == null ? void 0 : options.retry) == null ? void 0 : _c.retryInterval) != null ? _d : 1e3;
|
|
1726
|
-
const backoffMultiplier = (_f = (_e = options == null ? void 0 : options.retry) == null ? void 0 : _e.backoffMultiplier) != null ? _f : 2;
|
|
1727
|
-
let retries = 0;
|
|
1728
|
-
let lastError;
|
|
1729
|
-
while (retries < maxRetries) {
|
|
1730
|
-
try {
|
|
1731
|
-
const response = yield this.requestClient.get("/v2/tx/status", {
|
|
1732
|
-
chain_id: chainID,
|
|
1733
|
-
tx_hash: txHash
|
|
1734
|
-
});
|
|
1735
|
-
return chunk6AMBIQDN_js.txStatusResponseFromJSON(response);
|
|
1736
|
-
} catch (error) {
|
|
1737
|
-
lastError = error;
|
|
1738
|
-
retries++;
|
|
1739
|
-
yield wait(retryInterval * Math.pow(backoffMultiplier, retries - 1));
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
throw lastError;
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
waitForTransaction(_0) {
|
|
1746
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
1747
|
-
chainID,
|
|
1748
|
-
txHash,
|
|
1749
|
-
onTransactionTracked
|
|
1750
|
-
}) {
|
|
1751
|
-
const { explorerLink } = yield this.trackTransaction({
|
|
1752
|
-
chainID,
|
|
1753
|
-
txHash,
|
|
1754
|
-
options: {
|
|
1755
|
-
retry: {
|
|
1756
|
-
backoffMultiplier: 2.5
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1760
|
-
if (onTransactionTracked) {
|
|
1761
|
-
yield onTransactionTracked({ txHash, chainID, explorerLink });
|
|
1762
|
-
}
|
|
1763
|
-
while (true) {
|
|
1764
|
-
const txStatusResponse = yield this.transactionStatus({
|
|
1765
|
-
chainID,
|
|
1766
|
-
txHash
|
|
1767
|
-
});
|
|
1768
|
-
if (txStatusResponse.status === "STATE_COMPLETED") {
|
|
1769
|
-
return txStatusResponse;
|
|
1770
|
-
}
|
|
1771
|
-
yield wait(1e3);
|
|
1772
|
-
}
|
|
1773
|
-
});
|
|
1774
|
-
}
|
|
1775
|
-
venues(onlyTestnets) {
|
|
1776
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1777
|
-
const response = yield this.requestClient.get("/v2/fungible/venues", {
|
|
1778
|
-
only_testnets: onlyTestnets
|
|
1779
|
-
});
|
|
1780
|
-
return response.venues.map((venue) => chunk6AMBIQDN_js.swapVenueFromJSON(venue));
|
|
1781
|
-
});
|
|
1782
|
-
}
|
|
1783
|
-
getCosmsosGasAmountForMessage(client, signerAddress, chainID, cosmosMessages) {
|
|
1784
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1785
|
-
return chunkPV2ELBDQ_js.getCosmosGasAmountForMessage(
|
|
1786
|
-
client,
|
|
1787
|
-
signerAddress,
|
|
1788
|
-
chainID,
|
|
1789
|
-
cosmosMessages
|
|
1790
|
-
);
|
|
1791
|
-
});
|
|
1792
|
-
}
|
|
1793
|
-
getAccountNumberAndSequence(address, chainID) {
|
|
1794
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1795
|
-
if (chainID.includes("dymension")) {
|
|
1796
|
-
return this.getAccountNumberAndSequenceFromDymension(address, chainID);
|
|
1797
|
-
}
|
|
1798
|
-
const endpoint = yield this.getRpcEndpointForChain(chainID);
|
|
1799
|
-
const client = yield stargate.StargateClient.connect(endpoint, {
|
|
1800
|
-
accountParser: chunkJRIEAGIQ_js.accountParser
|
|
1801
|
-
});
|
|
1802
|
-
const account = yield client.getAccount(address);
|
|
1803
|
-
if (!account) {
|
|
1804
|
-
throw new Error(
|
|
1805
|
-
"getAccountNumberAndSequence: failed to retrieve account"
|
|
1806
|
-
);
|
|
1807
|
-
}
|
|
1808
|
-
client.disconnect();
|
|
1809
|
-
return {
|
|
1810
|
-
accountNumber: account.accountNumber,
|
|
1811
|
-
sequence: account.sequence
|
|
1812
|
-
};
|
|
1813
|
-
});
|
|
1814
|
-
}
|
|
1815
|
-
getAccountNumberAndSequenceFromDymension(address, chainID) {
|
|
1816
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1817
|
-
const endpoint = yield this.getRestEndpointForChain(chainID);
|
|
1818
|
-
const response = yield axios2__default.default.get(
|
|
1819
|
-
`${endpoint}/cosmos/auth/v1beta1/accounts/${address}`
|
|
1820
|
-
);
|
|
1821
|
-
let sequence = 0;
|
|
1822
|
-
let accountNumber = 0;
|
|
1823
|
-
if (response.data.account.base_account) {
|
|
1824
|
-
sequence = response.data.account.base_account.sequence;
|
|
1825
|
-
accountNumber = response.data.account.base_account.account_number;
|
|
1826
|
-
} else {
|
|
1827
|
-
sequence = response.data.account.sequence;
|
|
1828
|
-
accountNumber = response.data.account.account_number;
|
|
1829
|
-
}
|
|
1830
|
-
return {
|
|
1831
|
-
accountNumber,
|
|
1832
|
-
sequence
|
|
1833
|
-
};
|
|
1834
|
-
});
|
|
1835
|
-
}
|
|
1836
|
-
getAccountNumberAndSequenceFromEvmos(address, chainID) {
|
|
1837
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1838
|
-
const endpoint = yield this.getRestEndpointForChain(chainID);
|
|
1839
|
-
const response = yield axios2__default.default.get(
|
|
1840
|
-
`${endpoint}/cosmos/auth/v1beta1/accounts/${address}`
|
|
1841
|
-
);
|
|
1842
|
-
const accountNumber = response.data.account.base_account.account_number;
|
|
1843
|
-
const sequence = response.data.account.base_account.sequence;
|
|
1844
|
-
return {
|
|
1845
|
-
accountNumber,
|
|
1846
|
-
sequence
|
|
1847
|
-
};
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
getAccountNumberAndSequenceInjective(address, chainID) {
|
|
1851
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1852
|
-
const endpoint = yield this.getRestEndpointForChain(chainID);
|
|
1853
|
-
const chainRestAuthApi = new rest.ChainRestAuthApi(endpoint);
|
|
1854
|
-
const accountDetailsResponse = yield chainRestAuthApi.fetchAccount(address);
|
|
1855
|
-
return {
|
|
1856
|
-
accountNumber: parseInt(
|
|
1857
|
-
accountDetailsResponse.account.base_account.account_number
|
|
1858
|
-
),
|
|
1859
|
-
sequence: parseInt(accountDetailsResponse.account.base_account.sequence)
|
|
1860
|
-
};
|
|
1861
|
-
});
|
|
1862
|
-
}
|
|
1863
|
-
getRpcEndpointForChain(chainID) {
|
|
1864
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1865
|
-
var _a, _b, _c;
|
|
1866
|
-
if (this.endpointOptions.getRpcEndpointForChain) {
|
|
1867
|
-
return this.endpointOptions.getRpcEndpointForChain(chainID);
|
|
1868
|
-
}
|
|
1869
|
-
if (this.endpointOptions.endpoints && this.endpointOptions.endpoints[chainID]) {
|
|
1870
|
-
const endpointOptions = this.endpointOptions.endpoints[chainID];
|
|
1871
|
-
if (endpointOptions == null ? void 0 : endpointOptions.rpc) {
|
|
1872
|
-
return endpointOptions.rpc;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
let chain;
|
|
1876
|
-
chain = chains3().find((chain2) => chain2.chain_id === chainID);
|
|
1877
|
-
if (!chain) {
|
|
1878
|
-
chain = initiaChains().find((chain2) => chain2.chain_id === chainID);
|
|
1879
|
-
}
|
|
1880
|
-
if (!chain) {
|
|
1881
|
-
throw new Error(
|
|
1882
|
-
`getRpcEndpointForChain: failed to find chain id '${chainID}' in registry`
|
|
1883
|
-
);
|
|
1884
|
-
}
|
|
1885
|
-
const endpoint = (_c = (_b = (_a = chain.apis) == null ? void 0 : _a.rpc) == null ? void 0 : _b[0]) == null ? void 0 : _c.address;
|
|
1886
|
-
if (!endpoint) {
|
|
1887
|
-
throw new Error(
|
|
1888
|
-
`getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainID}'`
|
|
1889
|
-
);
|
|
1890
|
-
}
|
|
1891
|
-
return endpoint;
|
|
1892
|
-
});
|
|
1893
|
-
}
|
|
1894
|
-
getRestEndpointForChain(chainID) {
|
|
1895
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1896
|
-
var _a, _b, _c;
|
|
1897
|
-
if (this.endpointOptions.getRestEndpointForChain) {
|
|
1898
|
-
return this.endpointOptions.getRestEndpointForChain(chainID);
|
|
1899
|
-
}
|
|
1900
|
-
if (this.endpointOptions.endpoints && this.endpointOptions.endpoints[chainID]) {
|
|
1901
|
-
const endpointOptions = this.endpointOptions.endpoints[chainID];
|
|
1902
|
-
if (endpointOptions == null ? void 0 : endpointOptions.rest) {
|
|
1903
|
-
return endpointOptions.rest;
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
let chain;
|
|
1907
|
-
chain = chains3().find((chain2) => chain2.chain_id === chainID);
|
|
1908
|
-
if (!chain) {
|
|
1909
|
-
chain = initiaChains().find((chain2) => chain2.chain_id === chainID);
|
|
1910
|
-
}
|
|
1911
|
-
if (!chain) {
|
|
1912
|
-
throw new Error(
|
|
1913
|
-
`getRestEndpointForChain error: failed to find chain id '${chainID}' in registry`
|
|
1914
|
-
);
|
|
1915
|
-
}
|
|
1916
|
-
const endpoint = (_c = (_b = (_a = chain.apis) == null ? void 0 : _a.rest) == null ? void 0 : _b[0]) == null ? void 0 : _c.address;
|
|
1917
|
-
if (!endpoint) {
|
|
1918
|
-
throw new Error(
|
|
1919
|
-
`getRestEndpointForChain error: failed to find REST endpoint for chain '${chainID}'`
|
|
1920
|
-
);
|
|
1921
|
-
}
|
|
1922
|
-
return endpoint;
|
|
1923
|
-
});
|
|
1924
|
-
}
|
|
1925
|
-
getCosmosFeeForMessage(_0, _1) {
|
|
1926
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* (chainID, msgs, gasAmountMultiplier = chunkPV2ELBDQ_js.DEFAULT_GAS_MULTIPLIER, signer, gasPrice) {
|
|
1927
|
-
var _a, _b;
|
|
1928
|
-
gasPrice || (gasPrice = yield this.getRecommendedGasPrice(chainID));
|
|
1929
|
-
if (!gasPrice) {
|
|
1930
|
-
throw new Error(
|
|
1931
|
-
`getFeeForMessage error: Unable to get gas price for chain: ${chainID}`
|
|
1932
|
-
);
|
|
1933
|
-
}
|
|
1934
|
-
signer || (signer = yield (_a = this.getCosmosSigner) == null ? void 0 : _a.call(this, chainID));
|
|
1935
|
-
if (!signer) {
|
|
1936
|
-
throw new Error(
|
|
1937
|
-
"getFeeForMessage error: signer is not provided or 'getCosmosSigner' is not configured in skip router"
|
|
1938
|
-
);
|
|
1939
|
-
}
|
|
1940
|
-
const accounts = yield signer.getAccounts();
|
|
1941
|
-
const signerAddress = ((_b = accounts[0]) == null ? void 0 : _b.address) || raise(
|
|
1942
|
-
`getFeeForMessage error: unable to resolve account address from signer`
|
|
1943
|
-
);
|
|
1944
|
-
const endpoint = yield this.getRpcEndpointForChain(chainID);
|
|
1945
|
-
const client = yield stargate.SigningStargateClient.connectWithSigner(
|
|
1946
|
-
endpoint,
|
|
1947
|
-
signer,
|
|
1948
|
-
{
|
|
1949
|
-
aminoTypes: this.aminoTypes,
|
|
1950
|
-
registry: this.registry,
|
|
1951
|
-
accountParser: chunkJRIEAGIQ_js.accountParser
|
|
1952
|
-
}
|
|
1953
|
-
);
|
|
1954
|
-
const gasNeeded = yield chunkPV2ELBDQ_js.getCosmosGasAmountForMessage(
|
|
1955
|
-
client,
|
|
1956
|
-
signerAddress,
|
|
1957
|
-
chainID,
|
|
1958
|
-
msgs,
|
|
1959
|
-
void 0,
|
|
1960
|
-
gasAmountMultiplier
|
|
1961
|
-
);
|
|
1962
|
-
const fee = stargate.calculateFee(Math.ceil(parseFloat(gasNeeded)), gasPrice);
|
|
1963
|
-
if (!fee) {
|
|
1964
|
-
throw new Error("getFeeForMessage error: unable to get fee for message");
|
|
1965
|
-
}
|
|
1966
|
-
return fee;
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
getRecommendedGasPrice(chainID) {
|
|
1970
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1971
|
-
const feeInfo = yield this.getFeeInfoForChain(chainID);
|
|
1972
|
-
if (!feeInfo || !feeInfo.gasPrice) {
|
|
1973
|
-
return void 0;
|
|
1974
|
-
}
|
|
1975
|
-
let price = feeInfo.gasPrice.average;
|
|
1976
|
-
if (price === "") {
|
|
1977
|
-
price = feeInfo.gasPrice.high;
|
|
1978
|
-
}
|
|
1979
|
-
if (price === "") {
|
|
1980
|
-
price = feeInfo.gasPrice.low;
|
|
1981
|
-
}
|
|
1982
|
-
return new stargate.GasPrice(math.Decimal.fromUserInput(price, 18), feeInfo.denom);
|
|
1983
|
-
});
|
|
1984
|
-
}
|
|
1985
|
-
getFeeInfoForChain(chainID) {
|
|
1986
|
-
return chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
1987
|
-
var _a, _b;
|
|
1988
|
-
const skipChains = [
|
|
1989
|
-
...yield this.chains({}),
|
|
1990
|
-
...yield this.chains({ onlyTestnets: true })
|
|
1991
|
-
];
|
|
1992
|
-
const skipChain = skipChains.find((chain2) => chain2.chainID === chainID);
|
|
1993
|
-
if (!skipChain) {
|
|
1994
|
-
return void 0;
|
|
1995
|
-
}
|
|
1996
|
-
const defaultGasToken = yield this.getDefaultGasTokenForChain(chainID);
|
|
1997
|
-
if (!defaultGasToken && !skipChain.feeAssets) {
|
|
1998
|
-
return void 0;
|
|
1999
|
-
}
|
|
2000
|
-
const skipFeeInfo = defaultGasToken ? skipChain.feeAssets.find((skipFee) => skipFee.denom === defaultGasToken) : skipChain.feeAssets[0];
|
|
2001
|
-
if (!skipFeeInfo && ((_b = (_a = skipChain.feeAssets) == null ? void 0 : _a[0]) == null ? void 0 : _b.gasPrice) !== null) {
|
|
2002
|
-
return skipChain.feeAssets[0];
|
|
2003
|
-
}
|
|
2004
|
-
if (skipFeeInfo && skipFeeInfo.gasPrice !== null) {
|
|
2005
|
-
return skipFeeInfo;
|
|
2006
|
-
}
|
|
2007
|
-
let chain;
|
|
2008
|
-
chain = chains3().find((chain2) => chain2.chain_id === chainID);
|
|
2009
|
-
if (!chain) {
|
|
2010
|
-
chain = initiaChains().find((chain2) => chain2.chain_id === chainID);
|
|
2011
|
-
}
|
|
2012
|
-
if (!chain) {
|
|
2013
|
-
return void 0;
|
|
2014
|
-
}
|
|
2015
|
-
if (!chain.fees) {
|
|
2016
|
-
return void 0;
|
|
2017
|
-
}
|
|
2018
|
-
const registryFeeInfo = chain.fees.fee_tokens.find(
|
|
2019
|
-
(feeToken) => feeToken.denom === defaultGasToken
|
|
2020
|
-
);
|
|
2021
|
-
if (!registryFeeInfo) {
|
|
2022
|
-
return void 0;
|
|
2023
|
-
}
|
|
2024
|
-
return {
|
|
2025
|
-
denom: registryFeeInfo.denom,
|
|
2026
|
-
gasPrice: {
|
|
2027
|
-
low: registryFeeInfo.low_gas_price ? `${registryFeeInfo.low_gas_price}` : "",
|
|
2028
|
-
average: registryFeeInfo.average_gas_price ? `${registryFeeInfo.average_gas_price}` : "",
|
|
2029
|
-
high: registryFeeInfo.high_gas_price ? `${registryFeeInfo.high_gas_price}` : ""
|
|
2030
|
-
}
|
|
2031
|
-
};
|
|
2032
|
-
});
|
|
2033
|
-
}
|
|
2034
|
-
getDefaultGasTokenForChain(chainID) {
|
|
2035
|
-
var _a;
|
|
2036
|
-
const gasDenom = DEFAULT_GAS_DENOM_OVERRIDES[chainID];
|
|
2037
|
-
if (gasDenom) {
|
|
2038
|
-
return gasDenom;
|
|
2039
|
-
}
|
|
2040
|
-
let chain;
|
|
2041
|
-
chain = chains3().find((chain2) => chain2.chain_id === chainID);
|
|
2042
|
-
if (!chain) {
|
|
2043
|
-
chain = initiaChains().find((chain2) => chain2.chain_id === chainID);
|
|
2044
|
-
}
|
|
2045
|
-
if (!chain) {
|
|
2046
|
-
return void 0;
|
|
2047
|
-
}
|
|
2048
|
-
if (!chain.fees) {
|
|
2049
|
-
return void 0;
|
|
2050
|
-
}
|
|
2051
|
-
const stakingTokens = this.getStakingTokensForChain(chainID);
|
|
2052
|
-
if (stakingTokens && stakingTokens.length > 0) {
|
|
2053
|
-
const feeAsset = chain.fees.fee_tokens.find(
|
|
2054
|
-
(feeToken) => {
|
|
2055
|
-
var _a2;
|
|
2056
|
-
return feeToken.denom === ((_a2 = stakingTokens[0]) == null ? void 0 : _a2.denom);
|
|
2057
|
-
}
|
|
2058
|
-
);
|
|
2059
|
-
if (feeAsset) {
|
|
2060
|
-
return feeAsset.denom;
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
const nonIBCAsset = chain.fees.fee_tokens.find(
|
|
2064
|
-
(token) => !token.denom.startsWith("ibc/") && !token.denom.startsWith("l2/")
|
|
2065
|
-
);
|
|
2066
|
-
if (nonIBCAsset) {
|
|
2067
|
-
return nonIBCAsset.denom;
|
|
2068
|
-
}
|
|
2069
|
-
const nonL2Asset = chain.fees.fee_tokens.find(
|
|
2070
|
-
(token) => !token.denom.startsWith("l2/")
|
|
2071
|
-
);
|
|
2072
|
-
if (nonL2Asset) {
|
|
2073
|
-
return nonL2Asset.denom;
|
|
2074
|
-
}
|
|
2075
|
-
return (_a = chain.fees.fee_tokens[0]) == null ? void 0 : _a.denom;
|
|
2076
|
-
}
|
|
2077
|
-
getStakingTokensForChain(chainID) {
|
|
2078
|
-
let chain;
|
|
2079
|
-
chain = chains3().find((chain2) => chain2.chain_id === chainID);
|
|
2080
|
-
if (!chain) {
|
|
2081
|
-
chain = initiaChains().find((chain2) => chain2.chain_id === chainID);
|
|
2082
|
-
}
|
|
2083
|
-
if (!chain) {
|
|
2084
|
-
throw new Error(
|
|
2085
|
-
`getStakingTokensForChain error: failed to find chain id '${chainID}' in registry`
|
|
2086
|
-
);
|
|
2087
|
-
}
|
|
2088
|
-
if (!chain.staking) {
|
|
2089
|
-
return void 0;
|
|
2090
|
-
}
|
|
2091
|
-
return chain.staking.staking_tokens;
|
|
2092
|
-
}
|
|
2093
|
-
validateGasBalances(_0) {
|
|
2094
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
2095
|
-
txs,
|
|
2096
|
-
userAddresses,
|
|
2097
|
-
getOfflineSigner,
|
|
2098
|
-
getGasPrice,
|
|
2099
|
-
gasAmountMultiplier,
|
|
2100
|
-
getFallbackGasAmount
|
|
2101
|
-
}) {
|
|
2102
|
-
var _a;
|
|
2103
|
-
for (let i = 0; i < txs.length; i++) {
|
|
2104
|
-
const tx = txs[i];
|
|
2105
|
-
if (!tx) {
|
|
2106
|
-
raise(`validateGasBalances error: invalid tx at index ${i}`);
|
|
2107
|
-
}
|
|
2108
|
-
if ("cosmosTx" in tx) {
|
|
2109
|
-
const msgs = tx.cosmosTx.msgs;
|
|
2110
|
-
if (!msgs) {
|
|
2111
|
-
raise(`validateGasBalances error: invalid msgs ${msgs}`);
|
|
2112
|
-
}
|
|
2113
|
-
getOfflineSigner = getOfflineSigner || this.getCosmosSigner;
|
|
2114
|
-
if (!getOfflineSigner) {
|
|
2115
|
-
throw new Error(
|
|
2116
|
-
"executeRoute error: 'getCosmosSigner' is not provided or configured in skip router"
|
|
2117
|
-
);
|
|
2118
|
-
}
|
|
2119
|
-
const signer = yield getOfflineSigner(tx.cosmosTx.chainID);
|
|
2120
|
-
const endpoint = yield this.getRpcEndpointForChain(tx.cosmosTx.chainID);
|
|
2121
|
-
const client = yield stargate.SigningStargateClient.connectWithSigner(
|
|
2122
|
-
endpoint,
|
|
2123
|
-
signer,
|
|
2124
|
-
{
|
|
2125
|
-
aminoTypes: this.aminoTypes,
|
|
2126
|
-
registry: this.registry,
|
|
2127
|
-
accountParser: chunkJRIEAGIQ_js.accountParser
|
|
2128
|
-
}
|
|
2129
|
-
);
|
|
2130
|
-
const currentAddress = ((_a = userAddresses.find(
|
|
2131
|
-
(address) => address.chainID === tx.cosmosTx.chainID
|
|
2132
|
-
)) == null ? void 0 : _a.address) || raise(
|
|
2133
|
-
`validateGasBalance error: invalid address for chain '${tx.cosmosTx.chainID}'`
|
|
2134
|
-
);
|
|
2135
|
-
return yield this.validateCosmosGasBalance({
|
|
2136
|
-
client,
|
|
2137
|
-
signerAddress: currentAddress,
|
|
2138
|
-
chainID: tx.cosmosTx.chainID,
|
|
2139
|
-
messages: msgs,
|
|
2140
|
-
getGasPrice,
|
|
2141
|
-
gasAmountMultiplier,
|
|
2142
|
-
getFallbackGasAmount
|
|
2143
|
-
});
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
});
|
|
2147
|
-
}
|
|
2148
|
-
validateCosmosGasBalance(_0) {
|
|
2149
|
-
return chunk6FNC3XMI_js.__async(this, arguments, function* ({
|
|
2150
|
-
chainID,
|
|
2151
|
-
client,
|
|
2152
|
-
signerAddress,
|
|
2153
|
-
messages,
|
|
2154
|
-
getGasPrice,
|
|
2155
|
-
gasAmountMultiplier,
|
|
2156
|
-
getFallbackGasAmount
|
|
2157
|
-
}) {
|
|
2158
|
-
var _a, _b;
|
|
2159
|
-
const fee = yield this.estimateGasForMessage({
|
|
2160
|
-
stargateClient: client,
|
|
2161
|
-
chainID,
|
|
2162
|
-
signerAddress,
|
|
2163
|
-
gasAmountMultiplier,
|
|
2164
|
-
getGasPrice,
|
|
2165
|
-
messages,
|
|
2166
|
-
getFallbackGasAmount
|
|
2167
|
-
});
|
|
2168
|
-
if (!fee.amount[0]) {
|
|
2169
|
-
throw new Error(
|
|
2170
|
-
`validateCosmosGasBalance error: unable to get fee amount`
|
|
2171
|
-
);
|
|
2172
|
-
}
|
|
2173
|
-
const mainnetAssets = yield this.assets();
|
|
2174
|
-
const testnetAssets = yield this.assets({ onlyTestnets: true });
|
|
2175
|
-
const assets = chunk6FNC3XMI_js.__spreadValues(chunk6FNC3XMI_js.__spreadValues({}, mainnetAssets), testnetAssets);
|
|
2176
|
-
const assetByChainID = assets[chainID];
|
|
2177
|
-
const result = yield Promise.all(
|
|
2178
|
-
fee.amount.map((amount) => chunk6FNC3XMI_js.__async(this, null, function* () {
|
|
2179
|
-
const asset = assetByChainID == null ? void 0 : assetByChainID.find(
|
|
2180
|
-
(asset2) => asset2.denom.toLowerCase() === amount.denom.toLowerCase()
|
|
2181
|
-
);
|
|
2182
|
-
if (!asset || !asset.decimals) {
|
|
2183
|
-
return {
|
|
2184
|
-
errMessage: `${amount.denom} is not found in assets for ${chainID}.`,
|
|
2185
|
-
amount
|
|
2186
|
-
};
|
|
2187
|
-
}
|
|
2188
|
-
const balance = yield client.getBalance(signerAddress, amount.denom);
|
|
2189
|
-
if (parseInt(balance.amount) < parseInt(amount.amount)) {
|
|
2190
|
-
const formattedBalance = Number(balance.amount) / Math.pow(10, asset.decimals);
|
|
2191
|
-
const formattedAmount = Number(amount.amount) / Math.pow(10, asset.decimals);
|
|
2192
|
-
return {
|
|
2193
|
-
errMessage: `Insufficient fee token to initiate transfer on ${chainID}. Need ${formattedAmount} ${asset.recommendedSymbol || amount.denom}, but only have ${formattedBalance} ${asset.recommendedSymbol || amount.denom}.`,
|
|
2194
|
-
amount
|
|
2195
|
-
};
|
|
2196
|
-
}
|
|
2197
|
-
return {
|
|
2198
|
-
errMessage: null,
|
|
2199
|
-
amount
|
|
2200
|
-
};
|
|
2201
|
-
}))
|
|
2202
|
-
);
|
|
2203
|
-
const successful = result.find((res) => res.errMessage === null);
|
|
2204
|
-
if (!successful) {
|
|
2205
|
-
if (result.length > 1) {
|
|
2206
|
-
throw new Error(
|
|
2207
|
-
((_a = result[0]) == null ? void 0 : _a.errMessage) || `Insufficient fee token to initiate transfer on ${chainID}.`
|
|
2208
|
-
);
|
|
2209
|
-
}
|
|
2210
|
-
throw new Error(
|
|
2211
|
-
((_b = result[0]) == null ? void 0 : _b.errMessage) || `Insufficient fee token to initiate transfer on ${chainID}.`
|
|
2212
|
-
);
|
|
2213
|
-
}
|
|
2214
|
-
return successful.amount;
|
|
2215
|
-
});
|
|
2216
|
-
}
|
|
2217
|
-
};
|
|
2218
|
-
function raise(message, options) {
|
|
2219
|
-
throw new Error(message, options);
|
|
2220
|
-
}
|
|
2221
|
-
function wait(ms) {
|
|
2222
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
Object.defineProperty(exports, "DEFAULT_GAS_MULTIPLIER", {
|
|
2226
|
-
enumerable: true,
|
|
2227
|
-
get: function () { return chunkPV2ELBDQ_js.DEFAULT_GAS_MULTIPLIER; }
|
|
2228
|
-
});
|
|
2229
|
-
Object.defineProperty(exports, "getCosmosGasAmountForMessage", {
|
|
2230
|
-
enumerable: true,
|
|
2231
|
-
get: function () { return chunkPV2ELBDQ_js.getCosmosGasAmountForMessage; }
|
|
2232
|
-
});
|
|
2233
|
-
Object.defineProperty(exports, "getEncodeObjectFromCosmosMessage", {
|
|
2234
|
-
enumerable: true,
|
|
2235
|
-
get: function () { return chunkPV2ELBDQ_js.getEncodeObjectFromCosmosMessage; }
|
|
2236
|
-
});
|
|
2237
|
-
Object.defineProperty(exports, "getEncodeObjectFromCosmosMessageInjective", {
|
|
2238
|
-
enumerable: true,
|
|
2239
|
-
get: function () { return chunkPV2ELBDQ_js.getEncodeObjectFromCosmosMessageInjective; }
|
|
2240
|
-
});
|
|
2241
|
-
Object.defineProperty(exports, "affiliateFromJSON", {
|
|
2242
|
-
enumerable: true,
|
|
2243
|
-
get: function () { return chunk6AMBIQDN_js.affiliateFromJSON; }
|
|
2244
|
-
});
|
|
2245
|
-
Object.defineProperty(exports, "affiliateToJSON", {
|
|
2246
|
-
enumerable: true,
|
|
2247
|
-
get: function () { return chunk6AMBIQDN_js.affiliateToJSON; }
|
|
2248
|
-
});
|
|
2249
|
-
Object.defineProperty(exports, "assetBetweenChainsFromJSON", {
|
|
2250
|
-
enumerable: true,
|
|
2251
|
-
get: function () { return chunk6AMBIQDN_js.assetBetweenChainsFromJSON; }
|
|
2252
|
-
});
|
|
2253
|
-
Object.defineProperty(exports, "assetBetweenChainsToJSON", {
|
|
2254
|
-
enumerable: true,
|
|
2255
|
-
get: function () { return chunk6AMBIQDN_js.assetBetweenChainsToJSON; }
|
|
2256
|
-
});
|
|
2257
|
-
Object.defineProperty(exports, "assetFromJSON", {
|
|
2258
|
-
enumerable: true,
|
|
2259
|
-
get: function () { return chunk6AMBIQDN_js.assetFromJSON; }
|
|
2260
|
-
});
|
|
2261
|
-
Object.defineProperty(exports, "assetOrErrorFromJSON", {
|
|
2262
|
-
enumerable: true,
|
|
2263
|
-
get: function () { return chunk6AMBIQDN_js.assetOrErrorFromJSON; }
|
|
2264
|
-
});
|
|
2265
|
-
Object.defineProperty(exports, "assetOrErrorToJSON", {
|
|
2266
|
-
enumerable: true,
|
|
2267
|
-
get: function () { return chunk6AMBIQDN_js.assetOrErrorToJSON; }
|
|
2268
|
-
});
|
|
2269
|
-
Object.defineProperty(exports, "assetRecommendationFromJSON", {
|
|
2270
|
-
enumerable: true,
|
|
2271
|
-
get: function () { return chunk6AMBIQDN_js.assetRecommendationFromJSON; }
|
|
2272
|
-
});
|
|
2273
|
-
Object.defineProperty(exports, "assetRecommendationRequestFromJSON", {
|
|
2274
|
-
enumerable: true,
|
|
2275
|
-
get: function () { return chunk6AMBIQDN_js.assetRecommendationRequestFromJSON; }
|
|
2276
|
-
});
|
|
2277
|
-
Object.defineProperty(exports, "assetRecommendationRequestToJSON", {
|
|
2278
|
-
enumerable: true,
|
|
2279
|
-
get: function () { return chunk6AMBIQDN_js.assetRecommendationRequestToJSON; }
|
|
2280
|
-
});
|
|
2281
|
-
Object.defineProperty(exports, "assetRecommendationToJSON", {
|
|
2282
|
-
enumerable: true,
|
|
2283
|
-
get: function () { return chunk6AMBIQDN_js.assetRecommendationToJSON; }
|
|
2284
|
-
});
|
|
2285
|
-
Object.defineProperty(exports, "assetToJSON", {
|
|
2286
|
-
enumerable: true,
|
|
2287
|
-
get: function () { return chunk6AMBIQDN_js.assetToJSON; }
|
|
2288
|
-
});
|
|
2289
|
-
Object.defineProperty(exports, "assetsBetweenChainsRequestFromJSON", {
|
|
2290
|
-
enumerable: true,
|
|
2291
|
-
get: function () { return chunk6AMBIQDN_js.assetsBetweenChainsRequestFromJSON; }
|
|
2292
|
-
});
|
|
2293
|
-
Object.defineProperty(exports, "assetsBetweenChainsRequestToJSON", {
|
|
2294
|
-
enumerable: true,
|
|
2295
|
-
get: function () { return chunk6AMBIQDN_js.assetsBetweenChainsRequestToJSON; }
|
|
2296
|
-
});
|
|
2297
|
-
Object.defineProperty(exports, "assetsBetweenChainsResponseFromJSON", {
|
|
2298
|
-
enumerable: true,
|
|
2299
|
-
get: function () { return chunk6AMBIQDN_js.assetsBetweenChainsResponseFromJSON; }
|
|
2300
|
-
});
|
|
2301
|
-
Object.defineProperty(exports, "assetsFromSourceRequestFromJSON", {
|
|
2302
|
-
enumerable: true,
|
|
2303
|
-
get: function () { return chunk6AMBIQDN_js.assetsFromSourceRequestFromJSON; }
|
|
2304
|
-
});
|
|
2305
|
-
Object.defineProperty(exports, "assetsFromSourceRequestToJSON", {
|
|
2306
|
-
enumerable: true,
|
|
2307
|
-
get: function () { return chunk6AMBIQDN_js.assetsFromSourceRequestToJSON; }
|
|
2308
|
-
});
|
|
2309
|
-
Object.defineProperty(exports, "assetsRequestFromJSON", {
|
|
2310
|
-
enumerable: true,
|
|
2311
|
-
get: function () { return chunk6AMBIQDN_js.assetsRequestFromJSON; }
|
|
2312
|
-
});
|
|
2313
|
-
Object.defineProperty(exports, "assetsRequestToJSON", {
|
|
2314
|
-
enumerable: true,
|
|
2315
|
-
get: function () { return chunk6AMBIQDN_js.assetsRequestToJSON; }
|
|
2316
|
-
});
|
|
2317
|
-
Object.defineProperty(exports, "axelarTransferFromJSON", {
|
|
2318
|
-
enumerable: true,
|
|
2319
|
-
get: function () { return chunk6AMBIQDN_js.axelarTransferFromJSON; }
|
|
2320
|
-
});
|
|
2321
|
-
Object.defineProperty(exports, "axelarTransferInfoFromJSON", {
|
|
2322
|
-
enumerable: true,
|
|
2323
|
-
get: function () { return chunk6AMBIQDN_js.axelarTransferInfoFromJSON; }
|
|
2324
|
-
});
|
|
2325
|
-
Object.defineProperty(exports, "axelarTransferInfoToJSON", {
|
|
2326
|
-
enumerable: true,
|
|
2327
|
-
get: function () { return chunk6AMBIQDN_js.axelarTransferInfoToJSON; }
|
|
2328
|
-
});
|
|
2329
|
-
Object.defineProperty(exports, "axelarTransferToJSON", {
|
|
2330
|
-
enumerable: true,
|
|
2331
|
-
get: function () { return chunk6AMBIQDN_js.axelarTransferToJSON; }
|
|
2332
|
-
});
|
|
2333
|
-
Object.defineProperty(exports, "axelarTransferTransactionsFromJSON", {
|
|
2334
|
-
enumerable: true,
|
|
2335
|
-
get: function () { return chunk6AMBIQDN_js.axelarTransferTransactionsFromJSON; }
|
|
2336
|
-
});
|
|
2337
|
-
Object.defineProperty(exports, "axelarTransferTransactionsToJSON", {
|
|
2338
|
-
enumerable: true,
|
|
2339
|
-
get: function () { return chunk6AMBIQDN_js.axelarTransferTransactionsToJSON; }
|
|
2340
|
-
});
|
|
2341
|
-
Object.defineProperty(exports, "bankSendFromJSON", {
|
|
2342
|
-
enumerable: true,
|
|
2343
|
-
get: function () { return chunk6AMBIQDN_js.bankSendFromJSON; }
|
|
2344
|
-
});
|
|
2345
|
-
Object.defineProperty(exports, "bankSendToJSON", {
|
|
2346
|
-
enumerable: true,
|
|
2347
|
-
get: function () { return chunk6AMBIQDN_js.bankSendToJSON; }
|
|
2348
|
-
});
|
|
2349
|
-
Object.defineProperty(exports, "bridgeFromJSON", {
|
|
2350
|
-
enumerable: true,
|
|
2351
|
-
get: function () { return chunk6AMBIQDN_js.bridgeFromJSON; }
|
|
2352
|
-
});
|
|
2353
|
-
Object.defineProperty(exports, "bridgeToJSON", {
|
|
2354
|
-
enumerable: true,
|
|
2355
|
-
get: function () { return chunk6AMBIQDN_js.bridgeToJSON; }
|
|
2356
|
-
});
|
|
2357
|
-
Object.defineProperty(exports, "bridgesResponseFromJSON", {
|
|
2358
|
-
enumerable: true,
|
|
2359
|
-
get: function () { return chunk6AMBIQDN_js.bridgesResponseFromJSON; }
|
|
2360
|
-
});
|
|
2361
|
-
Object.defineProperty(exports, "bridgesResponseToJSON", {
|
|
2362
|
-
enumerable: true,
|
|
2363
|
-
get: function () { return chunk6AMBIQDN_js.bridgesResponseToJSON; }
|
|
2364
|
-
});
|
|
2365
|
-
Object.defineProperty(exports, "cctpTransferFromJSON", {
|
|
2366
|
-
enumerable: true,
|
|
2367
|
-
get: function () { return chunk6AMBIQDN_js.cctpTransferFromJSON; }
|
|
2368
|
-
});
|
|
2369
|
-
Object.defineProperty(exports, "cctpTransferInfoFromJSON", {
|
|
2370
|
-
enumerable: true,
|
|
2371
|
-
get: function () { return chunk6AMBIQDN_js.cctpTransferInfoFromJSON; }
|
|
2372
|
-
});
|
|
2373
|
-
Object.defineProperty(exports, "cctpTransferInfoToJSON", {
|
|
2374
|
-
enumerable: true,
|
|
2375
|
-
get: function () { return chunk6AMBIQDN_js.cctpTransferInfoToJSON; }
|
|
2376
|
-
});
|
|
2377
|
-
Object.defineProperty(exports, "cctpTransferToJSON", {
|
|
2378
|
-
enumerable: true,
|
|
2379
|
-
get: function () { return chunk6AMBIQDN_js.cctpTransferToJSON; }
|
|
2380
|
-
});
|
|
2381
|
-
Object.defineProperty(exports, "cctpTransferTransactionsFromJSON", {
|
|
2382
|
-
enumerable: true,
|
|
2383
|
-
get: function () { return chunk6AMBIQDN_js.cctpTransferTransactionsFromJSON; }
|
|
2384
|
-
});
|
|
2385
|
-
Object.defineProperty(exports, "cctpTransferTransactionsToJSON", {
|
|
2386
|
-
enumerable: true,
|
|
2387
|
-
get: function () { return chunk6AMBIQDN_js.cctpTransferTransactionsToJSON; }
|
|
2388
|
-
});
|
|
2389
|
-
Object.defineProperty(exports, "chainAffiliatesFromJSON", {
|
|
2390
|
-
enumerable: true,
|
|
2391
|
-
get: function () { return chunk6AMBIQDN_js.chainAffiliatesFromJSON; }
|
|
2392
|
-
});
|
|
2393
|
-
Object.defineProperty(exports, "chainAffiliatesToJSON", {
|
|
2394
|
-
enumerable: true,
|
|
2395
|
-
get: function () { return chunk6AMBIQDN_js.chainAffiliatesToJSON; }
|
|
2396
|
-
});
|
|
2397
|
-
Object.defineProperty(exports, "chainFromJSON", {
|
|
2398
|
-
enumerable: true,
|
|
2399
|
-
get: function () { return chunk6AMBIQDN_js.chainFromJSON; }
|
|
2400
|
-
});
|
|
2401
|
-
Object.defineProperty(exports, "chainIDsToAffiliatesMapFromJSON", {
|
|
2402
|
-
enumerable: true,
|
|
2403
|
-
get: function () { return chunk6AMBIQDN_js.chainIDsToAffiliatesMapFromJSON; }
|
|
2404
|
-
});
|
|
2405
|
-
Object.defineProperty(exports, "chainIDsToAffiliatesMapToJSON", {
|
|
2406
|
-
enumerable: true,
|
|
2407
|
-
get: function () { return chunk6AMBIQDN_js.chainIDsToAffiliatesMapToJSON; }
|
|
2408
|
-
});
|
|
2409
|
-
Object.defineProperty(exports, "chainToJSON", {
|
|
2410
|
-
enumerable: true,
|
|
2411
|
-
get: function () { return chunk6AMBIQDN_js.chainToJSON; }
|
|
2412
|
-
});
|
|
2413
|
-
Object.defineProperty(exports, "chainTransactionFromJSON", {
|
|
2414
|
-
enumerable: true,
|
|
2415
|
-
get: function () { return chunk6AMBIQDN_js.chainTransactionFromJSON; }
|
|
2416
|
-
});
|
|
2417
|
-
Object.defineProperty(exports, "chainTransactionToJSON", {
|
|
2418
|
-
enumerable: true,
|
|
2419
|
-
get: function () { return chunk6AMBIQDN_js.chainTransactionToJSON; }
|
|
2420
|
-
});
|
|
2421
|
-
Object.defineProperty(exports, "contractCallWithTokenTransactionsFromJSON", {
|
|
2422
|
-
enumerable: true,
|
|
2423
|
-
get: function () { return chunk6AMBIQDN_js.contractCallWithTokenTransactionsFromJSON; }
|
|
2424
|
-
});
|
|
2425
|
-
Object.defineProperty(exports, "contractCallWithTokenTransactionsToJSON", {
|
|
2426
|
-
enumerable: true,
|
|
2427
|
-
get: function () { return chunk6AMBIQDN_js.contractCallWithTokenTransactionsToJSON; }
|
|
2428
|
-
});
|
|
2429
|
-
Object.defineProperty(exports, "cosmWasmContractMsgFromJSON", {
|
|
2430
|
-
enumerable: true,
|
|
2431
|
-
get: function () { return chunk6AMBIQDN_js.cosmWasmContractMsgFromJSON; }
|
|
2432
|
-
});
|
|
2433
|
-
Object.defineProperty(exports, "cosmWasmContractMsgToJSON", {
|
|
2434
|
-
enumerable: true,
|
|
2435
|
-
get: function () { return chunk6AMBIQDN_js.cosmWasmContractMsgToJSON; }
|
|
2436
|
-
});
|
|
2437
|
-
Object.defineProperty(exports, "cosmosMsgFromJSON", {
|
|
2438
|
-
enumerable: true,
|
|
2439
|
-
get: function () { return chunk6AMBIQDN_js.cosmosMsgFromJSON; }
|
|
2440
|
-
});
|
|
2441
|
-
Object.defineProperty(exports, "cosmosMsgToJSON", {
|
|
2442
|
-
enumerable: true,
|
|
2443
|
-
get: function () { return chunk6AMBIQDN_js.cosmosMsgToJSON; }
|
|
2444
|
-
});
|
|
2445
|
-
Object.defineProperty(exports, "cosmosTxFromJSON", {
|
|
2446
|
-
enumerable: true,
|
|
2447
|
-
get: function () { return chunk6AMBIQDN_js.cosmosTxFromJSON; }
|
|
2448
|
-
});
|
|
2449
|
-
Object.defineProperty(exports, "cosmosTxToJSON", {
|
|
2450
|
-
enumerable: true,
|
|
2451
|
-
get: function () { return chunk6AMBIQDN_js.cosmosTxToJSON; }
|
|
2452
|
-
});
|
|
2453
|
-
Object.defineProperty(exports, "denomWithChainIDFromJSON", {
|
|
2454
|
-
enumerable: true,
|
|
2455
|
-
get: function () { return chunk6AMBIQDN_js.denomWithChainIDFromJSON; }
|
|
2456
|
-
});
|
|
2457
|
-
Object.defineProperty(exports, "denomWithChainIDToJSON", {
|
|
2458
|
-
enumerable: true,
|
|
2459
|
-
get: function () { return chunk6AMBIQDN_js.denomWithChainIDToJSON; }
|
|
2460
|
-
});
|
|
2461
|
-
Object.defineProperty(exports, "erc20ApprovalFromJSON", {
|
|
2462
|
-
enumerable: true,
|
|
2463
|
-
get: function () { return chunk6AMBIQDN_js.erc20ApprovalFromJSON; }
|
|
2464
|
-
});
|
|
2465
|
-
Object.defineProperty(exports, "erc20ApprovalToJSON", {
|
|
2466
|
-
enumerable: true,
|
|
2467
|
-
get: function () { return chunk6AMBIQDN_js.erc20ApprovalToJSON; }
|
|
2468
|
-
});
|
|
2469
|
-
Object.defineProperty(exports, "estimatedFeeFromJSON", {
|
|
2470
|
-
enumerable: true,
|
|
2471
|
-
get: function () { return chunk6AMBIQDN_js.estimatedFeeFromJSON; }
|
|
2472
|
-
});
|
|
2473
|
-
Object.defineProperty(exports, "estimatedFeeToJSON", {
|
|
2474
|
-
enumerable: true,
|
|
2475
|
-
get: function () { return chunk6AMBIQDN_js.estimatedFeeToJSON; }
|
|
2476
|
-
});
|
|
2477
|
-
Object.defineProperty(exports, "evmSwapFromJSON", {
|
|
2478
|
-
enumerable: true,
|
|
2479
|
-
get: function () { return chunk6AMBIQDN_js.evmSwapFromJSON; }
|
|
2480
|
-
});
|
|
2481
|
-
Object.defineProperty(exports, "evmSwapToJSON", {
|
|
2482
|
-
enumerable: true,
|
|
2483
|
-
get: function () { return chunk6AMBIQDN_js.evmSwapToJSON; }
|
|
2484
|
-
});
|
|
2485
|
-
Object.defineProperty(exports, "evmTxFromJSON", {
|
|
2486
|
-
enumerable: true,
|
|
2487
|
-
get: function () { return chunk6AMBIQDN_js.evmTxFromJSON; }
|
|
2488
|
-
});
|
|
2489
|
-
Object.defineProperty(exports, "evmTxToJSON", {
|
|
2490
|
-
enumerable: true,
|
|
2491
|
-
get: function () { return chunk6AMBIQDN_js.evmTxToJSON; }
|
|
2492
|
-
});
|
|
2493
|
-
Object.defineProperty(exports, "feeAssetFromJSON", {
|
|
2494
|
-
enumerable: true,
|
|
2495
|
-
get: function () { return chunk6AMBIQDN_js.feeAssetFromJSON; }
|
|
2496
|
-
});
|
|
2497
|
-
Object.defineProperty(exports, "feeAssetToJSON", {
|
|
2498
|
-
enumerable: true,
|
|
2499
|
-
get: function () { return chunk6AMBIQDN_js.feeAssetToJSON; }
|
|
2500
|
-
});
|
|
2501
|
-
Object.defineProperty(exports, "hyperlaneTransferFromJSON", {
|
|
2502
|
-
enumerable: true,
|
|
2503
|
-
get: function () { return chunk6AMBIQDN_js.hyperlaneTransferFromJSON; }
|
|
2504
|
-
});
|
|
2505
|
-
Object.defineProperty(exports, "hyperlaneTransferInfoFromJSON", {
|
|
2506
|
-
enumerable: true,
|
|
2507
|
-
get: function () { return chunk6AMBIQDN_js.hyperlaneTransferInfoFromJSON; }
|
|
2508
|
-
});
|
|
2509
|
-
Object.defineProperty(exports, "hyperlaneTransferInfoToJSON", {
|
|
2510
|
-
enumerable: true,
|
|
2511
|
-
get: function () { return chunk6AMBIQDN_js.hyperlaneTransferInfoToJSON; }
|
|
2512
|
-
});
|
|
2513
|
-
Object.defineProperty(exports, "hyperlaneTransferToJSON", {
|
|
2514
|
-
enumerable: true,
|
|
2515
|
-
get: function () { return chunk6AMBIQDN_js.hyperlaneTransferToJSON; }
|
|
2516
|
-
});
|
|
2517
|
-
Object.defineProperty(exports, "hyperlaneTransferTransactionsFromJSON", {
|
|
2518
|
-
enumerable: true,
|
|
2519
|
-
get: function () { return chunk6AMBIQDN_js.hyperlaneTransferTransactionsFromJSON; }
|
|
2520
|
-
});
|
|
2521
|
-
Object.defineProperty(exports, "hyperlaneTransferTransactionsToJSON", {
|
|
2522
|
-
enumerable: true,
|
|
2523
|
-
get: function () { return chunk6AMBIQDN_js.hyperlaneTransferTransactionsToJSON; }
|
|
2524
|
-
});
|
|
2525
|
-
Object.defineProperty(exports, "ibcAddressFromJSON", {
|
|
2526
|
-
enumerable: true,
|
|
2527
|
-
get: function () { return chunk6AMBIQDN_js.ibcAddressFromJSON; }
|
|
2528
|
-
});
|
|
2529
|
-
Object.defineProperty(exports, "ibcAddressToJSON", {
|
|
2530
|
-
enumerable: true,
|
|
2531
|
-
get: function () { return chunk6AMBIQDN_js.ibcAddressToJSON; }
|
|
2532
|
-
});
|
|
2533
|
-
Object.defineProperty(exports, "ibcCapabilitiesFromJSON", {
|
|
2534
|
-
enumerable: true,
|
|
2535
|
-
get: function () { return chunk6AMBIQDN_js.ibcCapabilitiesFromJSON; }
|
|
2536
|
-
});
|
|
2537
|
-
Object.defineProperty(exports, "ibcCapabilitiesToJSON", {
|
|
2538
|
-
enumerable: true,
|
|
2539
|
-
get: function () { return chunk6AMBIQDN_js.ibcCapabilitiesToJSON; }
|
|
2540
|
-
});
|
|
2541
|
-
Object.defineProperty(exports, "messageResponseFromJSON", {
|
|
2542
|
-
enumerable: true,
|
|
2543
|
-
get: function () { return chunk6AMBIQDN_js.messageResponseFromJSON; }
|
|
2544
|
-
});
|
|
2545
|
-
Object.defineProperty(exports, "msgFromJSON", {
|
|
2546
|
-
enumerable: true,
|
|
2547
|
-
get: function () { return chunk6AMBIQDN_js.msgFromJSON; }
|
|
2548
|
-
});
|
|
2549
|
-
Object.defineProperty(exports, "msgToJSON", {
|
|
2550
|
-
enumerable: true,
|
|
2551
|
-
get: function () { return chunk6AMBIQDN_js.msgToJSON; }
|
|
2552
|
-
});
|
|
2553
|
-
Object.defineProperty(exports, "msgsDirectRequestFromJSON", {
|
|
2554
|
-
enumerable: true,
|
|
2555
|
-
get: function () { return chunk6AMBIQDN_js.msgsDirectRequestFromJSON; }
|
|
2556
|
-
});
|
|
2557
|
-
Object.defineProperty(exports, "msgsDirectRequestToJSON", {
|
|
2558
|
-
enumerable: true,
|
|
2559
|
-
get: function () { return chunk6AMBIQDN_js.msgsDirectRequestToJSON; }
|
|
2560
|
-
});
|
|
2561
|
-
Object.defineProperty(exports, "msgsRequestFromJSON", {
|
|
2562
|
-
enumerable: true,
|
|
2563
|
-
get: function () { return chunk6AMBIQDN_js.msgsRequestFromJSON; }
|
|
2564
|
-
});
|
|
2565
|
-
Object.defineProperty(exports, "msgsRequestToJSON", {
|
|
2566
|
-
enumerable: true,
|
|
2567
|
-
get: function () { return chunk6AMBIQDN_js.msgsRequestToJSON; }
|
|
2568
|
-
});
|
|
2569
|
-
Object.defineProperty(exports, "multiChainMsgFromJSON", {
|
|
2570
|
-
enumerable: true,
|
|
2571
|
-
get: function () { return chunk6AMBIQDN_js.multiChainMsgFromJSON; }
|
|
2572
|
-
});
|
|
2573
|
-
Object.defineProperty(exports, "multiChainMsgToJSON", {
|
|
2574
|
-
enumerable: true,
|
|
2575
|
-
get: function () { return chunk6AMBIQDN_js.multiChainMsgToJSON; }
|
|
2576
|
-
});
|
|
2577
|
-
Object.defineProperty(exports, "nextBlockingTransferFromJSON", {
|
|
2578
|
-
enumerable: true,
|
|
2579
|
-
get: function () { return chunk6AMBIQDN_js.nextBlockingTransferFromJSON; }
|
|
2580
|
-
});
|
|
2581
|
-
Object.defineProperty(exports, "nextBlockingTransferToJSON", {
|
|
2582
|
-
enumerable: true,
|
|
2583
|
-
get: function () { return chunk6AMBIQDN_js.nextBlockingTransferToJSON; }
|
|
2584
|
-
});
|
|
2585
|
-
Object.defineProperty(exports, "opInitTransferFromJSON", {
|
|
2586
|
-
enumerable: true,
|
|
2587
|
-
get: function () { return chunk6AMBIQDN_js.opInitTransferFromJSON; }
|
|
2588
|
-
});
|
|
2589
|
-
Object.defineProperty(exports, "opInitTransferInfoFromJSON", {
|
|
2590
|
-
enumerable: true,
|
|
2591
|
-
get: function () { return chunk6AMBIQDN_js.opInitTransferInfoFromJSON; }
|
|
2592
|
-
});
|
|
2593
|
-
Object.defineProperty(exports, "opInitTransferInfoToJSON", {
|
|
2594
|
-
enumerable: true,
|
|
2595
|
-
get: function () { return chunk6AMBIQDN_js.opInitTransferInfoToJSON; }
|
|
2596
|
-
});
|
|
2597
|
-
Object.defineProperty(exports, "opInitTransferToJSON", {
|
|
2598
|
-
enumerable: true,
|
|
2599
|
-
get: function () { return chunk6AMBIQDN_js.opInitTransferToJSON; }
|
|
2600
|
-
});
|
|
2601
|
-
Object.defineProperty(exports, "opInitTransferTransactionsFromJSON", {
|
|
2602
|
-
enumerable: true,
|
|
2603
|
-
get: function () { return chunk6AMBIQDN_js.opInitTransferTransactionsFromJSON; }
|
|
2604
|
-
});
|
|
2605
|
-
Object.defineProperty(exports, "opInitTransferTransactionsToJSON", {
|
|
2606
|
-
enumerable: true,
|
|
2607
|
-
get: function () { return chunk6AMBIQDN_js.opInitTransferTransactionsToJSON; }
|
|
2608
|
-
});
|
|
2609
|
-
Object.defineProperty(exports, "operationFromJSON", {
|
|
2610
|
-
enumerable: true,
|
|
2611
|
-
get: function () { return chunk6AMBIQDN_js.operationFromJSON; }
|
|
2612
|
-
});
|
|
2613
|
-
Object.defineProperty(exports, "operationToJSON", {
|
|
2614
|
-
enumerable: true,
|
|
2615
|
-
get: function () { return chunk6AMBIQDN_js.operationToJSON; }
|
|
2616
|
-
});
|
|
2617
|
-
Object.defineProperty(exports, "originAssetsRequestFromJSON", {
|
|
2618
|
-
enumerable: true,
|
|
2619
|
-
get: function () { return chunk6AMBIQDN_js.originAssetsRequestFromJSON; }
|
|
2620
|
-
});
|
|
2621
|
-
Object.defineProperty(exports, "originAssetsRequestToJSON", {
|
|
2622
|
-
enumerable: true,
|
|
2623
|
-
get: function () { return chunk6AMBIQDN_js.originAssetsRequestToJSON; }
|
|
2624
|
-
});
|
|
2625
|
-
Object.defineProperty(exports, "originAssetsResponseFromJSON", {
|
|
2626
|
-
enumerable: true,
|
|
2627
|
-
get: function () { return chunk6AMBIQDN_js.originAssetsResponseFromJSON; }
|
|
2628
|
-
});
|
|
2629
|
-
Object.defineProperty(exports, "originAssetsResponseToJSON", {
|
|
2630
|
-
enumerable: true,
|
|
2631
|
-
get: function () { return chunk6AMBIQDN_js.originAssetsResponseToJSON; }
|
|
2632
|
-
});
|
|
2633
|
-
Object.defineProperty(exports, "packetFromJSON", {
|
|
2634
|
-
enumerable: true,
|
|
2635
|
-
get: function () { return chunk6AMBIQDN_js.packetFromJSON; }
|
|
2636
|
-
});
|
|
2637
|
-
Object.defineProperty(exports, "packetToJSON", {
|
|
2638
|
-
enumerable: true,
|
|
2639
|
-
get: function () { return chunk6AMBIQDN_js.packetToJSON; }
|
|
2640
|
-
});
|
|
2641
|
-
Object.defineProperty(exports, "postHandlerFromJSON", {
|
|
2642
|
-
enumerable: true,
|
|
2643
|
-
get: function () { return chunk6AMBIQDN_js.postHandlerFromJSON; }
|
|
2644
|
-
});
|
|
2645
|
-
Object.defineProperty(exports, "postHandlerToJSON", {
|
|
2646
|
-
enumerable: true,
|
|
2647
|
-
get: function () { return chunk6AMBIQDN_js.postHandlerToJSON; }
|
|
2648
|
-
});
|
|
2649
|
-
Object.defineProperty(exports, "recommendAssetsRequestFromJSON", {
|
|
2650
|
-
enumerable: true,
|
|
2651
|
-
get: function () { return chunk6AMBIQDN_js.recommendAssetsRequestFromJSON; }
|
|
2652
|
-
});
|
|
2653
|
-
Object.defineProperty(exports, "recommendAssetsRequestToJSON", {
|
|
2654
|
-
enumerable: true,
|
|
2655
|
-
get: function () { return chunk6AMBIQDN_js.recommendAssetsRequestToJSON; }
|
|
2656
|
-
});
|
|
2657
|
-
Object.defineProperty(exports, "recommendAssetsResponseFromJSON", {
|
|
2658
|
-
enumerable: true,
|
|
2659
|
-
get: function () { return chunk6AMBIQDN_js.recommendAssetsResponseFromJSON; }
|
|
2660
|
-
});
|
|
2661
|
-
Object.defineProperty(exports, "recommendAssetsResponseToJSON", {
|
|
2662
|
-
enumerable: true,
|
|
2663
|
-
get: function () { return chunk6AMBIQDN_js.recommendAssetsResponseToJSON; }
|
|
2664
|
-
});
|
|
2665
|
-
Object.defineProperty(exports, "recommendationEntryFromJSON", {
|
|
2666
|
-
enumerable: true,
|
|
2667
|
-
get: function () { return chunk6AMBIQDN_js.recommendationEntryFromJSON; }
|
|
2668
|
-
});
|
|
2669
|
-
Object.defineProperty(exports, "recommendationEntryToJSON", {
|
|
2670
|
-
enumerable: true,
|
|
2671
|
-
get: function () { return chunk6AMBIQDN_js.recommendationEntryToJSON; }
|
|
2672
|
-
});
|
|
2673
|
-
Object.defineProperty(exports, "routeRequestFromJSON", {
|
|
2674
|
-
enumerable: true,
|
|
2675
|
-
get: function () { return chunk6AMBIQDN_js.routeRequestFromJSON; }
|
|
2676
|
-
});
|
|
2677
|
-
Object.defineProperty(exports, "routeRequestToJSON", {
|
|
2678
|
-
enumerable: true,
|
|
2679
|
-
get: function () { return chunk6AMBIQDN_js.routeRequestToJSON; }
|
|
2680
|
-
});
|
|
2681
|
-
Object.defineProperty(exports, "routeResponseFromJSON", {
|
|
2682
|
-
enumerable: true,
|
|
2683
|
-
get: function () { return chunk6AMBIQDN_js.routeResponseFromJSON; }
|
|
2684
|
-
});
|
|
2685
|
-
Object.defineProperty(exports, "routeResponseToJSON", {
|
|
2686
|
-
enumerable: true,
|
|
2687
|
-
get: function () { return chunk6AMBIQDN_js.routeResponseToJSON; }
|
|
2688
|
-
});
|
|
2689
|
-
Object.defineProperty(exports, "sendTokenTransactionsFromJSON", {
|
|
2690
|
-
enumerable: true,
|
|
2691
|
-
get: function () { return chunk6AMBIQDN_js.sendTokenTransactionsFromJSON; }
|
|
2692
|
-
});
|
|
2693
|
-
Object.defineProperty(exports, "sendTokenTransactionsToJSON", {
|
|
2694
|
-
enumerable: true,
|
|
2695
|
-
get: function () { return chunk6AMBIQDN_js.sendTokenTransactionsToJSON; }
|
|
2696
|
-
});
|
|
2697
|
-
Object.defineProperty(exports, "smartSwapExactCoinInFromJSON", {
|
|
2698
|
-
enumerable: true,
|
|
2699
|
-
get: function () { return chunk6AMBIQDN_js.smartSwapExactCoinInFromJSON; }
|
|
2700
|
-
});
|
|
2701
|
-
Object.defineProperty(exports, "smartSwapExactCoinInToJSON", {
|
|
2702
|
-
enumerable: true,
|
|
2703
|
-
get: function () { return chunk6AMBIQDN_js.smartSwapExactCoinInToJSON; }
|
|
2704
|
-
});
|
|
2705
|
-
Object.defineProperty(exports, "smartSwapOptionsFromJSON", {
|
|
2706
|
-
enumerable: true,
|
|
2707
|
-
get: function () { return chunk6AMBIQDN_js.smartSwapOptionsFromJSON; }
|
|
2708
|
-
});
|
|
2709
|
-
Object.defineProperty(exports, "smartSwapOptionsToJSON", {
|
|
2710
|
-
enumerable: true,
|
|
2711
|
-
get: function () { return chunk6AMBIQDN_js.smartSwapOptionsToJSON; }
|
|
2712
|
-
});
|
|
2713
|
-
Object.defineProperty(exports, "submitTxRequestFromJSON", {
|
|
2714
|
-
enumerable: true,
|
|
2715
|
-
get: function () { return chunk6AMBIQDN_js.submitTxRequestFromJSON; }
|
|
2716
|
-
});
|
|
2717
|
-
Object.defineProperty(exports, "submitTxRequestToJSON", {
|
|
2718
|
-
enumerable: true,
|
|
2719
|
-
get: function () { return chunk6AMBIQDN_js.submitTxRequestToJSON; }
|
|
2720
|
-
});
|
|
2721
|
-
Object.defineProperty(exports, "submitTxResponseFromJSON", {
|
|
2722
|
-
enumerable: true,
|
|
2723
|
-
get: function () { return chunk6AMBIQDN_js.submitTxResponseFromJSON; }
|
|
2724
|
-
});
|
|
2725
|
-
Object.defineProperty(exports, "submitTxResponseToJSON", {
|
|
2726
|
-
enumerable: true,
|
|
2727
|
-
get: function () { return chunk6AMBIQDN_js.submitTxResponseToJSON; }
|
|
2728
|
-
});
|
|
2729
|
-
Object.defineProperty(exports, "svmTxFromJSON", {
|
|
2730
|
-
enumerable: true,
|
|
2731
|
-
get: function () { return chunk6AMBIQDN_js.svmTxFromJSON; }
|
|
2732
|
-
});
|
|
2733
|
-
Object.defineProperty(exports, "svmTxToJSON", {
|
|
2734
|
-
enumerable: true,
|
|
2735
|
-
get: function () { return chunk6AMBIQDN_js.svmTxToJSON; }
|
|
2736
|
-
});
|
|
2737
|
-
Object.defineProperty(exports, "swapExactCoinInFromJSON", {
|
|
2738
|
-
enumerable: true,
|
|
2739
|
-
get: function () { return chunk6AMBIQDN_js.swapExactCoinInFromJSON; }
|
|
2740
|
-
});
|
|
2741
|
-
Object.defineProperty(exports, "swapExactCoinInToJSON", {
|
|
2742
|
-
enumerable: true,
|
|
2743
|
-
get: function () { return chunk6AMBIQDN_js.swapExactCoinInToJSON; }
|
|
2744
|
-
});
|
|
2745
|
-
Object.defineProperty(exports, "swapExactCoinOutFromJSON", {
|
|
2746
|
-
enumerable: true,
|
|
2747
|
-
get: function () { return chunk6AMBIQDN_js.swapExactCoinOutFromJSON; }
|
|
2748
|
-
});
|
|
2749
|
-
Object.defineProperty(exports, "swapExactCoinOutToJSON", {
|
|
2750
|
-
enumerable: true,
|
|
2751
|
-
get: function () { return chunk6AMBIQDN_js.swapExactCoinOutToJSON; }
|
|
2752
|
-
});
|
|
2753
|
-
Object.defineProperty(exports, "swapFromJSON", {
|
|
2754
|
-
enumerable: true,
|
|
2755
|
-
get: function () { return chunk6AMBIQDN_js.swapFromJSON; }
|
|
2756
|
-
});
|
|
2757
|
-
Object.defineProperty(exports, "swapOperationFromJSON", {
|
|
2758
|
-
enumerable: true,
|
|
2759
|
-
get: function () { return chunk6AMBIQDN_js.swapOperationFromJSON; }
|
|
2760
|
-
});
|
|
2761
|
-
Object.defineProperty(exports, "swapOperationToJSON", {
|
|
2762
|
-
enumerable: true,
|
|
2763
|
-
get: function () { return chunk6AMBIQDN_js.swapOperationToJSON; }
|
|
2764
|
-
});
|
|
2765
|
-
Object.defineProperty(exports, "swapRouteFromJSON", {
|
|
2766
|
-
enumerable: true,
|
|
2767
|
-
get: function () { return chunk6AMBIQDN_js.swapRouteFromJSON; }
|
|
2768
|
-
});
|
|
2769
|
-
Object.defineProperty(exports, "swapRouteToJSON", {
|
|
2770
|
-
enumerable: true,
|
|
2771
|
-
get: function () { return chunk6AMBIQDN_js.swapRouteToJSON; }
|
|
2772
|
-
});
|
|
2773
|
-
Object.defineProperty(exports, "swapToJSON", {
|
|
2774
|
-
enumerable: true,
|
|
2775
|
-
get: function () { return chunk6AMBIQDN_js.swapToJSON; }
|
|
2776
|
-
});
|
|
2777
|
-
Object.defineProperty(exports, "swapVenueFromJSON", {
|
|
2778
|
-
enumerable: true,
|
|
2779
|
-
get: function () { return chunk6AMBIQDN_js.swapVenueFromJSON; }
|
|
2780
|
-
});
|
|
2781
|
-
Object.defineProperty(exports, "swapVenueRequestFromJSON", {
|
|
2782
|
-
enumerable: true,
|
|
2783
|
-
get: function () { return chunk6AMBIQDN_js.swapVenueRequestFromJSON; }
|
|
2784
|
-
});
|
|
2785
|
-
Object.defineProperty(exports, "swapVenueRequestToJSON", {
|
|
2786
|
-
enumerable: true,
|
|
2787
|
-
get: function () { return chunk6AMBIQDN_js.swapVenueRequestToJSON; }
|
|
2788
|
-
});
|
|
2789
|
-
Object.defineProperty(exports, "swapVenueToJSON", {
|
|
2790
|
-
enumerable: true,
|
|
2791
|
-
get: function () { return chunk6AMBIQDN_js.swapVenueToJSON; }
|
|
2792
|
-
});
|
|
2793
|
-
Object.defineProperty(exports, "trackTxRequestFromJSON", {
|
|
2794
|
-
enumerable: true,
|
|
2795
|
-
get: function () { return chunk6AMBIQDN_js.trackTxRequestFromJSON; }
|
|
2796
|
-
});
|
|
2797
|
-
Object.defineProperty(exports, "trackTxRequestToJSON", {
|
|
2798
|
-
enumerable: true,
|
|
2799
|
-
get: function () { return chunk6AMBIQDN_js.trackTxRequestToJSON; }
|
|
2800
|
-
});
|
|
2801
|
-
Object.defineProperty(exports, "trackTxResponseFromJSON", {
|
|
2802
|
-
enumerable: true,
|
|
2803
|
-
get: function () { return chunk6AMBIQDN_js.trackTxResponseFromJSON; }
|
|
2804
|
-
});
|
|
2805
|
-
Object.defineProperty(exports, "trackTxResponseToJSON", {
|
|
2806
|
-
enumerable: true,
|
|
2807
|
-
get: function () { return chunk6AMBIQDN_js.trackTxResponseToJSON; }
|
|
2808
|
-
});
|
|
2809
|
-
Object.defineProperty(exports, "transferAssetReleaseFromJSON", {
|
|
2810
|
-
enumerable: true,
|
|
2811
|
-
get: function () { return chunk6AMBIQDN_js.transferAssetReleaseFromJSON; }
|
|
2812
|
-
});
|
|
2813
|
-
Object.defineProperty(exports, "transferAssetReleaseToJSON", {
|
|
2814
|
-
enumerable: true,
|
|
2815
|
-
get: function () { return chunk6AMBIQDN_js.transferAssetReleaseToJSON; }
|
|
2816
|
-
});
|
|
2817
|
-
Object.defineProperty(exports, "transferEventFromJSON", {
|
|
2818
|
-
enumerable: true,
|
|
2819
|
-
get: function () { return chunk6AMBIQDN_js.transferEventFromJSON; }
|
|
2820
|
-
});
|
|
2821
|
-
Object.defineProperty(exports, "transferEventToJSON", {
|
|
2822
|
-
enumerable: true,
|
|
2823
|
-
get: function () { return chunk6AMBIQDN_js.transferEventToJSON; }
|
|
2824
|
-
});
|
|
2825
|
-
Object.defineProperty(exports, "transferFromJSON", {
|
|
2826
|
-
enumerable: true,
|
|
2827
|
-
get: function () { return chunk6AMBIQDN_js.transferFromJSON; }
|
|
2828
|
-
});
|
|
2829
|
-
Object.defineProperty(exports, "transferInfoFromJSON", {
|
|
2830
|
-
enumerable: true,
|
|
2831
|
-
get: function () { return chunk6AMBIQDN_js.transferInfoFromJSON; }
|
|
2832
|
-
});
|
|
2833
|
-
Object.defineProperty(exports, "transferInfoToJSON", {
|
|
2834
|
-
enumerable: true,
|
|
2835
|
-
get: function () { return chunk6AMBIQDN_js.transferInfoToJSON; }
|
|
2836
|
-
});
|
|
2837
|
-
Object.defineProperty(exports, "transferStatusFromJSON", {
|
|
2838
|
-
enumerable: true,
|
|
2839
|
-
get: function () { return chunk6AMBIQDN_js.transferStatusFromJSON; }
|
|
2840
|
-
});
|
|
2841
|
-
Object.defineProperty(exports, "transferStatusToJSON", {
|
|
2842
|
-
enumerable: true,
|
|
2843
|
-
get: function () { return chunk6AMBIQDN_js.transferStatusToJSON; }
|
|
2844
|
-
});
|
|
2845
|
-
Object.defineProperty(exports, "transferToJSON", {
|
|
2846
|
-
enumerable: true,
|
|
2847
|
-
get: function () { return chunk6AMBIQDN_js.transferToJSON; }
|
|
2848
|
-
});
|
|
2849
|
-
Object.defineProperty(exports, "txFromJSON", {
|
|
2850
|
-
enumerable: true,
|
|
2851
|
-
get: function () { return chunk6AMBIQDN_js.txFromJSON; }
|
|
2852
|
-
});
|
|
2853
|
-
Object.defineProperty(exports, "txStatusRequestFromJSON", {
|
|
2854
|
-
enumerable: true,
|
|
2855
|
-
get: function () { return chunk6AMBIQDN_js.txStatusRequestFromJSON; }
|
|
2856
|
-
});
|
|
2857
|
-
Object.defineProperty(exports, "txStatusRequestToJSON", {
|
|
2858
|
-
enumerable: true,
|
|
2859
|
-
get: function () { return chunk6AMBIQDN_js.txStatusRequestToJSON; }
|
|
2860
|
-
});
|
|
2861
|
-
Object.defineProperty(exports, "txStatusResponseFromJSON", {
|
|
2862
|
-
enumerable: true,
|
|
2863
|
-
get: function () { return chunk6AMBIQDN_js.txStatusResponseFromJSON; }
|
|
2864
|
-
});
|
|
2865
|
-
Object.defineProperty(exports, "txStatusResponseToJSON", {
|
|
2866
|
-
enumerable: true,
|
|
2867
|
-
get: function () { return chunk6AMBIQDN_js.txStatusResponseToJSON; }
|
|
2868
|
-
});
|
|
2869
|
-
Object.defineProperty(exports, "txToJSON", {
|
|
2870
|
-
enumerable: true,
|
|
2871
|
-
get: function () { return chunk6AMBIQDN_js.txToJSON; }
|
|
2872
|
-
});
|
|
2873
|
-
exports.SKIP_API_URL = SKIP_API_URL;
|
|
2874
|
-
exports.SkipRouter = SkipRouter;
|