@satora/swap 1.10.2 → 1.11.1
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/{chunk-K4BQUZC6.js → chunk-2AULREFC.js} +2 -2
- package/dist/chunk-2AULREFC.js.map +1 -0
- package/dist/{chunk-2LGHF7A3.cjs → chunk-4NVWIR74.cjs} +755 -439
- package/dist/chunk-4NVWIR74.cjs.map +1 -0
- package/dist/{chunk-HWK7LVVX.js → chunk-JHZHRY7S.js} +130 -51
- package/dist/chunk-JHZHRY7S.js.map +1 -0
- package/dist/{chunk-7GOXIT24.cjs → chunk-JZTF4JNH.cjs} +110 -31
- package/dist/chunk-JZTF4JNH.cjs.map +1 -0
- package/dist/{chunk-OJNQCRHU.cjs → chunk-Q4TOBBAN.cjs} +7 -7
- package/dist/{chunk-OJNQCRHU.cjs.map → chunk-Q4TOBBAN.cjs.map} +1 -1
- package/dist/{chunk-MYOGO44L.cjs → chunk-TNZW35XA.cjs} +2 -2
- package/dist/chunk-TNZW35XA.cjs.map +1 -0
- package/dist/{chunk-VBNBVJLB.js → chunk-TT3J2OOS.js} +8 -8
- package/dist/{chunk-VBNBVJLB.js.map → chunk-TT3J2OOS.js.map} +1 -1
- package/dist/{chunk-S4T4GK5G.js → chunk-WQMAL2VD.js} +391 -75
- package/dist/chunk-WQMAL2VD.js.map +1 -0
- package/dist/delegate.cjs +3 -3
- package/dist/delegate.js +2 -2
- package/dist/dist-MHRQ5FFV.cjs +394 -0
- package/dist/{dist-MMYSP6LP.cjs.map → dist-MHRQ5FFV.cjs.map} +1 -1
- package/dist/{dist-L5LHQNRK.js → dist-SHY7I6SH.js} +13 -13
- package/dist/{fundSwap-IUPFISXM-ON5IVSSZ.cjs → fundSwap-UBCHMUP4-BEMQNSFQ.cjs} +15 -15
- package/dist/{fundSwap-IUPFISXM-ON5IVSSZ.cjs.map → fundSwap-UBCHMUP4-BEMQNSFQ.cjs.map} +1 -1
- package/dist/{fundSwap-IUPFISXM-6IBPJ5O7.js → fundSwap-UBCHMUP4-WBLYE6MC.js} +11 -11
- package/dist/index.cjs +28 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -13
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +11 -6
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +11 -6
- package/dist/node.js.map +1 -1
- package/dist/types/cjs/pure/cctp/attestation.d.cts +5 -3
- package/dist/types/cjs/pure/cctp/types.d.cts +11 -2
- package/dist/types/cjs/pure/cctp-inbound/submit.d.cts +2 -0
- package/dist/types/cjs/pure/cctp-inbound/types.d.cts +5 -0
- package/dist/types/cjs/pure/cctp-inbound/userOp.d.cts +11 -0
- package/dist/types/cjs/pure/client.d.cts +61 -18
- package/dist/types/cjs/pure/create/arkade-to-lightning.d.cts +8 -0
- package/dist/types/cjs/pure/create/bitcoin-to-lightning.d.cts +8 -0
- package/dist/types/cjs/pure/create/types.d.cts +16 -4
- package/dist/types/cjs/pure/evm/coordinator.d.cts +4 -0
- package/dist/types/cjs/pure/evm/wallet.d.cts +4 -4
- package/dist/types/cjs/pure/generated/api.d.cts +102 -21
- package/dist/types/cjs/pure/redeem/arkade.d.cts +4 -1
- package/dist/types/cjs/pure/storage/types.d.cts +2 -0
- package/dist/types/cjs/pure/swap-verification.d.cts +12 -0
- package/dist/types/cjs/pure/tokens.d.cts +0 -6
- package/dist/types/cjs/pure/types/dex-quote.d.cts +9 -1
- package/dist/types/cjs/pure/version.d.cts +4 -4
- package/dist/types/cjs/swap/client.d.cts +2 -0
- package/dist/types/esm/pure/cctp/attestation.d.ts +5 -3
- package/dist/types/esm/pure/cctp/types.d.ts +11 -2
- package/dist/types/esm/pure/cctp-inbound/submit.d.ts +2 -0
- package/dist/types/esm/pure/cctp-inbound/types.d.ts +5 -0
- package/dist/types/esm/pure/cctp-inbound/userOp.d.ts +11 -0
- package/dist/types/esm/pure/client.d.ts +61 -18
- package/dist/types/esm/pure/create/arkade-to-lightning.d.ts +8 -0
- package/dist/types/esm/pure/create/bitcoin-to-lightning.d.ts +8 -0
- package/dist/types/esm/pure/create/types.d.ts +16 -4
- package/dist/types/esm/pure/evm/coordinator.d.ts +4 -0
- package/dist/types/esm/pure/evm/wallet.d.ts +4 -4
- package/dist/types/esm/pure/generated/api.d.ts +102 -21
- package/dist/types/esm/pure/redeem/arkade.d.ts +4 -1
- package/dist/types/esm/pure/storage/types.d.ts +2 -0
- package/dist/types/esm/pure/swap-verification.d.ts +12 -0
- package/dist/types/esm/pure/tokens.d.ts +0 -6
- package/dist/types/esm/pure/types/dex-quote.d.ts +9 -1
- package/dist/types/esm/pure/version.d.ts +4 -4
- package/dist/types/esm/swap/client.d.ts +2 -0
- package/dist/wallet-33OJRHX5-4VM7QDPO.cjs +31 -0
- package/dist/{wallet-THELKUYT-26NOFCTE.cjs.map → wallet-33OJRHX5-4VM7QDPO.cjs.map} +1 -1
- package/dist/{wallet-THELKUYT-TOHSMRGU.js → wallet-33OJRHX5-PR4S3NI3.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2LGHF7A3.cjs.map +0 -1
- package/dist/chunk-7GOXIT24.cjs.map +0 -1
- package/dist/chunk-HWK7LVVX.js.map +0 -1
- package/dist/chunk-K4BQUZC6.js.map +0 -1
- package/dist/chunk-MYOGO44L.cjs.map +0 -1
- package/dist/chunk-S4T4GK5G.js.map +0 -1
- package/dist/dist-MMYSP6LP.cjs +0 -394
- package/dist/wallet-THELKUYT-26NOFCTE.cjs +0 -31
- /package/dist/{dist-L5LHQNRK.js.map → dist-SHY7I6SH.js.map} +0 -0
- /package/dist/{fundSwap-IUPFISXM-6IBPJ5O7.js.map → fundSwap-UBCHMUP4-WBLYE6MC.js.map} +0 -0
- /package/dist/{wallet-THELKUYT-TOHSMRGU.js.map → wallet-33OJRHX5-PR4S3NI3.js.map} +0 -0
|
@@ -516,7 +516,11 @@ export interface ExecuteAndCreateWithPermit2Params {
|
|
|
516
516
|
deadline: bigint;
|
|
517
517
|
/** Signature bytes (compact 65-byte: r || s || v) */
|
|
518
518
|
signature: string;
|
|
519
|
+
/** On-chain depositor code. Only explicit empty code permits EOA normalization. */
|
|
520
|
+
depositorCode?: string;
|
|
519
521
|
}
|
|
522
|
+
/** Normalize only signatures belonging to a verified code-free Permit2 owner. */
|
|
523
|
+
export declare function normalizePermit2Signature(signature: string, depositorCode?: string): string;
|
|
520
524
|
/**
|
|
521
525
|
* Encodes the call data for `coordinator.executeAndCreateWithPermit2(...)` (overload 1).
|
|
522
526
|
*
|
|
@@ -29,6 +29,7 @@ export interface EIP712TypedData {
|
|
|
29
29
|
* const signer: EvmSigner = {
|
|
30
30
|
* address: walletClient.account.address,
|
|
31
31
|
* chainId: walletClient.chain.id,
|
|
32
|
+
* getCode: async (address) => (await publicClient.getCode({ address })) ?? "0x",
|
|
32
33
|
* signTypedData: (td) => walletClient.signTypedData({ ...td, account: walletClient.account }),
|
|
33
34
|
* sendTransaction: (tx) => walletClient.sendTransaction({ to: tx.to, data: tx.data, value: tx.value, type: tx.type, chain, gas: tx.gas }),
|
|
34
35
|
* waitForReceipt: (hash) => publicClient.waitForTransactionReceipt({ hash }),
|
|
@@ -48,10 +49,9 @@ export interface EvmSigner {
|
|
|
48
49
|
address: string;
|
|
49
50
|
/** Current chain ID the wallet is connected to. */
|
|
50
51
|
chainId: number;
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*/
|
|
52
|
+
/** Read account code on this chain; return "0x" for an account without code. */
|
|
53
|
+
getCode?(address: string): Promise<string>;
|
|
54
|
+
/** Sign EIP-712 data; returns EOA or opaque ERC-1271 signature bytes. */
|
|
55
55
|
signTypedData(typedData: EIP712TypedData): Promise<string>;
|
|
56
56
|
/**
|
|
57
57
|
* Sign a raw message hash (personal_sign style).
|
|
@@ -1328,6 +1328,13 @@ export interface components {
|
|
|
1328
1328
|
bridge_target_chain?: string | null;
|
|
1329
1329
|
/** @description USDC address on the bridge destination chain. */
|
|
1330
1330
|
bridge_target_token_address?: string | null;
|
|
1331
|
+
/**
|
|
1332
|
+
* @description Transaction that delivered the bridged payout on the destination
|
|
1333
|
+
* chain, once the server has minted it there. Absent while the transfer
|
|
1334
|
+
* is in flight, and for payouts Circle's Forwarding Service delivers
|
|
1335
|
+
* (Circle's API reports that transaction).
|
|
1336
|
+
*/
|
|
1337
|
+
bridge_target_txid?: string | null;
|
|
1331
1338
|
btc_claim_txid?: string | null;
|
|
1332
1339
|
btc_fund_txid?: string | null;
|
|
1333
1340
|
btc_vhtlc_address: string;
|
|
@@ -1401,8 +1408,10 @@ export interface components {
|
|
|
1401
1408
|
*/
|
|
1402
1409
|
lightning_address?: string | null;
|
|
1403
1410
|
/**
|
|
1404
|
-
* @description BOLT11 invoice the user wants paid. Must carry an amount
|
|
1405
|
-
* pins the payout
|
|
1411
|
+
* @description BOLT11 invoice the user wants paid. Must carry an amount, which
|
|
1412
|
+
* pins the payout. By default the fees go on top of it and the lock
|
|
1413
|
+
* amount follows from the Lightning send fee quoted for this invoice;
|
|
1414
|
+
* pass `source_amount_sats` as well to lock a fixed amount instead.
|
|
1406
1415
|
* Mutually exclusive with `lightning_address` and `lnurl`.
|
|
1407
1416
|
*/
|
|
1408
1417
|
lightning_invoice?: string | null;
|
|
@@ -1417,10 +1426,20 @@ export interface components {
|
|
|
1417
1426
|
refund_pk: string;
|
|
1418
1427
|
/**
|
|
1419
1428
|
* Format: int64
|
|
1420
|
-
* @description Total amount the user wants to lock on Arkade in satoshis
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1429
|
+
* @description Total amount the user wants to lock on Arkade in satoshis; mutually
|
|
1430
|
+
* exclusive with `target_amount_sats`.
|
|
1431
|
+
*
|
|
1432
|
+
* With `lightning_address`/`lnurl` (send-max): fees are deducted from
|
|
1433
|
+
* the Lightning payout.
|
|
1434
|
+
*
|
|
1435
|
+
* With `lightning_invoice` (fixed lock): the VHTLC amount is exactly
|
|
1436
|
+
* this. It must cover invoice amount + protocol fee + the Lightning
|
|
1437
|
+
* send fee quoted for the invoice, else the request fails with a 400
|
|
1438
|
+
* naming the shortfall. Any surplus is charged as network fee, capped
|
|
1439
|
+
* at max(1% of the lock, 100 sats, the route's `/quote` send-fee
|
|
1440
|
+
* estimate); a larger surplus is refused. Typical flow: `/quote` with
|
|
1441
|
+
* this source amount, request an invoice over its `net_target_amount`,
|
|
1442
|
+
* then create with both.
|
|
1424
1443
|
*/
|
|
1425
1444
|
source_amount_sats?: number | null;
|
|
1426
1445
|
/**
|
|
@@ -1631,6 +1650,13 @@ export interface components {
|
|
|
1631
1650
|
bridge_target_chain?: string | null;
|
|
1632
1651
|
/** @description USDC address on the bridge destination chain. */
|
|
1633
1652
|
bridge_target_token_address?: string | null;
|
|
1653
|
+
/**
|
|
1654
|
+
* @description Transaction that delivered the bridged payout on the destination
|
|
1655
|
+
* chain, once the server has minted it there. Absent while the transfer
|
|
1656
|
+
* is in flight, and for payouts Circle's Forwarding Service delivers
|
|
1657
|
+
* (Circle's API reports that transaction).
|
|
1658
|
+
*/
|
|
1659
|
+
bridge_target_txid?: string | null;
|
|
1634
1660
|
/** @description On-chain claim transaction ID (server claim) */
|
|
1635
1661
|
btc_claim_txid?: string | null;
|
|
1636
1662
|
/** @description On-chain funding transaction ID */
|
|
@@ -1742,8 +1768,10 @@ export interface components {
|
|
|
1742
1768
|
*/
|
|
1743
1769
|
lightning_address?: string | null;
|
|
1744
1770
|
/**
|
|
1745
|
-
* @description BOLT11 invoice the user wants paid. Must carry an amount
|
|
1746
|
-
* pins the payout
|
|
1771
|
+
* @description BOLT11 invoice the user wants paid. Must carry an amount, which
|
|
1772
|
+
* pins the payout. By default the fees go on top of it and the lock
|
|
1773
|
+
* amount follows from the Lightning send fee quoted for this invoice;
|
|
1774
|
+
* pass `source_amount_sats` as well to lock a fixed amount instead.
|
|
1747
1775
|
* Mutually exclusive with `lightning_address` and `lnurl`.
|
|
1748
1776
|
*/
|
|
1749
1777
|
lightning_invoice?: string | null;
|
|
@@ -1758,10 +1786,19 @@ export interface components {
|
|
|
1758
1786
|
refund_pk: string;
|
|
1759
1787
|
/**
|
|
1760
1788
|
* Format: int64
|
|
1761
|
-
* @description Total amount the user wants to lock on-chain in satoshis
|
|
1762
|
-
*
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1789
|
+
* @description Total amount the user wants to lock on-chain in satoshis; mutually
|
|
1790
|
+
* exclusive with `target_amount_sats`.
|
|
1791
|
+
*
|
|
1792
|
+
* With `lightning_address`/`lnurl` (send-max): fees are deducted from
|
|
1793
|
+
* the Lightning payout.
|
|
1794
|
+
*
|
|
1795
|
+
* With `lightning_invoice` (fixed lock): the HTLC amount is exactly
|
|
1796
|
+
* this. It must cover invoice amount + protocol fee + the Lightning
|
|
1797
|
+
* send fee quoted for the invoice + the server's on-chain claim fee,
|
|
1798
|
+
* else the request fails with a 400 naming the shortfall. Any surplus
|
|
1799
|
+
* is charged as network fee, capped at max(1% of the lock, 100 sats,
|
|
1800
|
+
* the route's `/quote` send-fee estimate); a larger surplus is
|
|
1801
|
+
* refused.
|
|
1765
1802
|
*/
|
|
1766
1803
|
source_amount_sats?: number | null;
|
|
1767
1804
|
/**
|
|
@@ -1858,8 +1895,8 @@ export interface components {
|
|
|
1858
1895
|
fee_token: components["schemas"]["Token"];
|
|
1859
1896
|
/**
|
|
1860
1897
|
* @description Flat USDC fee deducted from the bridged amount, recipient already
|
|
1861
|
-
* provisioned. Outbound: `forwardFee.high
|
|
1862
|
-
* `receiveMessage` ourselves). Stringified `u64`.
|
|
1898
|
+
* provisioned. Outbound: `forwardFee.high`, or `0` when `self_relayed`;
|
|
1899
|
+
* inbound: `0` (we call `receiveMessage` ourselves). Stringified `u64`.
|
|
1863
1900
|
*/
|
|
1864
1901
|
flat: string;
|
|
1865
1902
|
/**
|
|
@@ -1881,6 +1918,23 @@ export interface components {
|
|
|
1881
1918
|
proportional_fee_millionths: string;
|
|
1882
1919
|
/** @enum {string} */
|
|
1883
1920
|
router: "cctp";
|
|
1921
|
+
/**
|
|
1922
|
+
* @description `true` when the payout is priced as minted on the destination by
|
|
1923
|
+
* the server itself instead of Circle's Forwarding Service
|
|
1924
|
+
* (outbound to chains where it holds gas). `flat` is then `0`.
|
|
1925
|
+
*
|
|
1926
|
+
* The server only mints a burn it can attribute to a swap: that
|
|
1927
|
+
* swap's own claim, burned through the swap's coordinator and
|
|
1928
|
+
* minted to the swap's recorded payout address, without Circle's
|
|
1929
|
+
* forwarding hook. Claim calldata from `/dex-calldata` (with
|
|
1930
|
+
* `swap_id`) and `redeem-and-swap-calldata` is built that way. A
|
|
1931
|
+
* client that builds the burn itself may rely on this flag only
|
|
1932
|
+
* when it named the swap in the quote (`swap_id`) and its burn meets
|
|
1933
|
+
* those conditions; any other burn must request forwarding and pay
|
|
1934
|
+
* the forwarding fee, or nobody delivers it. Always `false`
|
|
1935
|
+
* inbound.
|
|
1936
|
+
*/
|
|
1937
|
+
self_relayed: boolean;
|
|
1884
1938
|
} | {
|
|
1885
1939
|
/**
|
|
1886
1940
|
* @description LayerZero messaging fee in sats: the live `quoteSend` fee converted
|
|
@@ -2410,6 +2464,14 @@ export interface components {
|
|
|
2410
2464
|
* Bounded server-side; out-of-range values return 400.
|
|
2411
2465
|
*/
|
|
2412
2466
|
slippage_bps: number;
|
|
2467
|
+
/**
|
|
2468
|
+
* Format: uuid
|
|
2469
|
+
* @description The swap this calldata claims. Only with it can the server deliver a
|
|
2470
|
+
* bridged USDC payout itself (no Circle forwarding fee): it delivers
|
|
2471
|
+
* what it can find again, the payout of a swap created to bridge to
|
|
2472
|
+
* that chain. Without it the payout uses Circle's Forwarding Service.
|
|
2473
|
+
*/
|
|
2474
|
+
swap_id?: string | null;
|
|
2413
2475
|
/** @description Target asset the swap will produce. */
|
|
2414
2476
|
to: components["schemas"]["Token"];
|
|
2415
2477
|
};
|
|
@@ -2539,6 +2601,13 @@ export interface components {
|
|
|
2539
2601
|
* Bounded server-side; out-of-range values return 400.
|
|
2540
2602
|
*/
|
|
2541
2603
|
slippage_bps: number;
|
|
2604
|
+
/**
|
|
2605
|
+
* Format: uuid
|
|
2606
|
+
* @description The swap whose bridged payout this quote prices, when it is one. Who
|
|
2607
|
+
* delivers a CCTP payout is then decided for that swap, as its claim
|
|
2608
|
+
* calldata decides it, instead of for the quoted amount.
|
|
2609
|
+
*/
|
|
2610
|
+
swap_id?: string | null;
|
|
2542
2611
|
/**
|
|
2543
2612
|
* @description Target asset. Same-chain quotes use the same chain id as `from`;
|
|
2544
2613
|
* cross-chain quotes bridge (a different EVM chain id, or a
|
|
@@ -3291,7 +3360,8 @@ export interface components {
|
|
|
3291
3360
|
/**
|
|
3292
3361
|
* Format: int64
|
|
3293
3362
|
* @description Provider-quoted Lightning send fee, charged as the network fee,
|
|
3294
|
-
* in satoshis
|
|
3363
|
+
* in satoshis (plus, for a fixed-lock invoice quote, the lock's
|
|
3364
|
+
* surplus over invoice + fees).
|
|
3295
3365
|
*/
|
|
3296
3366
|
network_fee_sats: number;
|
|
3297
3367
|
/**
|
|
@@ -3618,6 +3688,13 @@ export interface components {
|
|
|
3618
3688
|
bridge_target_chain?: string | null;
|
|
3619
3689
|
/** @description USDC address on the bridge destination chain. */
|
|
3620
3690
|
bridge_target_token_address?: string | null;
|
|
3691
|
+
/**
|
|
3692
|
+
* @description Transaction that delivered the bridged payout on the destination
|
|
3693
|
+
* chain, once the server has minted it there. Absent while the transfer
|
|
3694
|
+
* is in flight, and for payouts Circle's Forwarding Service delivers
|
|
3695
|
+
* (Circle's API reports that transaction).
|
|
3696
|
+
*/
|
|
3697
|
+
bridge_target_txid?: string | null;
|
|
3621
3698
|
/** @description EVM chain name (e.g. "Polygon", "Ethereum", "Arbitrum") */
|
|
3622
3699
|
chain: string;
|
|
3623
3700
|
/** @description EVM address that will sign the HTLC claim (SDK-derived for gasless claims) */
|
|
@@ -5312,15 +5389,19 @@ export interface operations {
|
|
|
5312
5389
|
source_token?: string | null;
|
|
5313
5390
|
/**
|
|
5314
5391
|
* @description Total to lock on the source chain, in the source token's smallest
|
|
5315
|
-
* unit (satoshis for Arkade and Bitcoin, token units for EVM);
|
|
5316
|
-
*
|
|
5317
|
-
*
|
|
5318
|
-
* `
|
|
5392
|
+
* unit (satoshis for Arkade and Bitcoin, token units for EVM); mutually
|
|
5393
|
+
* exclusive with `target_amount_sats`. With `lightning_address`/`lnurl`
|
|
5394
|
+
* fees are deducted from the Lightning payout (send-max). With
|
|
5395
|
+
* `lightning_invoice` (Arkade and Bitcoin only) it is a fixed lock:
|
|
5396
|
+
* the quote reports the same split create would persist (surplus over
|
|
5397
|
+
* invoice + fees charged as network fee) or the same 400 naming the
|
|
5398
|
+
* shortfall or excess surplus.
|
|
5319
5399
|
*/
|
|
5320
5400
|
source_amount?: string | null;
|
|
5321
5401
|
/**
|
|
5322
|
-
* @description BOLT11 invoice the user wants paid; pins the payout.
|
|
5323
|
-
*
|
|
5402
|
+
* @description BOLT11 invoice the user wants paid; pins the payout. Combine with
|
|
5403
|
+
* `source_amount` for a fixed lock. Mutually exclusive with
|
|
5404
|
+
* `lightning_address` and `lnurl`.
|
|
5324
5405
|
*/
|
|
5325
5406
|
lightning_invoice?: string | null;
|
|
5326
5407
|
/**
|
|
@@ -69,4 +69,7 @@ export interface ArkadeClaimResult {
|
|
|
69
69
|
* @throws Error if the claim fails
|
|
70
70
|
*/
|
|
71
71
|
export declare function buildArkadeClaim(params: ArkadeClaimParams): Promise<ArkadeClaimResult>;
|
|
72
|
-
|
|
72
|
+
/** Resume an existing claim, checking its recipient when supplied by the caller. */
|
|
73
|
+
export declare function continueArkadeClaim(params: Omit<ArkadeClaimParams, "destinationAddress"> & {
|
|
74
|
+
destinationAddress?: string;
|
|
75
|
+
}): Promise<ArkadeClaimResult>;
|
|
@@ -112,6 +112,8 @@ export interface StoredSwap {
|
|
|
112
112
|
* {@link lightningPaymentHash}, whichever tx it came from.
|
|
113
113
|
*/
|
|
114
114
|
evmFundTxid?: string;
|
|
115
|
+
/** Signed sponsored funding: reconcile before allowing another attempt. */
|
|
116
|
+
evmFundingUserOpHash?: string;
|
|
115
117
|
/**
|
|
116
118
|
* For an EVM → Lightning swap, the payment hash this client fixed at
|
|
117
119
|
* creation. Every funding path refuses to lock under any other hash (the
|
|
@@ -26,6 +26,18 @@ export declare class SwapVerificationError extends Error {
|
|
|
26
26
|
swapId?: string;
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A fixed-lock invoice swap (`lightningInvoice` + `sourceAmountSats`) must
|
|
31
|
+
* ask for exactly the requested lock: a caller like an escrow can only fund
|
|
32
|
+
* that amount, and a larger one would leave the swap underfunded.
|
|
33
|
+
*/
|
|
34
|
+
export declare function assertFixedLockAmount(options: {
|
|
35
|
+
lightningInvoice?: string;
|
|
36
|
+
sourceAmountSats?: number;
|
|
37
|
+
}, data: {
|
|
38
|
+
id?: string;
|
|
39
|
+
source_amount: string | number;
|
|
40
|
+
}): void;
|
|
29
41
|
/** A hex hash without `0x`, lowercase. */
|
|
30
42
|
export declare function normalizeHash(hash: string): string;
|
|
31
43
|
/**
|
|
@@ -116,12 +116,6 @@ export declare function isNativeLockTarget(chain: string, token: string): boolea
|
|
|
116
116
|
export declare function isEvmSwapSource(chain: string, token: string): boolean;
|
|
117
117
|
/** Native USDT on Tron is a send-only Legacy Mesh destination. */
|
|
118
118
|
export declare function isTronToken(chain: string): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Kill switch for paying out USDC on Ethereum and Polygon over CCTP from
|
|
121
|
-
* Arbitrum. With `false`, those payouts run on the chain directly again.
|
|
122
|
-
* Keep in sync with `CCTP_ROUTED_USDC_ENABLED` in the Rust SDK.
|
|
123
|
-
*/
|
|
124
|
-
export declare const CCTP_ROUTED_USDC_ENABLED = true;
|
|
125
119
|
/**
|
|
126
120
|
* Returns true for native USDC on Ethereum or Polygon as a swap *target*.
|
|
127
121
|
* Both chains have HTLCs, but USDC payouts to them settle on Arbitrum and
|
|
@@ -78,10 +78,17 @@ export type BridgeRate = {
|
|
|
78
78
|
* 0.013% = `130 / 1_000_000`. Stringified u128.
|
|
79
79
|
*/
|
|
80
80
|
proportional_fee_millionths: string;
|
|
81
|
-
/** Flat USDC fee deducted from the bridged amount, recipient already provisioned. Outbound: `forwardFee.high`; inbound: `"0"`. Stringified u64. */
|
|
81
|
+
/** Flat USDC fee deducted from the bridged amount, recipient already provisioned. Outbound: `forwardFee.high`, or `"0"` when `self_relayed`; inbound: `"0"`. Stringified u64. */
|
|
82
82
|
flat: string;
|
|
83
83
|
/** Flat-fee variant including a fresh non-EVM recipient's ATA rent (Solana). Equals `flat` otherwise; same units. Stringified u64. */
|
|
84
84
|
flat_with_setup: string;
|
|
85
|
+
/**
|
|
86
|
+
* `true` when the Satora server mints the USDC on the destination chain
|
|
87
|
+
* itself instead of Circle's Forwarding Service (outbound USDC on
|
|
88
|
+
* Polygon and Ethereum, while the server holds gas there). `flat` is
|
|
89
|
+
* then `"0"`. Absent on servers that predate it.
|
|
90
|
+
*/
|
|
91
|
+
self_relayed?: boolean;
|
|
85
92
|
} | {
|
|
86
93
|
router: "layerzero";
|
|
87
94
|
/** LayerZero messaging fee in sats (the live ETH fee converted at the current rate); add it to the network fee. Stringified u64. */
|
|
@@ -125,6 +132,7 @@ export type WireBridgeRate = {
|
|
|
125
132
|
proportional_fee_millionths: string;
|
|
126
133
|
flat: string;
|
|
127
134
|
flat_with_setup: string;
|
|
135
|
+
self_relayed?: boolean | null;
|
|
128
136
|
} | {
|
|
129
137
|
router: "layerzero";
|
|
130
138
|
native_fee_sats: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const SDK_NAME = "swap";
|
|
2
|
-
export declare const SDK_VERSION = "1.
|
|
3
|
-
export declare const SDK_COMMIT_HASH = "
|
|
2
|
+
export declare const SDK_VERSION = "1.11.1";
|
|
3
|
+
export declare const SDK_COMMIT_HASH = "082a5f12e1766f59a5ff63bef69e81ce27453535";
|
|
4
4
|
/** @deprecated Retained for source compatibility; requests no longer send it. */
|
|
5
|
-
export declare const SATORA_SERVER_VERSION = "0.3.
|
|
6
|
-
export declare const CLIENT_AGENT = "swap/1.
|
|
5
|
+
export declare const SATORA_SERVER_VERSION = "0.3.29";
|
|
6
|
+
export declare const CLIENT_AGENT = "swap/1.11.1";
|
|
7
7
|
export declare const DEFAULT_AA_BUNDLER_URL = "https://arb-mainnet.g.alchemy.com/v2/ZaG_75AoAHzPqzmys5jpD";
|
|
8
8
|
export declare const DEFAULT_AA_POLICY_ID = "878b1c90-5b53-4c9c-8892-6d7659dd2e72";
|
|
@@ -256,6 +256,8 @@ export declare class Client {
|
|
|
256
256
|
/** Delegated to the legacy client (migration checkpoint). */
|
|
257
257
|
fundSwapGasless(...args: Parameters<LegacyClient["fundSwapGasless"]>): ReturnType<LegacyClient["fundSwapGasless"]>;
|
|
258
258
|
/** Delegated to the legacy client (migration checkpoint). */
|
|
259
|
+
gaslessFundingPlan(...args: Parameters<LegacyClient["gaslessFundingPlan"]>): ReturnType<LegacyClient["gaslessFundingPlan"]>;
|
|
260
|
+
/** Delegated to the legacy client (migration checkpoint). */
|
|
259
261
|
getEvmFundingExpectation(...args: Parameters<LegacyClient["getEvmFundingExpectation"]>): ReturnType<LegacyClient["getEvmFundingExpectation"]>;
|
|
260
262
|
/** Delegated to the legacy client (migration checkpoint). */
|
|
261
263
|
getSwapDepositorKey(...args: Parameters<LegacyClient["getSwapDepositorKey"]>): ReturnType<LegacyClient["getSwapDepositorKey"]>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkTNZW35XAcjs = require('./chunk-TNZW35XA.cjs');
|
|
15
|
+
require('./chunk-W34QUYVC.cjs');
|
|
16
|
+
require('./chunk-JEQ2X3Z6.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.SimulationRevertError = _chunkTNZW35XAcjs.SimulationRevertError; exports.decodeUint256 = _chunkTNZW35XAcjs.decodeUint256; exports.encodeAllowanceCall = _chunkTNZW35XAcjs.encodeAllowanceCall; exports.encodeBalanceOfCall = _chunkTNZW35XAcjs.encodeBalanceOfCall; exports.encodeMaxApproveData = _chunkTNZW35XAcjs.encodeMaxApproveData; exports.encodeTransferCall = _chunkTNZW35XAcjs.encodeTransferCall; exports.gasLimitFor = _chunkTNZW35XAcjs.gasLimitFor; exports.getRevertReason = _chunkTNZW35XAcjs.getRevertReason; exports.isUserRejection = _chunkTNZW35XAcjs.isUserRejection; exports.parseSignature = _chunkTNZW35XAcjs.parseSignature; exports.simulateTransaction = _chunkTNZW35XAcjs.simulateTransaction; exports.txTypeFor = _chunkTNZW35XAcjs.txTypeFor;
|
|
31
|
+
//# sourceMappingURL=wallet-33OJRHX5-4VM7QDPO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/swap/swap/client-sdk/ts-sdk/packages/swap/dist/wallet-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/swap/swap/client-sdk/ts-sdk/packages/swap/dist/wallet-33OJRHX5-4VM7QDPO.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,qvBAAC","file":"/home/runner/work/swap/swap/client-sdk/ts-sdk/packages/swap/dist/wallet-33OJRHX5-4VM7QDPO.cjs"}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
parseSignature,
|
|
12
12
|
simulateTransaction,
|
|
13
13
|
txTypeFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2AULREFC.js";
|
|
15
15
|
import "./chunk-Z4J6YUVR.js";
|
|
16
16
|
import "./chunk-DGUM43GV.js";
|
|
17
17
|
export {
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
simulateTransaction,
|
|
29
29
|
txTypeFor
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=wallet-
|
|
31
|
+
//# sourceMappingURL=wallet-33OJRHX5-PR4S3NI3.js.map
|