@lendasat/lendaswap-sdk-pure 0.2.41 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_esm-6K2AP5GG.js +3663 -0
- package/dist/_esm-6K2AP5GG.js.map +1 -0
- package/dist/_esm-UGRDSVEV.cjs +3662 -0
- package/dist/_esm-UGRDSVEV.cjs.map +1 -0
- package/dist/api/client.d.ts +0 -4
- package/dist/api/client.d.ts.map +1 -1
- package/dist/base-2KYNAFR3.cjs +109 -0
- package/dist/base-2KYNAFR3.cjs.map +1 -0
- package/dist/base-HMHH3XPM.js +9 -0
- package/dist/base-HMHH3XPM.js.map +1 -0
- package/dist/ccip-EBXWV2U3.js +8 -0
- package/dist/ccip-EBXWV2U3.js.map +1 -0
- package/dist/ccip-PD37NJHA.cjs +26 -0
- package/dist/ccip-PD37NJHA.cjs.map +1 -0
- package/dist/cctp-bridge/index.cjs +67 -0
- package/dist/cctp-bridge/index.cjs.map +1 -0
- package/dist/cctp-bridge/index.js +53 -15
- package/dist/cctp-bridge/index.js.map +1 -1
- package/dist/cctp-inbound/client.d.ts +21 -19
- package/dist/cctp-inbound/client.d.ts.map +1 -1
- package/dist/cctp-inbound/smartAccount.d.ts +21 -19
- package/dist/cctp-inbound/smartAccount.d.ts.map +1 -1
- package/dist/chunk-4JXN4UPB.js +554 -0
- package/dist/chunk-4JXN4UPB.js.map +1 -0
- package/dist/chunk-A4GKKURK.cjs +430 -0
- package/dist/chunk-A4GKKURK.cjs.map +1 -0
- package/dist/chunk-BZU3R5DJ.cjs +554 -0
- package/dist/chunk-BZU3R5DJ.cjs.map +1 -0
- package/dist/chunk-DBBCKPZ5.js +421 -0
- package/dist/chunk-DBBCKPZ5.js.map +1 -0
- package/dist/chunk-DNSJDKTP.cjs +96 -0
- package/dist/chunk-DNSJDKTP.cjs.map +1 -0
- package/dist/chunk-EIK6BZWG.js +90 -0
- package/dist/chunk-EIK6BZWG.js.map +1 -0
- package/dist/chunk-GVAPVS4Z.js +6144 -0
- package/dist/chunk-GVAPVS4Z.js.map +1 -0
- package/dist/chunk-I7TGLGN6.js +46 -0
- package/dist/chunk-I7TGLGN6.js.map +1 -0
- package/dist/chunk-JBVKWKD4.cjs +50 -0
- package/dist/chunk-JBVKWKD4.cjs.map +1 -0
- package/dist/chunk-LA3YX2HD.js +47096 -0
- package/dist/chunk-LA3YX2HD.js.map +1 -0
- package/dist/chunk-PKDJZJMV.cjs +2214 -0
- package/dist/chunk-PKDJZJMV.cjs.map +1 -0
- package/dist/chunk-PRN5VZOM.js +370 -0
- package/dist/chunk-PRN5VZOM.js.map +1 -0
- package/dist/chunk-RIOT5VOJ.cjs +47240 -0
- package/dist/chunk-RIOT5VOJ.cjs.map +1 -0
- package/dist/chunk-WVZSHRV7.cjs +431 -0
- package/dist/chunk-WVZSHRV7.cjs.map +1 -0
- package/dist/chunk-YLWPBHMV.cjs +6311 -0
- package/dist/chunk-YLWPBHMV.cjs.map +1 -0
- package/dist/chunk-Z2FCTNRC.js +2210 -0
- package/dist/chunk-Z2FCTNRC.js.map +1 -0
- package/dist/client.d.ts +68 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/compose-quote.d.ts +77 -0
- package/dist/compose-quote.d.ts.map +1 -0
- package/dist/delegate.cjs +23 -0
- package/dist/delegate.cjs.map +1 -0
- package/dist/delegate.js +8 -269
- package/dist/delegate.js.map +1 -1
- package/dist/dist-PWXNFVDF.js +8 -0
- package/dist/dist-PWXNFVDF.js.map +1 -0
- package/dist/dist-VEHYC67F.cjs +550 -0
- package/dist/dist-VEHYC67F.cjs.map +1 -0
- package/dist/esplora.d.ts +14 -0
- package/dist/esplora.d.ts.map +1 -1
- package/dist/generated/api.d.ts +235 -38
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/index.cjs +35461 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35312 -32
- package/dist/index.js.map +1 -1
- package/dist/mine.wasm-LUTPOAD2.js +12 -0
- package/dist/mine.wasm-LUTPOAD2.js.map +1 -0
- package/dist/mine.wasm-Z3ORSBKN.cjs +12 -0
- package/dist/mine.wasm-Z3ORSBKN.cjs.map +1 -0
- package/dist/node.cjs +166 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.js +159 -18
- package/dist/node.js.map +1 -1
- package/dist/secp256k1-B6OW5ZCM.js +8 -0
- package/dist/secp256k1-B6OW5ZCM.js.map +1 -0
- package/dist/secp256k1-PJCSE4N6.cjs +30 -0
- package/dist/secp256k1-PJCSE4N6.cjs.map +1 -0
- package/dist/tokens.d.ts +2 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/types/chain-config.d.ts +50 -0
- package/dist/types/chain-config.d.ts.map +1 -0
- package/dist/types/chain.d.ts +11 -0
- package/dist/types/chain.d.ts.map +1 -0
- package/dist/types/dex-quote.d.ts +85 -0
- package/dist/types/dex-quote.d.ts.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/network-fees.d.ts +43 -0
- package/dist/types/network-fees.d.ts.map +1 -0
- package/dist/types/quote.d.ts +87 -0
- package/dist/types/quote.d.ts.map +1 -0
- package/dist/types/swap-pairs.d.ts +37 -0
- package/dist/types/swap-pairs.d.ts.map +1 -0
- package/dist/version.d.ts +2 -2
- package/dist/wallet-4YGTKWNZ.js +7 -0
- package/dist/wallet-4YGTKWNZ.js.map +1 -0
- package/dist/wallet-SZJDXAY7.cjs +45 -0
- package/dist/wallet-SZJDXAY7.cjs.map +1 -0
- package/package.json +23 -10
- package/dist/api/client.js +0 -13
- package/dist/api/client.js.map +0 -1
- package/dist/arkade-network.js +0 -40
- package/dist/arkade-network.js.map +0 -1
- package/dist/arkade.js +0 -61
- package/dist/arkade.js.map +0 -1
- package/dist/cctp/attestation.js +0 -149
- package/dist/cctp/attestation.js.map +0 -1
- package/dist/cctp/constants.js +0 -92
- package/dist/cctp/constants.js.map +0 -1
- package/dist/cctp/fee.js +0 -70
- package/dist/cctp/fee.js.map +0 -1
- package/dist/cctp/index.js +0 -13
- package/dist/cctp/index.js.map +0 -1
- package/dist/cctp/types.js +0 -5
- package/dist/cctp/types.js.map +0 -1
- package/dist/cctp/utils.js +0 -91
- package/dist/cctp/utils.js.map +0 -1
- package/dist/cctp-bridge/bridge.js +0 -74
- package/dist/cctp-bridge/bridge.js.map +0 -1
- package/dist/cctp-inbound/approveAndBurn.js +0 -95
- package/dist/cctp-inbound/approveAndBurn.js.map +0 -1
- package/dist/cctp-inbound/burn.js +0 -66
- package/dist/cctp-inbound/burn.js.map +0 -1
- package/dist/cctp-inbound/chainMap.js +0 -128
- package/dist/cctp-inbound/chainMap.js.map +0 -1
- package/dist/cctp-inbound/client.js +0 -125
- package/dist/cctp-inbound/client.js.map +0 -1
- package/dist/cctp-inbound/eip2612.js +0 -95
- package/dist/cctp-inbound/eip2612.js.map +0 -1
- package/dist/cctp-inbound/evmSignerAdapter.js +0 -82
- package/dist/cctp-inbound/evmSignerAdapter.js.map +0 -1
- package/dist/cctp-inbound/fundSwap.js +0 -95
- package/dist/cctp-inbound/fundSwap.js.map +0 -1
- package/dist/cctp-inbound/index.js +0 -34
- package/dist/cctp-inbound/index.js.map +0 -1
- package/dist/cctp-inbound/permit2.js +0 -32
- package/dist/cctp-inbound/permit2.js.map +0 -1
- package/dist/cctp-inbound/preflight.js +0 -84
- package/dist/cctp-inbound/preflight.js.map +0 -1
- package/dist/cctp-inbound/recover.js +0 -177
- package/dist/cctp-inbound/recover.js.map +0 -1
- package/dist/cctp-inbound/smartAccount.js +0 -117
- package/dist/cctp-inbound/smartAccount.js.map +0 -1
- package/dist/cctp-inbound/submit.js +0 -136
- package/dist/cctp-inbound/submit.js.map +0 -1
- package/dist/cctp-inbound/types.js +0 -5
- package/dist/cctp-inbound/types.js.map +0 -1
- package/dist/cctp-inbound/userOp.js +0 -151
- package/dist/cctp-inbound/userOp.js.map +0 -1
- package/dist/client.js +0 -4126
- package/dist/client.js.map +0 -1
- package/dist/create/arkade-to-lightning.js +0 -76
- package/dist/create/arkade-to-lightning.js.map +0 -1
- package/dist/create/arkade.js +0 -86
- package/dist/create/arkade.js.map +0 -1
- package/dist/create/bitcoin-to-arkade.js +0 -76
- package/dist/create/bitcoin-to-arkade.js.map +0 -1
- package/dist/create/bitcoin.js +0 -77
- package/dist/create/bitcoin.js.map +0 -1
- package/dist/create/evm-to-arkade.js +0 -80
- package/dist/create/evm-to-arkade.js.map +0 -1
- package/dist/create/evm-to-bitcoin.js +0 -82
- package/dist/create/evm-to-bitcoin.js.map +0 -1
- package/dist/create/evm-to-lightning.js +0 -89
- package/dist/create/evm-to-lightning.js.map +0 -1
- package/dist/create/index.js +0 -21
- package/dist/create/index.js.map +0 -1
- package/dist/create/lightning-to-arkade.js +0 -69
- package/dist/create/lightning-to-arkade.js.map +0 -1
- package/dist/create/lightning.js +0 -61
- package/dist/create/lightning.js.map +0 -1
- package/dist/create/retry.js +0 -71
- package/dist/create/retry.js.map +0 -1
- package/dist/create/types.js +0 -5
- package/dist/create/types.js.map +0 -1
- package/dist/escrow/index.js +0 -115
- package/dist/escrow/index.js.map +0 -1
- package/dist/esplora.js +0 -47
- package/dist/esplora.js.map +0 -1
- package/dist/evm/coordinator.js +0 -714
- package/dist/evm/coordinator.js.map +0 -1
- package/dist/evm/htlc.js +0 -278
- package/dist/evm/htlc.js.map +0 -1
- package/dist/evm/index.js +0 -10
- package/dist/evm/index.js.map +0 -1
- package/dist/evm/signing.js +0 -70
- package/dist/evm/signing.js.map +0 -1
- package/dist/evm/wallet.js +0 -133
- package/dist/evm/wallet.js.map +0 -1
- package/dist/generated/api.js +0 -6
- package/dist/generated/api.js.map +0 -1
- package/dist/logging.js +0 -130
- package/dist/logging.js.map +0 -1
- package/dist/price-calculations.js +0 -135
- package/dist/price-calculations.js.map +0 -1
- package/dist/redeem/arkade.js +0 -416
- package/dist/redeem/arkade.js.map +0 -1
- package/dist/redeem/ethereum.js +0 -206
- package/dist/redeem/ethereum.js.map +0 -1
- package/dist/redeem/gasless.js +0 -73
- package/dist/redeem/gasless.js.map +0 -1
- package/dist/redeem/index.js +0 -189
- package/dist/redeem/index.js.map +0 -1
- package/dist/redeem/types.js +0 -36
- package/dist/redeem/types.js.map +0 -1
- package/dist/refund/arkade.js +0 -200
- package/dist/refund/arkade.js.map +0 -1
- package/dist/refund/collab-arkade-evm.js +0 -307
- package/dist/refund/collab-arkade-evm.js.map +0 -1
- package/dist/refund/collab-arkade-lightning.js +0 -245
- package/dist/refund/collab-arkade-lightning.js.map +0 -1
- package/dist/refund/index.js +0 -12
- package/dist/refund/index.js.map +0 -1
- package/dist/refund/onchain.js +0 -366
- package/dist/refund/onchain.js.map +0 -1
- package/dist/signer/index.js +0 -249
- package/dist/signer/index.js.map +0 -1
- package/dist/storage/idb.js +0 -236
- package/dist/storage/idb.js.map +0 -1
- package/dist/storage/index.js +0 -98
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/sqlite.js +0 -206
- package/dist/storage/sqlite.js.map +0 -1
- package/dist/storage/types.js +0 -9
- package/dist/storage/types.js.map +0 -1
- package/dist/tokens.js +0 -322
- package/dist/tokens.js.map +0 -1
- package/dist/usd-price.js +0 -96
- package/dist/usd-price.js.map +0 -1
- package/dist/usdt0-bridge/constants.js +0 -71
- package/dist/usdt0-bridge/constants.js.map +0 -1
- package/dist/usdt0-bridge/index.js +0 -11
- package/dist/usdt0-bridge/index.js.map +0 -1
- package/dist/usdt0-bridge/tracking.js +0 -123
- package/dist/usdt0-bridge/tracking.js.map +0 -1
- package/dist/usdt0-bridge/utils.js +0 -51
- package/dist/usdt0-bridge/utils.js.map +0 -1
- package/dist/version.js +0 -6
- package/dist/version.js.map +0 -1
- package/dist/ws.js +0 -145
- package/dist/ws.js.map +0 -1
package/dist/generated/api.d.ts
CHANGED
|
@@ -223,6 +223,23 @@ export interface paths {
|
|
|
223
223
|
patch?: never;
|
|
224
224
|
trace?: never;
|
|
225
225
|
};
|
|
226
|
+
"/chain-config": {
|
|
227
|
+
parameters: {
|
|
228
|
+
query?: never;
|
|
229
|
+
header?: never;
|
|
230
|
+
path?: never;
|
|
231
|
+
cookie?: never;
|
|
232
|
+
};
|
|
233
|
+
/** Return per-chain configuration (BTC-pegged token, … more to come). */
|
|
234
|
+
get: operations["get_chain_config"];
|
|
235
|
+
put?: never;
|
|
236
|
+
post?: never;
|
|
237
|
+
delete?: never;
|
|
238
|
+
options?: never;
|
|
239
|
+
head?: never;
|
|
240
|
+
patch?: never;
|
|
241
|
+
trace?: never;
|
|
242
|
+
};
|
|
226
243
|
"/dex-calldata/claim": {
|
|
227
244
|
parameters: {
|
|
228
245
|
query?: never;
|
|
@@ -363,6 +380,26 @@ export interface paths {
|
|
|
363
380
|
patch?: never;
|
|
364
381
|
trace?: never;
|
|
365
382
|
};
|
|
383
|
+
"/network-fees": {
|
|
384
|
+
parameters: {
|
|
385
|
+
query?: never;
|
|
386
|
+
header?: never;
|
|
387
|
+
path?: never;
|
|
388
|
+
cookie?: never;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Return per-pair network-fee estimates in sats at current gas / mining
|
|
392
|
+
* prices.
|
|
393
|
+
*/
|
|
394
|
+
get: operations["get_network_fees"];
|
|
395
|
+
put?: never;
|
|
396
|
+
post?: never;
|
|
397
|
+
delete?: never;
|
|
398
|
+
options?: never;
|
|
399
|
+
head?: never;
|
|
400
|
+
patch?: never;
|
|
401
|
+
trace?: never;
|
|
402
|
+
};
|
|
366
403
|
"/quote": {
|
|
367
404
|
parameters: {
|
|
368
405
|
query?: never;
|
|
@@ -1037,7 +1074,10 @@ export interface components {
|
|
|
1037
1074
|
referral_code?: string | null;
|
|
1038
1075
|
/** @description Refund public key used to generate the Arkade VHTLC. */
|
|
1039
1076
|
refund_pk: string;
|
|
1040
|
-
/**
|
|
1077
|
+
/**
|
|
1078
|
+
* @description Recipient where tokens land after the claim (user's final destination).
|
|
1079
|
+
* An EVM hex address, or a base58 Solana pubkey for a Solana bridge target.
|
|
1080
|
+
*/
|
|
1041
1081
|
target_address: string;
|
|
1042
1082
|
/** @description ERC-20 contract address of the desired token on the target chain. */
|
|
1043
1083
|
token_address: string;
|
|
@@ -1296,7 +1336,10 @@ export interface components {
|
|
|
1296
1336
|
referral_code?: string | null;
|
|
1297
1337
|
/** @description Refund public key used to generate the Arkade VHTLC. */
|
|
1298
1338
|
refund_pk: string;
|
|
1299
|
-
/**
|
|
1339
|
+
/**
|
|
1340
|
+
* @description Recipient where tokens land after the claim (user's final destination).
|
|
1341
|
+
* An EVM hex address, or a base58 Solana pubkey for a Solana bridge target.
|
|
1342
|
+
*/
|
|
1300
1343
|
target_address: string;
|
|
1301
1344
|
/** @description ERC-20 contract address of the desired token on the target chain. */
|
|
1302
1345
|
token_address: string;
|
|
@@ -1483,6 +1526,39 @@ export interface components {
|
|
|
1483
1526
|
* @enum {string}
|
|
1484
1527
|
*/
|
|
1485
1528
|
Chain: "Arkade" | "Lightning" | "Bitcoin" | "137" | "1" | "42161";
|
|
1529
|
+
/**
|
|
1530
|
+
* @description Per-chain configuration. EVM chains only — Bitcoin / Lightning /
|
|
1531
|
+
* Arkade don't have a meaningful chain-config shape.
|
|
1532
|
+
*/
|
|
1533
|
+
ChainConfigEntry: {
|
|
1534
|
+
/**
|
|
1535
|
+
* @description How many `btc_pegged_token` units equal 1 BTC, as a decimal
|
|
1536
|
+
* string. Multiply BTC sats by this — then scale by the token's
|
|
1537
|
+
* decimals — to get pegged-token base units for a direct BTC↔pegged
|
|
1538
|
+
* conversion (the leg with no DEX hop); divide for the inverse.
|
|
1539
|
+
*
|
|
1540
|
+
* Currently always `"1"`: every supported peg (tBTC, WBTC) is treated
|
|
1541
|
+
* 1:1 against BTC. The field is here so a chain whose peg genuinely
|
|
1542
|
+
* deviates can report its real rate without a client change. If that
|
|
1543
|
+
* ever becomes a live market rate, treat it as a quote input — refresh
|
|
1544
|
+
* on the quote cadence, not as session-permanent config.
|
|
1545
|
+
*/
|
|
1546
|
+
btc_peg_rate: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* @description The chain's BTC-pegged token (tBTC v2 on Arbitrum / Ethereum,
|
|
1549
|
+
* WBTC on Polygon). Used as the DEX pivot when composing a quote
|
|
1550
|
+
* for any BTC↔this-chain pair.
|
|
1551
|
+
*/
|
|
1552
|
+
btc_pegged_token: components["schemas"]["TokenRef"];
|
|
1553
|
+
/**
|
|
1554
|
+
* @description Chain identifier — EVM chain id as a string (`"1"`, `"137"`,
|
|
1555
|
+
* `"42161"`), matching the encoding used elsewhere in the API.
|
|
1556
|
+
*/
|
|
1557
|
+
chain: components["schemas"]["Chain"];
|
|
1558
|
+
};
|
|
1559
|
+
ChainConfigResponse: {
|
|
1560
|
+
chains: components["schemas"]["ChainConfigEntry"][];
|
|
1561
|
+
};
|
|
1486
1562
|
/**
|
|
1487
1563
|
* @description Request body for `POST /swap/{id}/claim-gasless`.
|
|
1488
1564
|
*
|
|
@@ -1698,30 +1774,6 @@ export interface components {
|
|
|
1698
1774
|
/** @description List of VTXO outpoints to refresh */
|
|
1699
1775
|
vtxos: string[];
|
|
1700
1776
|
};
|
|
1701
|
-
/**
|
|
1702
|
-
* @description Which side the caller is pinning on the requested swap.
|
|
1703
|
-
*
|
|
1704
|
-
* Stringified `u128` rather than typed integer — matches the rest of the
|
|
1705
|
-
* API (`net_source_amount`, `min_amount_out`, …) and dodges the JS
|
|
1706
|
-
* `Number` precision cliff at 2^53 for 18-decimal tokens.
|
|
1707
|
-
*/
|
|
1708
|
-
DexAmount: {
|
|
1709
|
-
/** @enum {string} */
|
|
1710
|
-
kind: "exact_in";
|
|
1711
|
-
/**
|
|
1712
|
-
* @description Spend exactly this much `from_token`; receive at least the
|
|
1713
|
-
* response's `estimated_amount_out` (post-slippage) of `to_token`.
|
|
1714
|
-
*/
|
|
1715
|
-
value: string;
|
|
1716
|
-
} | {
|
|
1717
|
-
/** @enum {string} */
|
|
1718
|
-
kind: "exact_out";
|
|
1719
|
-
/**
|
|
1720
|
-
* @description Receive exactly this much `to_token`; spend at most the
|
|
1721
|
-
* response's `expected_amount_in` (post-slippage) of `from_token`.
|
|
1722
|
-
*/
|
|
1723
|
-
value: string;
|
|
1724
|
-
};
|
|
1725
1777
|
/**
|
|
1726
1778
|
* @description A single EVM contract call the SDK should embed in its batch user op.
|
|
1727
1779
|
*
|
|
@@ -1760,6 +1812,30 @@ export interface components {
|
|
|
1760
1812
|
/** @description Native token value (usually "0") */
|
|
1761
1813
|
value?: string;
|
|
1762
1814
|
};
|
|
1815
|
+
/**
|
|
1816
|
+
* @description Which side the caller is pinning on the requested swap.
|
|
1817
|
+
*
|
|
1818
|
+
* Stringified `u128` rather than typed integer — matches the rest of the
|
|
1819
|
+
* API (`net_source_amount`, `min_amount_out`, …) and dodges the JS
|
|
1820
|
+
* `Number` precision cliff at 2^53 for 18-decimal tokens.
|
|
1821
|
+
*/
|
|
1822
|
+
DexCalldataAmount: {
|
|
1823
|
+
/** @enum {string} */
|
|
1824
|
+
kind: "exact_in";
|
|
1825
|
+
/**
|
|
1826
|
+
* @description Spend exactly this much `from_token`; receive at least the
|
|
1827
|
+
* response's `estimated_amount_out` (post-slippage) of `to_token`.
|
|
1828
|
+
*/
|
|
1829
|
+
value: string;
|
|
1830
|
+
} | {
|
|
1831
|
+
/** @enum {string} */
|
|
1832
|
+
kind: "exact_out";
|
|
1833
|
+
/**
|
|
1834
|
+
* @description Receive exactly this much `to_token`; spend at most the
|
|
1835
|
+
* response's `expected_amount_in` (post-slippage) of `from_token`.
|
|
1836
|
+
*/
|
|
1837
|
+
value: string;
|
|
1838
|
+
};
|
|
1763
1839
|
/**
|
|
1764
1840
|
* @description Request shared by both `/dex-calldata/claim` and `/dex-calldata/fund`.
|
|
1765
1841
|
*
|
|
@@ -1772,7 +1848,7 @@ export interface components {
|
|
|
1772
1848
|
* @description Either the input amount (exact-in) or the desired output amount
|
|
1773
1849
|
* (exact-out), both as stringified `u128` smallest-unit values.
|
|
1774
1850
|
*/
|
|
1775
|
-
amount: components["schemas"]["
|
|
1851
|
+
amount: components["schemas"]["DexCalldataAmount"];
|
|
1776
1852
|
/**
|
|
1777
1853
|
* @description Source asset the SDK will spend. Must be a [`Token::Evm`] variant —
|
|
1778
1854
|
* EOAs only delegate via EIP-7702 on EVM. `Solana` is rejected with
|
|
@@ -1866,6 +1942,35 @@ export interface components {
|
|
|
1866
1942
|
/** @enum {string} */
|
|
1867
1943
|
kind: "evm";
|
|
1868
1944
|
};
|
|
1945
|
+
/**
|
|
1946
|
+
* @description Which side the caller is pinning on the requested quote.
|
|
1947
|
+
*
|
|
1948
|
+
* Stringified `u128` rather than typed integer — matches the rest of the
|
|
1949
|
+
* API (`net_source_amount`, `min_amount_out`, …) and dodges the JS
|
|
1950
|
+
* `Number` precision cliff at 2^53 for 18-decimal tokens.
|
|
1951
|
+
*
|
|
1952
|
+
* Mirrors `dex_calldata::DexAmount` on the wire but kept as a separate
|
|
1953
|
+
* Rust type so the two endpoints can evolve independently.
|
|
1954
|
+
*/
|
|
1955
|
+
DexQuoteAmount: {
|
|
1956
|
+
/** @enum {string} */
|
|
1957
|
+
kind: "exact_in";
|
|
1958
|
+
/**
|
|
1959
|
+
* @description Spend exactly this much `from_token`; the response's
|
|
1960
|
+
* `estimated_amount_out` is the expected (mid-market) receive
|
|
1961
|
+
* amount that the requested slippage tolerance covers.
|
|
1962
|
+
*/
|
|
1963
|
+
value: string;
|
|
1964
|
+
} | {
|
|
1965
|
+
/** @enum {string} */
|
|
1966
|
+
kind: "exact_out";
|
|
1967
|
+
/**
|
|
1968
|
+
* @description Receive exactly this much `to_token`; the response's
|
|
1969
|
+
* `expected_amount_in` is the expected (mid-market) required input
|
|
1970
|
+
* at the requested slippage tolerance.
|
|
1971
|
+
*/
|
|
1972
|
+
value: string;
|
|
1973
|
+
};
|
|
1869
1974
|
/**
|
|
1870
1975
|
* @description A single hop in the route the server picked.
|
|
1871
1976
|
*
|
|
@@ -1906,7 +2011,7 @@ export interface components {
|
|
|
1906
2011
|
* @description Either the input amount (exact-in) or the desired output amount
|
|
1907
2012
|
* (exact-out), both as stringified `u128` smallest-unit values.
|
|
1908
2013
|
*/
|
|
1909
|
-
amount: components["schemas"]["
|
|
2014
|
+
amount: components["schemas"]["DexQuoteAmount"];
|
|
1910
2015
|
/**
|
|
1911
2016
|
* @description Source asset. Must be a [`Token::Evm`] variant — price discovery
|
|
1912
2017
|
* is rooted in an EVM settlement hub; `Solana` is rejected with a
|
|
@@ -2598,7 +2703,10 @@ export interface components {
|
|
|
2598
2703
|
referral_code?: string | null;
|
|
2599
2704
|
/** @description Refund public key used to generate the Arkade VHTLC. */
|
|
2600
2705
|
refund_pk: string;
|
|
2601
|
-
/**
|
|
2706
|
+
/**
|
|
2707
|
+
* @description Recipient where tokens land after the claim (user's final destination).
|
|
2708
|
+
* An EVM hex address, or a base58 Solana pubkey for a Solana bridge target.
|
|
2709
|
+
*/
|
|
2602
2710
|
target_address: string;
|
|
2603
2711
|
/** @description ERC-20 contract address of the desired token on the target chain. */
|
|
2604
2712
|
token_address: string;
|
|
@@ -2675,6 +2783,42 @@ export interface components {
|
|
|
2675
2783
|
*/
|
|
2676
2784
|
tip_height: number;
|
|
2677
2785
|
};
|
|
2786
|
+
/**
|
|
2787
|
+
* @description Sats the server pays on each side of the pair at *current* gas/mining
|
|
2788
|
+
* prices. Extensible — future breakouts (`htlc_create_sats`,
|
|
2789
|
+
* `dex_swap_sats`, …) land alongside.
|
|
2790
|
+
*/
|
|
2791
|
+
NetworkFee: {
|
|
2792
|
+
/**
|
|
2793
|
+
* Format: int64
|
|
2794
|
+
* @description Sats the server incurs on the source side of the swap.
|
|
2795
|
+
*
|
|
2796
|
+
* - **Bitcoin**: BTC mining fee for the HTLC claim transaction.
|
|
2797
|
+
* - **EVM**: gas-to-sats for the HTLC-claim transaction.
|
|
2798
|
+
*/
|
|
2799
|
+
source_sats: number;
|
|
2800
|
+
/**
|
|
2801
|
+
* Format: int64
|
|
2802
|
+
* @description Sats the server incurs on the target side of the swap.
|
|
2803
|
+
*
|
|
2804
|
+
* - **EVM**: gas-to-sats for the HTLC-create transaction.
|
|
2805
|
+
* - **Bitcoin**: BTC mining fee.
|
|
2806
|
+
*/
|
|
2807
|
+
target_sats: number;
|
|
2808
|
+
};
|
|
2809
|
+
/**
|
|
2810
|
+
* @description One entry in the pair grid. Same shape vocabulary as
|
|
2811
|
+
* [`crate::api::swap_pairs::SwapPairInfo`] so SDK consumers can join on
|
|
2812
|
+
* `(source, target)`.
|
|
2813
|
+
*/
|
|
2814
|
+
NetworkFeePairEntry: {
|
|
2815
|
+
fees: components["schemas"]["NetworkFee"];
|
|
2816
|
+
source: components["schemas"]["Chain"];
|
|
2817
|
+
target: components["schemas"]["Chain"];
|
|
2818
|
+
};
|
|
2819
|
+
NetworkFeesResponse: {
|
|
2820
|
+
pairs: components["schemas"]["NetworkFeePairEntry"][];
|
|
2821
|
+
};
|
|
2678
2822
|
QuoteResponse: {
|
|
2679
2823
|
/**
|
|
2680
2824
|
* Format: int64
|
|
@@ -2788,18 +2932,20 @@ export interface components {
|
|
|
2788
2932
|
/** @description List of recovered swaps with their derivation indices */
|
|
2789
2933
|
swaps: components["schemas"]["RecoveredSwap"][];
|
|
2790
2934
|
};
|
|
2791
|
-
/** @description Response containing fresh DEX calldata
|
|
2935
|
+
/** @description Response containing fresh DEX calldata for an EVM-targeted gasless claim. */
|
|
2792
2936
|
RedeemAndSwapResponse: {
|
|
2793
2937
|
/**
|
|
2794
|
-
* @description keccak256(abi.encode(calls)) — the hash of the full calls array
|
|
2938
|
+
* @description keccak256(abi.encode(calls)) — the hash of the full calls array.
|
|
2795
2939
|
* Must be included in the client's EIP-712 redeem signature to prevent call substitution.
|
|
2796
2940
|
*/
|
|
2797
2941
|
calls_hash: string;
|
|
2798
2942
|
dex_calldata?: null | components["schemas"]["DexCallData"];
|
|
2799
2943
|
/**
|
|
2800
2944
|
* Format: int64
|
|
2801
|
-
* @description
|
|
2802
|
-
*
|
|
2945
|
+
* @description Backwards-compatibility only: always 0. The settlement gas is now folded
|
|
2946
|
+
* into `network_fee` at quote time, so the claim path no longer deducts a
|
|
2947
|
+
* separate fee. Kept on the wire for older clients; intended for removal in
|
|
2948
|
+
* a future version.
|
|
2803
2949
|
*/
|
|
2804
2950
|
gasless_fee_sats: number;
|
|
2805
2951
|
/**
|
|
@@ -2883,15 +3029,16 @@ export interface components {
|
|
|
2883
3029
|
SupportAgentsResponse: {
|
|
2884
3030
|
agents: components["schemas"]["SupportAgentInfo"][];
|
|
2885
3031
|
};
|
|
2886
|
-
/** @description A supported swap pair with its limits and
|
|
3032
|
+
/** @description A supported swap pair with its limits and total fee rate. */
|
|
2887
3033
|
SwapPairInfo: {
|
|
2888
3034
|
/**
|
|
2889
3035
|
* Format: double
|
|
2890
|
-
* @description
|
|
3036
|
+
* @description User-facing fee rate as a decimal fraction (e.g. 0.0025 = 0.25%).
|
|
2891
3037
|
*
|
|
2892
|
-
*
|
|
2893
|
-
*
|
|
2894
|
-
*
|
|
3038
|
+
* The single rate consumers should display. Includes any
|
|
3039
|
+
* percentage components the server passes through on top of the
|
|
3040
|
+
* protocol fee — those vary by pair but are bundled here so the
|
|
3041
|
+
* SDK doesn't have to compose them.
|
|
2895
3042
|
*/
|
|
2896
3043
|
fee_percentage: number;
|
|
2897
3044
|
/**
|
|
@@ -3029,6 +3176,16 @@ export interface components {
|
|
|
3029
3176
|
btc_tokens: components["schemas"]["TokenInfo"][];
|
|
3030
3177
|
evm_tokens: components["schemas"]["TokenInfo"][];
|
|
3031
3178
|
};
|
|
3179
|
+
/**
|
|
3180
|
+
* @description Reference to an ERC-20 token plus the decimals/symbol the SDK needs
|
|
3181
|
+
* to format amounts. Address is lowercase hex (`0x`-prefixed).
|
|
3182
|
+
*/
|
|
3183
|
+
TokenRef: {
|
|
3184
|
+
address: string;
|
|
3185
|
+
/** Format: int32 */
|
|
3186
|
+
decimals: number;
|
|
3187
|
+
symbol: string;
|
|
3188
|
+
};
|
|
3032
3189
|
/**
|
|
3033
3190
|
* @description Response: same HTLC + DEX payload the Permit2 endpoint returns, plus
|
|
3034
3191
|
* an `aa` object with the addresses a 4337 client needs.
|
|
@@ -3628,6 +3785,26 @@ export interface operations {
|
|
|
3628
3785
|
};
|
|
3629
3786
|
};
|
|
3630
3787
|
};
|
|
3788
|
+
get_chain_config: {
|
|
3789
|
+
parameters: {
|
|
3790
|
+
query?: never;
|
|
3791
|
+
header?: never;
|
|
3792
|
+
path?: never;
|
|
3793
|
+
cookie?: never;
|
|
3794
|
+
};
|
|
3795
|
+
requestBody?: never;
|
|
3796
|
+
responses: {
|
|
3797
|
+
/** @description Per-chain configuration (BTC pivot, contracts, …) */
|
|
3798
|
+
200: {
|
|
3799
|
+
headers: {
|
|
3800
|
+
[name: string]: unknown;
|
|
3801
|
+
};
|
|
3802
|
+
content: {
|
|
3803
|
+
"application/json": components["schemas"]["ChainConfigResponse"];
|
|
3804
|
+
};
|
|
3805
|
+
};
|
|
3806
|
+
};
|
|
3807
|
+
};
|
|
3631
3808
|
post_dex_calldata_claim: {
|
|
3632
3809
|
parameters: {
|
|
3633
3810
|
query?: never;
|
|
@@ -3880,6 +4057,26 @@ export interface operations {
|
|
|
3880
4057
|
};
|
|
3881
4058
|
};
|
|
3882
4059
|
};
|
|
4060
|
+
get_network_fees: {
|
|
4061
|
+
parameters: {
|
|
4062
|
+
query?: never;
|
|
4063
|
+
header?: never;
|
|
4064
|
+
path?: never;
|
|
4065
|
+
cookie?: never;
|
|
4066
|
+
};
|
|
4067
|
+
requestBody?: never;
|
|
4068
|
+
responses: {
|
|
4069
|
+
/** @description Per-pair network-fee estimates in sats */
|
|
4070
|
+
200: {
|
|
4071
|
+
headers: {
|
|
4072
|
+
[name: string]: unknown;
|
|
4073
|
+
};
|
|
4074
|
+
content: {
|
|
4075
|
+
"application/json": components["schemas"]["NetworkFeesResponse"];
|
|
4076
|
+
};
|
|
4077
|
+
};
|
|
4078
|
+
};
|
|
4079
|
+
};
|
|
3883
4080
|
get_quote: {
|
|
3884
4081
|
parameters: {
|
|
3885
4082
|
query: {
|