@lendasat/lendaswap-sdk 0.1.8 → 0.1.67

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.
Files changed (36) hide show
  1. package/README.md +200 -126
  2. package/dist/api.d.ts +206 -192
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +292 -132
  5. package/dist/api.js.map +1 -1
  6. package/dist/index.d.ts +23 -19
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +22 -21
  9. package/dist/index.js.map +1 -1
  10. package/dist/price-calculations.d.ts +135 -0
  11. package/dist/price-calculations.d.ts.map +1 -0
  12. package/dist/price-calculations.js +171 -0
  13. package/dist/price-calculations.js.map +1 -0
  14. package/dist/price-feed.d.ts +3 -0
  15. package/dist/price-feed.d.ts.map +1 -1
  16. package/dist/price-feed.js.map +1 -1
  17. package/dist/usd-price.d.ts.map +1 -1
  18. package/dist/usd-price.js +1 -0
  19. package/dist/usd-price.js.map +1 -1
  20. package/package.json +14 -15
  21. package/wasm/lendaswap_wasm_sdk.d.ts +442 -114
  22. package/wasm/lendaswap_wasm_sdk_bg.js +2946 -630
  23. package/wasm/lendaswap_wasm_sdk_bg.wasm +0 -0
  24. package/wasm/lendaswap_wasm_sdk_bg.wasm.d.ts +268 -64
  25. package/dist/storage/dexieSwapStorage.d.ts +0 -111
  26. package/dist/storage/dexieSwapStorage.d.ts.map +0 -1
  27. package/dist/storage/dexieSwapStorage.js +0 -139
  28. package/dist/storage/dexieSwapStorage.js.map +0 -1
  29. package/dist/storage/dexieWalletStorage.d.ts +0 -99
  30. package/dist/storage/dexieWalletStorage.d.ts.map +0 -1
  31. package/dist/storage/dexieWalletStorage.js +0 -139
  32. package/dist/storage/dexieWalletStorage.js.map +0 -1
  33. package/dist/storage/index.d.ts +0 -18
  34. package/dist/storage/index.d.ts.map +0 -1
  35. package/dist/storage/index.js +0 -20
  36. package/dist/storage/index.js.map +0 -1
package/dist/api.d.ts CHANGED
@@ -4,123 +4,35 @@
4
4
  * This module provides a high-level TypeScript API that wraps the WASM-based
5
5
  * API client for easier use in TypeScript/JavaScript applications.
6
6
  */
7
- import { type CreateVtxoSwapResult, type EstimateVtxoSwapResponse, type SwapParams, type VtxoSwapResponse } from "../wasm/lendaswap_wasm_sdk.js";
8
- import type { VhtlcAmounts } from "./types.js";
9
- export { CreateVtxoSwapResult, EstimateVtxoSwapResponse, QuoteResponse, SwapParams as VtxoSwapParams, TokenId, Version, VhtlcAmounts, VtxoSwapResponse, } from "../wasm/lendaswap_wasm_sdk.js";
7
+ import { type AssetPair, type BtcToArkadeSwapResponse, type BtcToEvmSwapResponse, Client as WasmClient, type CreateVtxoSwapResult, type EstimateVtxoSwapResponse, type EvmToBtcSwapResponse, type ExtendedVtxoSwapStorageData, type IdbStorageHandle, type QuoteResponse, type SwapParams, type TokenInfo, type Version, type VhtlcAmounts, type VtxoSwapResponse } from "../wasm/lendaswap_wasm_sdk.js";
8
+ export { AssetPair, BtcToEvmSwapResponse, BtcToArkadeSwapResponse, Chain, CreateVtxoSwapResult, EstimateVtxoSwapResponse, EvmToBtcSwapResponse, ExtendedSwapStorageData as ExtendedSwapStorageDataWasm, ExtendedVtxoSwapStorageData, IdbStorageHandle, Network, openIdbDatabase, QuoteResponse, SwapParams as VtxoSwapParams, SwapStatus, SwapType, swapStatusToString, TokenId, TokenInfo, Version, VhtlcAmounts, VtxoSwapResponse, } from "../wasm/lendaswap_wasm_sdk.js";
10
9
  /**
11
10
  * Known token identifiers.
12
11
  * Add new tokens here as they become supported.
13
12
  * Uses (string & {}) to allow unknown tokens while preserving autocomplete.
14
13
  */
