@arkade-os/swap 0.0.11 → 0.0.13
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-RIC5ZTZK.js → chunk-IFZOBTTG.js} +54 -9
- package/dist/index.cjs +661 -50
- package/dist/index.d.cts +240 -6
- package/dist/index.d.ts +240 -6
- package/dist/index.js +596 -28
- package/dist/nostr.d.cts +1 -1
- package/dist/nostr.d.ts +1 -1
- package/dist/nostr.js +1 -1
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/{repository-B02vsgcV.d.cts → repository-D5JoeqwB.d.ts} +4 -1
- package/dist/{repository-CfE18Fif.d.ts → repository-Vfx65uF1.d.cts} +4 -1
- package/dist/{rfq-DkckzRKK.d.ts → rfq-CYfKvAPp.d.cts} +45 -12
- package/dist/{rfq-DkckzRKK.d.cts → rfq-CYfKvAPp.d.ts} +45 -12
- package/package.json +2 -2
package/dist/nostr.d.cts
CHANGED
package/dist/nostr.d.ts
CHANGED
package/dist/nostr.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RealmLike } from '@arkade-os/sdk/repositories/realm';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-Vfx65uF1.cjs';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-CYfKvAPp.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Realm backend for React Native.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RealmLike } from '@arkade-os/sdk/repositories/realm';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-D5JoeqwB.js';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-CYfKvAPp.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Realm backend for React Native.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SQLExecutor } from '@arkade-os/sdk/repositories/sqlite';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-Vfx65uF1.cjs';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-CYfKvAPp.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* SQLite backend over the SDK's `SQLExecutor`, so any driver plugs in
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SQLExecutor } from '@arkade-os/sdk/repositories/sqlite';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-D5JoeqwB.js';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-CYfKvAPp.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* SQLite backend over the SDK's `SQLExecutor`, so any driver plugs in
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscoveredMarket } from '@arkade-os/solver-discovery';
|
|
2
2
|
import { IWallet, ProvisionedKey, ProvisionedClaimSecret, RestArkProvider, RestIndexerProvider, VHTLC, Identity, IContractManager } from '@arkade-os/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { B as RfqStatus, R as RfqTransport, a as OnchainHtlc, f as ChainUtxo, C as ChainSource, v as OnchainHtlcPhase } from './rfq-CYfKvAPp.js';
|
|
4
4
|
|
|
5
5
|
type AssetSwapStatus = "pending" | "cancelling" | "fulfilled" | "cancelled" | "recoverable" | "awaiting_fill" | "claimable" | "claimed" | "refunded_l1";
|
|
6
6
|
/** The sentinel asset id for BTC itself, as opposed to a 68-hex asset id.
|
|
@@ -829,6 +829,9 @@ interface OnchainSendSwap extends RfqSwapCommon {
|
|
|
829
829
|
htlc: OnchainHtlc;
|
|
830
830
|
/** `profile.min_confirmations` from the quote. */
|
|
831
831
|
minConfirmations: number;
|
|
832
|
+
/** Where {@link RfqSwapManagerCallbacks.claimOnchain} pays; optional only
|
|
833
|
+
* so records predating its profile slot still restore. */
|
|
834
|
+
payoutPkScript?: Uint8Array;
|
|
832
835
|
/** The fill's outpoint, learned on first sighting. Without it a SPENT
|
|
833
836
|
* HTLC reads as never funded — see {@link classifyOnchainHtlc}. */
|
|
834
837
|
funding?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscoveredMarket } from '@arkade-os/solver-discovery';
|
|
2
2
|
import { IWallet, ProvisionedKey, ProvisionedClaimSecret, RestArkProvider, RestIndexerProvider, VHTLC, Identity, IContractManager } from '@arkade-os/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { B as RfqStatus, R as RfqTransport, a as OnchainHtlc, f as ChainUtxo, C as ChainSource, v as OnchainHtlcPhase } from './rfq-CYfKvAPp.cjs';
|
|
4
4
|
|
|
5
5
|
type AssetSwapStatus = "pending" | "cancelling" | "fulfilled" | "cancelled" | "recoverable" | "awaiting_fill" | "claimable" | "claimed" | "refunded_l1";
|
|
6
6
|
/** The sentinel asset id for BTC itself, as opposed to a 68-hex asset id.
|
|
@@ -829,6 +829,9 @@ interface OnchainSendSwap extends RfqSwapCommon {
|
|
|
829
829
|
htlc: OnchainHtlc;
|
|
830
830
|
/** `profile.min_confirmations` from the quote. */
|
|
831
831
|
minConfirmations: number;
|
|
832
|
+
/** Where {@link RfqSwapManagerCallbacks.claimOnchain} pays; optional only
|
|
833
|
+
* so records predating its profile slot still restore. */
|
|
834
|
+
payoutPkScript?: Uint8Array;
|
|
832
835
|
/** The fill's outpoint, learned on first sighting. Without it a SPENT
|
|
833
836
|
* HTLC reads as never funded — see {@link classifyOnchainHtlc}. */
|
|
834
837
|
funding?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VHTLC,
|
|
1
|
+
import { VHTLC, IWallet, ProvisionedKey, ProvisionedClaimSecret, asset } from '@arkade-os/sdk';
|
|
2
2
|
|
|
3
3
|
/** L1 confirmation-depth and reorg margin between dependent timelocks. */
|
|
4
4
|
declare const ONCHAIN_ORDER_MARGIN_SECONDS: number;
|
|
@@ -46,6 +46,13 @@ declare const newPreimage: () => Uint8Array;
|
|
|
46
46
|
/** `sha256(P)`, hex — the wire `payment_hash`, same convention as BOLT11. */
|
|
47
47
|
declare const paymentHashOf: (preimage: Uint8Array) => string;
|
|
48
48
|
type OnchainNetwork = "bitcoin" | "testnet" | "regtest";
|
|
49
|
+
/**
|
|
50
|
+
* The `payoutPkScript` {@link buildHtlcClaim} pays the fill to. Resolved EARLY:
|
|
51
|
+
* the claim's output is the spender's own choice, so nothing that survives a
|
|
52
|
+
* send screen names it, and a destination that cannot be encoded must be
|
|
53
|
+
* refused before the swap is negotiated rather than at claim time.
|
|
54
|
+
*/
|
|
55
|
+
declare const l1ScriptForAddress: (address: string, network: OnchainNetwork) => Uint8Array;
|
|
49
56
|
interface OnchainHtlcParams {
|
|
50
57
|
/** `sha256(P)`, hex; the HASH160 commitment is derived internally. */
|
|
51
58
|
paymentHash: string;
|
|
@@ -129,8 +136,9 @@ interface ChainUtxo extends HtlcUtxo {
|
|
|
129
136
|
interface ChainSource {
|
|
130
137
|
/** Confirmed+mempool outputs paying a script; used to detect the fill. */
|
|
131
138
|
getScriptUtxos(pkScript: Uint8Array): Promise<ChainUtxo[]>;
|
|
132
|
-
/** The spend of an outpoint, if any — where P is extracted from.
|
|
133
|
-
|
|
139
|
+
/** The spend of an outpoint, if any — where P is extracted from. A
|
|
140
|
+
* provider omitting the spender txid still lists it in `pkScript`'s history. */
|
|
141
|
+
getSpendingTx(txid: string, vout: number, pkScript: Uint8Array): Promise<{
|
|
134
142
|
txHex: string;
|
|
135
143
|
} | null>;
|
|
136
144
|
broadcast(txHex: string): Promise<string>;
|
|
@@ -367,6 +375,25 @@ declare const assertFundable: (input: {
|
|
|
367
375
|
/** "send" = arkade->onchain (the L1 timelock-order gate applies). */
|
|
368
376
|
direction: "send" | "receive";
|
|
369
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* The most this client will pay: the GREATER of the two bounds, because a
|
|
380
|
+
* flat fee is a large proportion of a small swap (420 sats is 8.4% of
|
|
381
|
+
* 5_000, 0.084% of 500_000). Absent means no ceiling. OMIT a bound rather
|
|
382
|
+
* than zeroing it: `{ bps: 0 }` alone is a ceiling of zero, indistinguishable
|
|
383
|
+
* from "free or nothing". `{}` IS refused.
|
|
384
|
+
*/
|
|
385
|
+
maxFee?: {
|
|
386
|
+
/** Integer, 0..10_000 (10_000 = 100%). Out of range throws `max_fee_out_of_range`. */
|
|
387
|
+
bps?: number;
|
|
388
|
+
/** Non-negative integer. Out of range throws `max_fee_out_of_range`. */
|
|
389
|
+
sats?: number;
|
|
390
|
+
/**
|
|
391
|
+
* To-units per from-unit, required for a CROSS-ASSET pair. Must come
|
|
392
|
+
* from a source of YOUR OWN — the solver's own feed would check it
|
|
393
|
+
* against its own number. Needs a looser tolerance than same-asset.
|
|
394
|
+
*/
|
|
395
|
+
referenceRate?: number;
|
|
396
|
+
};
|
|
370
397
|
}) => void;
|
|
371
398
|
interface RfqTransport {
|
|
372
399
|
requestQuote(payload: Record<string, unknown>): Promise<RfqQuote>;
|
|
@@ -613,8 +640,10 @@ declare const lightningReceiveRequest: (input: {
|
|
|
613
640
|
payoutAddress: string;
|
|
614
641
|
/** Trader's x-only arkade key — the covenant's `receiver` role. */
|
|
615
642
|
payoutPubkey: Uint8Array;
|
|
616
|
-
/** `P` sealed to covclaimd, base64 — `sealClaimPacket(...).ciphertext`.
|
|
617
|
-
|
|
643
|
+
/** `P` sealed to covclaimd, base64 — `sealClaimPacket(...).ciphertext`.
|
|
644
|
+
* Omitted when there is no covclaimd to seal to; the field is then left off
|
|
645
|
+
* the wire entirely, since the solver refuses an empty packet. */
|
|
646
|
+
claimPacket?: string;
|
|
618
647
|
amount: number;
|
|
619
648
|
amountSide: "from" | "to";
|
|
620
649
|
}) => Record<string, unknown>;
|
|
@@ -632,8 +661,9 @@ declare const onchainReceiveRequest: (input: {
|
|
|
632
661
|
payoutPubkey: Uint8Array;
|
|
633
662
|
/** Trader's x-only L1 key for the HTLC's refund leaf. */
|
|
634
663
|
refundPubkey: Uint8Array;
|
|
635
|
-
/** `P` sealed to covclaimd, base64
|
|
636
|
-
|
|
664
|
+
/** `P` sealed to covclaimd, base64. Omitted when there is none to seal to —
|
|
665
|
+
* see {@link lightningReceiveRequest}. */
|
|
666
|
+
claimPacket?: string;
|
|
637
667
|
amount: number;
|
|
638
668
|
amountSide: "from" | "to";
|
|
639
669
|
}) => Record<string, unknown>;
|
|
@@ -915,8 +945,10 @@ declare function requestLightningReceive(wallet: IWallet, arkServerUrl: string,
|
|
|
915
945
|
* {@link resolveEmulatorPubkey}. */
|
|
916
946
|
emulatorPubkey?: string;
|
|
917
947
|
/** covclaimd's 33-byte compressed pubkey (from its own info endpoint)
|
|
918
|
-
* — the claim packet seals to it and only it can ever read `P` early.
|
|
919
|
-
|
|
948
|
+
* — the claim packet seals to it and only it can ever read `P` early.
|
|
949
|
+
* Unset where no covclaimd is deployed: nothing is sealed and no packet
|
|
950
|
+
* is sent. Never substitute a throwaway key — nobody could open it. */
|
|
951
|
+
covclaimdPubkey?: Uint8Array;
|
|
920
952
|
/** The caller's own BOLT11 decoder, applied to the SOLVER's invoice.
|
|
921
953
|
* Required: an optional verifier is one integrators skip, and this is
|
|
922
954
|
* the check whose absence loses the whole payment. */
|
|
@@ -1005,8 +1037,9 @@ declare function requestOnchainReceive(wallet: IWallet, arkServerUrl: string, tr
|
|
|
1005
1037
|
emulatorPubkey?: string;
|
|
1006
1038
|
/** Trader's x-only L1 key for the HTLC's refund leaf. */
|
|
1007
1039
|
refundPubkey: Uint8Array;
|
|
1008
|
-
/** covclaimd's 33-byte compressed pubkey
|
|
1009
|
-
|
|
1040
|
+
/** covclaimd's 33-byte compressed pubkey, unset where none is deployed
|
|
1041
|
+
* — see {@link requestLightningReceive}. */
|
|
1042
|
+
covclaimdPubkey?: Uint8Array;
|
|
1010
1043
|
rfqId?: string;
|
|
1011
1044
|
}): Promise<{
|
|
1012
1045
|
rfqId: string;
|
|
@@ -1030,4 +1063,4 @@ declare function requestOnchainReceive(wallet: IWallet, arkServerUrl: string, tr
|
|
|
1030
1063
|
secrets: ProvisionedClaimSecret;
|
|
1031
1064
|
}>;
|
|
1032
1065
|
|
|
1033
|
-
export {
|
|
1066
|
+
export { lightningSendRequest as $, ARKADE_ASSET as A, type RfqStatus as B, type ChainSource as C, SwapRefusal as D, arkadeAssetLeg as E, arkadeSwapRequest as F, assertFundable as G, type HtlcUtxo as H, type InvoiceFacts as I, assertReceivable as J, awaitOnchainFill as K, LIGHTNING_BTC as L, MAX_MIN_CONFIRMATIONS as M, buildHtlcClaim as N, type OnchainNetwork as O, buildHtlcRefund as P, claimOnchainFill as Q, type RfqTransport as R, SOLO_REFUND_HEADROOM_SECONDS as S, classifyOnchainHtlc as T, deriveLightningReceive as U, deriveOnchainReceive as V, deriveOnchainSend as W, extractPreimage as X, httpTransport as Y, l1ScriptForAddress as Z, lightningReceiveRequest as _, type OnchainHtlc as a, lightningSendVtxoScript as a0, newPreimage as a1, newRfqId as a2, offerTermsFromQuote as a3, onchainHtlcScript as a4, onchainReceiveRequest as a5, onchainSendRequest as a6, paymentHashOf as a7, receiveVtxoScript as a8, relayTransport as a9, requestLightningReceive as aa, requestOnchainReceive as ab, rfqPair as ac, unilateralClaimDelay as ad, unilateralRefundDelay as ae, unilateralRefundWithoutReceiverDelay as af, verifyLockupAddress as ag, verifyReceiveInvoice as ah, type OnchainHtlcParams as b, requestLightningSend as c, ARKADE_BTC as d, AddressMismatch as e, type ChainUtxo as f, LIGHTNING_RECEIVE_PAIR as g, LIGHTNING_SEND_PAIR as h, LOCKTIME_THRESHOLD as i, type LightningReceiveTreeParams as j, type LightningSendTreeParams as k, MIN_CLAIM_WINDOW_SECONDS as l, MIN_HEADROOM_SECONDS as m, ONCHAIN_BTC as n, ONCHAIN_CLAIM_MARGIN_SECONDS as o, ONCHAIN_DUST_SATS as p, ONCHAIN_ORDER_MARGIN_SECONDS as q, requestOnchainSend as r, ONCHAIN_RECEIVE_PAIR as s, ONCHAIN_SECONDS_PER_BLOCK as t, ONCHAIN_SEND_PAIR as u, type OnchainHtlcPhase as v, RFQ_TERMINAL_STATES as w, type RelaySocket as x, type RfqQuote as y, type RfqRefusalReason as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VHTLC,
|
|
1
|
+
import { VHTLC, IWallet, ProvisionedKey, ProvisionedClaimSecret, asset } from '@arkade-os/sdk';
|
|
2
2
|
|
|
3
3
|
/** L1 confirmation-depth and reorg margin between dependent timelocks. */
|
|
4
4
|
declare const ONCHAIN_ORDER_MARGIN_SECONDS: number;
|
|
@@ -46,6 +46,13 @@ declare const newPreimage: () => Uint8Array;
|
|
|
46
46
|
/** `sha256(P)`, hex — the wire `payment_hash`, same convention as BOLT11. */
|
|
47
47
|
declare const paymentHashOf: (preimage: Uint8Array) => string;
|
|
48
48
|
type OnchainNetwork = "bitcoin" | "testnet" | "regtest";
|
|
49
|
+
/**
|
|
50
|
+
* The `payoutPkScript` {@link buildHtlcClaim} pays the fill to. Resolved EARLY:
|
|
51
|
+
* the claim's output is the spender's own choice, so nothing that survives a
|
|
52
|
+
* send screen names it, and a destination that cannot be encoded must be
|
|
53
|
+
* refused before the swap is negotiated rather than at claim time.
|
|
54
|
+
*/
|
|
55
|
+
declare const l1ScriptForAddress: (address: string, network: OnchainNetwork) => Uint8Array;
|
|
49
56
|
interface OnchainHtlcParams {
|
|
50
57
|
/** `sha256(P)`, hex; the HASH160 commitment is derived internally. */
|
|
51
58
|
paymentHash: string;
|
|
@@ -129,8 +136,9 @@ interface ChainUtxo extends HtlcUtxo {
|
|
|
129
136
|
interface ChainSource {
|
|
130
137
|
/** Confirmed+mempool outputs paying a script; used to detect the fill. */
|
|
131
138
|
getScriptUtxos(pkScript: Uint8Array): Promise<ChainUtxo[]>;
|
|
132
|
-
/** The spend of an outpoint, if any — where P is extracted from.
|
|
133
|
-
|
|
139
|
+
/** The spend of an outpoint, if any — where P is extracted from. A
|
|
140
|
+
* provider omitting the spender txid still lists it in `pkScript`'s history. */
|
|
141
|
+
getSpendingTx(txid: string, vout: number, pkScript: Uint8Array): Promise<{
|
|
134
142
|
txHex: string;
|
|
135
143
|
} | null>;
|
|
136
144
|
broadcast(txHex: string): Promise<string>;
|
|
@@ -367,6 +375,25 @@ declare const assertFundable: (input: {
|
|
|
367
375
|
/** "send" = arkade->onchain (the L1 timelock-order gate applies). */
|
|
368
376
|
direction: "send" | "receive";
|
|
369
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* The most this client will pay: the GREATER of the two bounds, because a
|
|
380
|
+
* flat fee is a large proportion of a small swap (420 sats is 8.4% of
|
|
381
|
+
* 5_000, 0.084% of 500_000). Absent means no ceiling. OMIT a bound rather
|
|
382
|
+
* than zeroing it: `{ bps: 0 }` alone is a ceiling of zero, indistinguishable
|
|
383
|
+
* from "free or nothing". `{}` IS refused.
|
|
384
|
+
*/
|
|
385
|
+
maxFee?: {
|
|
386
|
+
/** Integer, 0..10_000 (10_000 = 100%). Out of range throws `max_fee_out_of_range`. */
|
|
387
|
+
bps?: number;
|
|
388
|
+
/** Non-negative integer. Out of range throws `max_fee_out_of_range`. */
|
|
389
|
+
sats?: number;
|
|
390
|
+
/**
|
|
391
|
+
* To-units per from-unit, required for a CROSS-ASSET pair. Must come
|
|
392
|
+
* from a source of YOUR OWN — the solver's own feed would check it
|
|
393
|
+
* against its own number. Needs a looser tolerance than same-asset.
|
|
394
|
+
*/
|
|
395
|
+
referenceRate?: number;
|
|
396
|
+
};
|
|
370
397
|
}) => void;
|
|
371
398
|
interface RfqTransport {
|
|
372
399
|
requestQuote(payload: Record<string, unknown>): Promise<RfqQuote>;
|
|
@@ -613,8 +640,10 @@ declare const lightningReceiveRequest: (input: {
|
|
|
613
640
|
payoutAddress: string;
|
|
614
641
|
/** Trader's x-only arkade key — the covenant's `receiver` role. */
|
|
615
642
|
payoutPubkey: Uint8Array;
|
|
616
|
-
/** `P` sealed to covclaimd, base64 — `sealClaimPacket(...).ciphertext`.
|
|
617
|
-
|
|
643
|
+
/** `P` sealed to covclaimd, base64 — `sealClaimPacket(...).ciphertext`.
|
|
644
|
+
* Omitted when there is no covclaimd to seal to; the field is then left off
|
|
645
|
+
* the wire entirely, since the solver refuses an empty packet. */
|
|
646
|
+
claimPacket?: string;
|
|
618
647
|
amount: number;
|
|
619
648
|
amountSide: "from" | "to";
|
|
620
649
|
}) => Record<string, unknown>;
|
|
@@ -632,8 +661,9 @@ declare const onchainReceiveRequest: (input: {
|
|
|
632
661
|
payoutPubkey: Uint8Array;
|
|
633
662
|
/** Trader's x-only L1 key for the HTLC's refund leaf. */
|
|
634
663
|
refundPubkey: Uint8Array;
|
|
635
|
-
/** `P` sealed to covclaimd, base64
|
|
636
|
-
|
|
664
|
+
/** `P` sealed to covclaimd, base64. Omitted when there is none to seal to —
|
|
665
|
+
* see {@link lightningReceiveRequest}. */
|
|
666
|
+
claimPacket?: string;
|
|
637
667
|
amount: number;
|
|
638
668
|
amountSide: "from" | "to";
|
|
639
669
|
}) => Record<string, unknown>;
|
|
@@ -915,8 +945,10 @@ declare function requestLightningReceive(wallet: IWallet, arkServerUrl: string,
|
|
|
915
945
|
* {@link resolveEmulatorPubkey}. */
|
|
916
946
|
emulatorPubkey?: string;
|
|
917
947
|
/** covclaimd's 33-byte compressed pubkey (from its own info endpoint)
|
|
918
|
-
* — the claim packet seals to it and only it can ever read `P` early.
|
|
919
|
-
|
|
948
|
+
* — the claim packet seals to it and only it can ever read `P` early.
|
|
949
|
+
* Unset where no covclaimd is deployed: nothing is sealed and no packet
|
|
950
|
+
* is sent. Never substitute a throwaway key — nobody could open it. */
|
|
951
|
+
covclaimdPubkey?: Uint8Array;
|
|
920
952
|
/** The caller's own BOLT11 decoder, applied to the SOLVER's invoice.
|
|
921
953
|
* Required: an optional verifier is one integrators skip, and this is
|
|
922
954
|
* the check whose absence loses the whole payment. */
|
|
@@ -1005,8 +1037,9 @@ declare function requestOnchainReceive(wallet: IWallet, arkServerUrl: string, tr
|
|
|
1005
1037
|
emulatorPubkey?: string;
|
|
1006
1038
|
/** Trader's x-only L1 key for the HTLC's refund leaf. */
|
|
1007
1039
|
refundPubkey: Uint8Array;
|
|
1008
|
-
/** covclaimd's 33-byte compressed pubkey
|
|
1009
|
-
|
|
1040
|
+
/** covclaimd's 33-byte compressed pubkey, unset where none is deployed
|
|
1041
|
+
* — see {@link requestLightningReceive}. */
|
|
1042
|
+
covclaimdPubkey?: Uint8Array;
|
|
1010
1043
|
rfqId?: string;
|
|
1011
1044
|
}): Promise<{
|
|
1012
1045
|
rfqId: string;
|
|
@@ -1030,4 +1063,4 @@ declare function requestOnchainReceive(wallet: IWallet, arkServerUrl: string, tr
|
|
|
1030
1063
|
secrets: ProvisionedClaimSecret;
|
|
1031
1064
|
}>;
|
|
1032
1065
|
|
|
1033
|
-
export {
|
|
1066
|
+
export { lightningSendRequest as $, ARKADE_ASSET as A, type RfqStatus as B, type ChainSource as C, SwapRefusal as D, arkadeAssetLeg as E, arkadeSwapRequest as F, assertFundable as G, type HtlcUtxo as H, type InvoiceFacts as I, assertReceivable as J, awaitOnchainFill as K, LIGHTNING_BTC as L, MAX_MIN_CONFIRMATIONS as M, buildHtlcClaim as N, type OnchainNetwork as O, buildHtlcRefund as P, claimOnchainFill as Q, type RfqTransport as R, SOLO_REFUND_HEADROOM_SECONDS as S, classifyOnchainHtlc as T, deriveLightningReceive as U, deriveOnchainReceive as V, deriveOnchainSend as W, extractPreimage as X, httpTransport as Y, l1ScriptForAddress as Z, lightningReceiveRequest as _, type OnchainHtlc as a, lightningSendVtxoScript as a0, newPreimage as a1, newRfqId as a2, offerTermsFromQuote as a3, onchainHtlcScript as a4, onchainReceiveRequest as a5, onchainSendRequest as a6, paymentHashOf as a7, receiveVtxoScript as a8, relayTransport as a9, requestLightningReceive as aa, requestOnchainReceive as ab, rfqPair as ac, unilateralClaimDelay as ad, unilateralRefundDelay as ae, unilateralRefundWithoutReceiverDelay as af, verifyLockupAddress as ag, verifyReceiveInvoice as ah, type OnchainHtlcParams as b, requestLightningSend as c, ARKADE_BTC as d, AddressMismatch as e, type ChainUtxo as f, LIGHTNING_RECEIVE_PAIR as g, LIGHTNING_SEND_PAIR as h, LOCKTIME_THRESHOLD as i, type LightningReceiveTreeParams as j, type LightningSendTreeParams as k, MIN_CLAIM_WINDOW_SECONDS as l, MIN_HEADROOM_SECONDS as m, ONCHAIN_BTC as n, ONCHAIN_CLAIM_MARGIN_SECONDS as o, ONCHAIN_DUST_SATS as p, ONCHAIN_ORDER_MARGIN_SECONDS as q, requestOnchainSend as r, ONCHAIN_RECEIVE_PAIR as s, ONCHAIN_SECONDS_PER_BLOCK as t, ONCHAIN_SEND_PAIR as u, type OnchainHtlcPhase as v, RFQ_TERMINAL_STATES as w, type RelaySocket as x, type RfqQuote as y, type RfqRefusalReason as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkade-os/swap",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Client-side Arkade Intents asset swaps: discover markets, quote, create/track/cancel offers, restore from chain.",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@noble/hashes": "2.0.1",
|
|
71
71
|
"@scure/base": "2.0.0",
|
|
72
72
|
"@scure/btc-signer": "2.0.1",
|
|
73
|
-
"@arkade-os/sdk": "0.4.
|
|
73
|
+
"@arkade-os/sdk": "0.4.70"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"nostr-tools": "^2.12.0"
|