@lendasat/lendaswap-sdk-pure 0.2.24 → 0.2.26
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/arkade-network.d.ts +8 -0
- package/dist/arkade-network.d.ts.map +1 -0
- package/dist/arkade-network.js +40 -0
- package/dist/arkade-network.js.map +1 -0
- package/dist/arkade.d.ts.map +1 -1
- package/dist/arkade.js +2 -9
- package/dist/arkade.js.map +1 -1
- package/dist/cctp/constants.d.ts.map +1 -1
- package/dist/cctp/constants.js +4 -0
- package/dist/cctp/constants.js.map +1 -1
- package/dist/cctp/fee.d.ts +49 -0
- package/dist/cctp/fee.d.ts.map +1 -0
- package/dist/cctp/fee.js +70 -0
- package/dist/cctp/fee.js.map +1 -0
- package/dist/cctp/index.d.ts +2 -1
- package/dist/cctp/index.d.ts.map +1 -1
- package/dist/cctp/index.js +2 -1
- package/dist/cctp/index.js.map +1 -1
- package/dist/cctp/utils.d.ts +15 -0
- package/dist/cctp/utils.d.ts.map +1 -1
- package/dist/cctp/utils.js +41 -0
- package/dist/cctp/utils.js.map +1 -1
- package/dist/cctp-bridge/bridge.d.ts +62 -0
- package/dist/cctp-bridge/bridge.d.ts.map +1 -0
- package/dist/cctp-bridge/bridge.js +74 -0
- package/dist/cctp-bridge/bridge.js.map +1 -0
- package/dist/cctp-bridge/index.d.ts +17 -0
- package/dist/cctp-bridge/index.d.ts.map +1 -0
- package/dist/cctp-bridge/index.js +16 -0
- package/dist/cctp-bridge/index.js.map +1 -0
- package/dist/cctp-inbound/approveAndBurn.d.ts +68 -0
- package/dist/cctp-inbound/approveAndBurn.d.ts.map +1 -0
- package/dist/cctp-inbound/approveAndBurn.js +95 -0
- package/dist/cctp-inbound/approveAndBurn.js.map +1 -0
- package/dist/cctp-inbound/burn.d.ts +51 -0
- package/dist/cctp-inbound/burn.d.ts.map +1 -0
- package/dist/cctp-inbound/burn.js +66 -0
- package/dist/cctp-inbound/burn.js.map +1 -0
- package/dist/cctp-inbound/chainMap.d.ts +48 -0
- package/dist/cctp-inbound/chainMap.d.ts.map +1 -0
- package/dist/cctp-inbound/chainMap.js +103 -0
- package/dist/cctp-inbound/chainMap.js.map +1 -0
- package/dist/cctp-inbound/client.d.ts +1573 -0
- package/dist/cctp-inbound/client.d.ts.map +1 -0
- package/dist/cctp-inbound/client.js +117 -0
- package/dist/cctp-inbound/client.js.map +1 -0
- package/dist/cctp-inbound/eip2612.d.ts +77 -0
- package/dist/cctp-inbound/eip2612.d.ts.map +1 -0
- package/dist/cctp-inbound/eip2612.js +95 -0
- package/dist/cctp-inbound/eip2612.js.map +1 -0
- package/dist/cctp-inbound/evmSignerAdapter.d.ts +25 -0
- package/dist/cctp-inbound/evmSignerAdapter.d.ts.map +1 -0
- package/dist/cctp-inbound/evmSignerAdapter.js +50 -0
- package/dist/cctp-inbound/evmSignerAdapter.js.map +1 -0
- package/dist/cctp-inbound/fundSwap.d.ts +94 -0
- package/dist/cctp-inbound/fundSwap.d.ts.map +1 -0
- package/dist/cctp-inbound/fundSwap.js +90 -0
- package/dist/cctp-inbound/fundSwap.js.map +1 -0
- package/dist/cctp-inbound/index.d.ts +35 -0
- package/dist/cctp-inbound/index.d.ts.map +1 -0
- package/dist/cctp-inbound/index.js +33 -0
- package/dist/cctp-inbound/index.js.map +1 -0
- package/dist/cctp-inbound/permit2.d.ts +33 -0
- package/dist/cctp-inbound/permit2.d.ts.map +1 -0
- package/dist/cctp-inbound/permit2.js +32 -0
- package/dist/cctp-inbound/permit2.js.map +1 -0
- package/dist/cctp-inbound/preflight.d.ts +36 -0
- package/dist/cctp-inbound/preflight.d.ts.map +1 -0
- package/dist/cctp-inbound/preflight.js +67 -0
- package/dist/cctp-inbound/preflight.js.map +1 -0
- package/dist/cctp-inbound/smartAccount.d.ts +1518 -0
- package/dist/cctp-inbound/smartAccount.d.ts.map +1 -0
- package/dist/cctp-inbound/smartAccount.js +117 -0
- package/dist/cctp-inbound/smartAccount.js.map +1 -0
- package/dist/cctp-inbound/submit.d.ts +75 -0
- package/dist/cctp-inbound/submit.d.ts.map +1 -0
- package/dist/cctp-inbound/submit.js +126 -0
- package/dist/cctp-inbound/submit.js.map +1 -0
- package/dist/cctp-inbound/types.d.ts +30 -0
- package/dist/cctp-inbound/types.d.ts.map +1 -0
- package/dist/cctp-inbound/types.js +5 -0
- package/dist/cctp-inbound/types.js.map +1 -0
- package/dist/cctp-inbound/userOp.d.ts +93 -0
- package/dist/cctp-inbound/userOp.d.ts.map +1 -0
- package/dist/cctp-inbound/userOp.js +151 -0
- package/dist/cctp-inbound/userOp.js.map +1 -0
- package/dist/client.d.ts +166 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +565 -32
- package/dist/client.js.map +1 -1
- package/dist/create/arkade.d.ts.map +1 -1
- package/dist/create/arkade.js +21 -19
- package/dist/create/arkade.js.map +1 -1
- package/dist/create/bitcoin.d.ts.map +1 -1
- package/dist/create/bitcoin.js +17 -15
- package/dist/create/bitcoin.js.map +1 -1
- package/dist/create/evm-to-arkade.d.ts.map +1 -1
- package/dist/create/evm-to-arkade.js +2 -0
- package/dist/create/evm-to-arkade.js.map +1 -1
- package/dist/create/evm-to-bitcoin.d.ts.map +1 -1
- package/dist/create/evm-to-bitcoin.js +2 -0
- package/dist/create/evm-to-bitcoin.js.map +1 -1
- package/dist/create/evm-to-lightning.d.ts.map +1 -1
- package/dist/create/evm-to-lightning.js +6 -3
- package/dist/create/evm-to-lightning.js.map +1 -1
- package/dist/create/lightning.d.ts.map +1 -1
- package/dist/create/lightning.js +17 -15
- package/dist/create/lightning.js.map +1 -1
- package/dist/create/types.d.ts +40 -0
- package/dist/create/types.d.ts.map +1 -1
- package/dist/delegate.d.ts.map +1 -1
- package/dist/delegate.js +2 -31
- package/dist/delegate.js.map +1 -1
- package/dist/evm/wallet.d.ts +16 -0
- package/dist/evm/wallet.d.ts.map +1 -1
- package/dist/evm/wallet.js.map +1 -1
- package/dist/generated/api.d.ts +408 -2
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/redeem/arkade.d.ts.map +1 -1
- package/dist/redeem/arkade.js +4 -43
- package/dist/redeem/arkade.js.map +1 -1
- package/dist/redeem/gasless.d.ts +16 -0
- package/dist/redeem/gasless.d.ts.map +1 -1
- package/dist/redeem/gasless.js +3 -1
- package/dist/redeem/gasless.js.map +1 -1
- package/dist/refund/arkade.d.ts.map +1 -1
- package/dist/refund/arkade.js +3 -39
- package/dist/refund/arkade.js.map +1 -1
- package/dist/refund/{collab.d.ts → collab-arkade-evm.d.ts} +6 -6
- package/dist/refund/collab-arkade-evm.d.ts.map +1 -0
- package/dist/refund/{collab.js → collab-arkade-evm.js} +6 -38
- package/dist/refund/collab-arkade-evm.js.map +1 -0
- package/dist/refund/collab-arkade-lightning.d.ts +59 -0
- package/dist/refund/collab-arkade-lightning.d.ts.map +1 -0
- package/dist/refund/collab-arkade-lightning.js +208 -0
- package/dist/refund/collab-arkade-lightning.js.map +1 -0
- package/dist/refund/index.d.ts +3 -2
- package/dist/refund/index.d.ts.map +1 -1
- package/dist/refund/index.js +3 -2
- package/dist/refund/index.js.map +1 -1
- package/dist/tokens.d.ts +18 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +43 -7
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/package.json +27 -2
- package/dist/refund/collab.d.ts.map +0 -1
- package/dist/refund/collab.js.map +0 -1
package/dist/generated/api.d.ts
CHANGED
|
@@ -94,6 +94,34 @@ export interface paths {
|
|
|
94
94
|
patch?: never;
|
|
95
95
|
trace?: never;
|
|
96
96
|
};
|
|
97
|
+
"/api/swap/arkade-lightning/{id}/collab-refund": {
|
|
98
|
+
parameters: {
|
|
99
|
+
query?: never;
|
|
100
|
+
header?: never;
|
|
101
|
+
path?: never;
|
|
102
|
+
cookie?: never;
|
|
103
|
+
};
|
|
104
|
+
get?: never;
|
|
105
|
+
put?: never;
|
|
106
|
+
/**
|
|
107
|
+
* Collaboratively refund an Arkade-to-Lightning VHTLC.
|
|
108
|
+
* @description The client builds and partially signs the refund transaction, then POSTs it
|
|
109
|
+
* here. The server obtains the receiver cosignature and returns the result.
|
|
110
|
+
* Only allowed when the swap is in `ServerWontFund` or `ClientInvalidFunded`
|
|
111
|
+
* state.
|
|
112
|
+
*
|
|
113
|
+
* After receiving the response the client must:
|
|
114
|
+
* 1. Submit the cosigned PSBTs to the Arkade server for the server signature
|
|
115
|
+
* 2. Merge all checkpoint signatures and sign as sender
|
|
116
|
+
* 3. Finalize the transaction with the Arkade server
|
|
117
|
+
*/
|
|
118
|
+
post: operations["collab_refund_arkade_to_lightning"];
|
|
119
|
+
delete?: never;
|
|
120
|
+
options?: never;
|
|
121
|
+
head?: never;
|
|
122
|
+
patch?: never;
|
|
123
|
+
trace?: never;
|
|
124
|
+
};
|
|
97
125
|
"/api/swap/{id}/collab-refund-evm": {
|
|
98
126
|
parameters: {
|
|
99
127
|
query?: never;
|
|
@@ -285,6 +313,28 @@ export interface paths {
|
|
|
285
313
|
patch?: never;
|
|
286
314
|
trace?: never;
|
|
287
315
|
};
|
|
316
|
+
"/status": {
|
|
317
|
+
parameters: {
|
|
318
|
+
query?: never;
|
|
319
|
+
header?: never;
|
|
320
|
+
path?: never;
|
|
321
|
+
cookie?: never;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Probe every external dependency and return their aggregated health.
|
|
325
|
+
* @description Returns 200 when every service is healthy, 503 otherwise — the body
|
|
326
|
+
* carries the per-service breakdown either way so callers can distinguish
|
|
327
|
+
* which dependency is down.
|
|
328
|
+
*/
|
|
329
|
+
get: operations["get_status"];
|
|
330
|
+
put?: never;
|
|
331
|
+
post?: never;
|
|
332
|
+
delete?: never;
|
|
333
|
+
options?: never;
|
|
334
|
+
head?: never;
|
|
335
|
+
patch?: never;
|
|
336
|
+
trace?: never;
|
|
337
|
+
};
|
|
288
338
|
"/support-agents": {
|
|
289
339
|
parameters: {
|
|
290
340
|
query?: never;
|
|
@@ -773,6 +823,29 @@ export interface paths {
|
|
|
773
823
|
patch?: never;
|
|
774
824
|
trace?: never;
|
|
775
825
|
};
|
|
826
|
+
"/swap/{id}/swap-and-lock-calldata-userop": {
|
|
827
|
+
parameters: {
|
|
828
|
+
query?: never;
|
|
829
|
+
header?: never;
|
|
830
|
+
path?: never;
|
|
831
|
+
cookie?: never;
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* Returns data for funding an EVM-to-BTC swap via a user's 4337 smart
|
|
835
|
+
* account. The client composes a UserOperation that executes receiveMessage
|
|
836
|
+
* (for CCTP-inbound) + USDC.approve(Permit2, max) + executeAndCreateWithPermit2
|
|
837
|
+
* atomically — `destinationCaller` on the source-chain burn is the smart
|
|
838
|
+
* account address, so CCTPv2's receiveMessage gating is pinned to it.
|
|
839
|
+
*/
|
|
840
|
+
get: operations["get_coordinator_funding_calldata_userop"];
|
|
841
|
+
put?: never;
|
|
842
|
+
post?: never;
|
|
843
|
+
delete?: never;
|
|
844
|
+
options?: never;
|
|
845
|
+
head?: never;
|
|
846
|
+
patch?: never;
|
|
847
|
+
trace?: never;
|
|
848
|
+
};
|
|
776
849
|
"/tokens": {
|
|
777
850
|
parameters: {
|
|
778
851
|
query?: never;
|
|
@@ -815,6 +888,23 @@ export interface paths {
|
|
|
815
888
|
export type webhooks = Record<string, never>;
|
|
816
889
|
export interface components {
|
|
817
890
|
schemas: {
|
|
891
|
+
/**
|
|
892
|
+
* @description ERC-4337 / Kernel specific addresses the client uses to derive its
|
|
893
|
+
* smart-account sender + compose `initCode`.
|
|
894
|
+
*/
|
|
895
|
+
AaConfig: {
|
|
896
|
+
/** @description Kernel (ZeroDev) factory address on this chain. */
|
|
897
|
+
account_factory: string;
|
|
898
|
+
/** @description Kernel implementation the factory deploys. */
|
|
899
|
+
account_impl: string;
|
|
900
|
+
/** @description Canonical EntryPoint v0.7 deployment. */
|
|
901
|
+
entry_point: string;
|
|
902
|
+
/**
|
|
903
|
+
* @description Salt used when deriving the smart-account address. Pinned to "0"
|
|
904
|
+
* so each user has exactly one smart account per signing key.
|
|
905
|
+
*/
|
|
906
|
+
salt: string;
|
|
907
|
+
};
|
|
818
908
|
/**
|
|
819
909
|
* @description Chain-agnostic request for Arkade-to-EVM swaps.
|
|
820
910
|
*
|
|
@@ -836,6 +926,11 @@ export interface components {
|
|
|
836
926
|
* USDC).
|
|
837
927
|
*/
|
|
838
928
|
amount_out?: number | null;
|
|
929
|
+
/**
|
|
930
|
+
* @description ATA-existence flag for non-EVM CCTP destinations (Solana).
|
|
931
|
+
* See `BitcoinToEvmSwapRequest::bridge_recipient_setup`.
|
|
932
|
+
*/
|
|
933
|
+
bridge_recipient_setup?: boolean;
|
|
839
934
|
/**
|
|
840
935
|
* @description Optional: CCTP bridge destination chain (e.g., "Ethereum", "Arbitrum"). When set,
|
|
841
936
|
* USDC will be bridged to this chain after the DEX swap.
|
|
@@ -919,6 +1014,20 @@ export interface components {
|
|
|
919
1014
|
/** @description WBTC token contract address on the target EVM chain (the token locked in the HTLC). */
|
|
920
1015
|
wbtc_address: string;
|
|
921
1016
|
};
|
|
1017
|
+
/** @description Request for a collaborative VHTLC refund. */
|
|
1018
|
+
ArkadeToLightningCollabRefundRequest: {
|
|
1019
|
+
/** @description Base64-encoded ark transaction PSBT, partially signed by the sender (client). */
|
|
1020
|
+
ark_tx: string;
|
|
1021
|
+
/** @description Base64-encoded checkpoint transaction PSBT (unsigned). */
|
|
1022
|
+
checkpoint: string;
|
|
1023
|
+
};
|
|
1024
|
+
/** @description Response with cosigned PSBTs for a collaborative refund. */
|
|
1025
|
+
ArkadeToLightningCollabRefundResponse: {
|
|
1026
|
+
/** @description Base64-encoded ark transaction PSBT with receiver cosignature added. */
|
|
1027
|
+
ark_tx: string;
|
|
1028
|
+
/** @description Base64-encoded checkpoint PSBT with receiver cosignature added. */
|
|
1029
|
+
checkpoint: string;
|
|
1030
|
+
};
|
|
922
1031
|
/**
|
|
923
1032
|
* @description Request for creating an Arkade-to-Lightning swap.
|
|
924
1033
|
*
|
|
@@ -1058,6 +1167,17 @@ export interface components {
|
|
|
1058
1167
|
* USDC).
|
|
1059
1168
|
*/
|
|
1060
1169
|
amount_out?: number | null;
|
|
1170
|
+
/**
|
|
1171
|
+
* @description ATA-existence flag for non-EVM CCTP destinations (Solana).
|
|
1172
|
+
* `true` = recipient has no USDC ATA yet (Circle's forwarder
|
|
1173
|
+
* creates one, paid out of the burn). `false` (default) = recipient
|
|
1174
|
+
* already holds USDC, or destination is EVM. Drives the bridge-fee
|
|
1175
|
+
* variant used when inflating the DEX target and must match the
|
|
1176
|
+
* value later passed to `redeem-and-swap-calldata` so the burn
|
|
1177
|
+
* doesn't underflow. Solana callers are responsible for probing
|
|
1178
|
+
* the destination chain and setting this correctly.
|
|
1179
|
+
*/
|
|
1180
|
+
bridge_recipient_setup?: boolean;
|
|
1061
1181
|
/**
|
|
1062
1182
|
* @description Optional: CCTP bridge destination chain (e.g., "Ethereum", "Arbitrum"). When set,
|
|
1063
1183
|
* USDC will be bridged to this chain after the DEX swap.
|
|
@@ -1259,7 +1379,7 @@ export interface components {
|
|
|
1259
1379
|
*/
|
|
1260
1380
|
vhtlc_refund_locktime: number;
|
|
1261
1381
|
};
|
|
1262
|
-
/** @description A single call in the coordinator's Call[] array. */
|
|
1382
|
+
/** @description A single call in the coordinator's Call[] array, serialized as JSON. */
|
|
1263
1383
|
CallJson: {
|
|
1264
1384
|
call_data: string;
|
|
1265
1385
|
target: string;
|
|
@@ -1310,6 +1430,22 @@ export interface components {
|
|
|
1310
1430
|
* ```
|
|
1311
1431
|
*/
|
|
1312
1432
|
ClaimGaslessRequest: {
|
|
1433
|
+
/**
|
|
1434
|
+
* @description Optional non-EVM bridge recipient (e.g. a Solana base58 SPL pubkey).
|
|
1435
|
+
* Used as CCTP `mintRecipient` when `bridge_target_chain` is non-EVM;
|
|
1436
|
+
* must match the value passed to `redeem-and-swap-calldata` so the
|
|
1437
|
+
* rebuilt `calls_hash` matches the EIP-712 signature.
|
|
1438
|
+
*
|
|
1439
|
+
* For Solana: this is the recipient's USDC ATA, not their wallet.
|
|
1440
|
+
*/
|
|
1441
|
+
bridge_recipient?: string | null;
|
|
1442
|
+
/**
|
|
1443
|
+
* @description Optional Solana wallet pubkey, supplied alongside `bridge_recipient`
|
|
1444
|
+
* when the recipient's USDC ATA does not yet exist. Triggers the
|
|
1445
|
+
* extended 65-byte forwarding hookData. Must mirror what was passed to
|
|
1446
|
+
* `redeem-and-swap-calldata` so the rebuilt `calls_hash` matches.
|
|
1447
|
+
*/
|
|
1448
|
+
bridge_recipient_wallet?: string | null;
|
|
1313
1449
|
/** @description EVM address where tokens should be sent */
|
|
1314
1450
|
destination: string;
|
|
1315
1451
|
dex_calldata?: null | components["schemas"]["DexCalldata"];
|
|
@@ -1551,6 +1687,15 @@ export interface components {
|
|
|
1551
1687
|
* @description Desired BTC output in sats (mutually exclusive with `amount_in`).
|
|
1552
1688
|
*/
|
|
1553
1689
|
amount_out?: number | null;
|
|
1690
|
+
/**
|
|
1691
|
+
* @description Optional: CCTP bridge source chain (e.g., "Ethereum", "Optimism"). When set,
|
|
1692
|
+
* the user's source USDC originates on this chain and hops through CCTPv2 to
|
|
1693
|
+
* Arbitrum before the HTLC is created. The backend pads `deposit_amount` by
|
|
1694
|
+
* the fast-transfer fee at UserOp-calldata time.
|
|
1695
|
+
*/
|
|
1696
|
+
bridge_source_chain?: string | null;
|
|
1697
|
+
/** @description Optional: USDC address on the bridge source chain. */
|
|
1698
|
+
bridge_source_token_address?: string | null;
|
|
1554
1699
|
/**
|
|
1555
1700
|
* Format: int64
|
|
1556
1701
|
* @description Numeric EVM chain ID: 1 (Ethereum), 137 (Polygon), 42161 (Arbitrum).
|
|
@@ -1576,6 +1721,16 @@ export interface components {
|
|
|
1576
1721
|
/** @description EVM → Arkade (generic) swap response */
|
|
1577
1722
|
EvmToArkadeSwapResponse: {
|
|
1578
1723
|
arkade_server_pk: string;
|
|
1724
|
+
/**
|
|
1725
|
+
* @description CCTP bridge source chain. Set when the source USDC originated on
|
|
1726
|
+
* another CCTP chain and hopped to Arbitrum via CCTPv2 before the
|
|
1727
|
+
* HTLC was created. `source_token` still reports the post-hop
|
|
1728
|
+
* Arbitrum USDC; this field tells the SDK what chain the user is
|
|
1729
|
+
* expected to burn from.
|
|
1730
|
+
*/
|
|
1731
|
+
bridge_source_chain?: string | null;
|
|
1732
|
+
/** @description Native USDC address on the bridge source chain. */
|
|
1733
|
+
bridge_source_token_address?: string | null;
|
|
1579
1734
|
btc_claim_txid?: string | null;
|
|
1580
1735
|
btc_fund_txid?: string | null;
|
|
1581
1736
|
btc_vhtlc_address: string;
|
|
@@ -1634,6 +1789,15 @@ export interface components {
|
|
|
1634
1789
|
* @description Desired BTC output in sats (mutually exclusive with `amount_in`).
|
|
1635
1790
|
*/
|
|
1636
1791
|
amount_out?: number | null;
|
|
1792
|
+
/**
|
|
1793
|
+
* @description Optional: CCTP bridge source chain (e.g., "Ethereum", "Optimism"). When set,
|
|
1794
|
+
* the user's source USDC originates on this chain and hops through CCTPv2 to
|
|
1795
|
+
* Arbitrum before the HTLC is created. The backend pads `deposit_amount` by
|
|
1796
|
+
* the fast-transfer fee at UserOp-calldata time.
|
|
1797
|
+
*/
|
|
1798
|
+
bridge_source_chain?: string | null;
|
|
1799
|
+
/** @description Optional: USDC address on the bridge source chain. */
|
|
1800
|
+
bridge_source_token_address?: string | null;
|
|
1637
1801
|
/** @description User's BTC public key for claiming BTC from the on-chain Taproot HTLC. */
|
|
1638
1802
|
claim_pk: string;
|
|
1639
1803
|
/**
|
|
@@ -1658,6 +1822,16 @@ export interface components {
|
|
|
1658
1822
|
};
|
|
1659
1823
|
/** @description EVM → Bitcoin (on-chain) swap response */
|
|
1660
1824
|
EvmToBitcoinSwapResponse: {
|
|
1825
|
+
/**
|
|
1826
|
+
* @description CCTP bridge source chain. Set when the source USDC originated on
|
|
1827
|
+
* another CCTP chain and hopped to Arbitrum via CCTPv2 before the
|
|
1828
|
+
* HTLC was created. `source_token` still reports the post-hop
|
|
1829
|
+
* Arbitrum USDC; this field tells the SDK what chain the user is
|
|
1830
|
+
* expected to burn from.
|
|
1831
|
+
*/
|
|
1832
|
+
bridge_source_chain?: string | null;
|
|
1833
|
+
/** @description Native USDC address on the bridge source chain. */
|
|
1834
|
+
bridge_source_token_address?: string | null;
|
|
1661
1835
|
btc_claim_txid?: string | null;
|
|
1662
1836
|
btc_fund_txid?: string | null;
|
|
1663
1837
|
/** Format: int64 */
|
|
@@ -1738,6 +1912,15 @@ export interface components {
|
|
|
1738
1912
|
* `lightning_invoice` is provided (amount is read from the invoice).
|
|
1739
1913
|
*/
|
|
1740
1914
|
amount_sats?: number | null;
|
|
1915
|
+
/**
|
|
1916
|
+
* @description Optional: CCTP bridge source chain (e.g., "Ethereum", "Optimism"). When set,
|
|
1917
|
+
* the user's source USDC originates on this chain and hops through CCTPv2 to
|
|
1918
|
+
* Arbitrum before the HTLC is created. The backend pads `deposit_amount` by
|
|
1919
|
+
* the fast-transfer fee at UserOp-calldata time.
|
|
1920
|
+
*/
|
|
1921
|
+
bridge_source_chain?: string | null;
|
|
1922
|
+
/** @description Optional: USDC address on the bridge source chain. */
|
|
1923
|
+
bridge_source_token_address?: string | null;
|
|
1741
1924
|
/**
|
|
1742
1925
|
* Format: int64
|
|
1743
1926
|
* @description Numeric EVM chain ID: 1 (Ethereum), 137 (Polygon), 42161 (Arbitrum).
|
|
@@ -1773,6 +1956,16 @@ export interface components {
|
|
|
1773
1956
|
/** @description EVM → Lightning swap response */
|
|
1774
1957
|
EvmToLightningSwapResponse: {
|
|
1775
1958
|
arkade_server_pk: string;
|
|
1959
|
+
/**
|
|
1960
|
+
* @description CCTP bridge source chain. Set when the source USDC originated on
|
|
1961
|
+
* another CCTP chain and hopped to Arbitrum via CCTPv2 before the
|
|
1962
|
+
* HTLC was created. `source_token` still reports the post-hop
|
|
1963
|
+
* Arbitrum USDC; this field tells the SDK what chain the user is
|
|
1964
|
+
* expected to burn from.
|
|
1965
|
+
*/
|
|
1966
|
+
bridge_source_chain?: string | null;
|
|
1967
|
+
/** @description Native USDC address on the bridge source chain. */
|
|
1968
|
+
bridge_source_token_address?: string | null;
|
|
1776
1969
|
chain: string;
|
|
1777
1970
|
client_evm_address: string;
|
|
1778
1971
|
/** @description User's Lightning invoice to receive payment */
|
|
@@ -1983,6 +2176,11 @@ export interface components {
|
|
|
1983
2176
|
* USDC).
|
|
1984
2177
|
*/
|
|
1985
2178
|
amount_out?: number | null;
|
|
2179
|
+
/**
|
|
2180
|
+
* @description ATA-existence flag for non-EVM CCTP destinations (Solana).
|
|
2181
|
+
* See `BitcoinToEvmSwapRequest::bridge_recipient_setup`.
|
|
2182
|
+
*/
|
|
2183
|
+
bridge_recipient_setup?: boolean;
|
|
1986
2184
|
/**
|
|
1987
2185
|
* @description Optional: CCTP bridge destination chain (e.g., "Ethereum", "Arbitrum"). When set,
|
|
1988
2186
|
* USDC will be bridged to this chain after the DEX swap.
|
|
@@ -2198,6 +2396,36 @@ export interface components {
|
|
|
2198
2396
|
* @enum {string}
|
|
2199
2397
|
*/
|
|
2200
2398
|
RefundMode: "direct" | "swap-back";
|
|
2399
|
+
/**
|
|
2400
|
+
* @description Per-service health datapoint.
|
|
2401
|
+
*
|
|
2402
|
+
* Failures intentionally do not include the underlying error: transport
|
|
2403
|
+
* errors from RPC clients can echo back full URLs (with embedded API keys)
|
|
2404
|
+
* and other internal topology. Detailed errors are logged server-side; the
|
|
2405
|
+
* public response only carries a sanitized `"unavailable"` marker.
|
|
2406
|
+
*/
|
|
2407
|
+
ServiceStatus: {
|
|
2408
|
+
/**
|
|
2409
|
+
* Format: int64
|
|
2410
|
+
* @description Tip / block height for chain-backed services (Bitcoin and EVMs).
|
|
2411
|
+
*/
|
|
2412
|
+
block_height?: number | null;
|
|
2413
|
+
/**
|
|
2414
|
+
* Format: int64
|
|
2415
|
+
* @description Tip block timestamp (Unix seconds) for chain-backed services.
|
|
2416
|
+
*/
|
|
2417
|
+
block_time?: number | null;
|
|
2418
|
+
error?: string | null;
|
|
2419
|
+
healthy: boolean;
|
|
2420
|
+
};
|
|
2421
|
+
ServicesStatus: {
|
|
2422
|
+
arbitrum: components["schemas"]["ServiceStatus"];
|
|
2423
|
+
arkade: components["schemas"]["ServiceStatus"];
|
|
2424
|
+
bitcoin: components["schemas"]["ServiceStatus"];
|
|
2425
|
+
ethereum: components["schemas"]["ServiceStatus"];
|
|
2426
|
+
lightning: components["schemas"]["ServiceStatus"];
|
|
2427
|
+
polygon: components["schemas"]["ServiceStatus"];
|
|
2428
|
+
};
|
|
2201
2429
|
SettleDelegateRequest: {
|
|
2202
2430
|
/** @description Hex-encoded compressed cosigner public key (must match our static key). */
|
|
2203
2431
|
cosigner_pk: string;
|
|
@@ -2219,6 +2447,12 @@ export interface components {
|
|
|
2219
2447
|
/** @description Commitment transaction ID from the batch settlement. */
|
|
2220
2448
|
commitment_txid: string;
|
|
2221
2449
|
};
|
|
2450
|
+
/** @description Aggregated health of every external dependency. */
|
|
2451
|
+
StatusResponse: {
|
|
2452
|
+
/** @description True if every probed service is healthy. */
|
|
2453
|
+
healthy: boolean;
|
|
2454
|
+
services: components["schemas"]["ServicesStatus"];
|
|
2455
|
+
};
|
|
2222
2456
|
SupportAgentInfo: {
|
|
2223
2457
|
npub: string;
|
|
2224
2458
|
};
|
|
@@ -2293,7 +2527,7 @@ export interface components {
|
|
|
2293
2527
|
* - `ClientRefundedServerFunded` is an error state that should never occur
|
|
2294
2528
|
* @enum {string}
|
|
2295
2529
|
*/
|
|
2296
|
-
SwapStatus: "pending" | "clientfundingseen" | "clientfunded" | "clientrefunded" | "serverfunded" | "clientredeeming" | "clientredeemed" | "serverredeemed" | "clientfundedserverrefunded" | "clientrefundedserverfunded" | "clientrefundedserverrefunded" | "expired" | "clientinvalidfunded" | "clientfundedtoolate" | "clientredeemedandclientrefunded";
|
|
2530
|
+
SwapStatus: "pending" | "clientfundingseen" | "clientfunded" | "clientrefunded" | "serverfunded" | "clientredeeming" | "clientredeemed" | "serverredeemed" | "clientfundedserverrefunded" | "clientrefundedserverfunded" | "clientrefundedserverrefunded" | "expired" | "clientinvalidfunded" | "clientfundedtoolate" | "serverwontfund" | "clientredeemedandclientrefunded";
|
|
2297
2531
|
/** @description Token identifier. Known values: btc, 0x123456 */
|
|
2298
2532
|
TokenId: "btc" | string;
|
|
2299
2533
|
TokenInfo: {
|
|
@@ -2308,6 +2542,27 @@ export interface components {
|
|
|
2308
2542
|
btc_tokens: components["schemas"]["TokenInfo"][];
|
|
2309
2543
|
evm_tokens: components["schemas"]["TokenInfo"][];
|
|
2310
2544
|
};
|
|
2545
|
+
/**
|
|
2546
|
+
* @description Response: same HTLC + DEX payload the Permit2 endpoint returns, plus
|
|
2547
|
+
* an `aa` object with the addresses a 4337 client needs.
|
|
2548
|
+
*/
|
|
2549
|
+
UseropFundingCalldataResponse: {
|
|
2550
|
+
/** @description 4337 / Kernel addresses. */
|
|
2551
|
+
aa: components["schemas"]["AaConfig"];
|
|
2552
|
+
calls: components["schemas"]["CallJson"][];
|
|
2553
|
+
calls_hash: string;
|
|
2554
|
+
claim_address: string;
|
|
2555
|
+
coordinator_address: string;
|
|
2556
|
+
lock_token_address: string;
|
|
2557
|
+
permit2_address: string;
|
|
2558
|
+
preimage_hash: string;
|
|
2559
|
+
relay_fee?: string | null;
|
|
2560
|
+
/** Format: int64 */
|
|
2561
|
+
source_amount: number;
|
|
2562
|
+
source_token_address: string;
|
|
2563
|
+
/** Format: int64 */
|
|
2564
|
+
timelock: number;
|
|
2565
|
+
};
|
|
2311
2566
|
Version: {
|
|
2312
2567
|
commit_hash: string;
|
|
2313
2568
|
tag: string;
|
|
@@ -2591,6 +2846,69 @@ export interface operations {
|
|
|
2591
2846
|
};
|
|
2592
2847
|
};
|
|
2593
2848
|
};
|
|
2849
|
+
collab_refund_arkade_to_lightning: {
|
|
2850
|
+
parameters: {
|
|
2851
|
+
query?: never;
|
|
2852
|
+
header?: never;
|
|
2853
|
+
path: {
|
|
2854
|
+
/** @description Swap ID */
|
|
2855
|
+
id: string;
|
|
2856
|
+
};
|
|
2857
|
+
cookie?: never;
|
|
2858
|
+
};
|
|
2859
|
+
requestBody: {
|
|
2860
|
+
content: {
|
|
2861
|
+
"application/json": components["schemas"]["ArkadeToLightningCollabRefundRequest"];
|
|
2862
|
+
};
|
|
2863
|
+
};
|
|
2864
|
+
responses: {
|
|
2865
|
+
/** @description Cosigned PSBTs */
|
|
2866
|
+
200: {
|
|
2867
|
+
headers: {
|
|
2868
|
+
[name: string]: unknown;
|
|
2869
|
+
};
|
|
2870
|
+
content: {
|
|
2871
|
+
"application/json": components["schemas"]["ArkadeToLightningCollabRefundResponse"];
|
|
2872
|
+
};
|
|
2873
|
+
};
|
|
2874
|
+
/** @description Bad request */
|
|
2875
|
+
400: {
|
|
2876
|
+
headers: {
|
|
2877
|
+
[name: string]: unknown;
|
|
2878
|
+
};
|
|
2879
|
+
content: {
|
|
2880
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2881
|
+
};
|
|
2882
|
+
};
|
|
2883
|
+
/** @description Refund not allowed in current swap state */
|
|
2884
|
+
403: {
|
|
2885
|
+
headers: {
|
|
2886
|
+
[name: string]: unknown;
|
|
2887
|
+
};
|
|
2888
|
+
content: {
|
|
2889
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2890
|
+
};
|
|
2891
|
+
};
|
|
2892
|
+
/** @description Swap not found */
|
|
2893
|
+
404: {
|
|
2894
|
+
headers: {
|
|
2895
|
+
[name: string]: unknown;
|
|
2896
|
+
};
|
|
2897
|
+
content: {
|
|
2898
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2899
|
+
};
|
|
2900
|
+
};
|
|
2901
|
+
/** @description Internal error */
|
|
2902
|
+
500: {
|
|
2903
|
+
headers: {
|
|
2904
|
+
[name: string]: unknown;
|
|
2905
|
+
};
|
|
2906
|
+
content: {
|
|
2907
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2908
|
+
};
|
|
2909
|
+
};
|
|
2910
|
+
};
|
|
2911
|
+
};
|
|
2594
2912
|
collab_refund_evm: {
|
|
2595
2913
|
parameters: {
|
|
2596
2914
|
query?: never;
|
|
@@ -2945,6 +3263,24 @@ export interface operations {
|
|
|
2945
3263
|
* When set, the CCTP forwarding fee is deducted from the target amount.
|
|
2946
3264
|
*/
|
|
2947
3265
|
bridge_target_chain?: string | null;
|
|
3266
|
+
/**
|
|
3267
|
+
* @description Optional: CCTP bridge source chain (e.g., "Optimism", "Base"). Set when
|
|
3268
|
+
* the user's source USDC originates on another CCTP chain and hops to
|
|
3269
|
+
* Arbitrum via CCTPv2 before the HTLC is created. The quote internally
|
|
3270
|
+
* runs the DEX calculation on Arbitrum-native USDC and accounts for the
|
|
3271
|
+
* fast-transfer fee deducted on the burn.
|
|
3272
|
+
*/
|
|
3273
|
+
bridge_source_chain?: string | null;
|
|
3274
|
+
/**
|
|
3275
|
+
* @description `true` when the recipient's USDC token account on the destination
|
|
3276
|
+
* chain does NOT yet exist and Circle's forwarder needs to create it
|
|
3277
|
+
* (only meaningful for non-EVM destinations like Solana — adds
|
|
3278
|
+
* ~$0.05 of ATA rent to `forwardFee`). `false` (default) confirms
|
|
3279
|
+
* the recipient already holds USDC, and is correct for all EVM
|
|
3280
|
+
* destinations. Solana callers are responsible for probing the
|
|
3281
|
+
* destination chain and setting this correctly.
|
|
3282
|
+
*/
|
|
3283
|
+
bridge_recipient_setup?: boolean;
|
|
2948
3284
|
/** @description Optional referral code for tracking. */
|
|
2949
3285
|
ref?: string | null;
|
|
2950
3286
|
};
|
|
@@ -2974,6 +3310,35 @@ export interface operations {
|
|
|
2974
3310
|
};
|
|
2975
3311
|
};
|
|
2976
3312
|
};
|
|
3313
|
+
get_status: {
|
|
3314
|
+
parameters: {
|
|
3315
|
+
query?: never;
|
|
3316
|
+
header?: never;
|
|
3317
|
+
path?: never;
|
|
3318
|
+
cookie?: never;
|
|
3319
|
+
};
|
|
3320
|
+
requestBody?: never;
|
|
3321
|
+
responses: {
|
|
3322
|
+
/** @description All external dependencies are healthy */
|
|
3323
|
+
200: {
|
|
3324
|
+
headers: {
|
|
3325
|
+
[name: string]: unknown;
|
|
3326
|
+
};
|
|
3327
|
+
content: {
|
|
3328
|
+
"application/json": components["schemas"]["StatusResponse"];
|
|
3329
|
+
};
|
|
3330
|
+
};
|
|
3331
|
+
/** @description At least one external dependency is unhealthy */
|
|
3332
|
+
503: {
|
|
3333
|
+
headers: {
|
|
3334
|
+
[name: string]: unknown;
|
|
3335
|
+
};
|
|
3336
|
+
content: {
|
|
3337
|
+
"application/json": components["schemas"]["StatusResponse"];
|
|
3338
|
+
};
|
|
3339
|
+
};
|
|
3340
|
+
};
|
|
3341
|
+
};
|
|
2977
3342
|
get_support_agents: {
|
|
2978
3343
|
parameters: {
|
|
2979
3344
|
query?: never;
|
|
@@ -3777,6 +4142,47 @@ export interface operations {
|
|
|
3777
4142
|
};
|
|
3778
4143
|
};
|
|
3779
4144
|
};
|
|
4145
|
+
get_coordinator_funding_calldata_userop: {
|
|
4146
|
+
parameters: {
|
|
4147
|
+
query?: never;
|
|
4148
|
+
header?: never;
|
|
4149
|
+
path: {
|
|
4150
|
+
/** @description Swap ID */
|
|
4151
|
+
id: string;
|
|
4152
|
+
};
|
|
4153
|
+
cookie?: never;
|
|
4154
|
+
};
|
|
4155
|
+
requestBody?: never;
|
|
4156
|
+
responses: {
|
|
4157
|
+
/** @description UserOp funding data */
|
|
4158
|
+
200: {
|
|
4159
|
+
headers: {
|
|
4160
|
+
[name: string]: unknown;
|
|
4161
|
+
};
|
|
4162
|
+
content: {
|
|
4163
|
+
"application/json": components["schemas"]["UseropFundingCalldataResponse"];
|
|
4164
|
+
};
|
|
4165
|
+
};
|
|
4166
|
+
/** @description Bad request */
|
|
4167
|
+
400: {
|
|
4168
|
+
headers: {
|
|
4169
|
+
[name: string]: unknown;
|
|
4170
|
+
};
|
|
4171
|
+
content: {
|
|
4172
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
4173
|
+
};
|
|
4174
|
+
};
|
|
4175
|
+
/** @description Internal server error */
|
|
4176
|
+
500: {
|
|
4177
|
+
headers: {
|
|
4178
|
+
[name: string]: unknown;
|
|
4179
|
+
};
|
|
4180
|
+
content: {
|
|
4181
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
4182
|
+
};
|
|
4183
|
+
};
|
|
4184
|
+
};
|
|
4185
|
+
};
|
|
3780
4186
|
get_tokens: {
|
|
3781
4187
|
parameters: {
|
|
3782
4188
|
query?: {
|