15
- export type TokenIdString = "btc_lightning" | "btc_arkade" | "usdc_pol" | "usdt0_pol" | "usdc_eth" | "usdt_eth" | "xaut_eth" | (string & {});
16
- /**
17
- * Blockchain network.
18
- * Uses (string & {}) to allow unknown chains while preserving autocomplete.
19
- */
20
- export type Chain = "Arkade" | "Lightning" | "Polygon" | "Ethereum" | (string & {});
21
- /**
22
- * Token information with typed token ID.
23
- */
24
- export interface TokenInfo {
25
- tokenId: TokenIdString;
26
- symbol: string;
27
- chain: Chain;
28
- name: string;
29
- decimals: number;
30
- }
31
- /**
32
- * Asset pair with typed token info.
33
- */
34
- export interface AssetPair {
35
- source: TokenInfo;
36
- target: TokenInfo;
37
- }
38
- /**
39
- * Swap status enumeration.
40
- * These match the server-side status values.
41
- */
42
- export type SwapStatus = "pending" | "clientfunded" | "clientrefunded" | "serverfunded" | "clientredeeming" | "clientredeemed" | "serverredeemed" | "clientfundedserverrefunded" | "clientrefundedserverfunded" | "clientrefundedserverrefunded" | "expired" | "clientinvalidfunded" | "clientfundedtoolate";
43
- /**
44
- * Common fields shared across all swap directions.
45
- * These fields are flattened into the response by serde.
46
- */
47
- export interface SwapCommonFields {
48
- id: string;
49
- status: SwapStatus;
50
- hash_lock: string;
51
- fee_sats: number;
52
- asset_amount: number;
53
- sender_pk: string;
54
- receiver_pk: string;
55
- server_pk: string;
56
- refund_locktime: number;
57
- unilateral_claim_delay: number;
58
- unilateral_refund_delay: number;
59
- unilateral_refund_without_receiver_delay: number;
60
- network: string;
61
- created_at: string;
62
- }
63
- /**
64
- * BTC to EVM swap response.
65
- * Note: direction field is added by the SDK, not returned by the server.
66
- */
67
- export interface BtcToEvmSwapResponse extends SwapCommonFields {
68
- direction: "btc_to_evm";
69
- htlc_address_evm: string;
70
- htlc_address_arkade: string;
71
- user_address_evm: string;
72
- ln_invoice: string;
73
- sats_receive: number;
74
- source_token: TokenIdString;
75
- target_token: TokenIdString;
76
- bitcoin_htlc_claim_txid: string | null;
77
- bitcoin_htlc_fund_txid: string | null;
78
- evm_htlc_claim_txid: string | null;
79
- evm_htlc_fund_txid: string | null;
80
- }
81
- /**
82
- * EVM to BTC swap response.
83
- * Note: direction field is added by the SDK, not returned by the server.
84
- */
85
- export interface EvmToBtcSwapResponse extends SwapCommonFields {
86
- direction: "evm_to_btc";
87
- htlc_address_evm: string;
88
- htlc_address_arkade: string;
89
- user_address_evm: string;
90
- user_address_arkade: string | null;
91
- ln_invoice: string;
92
- source_token: TokenIdString;
93
- target_token: TokenIdString;
94
- sats_receive: number;
95
- bitcoin_htlc_fund_txid: string | null;
96
- bitcoin_htlc_claim_txid: string | null;
97
- evm_htlc_claim_txid: string | null;
98
- evm_htlc_fund_txid: string | null;
99
- create_swap_tx: string | null;
100
- approve_tx: string | null;
101
- gelato_forwarder_address: string | null;
102
- gelato_user_nonce: string | null;
103
- gelato_user_deadline: string | null;
104
- source_token_address: string;
105
- }
14
+ export type TokenIdString = "btc_lightning" | "btc_arkade" | "btc_onchain" | "usdc_pol" | "usdt0_pol" | "usdc_eth" | "usdt_eth" | "xaut_eth" | (string & {});
106
15
  /**
107
16
  * Union type for swap responses based on direction.
17
+ * Uses WASM types directly - BtcToEvmSwapResponse and EvmToBtcSwapResponse are
18
+ * exported from the WASM module.
108
19
  */
109
- export type GetSwapResponse = BtcToEvmSwapResponse | EvmToBtcSwapResponse;
20
+ export type GetSwapResponse = BtcToEvmSwapResponse | EvmToBtcSwapResponse | BtcToArkadeSwapResponse;
110
21
  /**
111
- * Extended swap storage data that includes the swap response and optional secret.
112
- * Used for persisting swap data locally with the preimage secret.
22
+ * Extended swap storage data combining the API response with client-side swap parameters.
23
+ * Used for storage providers and as a common interface for swap data.
113
24
  */
114
25
  export interface ExtendedSwapStorageData {
115
- response: GetSwapResponse;
26
+ response: BtcToEvmSwapResponse | EvmToBtcSwapResponse | BtcToArkadeSwapResponse;
116
27
  swap_params: SwapParams;
117
28
  }
118
29
  /**
119
30
  * Request to create an Arkade to EVM swap (BTC → Token).
120
31
  */
121
32
  export interface SwapRequest {
33
+ source_amount?: bigint;
122
34
  target_address: string;
123
- target_amount: number;
35
+ target_amount?: number;
124
36
  target_token: TokenIdString;
125
37
  referral_code?: string;
126
38
  }
@@ -143,6 +55,17 @@ export interface EvmToLightningSwapRequest {
143
55
  user_address: string;
144
56
  referral_code?: string;
145
57
  }
58
+ /**
59
+ * Request to create an on-chain Bitcoin to Arkade swap.
60
+ */
61
+ export interface BtcToArkadeSwapRequest {
62
+ /** User's target Arkade address to receive VTXOs */
63
+ target_arkade_address: string;
64
+ /** Amount user wants to receive on Arkade in satoshis */
65
+ sats_receive: number;
66
+ /** Optional referral code */
67
+ referral_code?: string;
68
+ }
146
69
  /**
147
70
  * Gelato relay submit request.
148
71
  */
@@ -180,111 +103,158 @@ export interface QuoteRequest {
180
103
  base_amount: number;
181
104
  }
182
105
  /**
183
- * Version information (snake_case for consistency with other API types).
184
- */
185
- export interface VersionInfo {
186
- tag: string;
187
- commit_hash: string;
188
- }
189
- /**
190
- * Quote response (snake_case for consistency with other API types).
191
- */
192
- export interface QuoteResponseInfo {
193
- exchange_rate: string;
194
- network_fee: number;
195
- protocol_fee: number;
196
- protocol_fee_rate: number;
197
- min_amount: number;
198
- max_amount: number;
199
- }
200
- /**
201
- * VTXO swap status values.
202
- * Note: WASM returns status as lowercase string (e.g., "pending", "clientfunded")
203
- */
204
- export type VtxoSwapStatus = "pending" | "clientfunded" | "serverfunded" | "clientredeemed" | "serverredeemed" | "clientrefunded" | "clientfundedserverrefunded" | "expired";
205
- /**
206
- * Typed storage provider interface for wallet data (mnemonic, key index).
207
- * Provides typed async methods for wallet credential storage.
106
+ * Network input type for Bitcoin networks (string union for API convenience).
208
107
  */
209
- export interface WalletStorageProvider {
210
- /** Get the mnemonic phrase. Returns null if not stored. */
211
- getMnemonic: () => Promise<string | null>;
212
- /** Store the mnemonic phrase. Overwrites any existing mnemonic. */
213
- setMnemonic: (mnemonic: string) => Promise<void>;
214
- /** Get the current key derivation index. Returns 0 if not set. */
215
- getKeyIndex: () => Promise<number>;
216
- /** Set the key derivation index. */
217
- setKeyIndex: (index: number) => Promise<void>;
218
- }
108
+ export type NetworkInput = "bitcoin" | "testnet" | "regtest" | "mutinynet";
219
109
  /**
220
- * Typed storage provider interface for swap data.
221
- * Uses ExtendedSwapStorageData objects directly, allowing implementations
222
- * to store them efficiently (e.g., as objects in IndexedDB via Dexie).
110
+ * Builder for constructing a Client with a fluent API.
111
+ *
112
+ * Uses IndexedDB storage via `.withIdbStorage()` for browser applications.
113
+ * For Node.js server-side applications, use `@lendasat/lendaswap-sdk-native` instead.
114
+ *
115
+ * @example
116
+ * ```typescript
117
+ * import { Client } from '@lendasat/lendaswap-sdk';
118
+ *
119
+ * const client = await Client.builder()
120
+ * .url('https://api.lendaswap.com')
121
+ * .withIdbStorage()
122
+ * .network('bitcoin')
123
+ * .arkadeUrl('https://arkade.computer')
124
+ * .esploraUrl('https://mempool.space/api')
125
+ * .build();
126
+ * ```
223
127
  */
224
- export interface SwapStorageProvider {
225
- /** Get swap data by swap ID. Returns null if not found. */
226
- get: (swapId: string) => Promise<ExtendedSwapStorageData | null>;
227
- /** Store swap data. Overwrites any existing swap with the same ID. */
228
- store: (swapId: string, data: ExtendedSwapStorageData) => Promise<void>;
229
- /** Delete swap data by swap ID. */
230
- delete: (swapId: string) => Promise<void>;
231
- /** List all stored swap IDs. */
232
- list: () => Promise<string[]>;
233
- /** List all stored swaps. */
234
- getAll: () => Promise<ExtendedSwapStorageData[]>;
128
+ export declare class ClientBuilder {
129
+ private _url?;
130
+ private _storage?;
131
+ private _network?;
132
+ private _arkadeUrl?;
133
+ private _esploraUrl?;
134
+ constructor();
135
+ /**
136
+ * Set the Lendaswap API URL.
137
+ */
138
+ url(url: string): this;
139
+ /**
140
+ * Use IndexedDB storage.
141
+ *
142
+ * This will automatically open the IndexedDB database when `build()` is called.
143
+ *
144
+ * @example
145
+ * ```typescript
146
+ * const client = await Client.builder()
147
+ * .url('https://api.lendaswap.com')
148
+ * .withIdbStorage()
149
+ * .network('bitcoin')
150
+ * .arkadeUrl('...')
151
+ * .esploraUrl('...')
152
+ * .build();
153
+ * ```
154
+ */
155
+ withIdbStorage(): this;
156
+ /**
157
+ * Set the storage handle directly (for advanced use cases).
158
+ * @deprecated Use `.withIdbStorage()` instead.
159
+ */
160
+ storage(storage: IdbStorageHandle): this;
161
+ /**
162
+ * Set the Bitcoin network.
163
+ */
164
+ network(network: NetworkInput): this;
165
+ /**
166
+ * Set the Arkade server URL.
167
+ */
168
+ arkadeUrl(url: string): this;
169
+ /**
170
+ * Set the Esplora API URL for on-chain Bitcoin operations.
171
+ */
172
+ esploraUrl(url: string): this;
173
+ /**
174
+ * Build the client asynchronously.
175
+ *
176
+ * @returns A Promise that resolves to a new Client instance
177
+ * @throws Error if any required field is missing or storage initialization fails
178
+ */
179
+ build(): Promise<Client>;
235
180
  }
236
181
  /**
237
- * Network type for Bitcoin networks.
182
+ * Lendaswap client using IndexedDB storage.
183
+ *
184
+ * This client uses native Rust IndexedDB storage via the `idb` crate,
185
+ * eliminating the need for JavaScript storage callbacks.
186
+ *
187
+ * @example
188
+ * ```typescript
189
+ * import { openIdbDatabase, Client } from '@lendasat/lendaswap-sdk';
190
+ *
191
+ * // Open the IndexedDB database
192
+ * const storage = await openIdbDatabase();
193
+ *
194
+ * // Create the client
195
+ * const client = await Client.create(
196
+ * 'https://api.lendaswap.com',
197
+ * storage,
198
+ * 'bitcoin',
199
+ * 'https://arkade.computer',
200
+ * 'https://mempool.space/api'
201
+ * );
202
+ *
203
+ * // Initialize wallet (generates mnemonic if needed)
204
+ * await client.init();
205
+ *
206
+ * // Get all swaps
207
+ * const swaps = await client.listAllSwaps();
208
+ * ```
238
209
  */
239
- export type Network = "bitcoin" | "testnet" | "regtest" | "mutinynet";
240
210
  export declare class Client {
241
- private client;
211
+ private wasmClient;
242
212
  private constructor();
243
213
  /**
244
- * Create a new Client instance.
214
+ * Create a new ClientBuilder for constructing a client.
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * const client = Client.builder()
219
+ * .url('https://api.lendaswap.com')
220
+ * .withIdbStorage()
221
+ * .network('bitcoin')
222
+ * .arkadeUrl('https://arkade.computer')
223
+ * .esploraUrl('https://mempool.space/api')
224
+ * .build();
225
+ * ```
226
+ */
227
+ static builder(): ClientBuilder;
228
+ /**
229
+ * Create a Client from a WASM client instance.
230
+ * Used internally by ClientBuilder.
231
+ */
232
+ static fromWasmClient(wasmClient: WasmClient): Client;
233
+ /**
234
+ * Create a new Client instance with IndexedDB storage.
245
235
  *
246
236
  * @param baseUrl - The base URL of the Lendaswap API
247
- * @param walletStorage - Storage provider for persisting wallet data (mnemonic, key index)
248
- * @param swapStorage - Storage provider for persisting swap data (uses Dexie/IndexedDB)
237
+ * @param storage - Storage handle from `openIdbDatabase()`
249
238
  * @param network - Bitcoin network ("bitcoin", "testnet", "regtest", "mutinynet")
250
239
  * @param arkadeUrl - Arkade's server url
251
- * @param wasmPath - Optional path to the WASM file (for Node.js environments)
240
+ * @param esploraUrl - Esplora API URL for on-chain Bitcoin operations (e.g., "https://mempool.space/api")
252
241
  * @returns A new Client instance
253
242
  *
254
243
  * @example
255
244
  * ```typescript
256
- * import Dexie from 'dexie';
257
- *
258
- * // Wallet storage using localStorage with typed methods
259
- * const walletStorage: WalletStorageProvider = {
260
- * getMnemonic: async () => localStorage.getItem('mnemonic'),
261
- * setMnemonic: async (mnemonic) => localStorage.setItem('mnemonic', mnemonic),
262
- * getKeyIndex: async () => parseInt(localStorage.getItem('key_index') ?? '0'),
263
- * setKeyIndex: async (index) => localStorage.setItem('key_index', index.toString()),
264
- * };
265
- *
266
- * // Swap storage using Dexie (IndexedDB)
267
- * const db = new Dexie('lendaswap');
268
- * db.version(1).stores({ swaps: 'id' });
269
- *
270
- * const swapStorage: SwapStorageProvider = {
271
- * get: async (swapId) => await db.table('swaps').get(swapId) ?? null,
272
- * store: async (swapId, data) => await db.table('swaps').put({ id: swapId, ...data }),
273
- * delete: async (swapId) => await db.table('swaps').delete(swapId),
274
- * list: async () => await db.table('swaps').toCollection().primaryKeys() as string[],
275
- * getAll: async () => await db.table('swaps').toArray(),
276
- * };
245
+ * import { openIdbDatabase, Client } from '@lendasat/lendaswap-sdk';
277
246
  *
247
+ * const storage = await openIdbDatabase();
278
248
  * const client = await Client.create(
279
249
  * 'https://apilendaswap.lendasat.com',
280
- * walletStorage,
281
- * swapStorage,
250
+ * storage,
282
251
  * 'bitcoin',
283
- * 'https://arkade.computer'
252
+ * 'https://arkade.computer',
253
+ * 'https://mempool.space/api'
284
254
  * );
285
255
  * ```
286
256
  */
287
- static create(baseUrl: string, walletStorage: WalletStorageProvider, swapStorage: SwapStorageProvider, network: Network, arkadeUrl: string): Promise<Client>;
257
+ static create(baseUrl: string, storage: IdbStorageHandle, network: NetworkInput, arkadeUrl: string, esploraUrl: string): Promise<Client>;
288
258
  init(mnemonic?: string): Promise<void>;
289
259
  /**
290
260
  * Create an Arkade to EVM swap (BTC → Token).
@@ -294,6 +264,14 @@ export declare class Client {
294
264
  * @returns The created swap response
295
265
  */
296
266
  createArkadeToEvmSwap(request: SwapRequest, targetNetwork: "ethereum" | "polygon"): Promise<BtcToEvmSwapResponse>;
267
+ /**
268
+ * Create a Lightning to EVM swap (BTC → Token).
269
+ *
270
+ * @param request - The swap request parameters
271
+ * @param targetNetwork - Target EVM network (e.g., 'polygon', 'ethereum')
272
+ * @returns The created swap response
273
+ */
274
+ createLightningToEvmSwap(request: SwapRequest, targetNetwork: "ethereum" | "polygon"): Promise<BtcToEvmSwapResponse>;
297
275
  /**
298
276
  * Create an EVM to Arkade swap (Token → BTC).
299
277
  *
@@ -320,18 +298,18 @@ export declare class Client {
320
298
  * @param baseAmount - Amount in base units (satoshis for BTC, wei for EVM)
321
299
  * @returns Quote response with exchange rate and fees
322
300
  */
323
- getQuote(from: TokenIdString, to: TokenIdString, baseAmount: bigint): Promise<QuoteResponseInfo>;
301
+ getQuote(from: TokenIdString, to: TokenIdString, baseAmount: bigint): Promise<QuoteResponse>;
324
302
  /**
325
303
  * Get a swap by its ID.
326
304
  *
327
305
  * @param id - The swap ID
328
- * @returns The swap response
306
+ * @returns The swap data, or undefined if the swap type is unknown
329
307
  */
330
- getSwap(id: string): Promise<ExtendedSwapStorageData>;
308
+ getSwap(id: string): Promise<ExtendedSwapStorageData | undefined>;
331
309
  /**
332
310
  * Gets all stored swaps.
333
311
  *
334
- * @returns A vec of swaps
312
+ * @returns Array of swaps (unknown types are filtered out)
335
313
  */
336
314
  listAllSwaps(): Promise<ExtendedSwapStorageData[]>;
337
315
  /**
@@ -355,9 +333,10 @@ export declare class Client {
355
333
  */
356
334
  claimVhtlc(swapId: string): Promise<void>;
357
335
  /**
358
- * Claim a swap VHTLC
336
+ * Refund a swap VHTLC
359
337
  *
360
338
  * @param swapId - The swap ID
339
+ * @param refundAddress - The address to receive the refund
361
340
  * @returns The TXID of the Ark transaction which refunded the VHTLC.
362
341
  */
363
342
  refundVhtlc(swapId: string, refundAddress: string): Promise<string>;
@@ -366,11 +345,11 @@ export declare class Client {
366
345
  *
367
346
  * @returns Version information
368
347
  */
369
- getVersion(): Promise<VersionInfo>;
348
+ getVersion(): Promise<Version>;
370
349
  /**
371
350
  * Recover swaps for the currently loaded mnemonic.
372
351
  *
373
- * @returns Response containing recovered swaps
352
+ * @returns Array of recovered swaps (unknown types are filtered out)
374
353
  */
375
354
  recoverSwaps(): Promise<ExtendedSwapStorageData[]>;
376
355
  /**
@@ -413,9 +392,9 @@ export declare class Client {
413
392
  * Get VTXO swap details by ID.
414
393
  *
415
394
  * @param id - The swap ID
416
- * @returns The VTXO swap response
395
+ * @returns The extended VTXO swap data
417
396
  */
418
- getVtxoSwap(id: string): Promise<VtxoSwapResponse>;
397
+ getVtxoSwap(id: string): Promise<ExtendedVtxoSwapStorageData>;
419
398
  /**
420
399
  * Claim the server's VHTLC in a VTXO swap.
421
400
  *
@@ -434,12 +413,47 @@ export declare class Client {
434
413
  * This can be called if the swap fails (e.g., server doesn't fund)
435
414
  * and the client's locktime has expired.
436
415
  *
437
- * @param swap - The VTXO swap response
438
- * @param swapParams - The client's swap parameters
416
+ * @param swapId - The swap ID
439
417
  * @param refundAddress - The Arkade address to receive the refunded funds
440
418
  * @returns The refund transaction ID
441
419
  */
442
- refundVtxoSwap(swap: VtxoSwapResponse, swapParams: SwapParams, refundAddress: string): Promise<string>;
420
+ refundVtxoSwap(swapId: string, refundAddress: string): Promise<string>;
421
+ /**
422
+ * List all VTXO swaps from local storage.
423
+ *
424
+ * Returns all stored VTXO swaps without fetching from the API.
425
+ *
426
+ * @returns Array of all stored extended VTXO swap data
427
+ */
428
+ listAllVtxoSwaps(): Promise<ExtendedVtxoSwapStorageData[]>;
429
+ /**
430
+ * Create an on-chain Bitcoin to Arkade swap.
431
+ *
432
+ * User sends on-chain BTC to a P2WSH HTLC address, and receives Arkade VTXOs.
433
+ *
434
+ * @param request - The swap request parameters
435
+ * @returns The created swap response with P2WSH address to fund
436
+ */
437
+ createBitcoinToArkadeSwap(request: BtcToArkadeSwapRequest): Promise<BtcToArkadeSwapResponse>;
438
+ /**
439
+ * Claim the Arkade VHTLC for a BTC-to-Arkade swap.
440
+ *
441
+ * This reveals the preimage/secret to claim funds on Arkade.
442
+ *
443
+ * @param swapId - The swap ID
444
+ * @returns The Arkade claim transaction ID
445
+ */
446
+ claimBtcToArkadeVhtlc(swapId: string): Promise<string>;
447
+ /**
448
+ * Refund from the on-chain Bitcoin HTLC after timeout.
449
+ *
450
+ * This spends from the P2WSH HTLC back to the user's address.
451
+ *
452
+ * @param swapId - The swap ID
453
+ * @param refundAddress - The Bitcoin address to receive the refund
454
+ * @returns The refund transaction ID
455
+ */
456
+ refundOnchainHtlc(swapId: string, refundAddress: string): Promise<string>;
443
457
  }
444
458
  /**
445
459
  * Log level type for SDK logging configuration.
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAG7B,KAAK,UAAU,EACf,KAAK,gBAAgB,EAOtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,a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