@breeztech/breez-sdk-spark 0.9.1 → 0.10.0
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/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +577 -561
- package/bundler/breez_sdk_spark_wasm_bg.js +29 -30
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/bundler/storage/index.js +64 -15
- package/deno/breez_sdk_spark_wasm.d.ts +577 -561
- package/deno/breez_sdk_spark_wasm.js +29 -30
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +577 -561
- package/nodejs/breez_sdk_spark_wasm.js +29 -30
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/nodejs/storage/index.cjs +18 -3
- package/nodejs/storage/migrations.cjs +11 -0
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +580 -564
- package/web/breez_sdk_spark_wasm.js +29 -30
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/web/storage/index.js +64 -15
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
4
3
|
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
4
|
+
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
5
5
|
export function defaultConfig(network: Network): Config;
|
|
6
|
+
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
7
|
+
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
6
8
|
/**
|
|
7
9
|
* Creates a default external signer from a mnemonic phrase.
|
|
8
10
|
*
|
|
9
11
|
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
10
12
|
*/
|
|
11
13
|
export function getSparkStatus(): Promise<SparkStatus>;
|
|
12
|
-
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
13
|
-
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
14
14
|
/**
|
|
15
15
|
* Entry point invoked by JavaScript in a worker.
|
|
16
16
|
*/
|
|
@@ -53,12 +53,6 @@ export interface BitcoinChainService {
|
|
|
53
53
|
recommendedFees(): Promise<RecommendedFees>;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export interface TxStatus {
|
|
57
|
-
confirmed: boolean;
|
|
58
|
-
blockHeight?: number;
|
|
59
|
-
blockTime?: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
56
|
export interface Utxo {
|
|
63
57
|
txid: string;
|
|
64
58
|
vout: number;
|
|
@@ -76,116 +70,162 @@ export interface RecommendedFees {
|
|
|
76
70
|
minimumFee: number;
|
|
77
71
|
}
|
|
78
72
|
|
|
73
|
+
export interface TxStatus {
|
|
74
|
+
confirmed: boolean;
|
|
75
|
+
blockHeight?: number;
|
|
76
|
+
blockTime?: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
79
|
export interface PaymentObserver {
|
|
80
80
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export
|
|
84
|
-
from: ConversionStep;
|
|
85
|
-
to: ConversionStep;
|
|
86
|
-
}
|
|
83
|
+
export type TokenTransactionType = "transfer" | "mint" | "burn";
|
|
87
84
|
|
|
88
|
-
export interface
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
export interface DepositInfo {
|
|
86
|
+
txid: string;
|
|
87
|
+
vout: number;
|
|
88
|
+
amountSats: number;
|
|
89
|
+
refundTx?: string;
|
|
90
|
+
refundTxId?: string;
|
|
91
|
+
claimError?: DepositClaimError;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
export type
|
|
94
|
+
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
94
95
|
|
|
95
|
-
export interface
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
export interface LnurlWithdrawRequestDetails {
|
|
97
|
+
callback: string;
|
|
98
|
+
k1: string;
|
|
99
|
+
defaultDescription: string;
|
|
100
|
+
minWithdrawable: number;
|
|
101
|
+
maxWithdrawable: number;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
export
|
|
104
|
+
export interface Bolt11Invoice {
|
|
105
|
+
bolt11: string;
|
|
106
|
+
source: PaymentRequestSource;
|
|
107
|
+
}
|
|
101
108
|
|
|
102
|
-
export
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
110
|
+
|
|
111
|
+
export interface ListFiatCurrenciesResponse {
|
|
112
|
+
currencies: FiatCurrency[];
|
|
105
113
|
}
|
|
106
114
|
|
|
107
|
-
export interface
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
export interface IncomingChange {
|
|
116
|
+
newState: Record;
|
|
117
|
+
oldState?: Record;
|
|
110
118
|
}
|
|
111
119
|
|
|
112
|
-
export type
|
|
120
|
+
export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
113
121
|
|
|
114
|
-
export interface
|
|
115
|
-
|
|
116
|
-
network: Network;
|
|
117
|
-
syncIntervalSecs: number;
|
|
118
|
-
maxDepositClaimFee?: MaxFee;
|
|
119
|
-
lnurlDomain?: string;
|
|
120
|
-
preferSparkOverLightning: boolean;
|
|
121
|
-
externalInputParsers?: ExternalInputParser[];
|
|
122
|
-
useDefaultExternalInputParsers: boolean;
|
|
123
|
-
realTimeSyncServerUrl?: string;
|
|
124
|
-
privateEnabledDefault: boolean;
|
|
125
|
-
optimizationConfig: OptimizationConfig;
|
|
126
|
-
stableBalanceConfig?: StableBalanceConfig;
|
|
127
|
-
/**
|
|
128
|
-
* Maximum number of concurrent transfer claims.
|
|
129
|
-
*
|
|
130
|
-
* Controls how many pending Spark transfers can be claimed in parallel.
|
|
131
|
-
* Default is 4. Increase for server environments with high incoming
|
|
132
|
-
* payment volume to improve throughput.
|
|
133
|
-
*/
|
|
134
|
-
maxConcurrentClaims: number;
|
|
122
|
+
export interface LnurlErrorDetails {
|
|
123
|
+
reason: string;
|
|
135
124
|
}
|
|
136
125
|
|
|
137
|
-
export
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
127
|
+
|
|
128
|
+
export type PaymentDetails = { type: "spark"; invoiceDetails?: SparkInvoicePaymentDetails; htlcDetails?: SparkHtlcDetails; conversionInfo?: ConversionInfo } | { type: "token"; metadata: TokenMetadata; txHash: string; txType: TokenTransactionType; invoiceDetails?: SparkInvoicePaymentDetails; conversionInfo?: ConversionInfo } | { type: "lightning"; description?: string; invoice: string; destinationPubkey: string; htlcDetails: SparkHtlcDetails; lnurlPayInfo?: LnurlPayInfo; lnurlWithdrawInfo?: LnurlWithdrawInfo; lnurlReceiveMetadata?: LnurlReceiveMetadata } | { type: "withdraw"; txId: string } | { type: "deposit"; txId: string };
|
|
129
|
+
|
|
130
|
+
export type StoragePaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[]; hasLnurlPreimage?: boolean };
|
|
131
|
+
|
|
132
|
+
export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } & SilentPaymentAddressDetails) | ({ type: "lnurlAuth" } & LnurlAuthRequestDetails) | ({ type: "url" } & string) | ({ type: "bip21" } & Bip21Details) | ({ type: "bolt12InvoiceRequest" } & Bolt12InvoiceRequestDetails) | ({ type: "lnurlWithdraw" } & LnurlWithdrawRequestDetails) | ({ type: "sparkAddress" } & SparkAddressDetails) | ({ type: "sparkInvoice" } & SparkInvoiceDetails);
|
|
133
|
+
|
|
134
|
+
export interface ConnectRequest {
|
|
135
|
+
config: Config;
|
|
136
|
+
seed: Seed;
|
|
137
|
+
storageDir: string;
|
|
140
138
|
}
|
|
141
139
|
|
|
142
|
-
export
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
amount?: string;
|
|
147
|
-
tokenIdentifier?: string;
|
|
148
|
-
expiryTime?: number;
|
|
140
|
+
export type ConversionPurpose = { type: "ongoingPayment"; paymentRequest: string } | { type: "selfTransfer" } | { type: "autoConversion" };
|
|
141
|
+
|
|
142
|
+
export interface Bolt11InvoiceDetails {
|
|
143
|
+
amountMsat?: number;
|
|
149
144
|
description?: string;
|
|
150
|
-
|
|
145
|
+
descriptionHash?: string;
|
|
146
|
+
expiry: number;
|
|
147
|
+
invoice: Bolt11Invoice;
|
|
148
|
+
minFinalCltvExpiryDelta: number;
|
|
149
|
+
network: BitcoinNetwork;
|
|
150
|
+
payeePubkey: string;
|
|
151
|
+
paymentHash: string;
|
|
152
|
+
paymentSecret: string;
|
|
153
|
+
routingHints: Bolt11RouteHint[];
|
|
154
|
+
timestamp: number;
|
|
151
155
|
}
|
|
152
156
|
|
|
153
|
-
export interface
|
|
154
|
-
|
|
157
|
+
export interface TokenMetadata {
|
|
158
|
+
identifier: string;
|
|
159
|
+
issuerPublicKey: string;
|
|
160
|
+
name: string;
|
|
161
|
+
ticker: string;
|
|
162
|
+
decimals: number;
|
|
163
|
+
maxSupply: string;
|
|
164
|
+
isFreezable: boolean;
|
|
155
165
|
}
|
|
156
166
|
|
|
157
|
-
export interface
|
|
158
|
-
|
|
159
|
-
txHex: string;
|
|
167
|
+
export interface Bolt11RouteHint {
|
|
168
|
+
hops: Bolt11RouteHintHop[];
|
|
160
169
|
}
|
|
161
170
|
|
|
162
|
-
export interface
|
|
163
|
-
|
|
171
|
+
export interface Rate {
|
|
172
|
+
coin: string;
|
|
173
|
+
value: number;
|
|
164
174
|
}
|
|
165
175
|
|
|
166
|
-
export interface
|
|
167
|
-
id:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
fees: bigint;
|
|
172
|
-
timestamp: number;
|
|
173
|
-
method: PaymentMethod;
|
|
174
|
-
details?: PaymentDetails;
|
|
175
|
-
conversionDetails?: ConversionDetails;
|
|
176
|
+
export interface RecordChange {
|
|
177
|
+
id: RecordId;
|
|
178
|
+
schemaVersion: string;
|
|
179
|
+
updatedFields: Map<string, string>;
|
|
180
|
+
localRevision: number;
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
export interface
|
|
179
|
-
|
|
180
|
-
minToAmount?: bigint;
|
|
183
|
+
export interface ListUnclaimedDepositsResponse {
|
|
184
|
+
deposits: DepositInfo[];
|
|
181
185
|
}
|
|
182
186
|
|
|
183
|
-
export interface
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
export interface Bolt12OfferDetails {
|
|
188
|
+
absoluteExpiry?: number;
|
|
189
|
+
chains: string[];
|
|
190
|
+
description?: string;
|
|
191
|
+
issuer?: string;
|
|
192
|
+
minAmount?: Amount;
|
|
193
|
+
offer: Bolt12Offer;
|
|
194
|
+
paths: Bolt12OfferBlindedPath[];
|
|
195
|
+
signingPubkey?: string;
|
|
186
196
|
}
|
|
187
197
|
|
|
188
|
-
export
|
|
198
|
+
export interface PaymentRequestSource {
|
|
199
|
+
bip21Uri?: string;
|
|
200
|
+
bip353Address?: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface ListPaymentsRequest {
|
|
204
|
+
typeFilter?: PaymentType[];
|
|
205
|
+
statusFilter?: PaymentStatus[];
|
|
206
|
+
assetFilter?: AssetFilter;
|
|
207
|
+
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
208
|
+
fromTimestamp?: number;
|
|
209
|
+
toTimestamp?: number;
|
|
210
|
+
offset?: number;
|
|
211
|
+
limit?: number;
|
|
212
|
+
sortAscending?: boolean;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface LnurlWithdrawResponse {
|
|
216
|
+
paymentRequest: string;
|
|
217
|
+
payment?: Payment;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface OptimizationProgress {
|
|
221
|
+
isRunning: boolean;
|
|
222
|
+
currentRound: number;
|
|
223
|
+
totalRounds: number;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface SendPaymentResponse {
|
|
227
|
+
payment: Payment;
|
|
228
|
+
}
|
|
189
229
|
|
|
190
230
|
export interface LnurlPayRequestDetails {
|
|
191
231
|
callback: string;
|
|
@@ -200,106 +240,147 @@ export interface LnurlPayRequestDetails {
|
|
|
200
240
|
nostrPubkey?: string;
|
|
201
241
|
}
|
|
202
242
|
|
|
203
|
-
export interface
|
|
204
|
-
|
|
243
|
+
export interface SendOnchainFeeQuote {
|
|
244
|
+
id: string;
|
|
245
|
+
expiresAt: number;
|
|
246
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
247
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
248
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
205
249
|
}
|
|
206
250
|
|
|
207
|
-
export
|
|
251
|
+
export interface RefundDepositRequest {
|
|
252
|
+
txid: string;
|
|
253
|
+
vout: number;
|
|
254
|
+
destinationAddress: string;
|
|
255
|
+
fee: Fee;
|
|
256
|
+
}
|
|
208
257
|
|
|
209
|
-
export type
|
|
258
|
+
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
210
259
|
|
|
211
|
-
export
|
|
212
|
-
|
|
260
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
261
|
+
|
|
262
|
+
export interface Bolt12Offer {
|
|
263
|
+
offer: string;
|
|
264
|
+
source: PaymentRequestSource;
|
|
213
265
|
}
|
|
214
266
|
|
|
215
|
-
export interface
|
|
216
|
-
|
|
267
|
+
export interface PrepareLnurlPayRequest {
|
|
268
|
+
amountSats: number;
|
|
269
|
+
comment?: string;
|
|
270
|
+
payRequest: LnurlPayRequestDetails;
|
|
271
|
+
validateSuccessActionUrl?: boolean;
|
|
272
|
+
conversionOptions?: ConversionOptions;
|
|
273
|
+
feePolicy?: FeePolicy;
|
|
217
274
|
}
|
|
218
275
|
|
|
219
|
-
export type
|
|
276
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
220
277
|
|
|
221
|
-
export interface
|
|
222
|
-
|
|
223
|
-
multiplicity: number;
|
|
278
|
+
export interface GetPaymentRequest {
|
|
279
|
+
paymentId: string;
|
|
224
280
|
}
|
|
225
281
|
|
|
226
|
-
export interface
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
data: Map<string, string>;
|
|
282
|
+
export interface ConversionEstimate {
|
|
283
|
+
options: ConversionOptions;
|
|
284
|
+
amount: bigint;
|
|
285
|
+
fee: bigint;
|
|
231
286
|
}
|
|
232
287
|
|
|
233
|
-
export
|
|
234
|
-
|
|
235
|
-
|
|
288
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
289
|
+
|
|
290
|
+
export interface ProvisionalPayment {
|
|
291
|
+
paymentId: string;
|
|
292
|
+
amount: bigint;
|
|
293
|
+
details: ProvisionalPaymentDetails;
|
|
236
294
|
}
|
|
237
295
|
|
|
238
|
-
export interface
|
|
239
|
-
|
|
296
|
+
export interface FetchConversionLimitsResponse {
|
|
297
|
+
minFromAmount?: bigint;
|
|
298
|
+
minToAmount?: bigint;
|
|
240
299
|
}
|
|
241
300
|
|
|
242
|
-
export interface
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
301
|
+
export interface Bip21Details {
|
|
302
|
+
amountSat?: number;
|
|
303
|
+
assetId?: string;
|
|
304
|
+
uri: string;
|
|
305
|
+
extras: Bip21Extra[];
|
|
306
|
+
label?: string;
|
|
307
|
+
message?: string;
|
|
308
|
+
paymentMethods: InputType[];
|
|
248
309
|
}
|
|
249
310
|
|
|
250
|
-
export interface
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
amountSats: number;
|
|
254
|
-
refundTx?: string;
|
|
255
|
-
refundTxId?: string;
|
|
256
|
-
claimError?: DepositClaimError;
|
|
311
|
+
export interface SparkHtlcOptions {
|
|
312
|
+
paymentHash: string;
|
|
313
|
+
expiryDurationSecs: number;
|
|
257
314
|
}
|
|
258
315
|
|
|
259
|
-
export interface
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
316
|
+
export interface SyncWalletResponse {}
|
|
317
|
+
|
|
318
|
+
export interface ExternalInputParser {
|
|
319
|
+
providerId: string;
|
|
320
|
+
inputRegex: string;
|
|
321
|
+
parserUrl: string;
|
|
263
322
|
}
|
|
264
323
|
|
|
265
|
-
export
|
|
266
|
-
|
|
324
|
+
export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: string; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: string; tokenIdentifier?: string };
|
|
325
|
+
|
|
326
|
+
export interface StableBalanceConfig {
|
|
327
|
+
tokenIdentifier: string;
|
|
328
|
+
thresholdSats?: number;
|
|
329
|
+
maxSlippageBps?: number;
|
|
330
|
+
reservedSats?: number;
|
|
267
331
|
}
|
|
268
332
|
|
|
269
|
-
export interface
|
|
270
|
-
|
|
333
|
+
export interface CurrencyInfo {
|
|
334
|
+
name: string;
|
|
335
|
+
fractionSize: number;
|
|
336
|
+
spacing?: number;
|
|
337
|
+
symbol?: Symbol;
|
|
338
|
+
uniqSymbol?: Symbol;
|
|
339
|
+
localizedName: LocalizedName[];
|
|
340
|
+
localeOverrides: LocaleOverrides[];
|
|
271
341
|
}
|
|
272
342
|
|
|
273
|
-
export interface
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
343
|
+
export interface LnurlPayInfo {
|
|
344
|
+
lnAddress?: string;
|
|
345
|
+
comment?: string;
|
|
346
|
+
domain?: string;
|
|
347
|
+
metadata?: string;
|
|
348
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
349
|
+
rawSuccessAction?: SuccessAction;
|
|
277
350
|
}
|
|
278
351
|
|
|
279
|
-
export interface
|
|
280
|
-
|
|
281
|
-
|
|
352
|
+
export interface KeySetConfig {
|
|
353
|
+
keySetType: KeySetType;
|
|
354
|
+
useAddressIndex: boolean;
|
|
355
|
+
accountNumber?: number;
|
|
282
356
|
}
|
|
283
357
|
|
|
284
|
-
export interface
|
|
285
|
-
|
|
358
|
+
export interface SetLnurlMetadataItem {
|
|
359
|
+
paymentHash: string;
|
|
360
|
+
senderComment?: string;
|
|
361
|
+
nostrZapRequest?: string;
|
|
362
|
+
nostrZapReceipt?: string;
|
|
363
|
+
preimage?: string;
|
|
286
364
|
}
|
|
287
365
|
|
|
288
|
-
export
|
|
366
|
+
export interface ReceivePaymentRequest {
|
|
367
|
+
paymentMethod: ReceivePaymentMethod;
|
|
368
|
+
}
|
|
289
369
|
|
|
290
|
-
export interface
|
|
291
|
-
|
|
292
|
-
|
|
370
|
+
export interface SyncWalletRequest {}
|
|
371
|
+
|
|
372
|
+
export interface FiatCurrency {
|
|
373
|
+
id: string;
|
|
374
|
+
info: CurrencyInfo;
|
|
293
375
|
}
|
|
294
376
|
|
|
295
|
-
export interface
|
|
296
|
-
|
|
297
|
-
inputRegex: string;
|
|
298
|
-
parserUrl: string;
|
|
377
|
+
export interface ClaimDepositResponse {
|
|
378
|
+
payment: Payment;
|
|
299
379
|
}
|
|
300
380
|
|
|
301
|
-
export interface
|
|
302
|
-
|
|
381
|
+
export interface LightningAddressDetails {
|
|
382
|
+
address: string;
|
|
383
|
+
payRequest: LnurlPayRequestDetails;
|
|
303
384
|
}
|
|
304
385
|
|
|
305
386
|
export interface LnurlAuthRequestDetails {
|
|
@@ -309,42 +390,27 @@ export interface LnurlAuthRequestDetails {
|
|
|
309
390
|
url: string;
|
|
310
391
|
}
|
|
311
392
|
|
|
312
|
-
export type
|
|
313
|
-
|
|
314
|
-
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
315
|
-
|
|
316
|
-
export interface LnurlPayInfo {
|
|
317
|
-
lnAddress?: string;
|
|
318
|
-
comment?: string;
|
|
319
|
-
domain?: string;
|
|
320
|
-
metadata?: string;
|
|
321
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
322
|
-
rawSuccessAction?: SuccessAction;
|
|
323
|
-
}
|
|
393
|
+
export type SdkEvent = { type: "synced" } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment } | { type: "optimization"; optimizationEvent: OptimizationEvent };
|
|
324
394
|
|
|
325
|
-
export interface
|
|
326
|
-
|
|
327
|
-
|
|
395
|
+
export interface LightningAddressInfo {
|
|
396
|
+
description: string;
|
|
397
|
+
lightningAddress: string;
|
|
398
|
+
lnurl: LnurlInfo;
|
|
399
|
+
username: string;
|
|
328
400
|
}
|
|
329
401
|
|
|
330
|
-
export type
|
|
402
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
331
403
|
|
|
332
|
-
export interface
|
|
333
|
-
|
|
334
|
-
|
|
404
|
+
export interface SparkStatus {
|
|
405
|
+
status: ServiceStatus;
|
|
406
|
+
lastUpdated: number;
|
|
335
407
|
}
|
|
336
408
|
|
|
337
|
-
export
|
|
338
|
-
paymentRequest: string;
|
|
339
|
-
payment?: Payment;
|
|
340
|
-
}
|
|
409
|
+
export type ConversionStatus = "completed" | "refundNeeded" | "refunded";
|
|
341
410
|
|
|
342
|
-
export interface
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
speedFast: SendOnchainSpeedFeeQuote;
|
|
346
|
-
speedMedium: SendOnchainSpeedFeeQuote;
|
|
347
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
411
|
+
export interface BuyBitcoinRequest {
|
|
412
|
+
lockedAmountSat?: number;
|
|
413
|
+
redirectUrl?: string;
|
|
348
414
|
}
|
|
349
415
|
|
|
350
416
|
export interface SparkAddressDetails {
|
|
@@ -354,10 +420,9 @@ export interface SparkAddressDetails {
|
|
|
354
420
|
source: PaymentRequestSource;
|
|
355
421
|
}
|
|
356
422
|
|
|
357
|
-
export interface
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
source: PaymentRequestSource;
|
|
423
|
+
export interface OptimizationConfig {
|
|
424
|
+
autoEnabled: boolean;
|
|
425
|
+
multiplicity: number;
|
|
361
426
|
}
|
|
362
427
|
|
|
363
428
|
export interface OutgoingChange {
|
|
@@ -365,99 +430,104 @@ export interface OutgoingChange {
|
|
|
365
430
|
parent?: Record;
|
|
366
431
|
}
|
|
367
432
|
|
|
368
|
-
export interface
|
|
369
|
-
|
|
370
|
-
tokenMetadata: TokenMetadata;
|
|
433
|
+
export interface LnurlWithdrawInfo {
|
|
434
|
+
withdrawUrl: string;
|
|
371
435
|
}
|
|
372
436
|
|
|
373
|
-
export interface
|
|
374
|
-
|
|
375
|
-
|
|
437
|
+
export interface AesSuccessActionDataDecrypted {
|
|
438
|
+
description: string;
|
|
439
|
+
plaintext: string;
|
|
376
440
|
}
|
|
377
441
|
|
|
378
|
-
export interface
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
442
|
+
export interface Payment {
|
|
443
|
+
id: string;
|
|
444
|
+
paymentType: PaymentType;
|
|
445
|
+
status: PaymentStatus;
|
|
446
|
+
amount: bigint;
|
|
447
|
+
fees: bigint;
|
|
448
|
+
timestamp: number;
|
|
449
|
+
method: PaymentMethod;
|
|
450
|
+
details?: PaymentDetails;
|
|
451
|
+
conversionDetails?: ConversionDetails;
|
|
383
452
|
}
|
|
384
453
|
|
|
385
|
-
export
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
useAddressIndex: boolean;
|
|
390
|
-
accountNumber?: number;
|
|
454
|
+
export interface LnurlWithdrawRequest {
|
|
455
|
+
amountSats: number;
|
|
456
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
457
|
+
completionTimeoutSecs?: number;
|
|
391
458
|
}
|
|
392
459
|
|
|
393
|
-
export
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
460
|
+
export interface ConversionOptions {
|
|
461
|
+
conversionType: ConversionType;
|
|
462
|
+
maxSlippageBps?: number;
|
|
463
|
+
completionTimeoutSecs?: number;
|
|
397
464
|
}
|
|
398
465
|
|
|
399
|
-
export
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
prepareResponse: PrepareSendPaymentResponse;
|
|
403
|
-
options?: SendPaymentOptions;
|
|
404
|
-
idempotencyKey?: string;
|
|
466
|
+
export interface RecordId {
|
|
467
|
+
type: string;
|
|
468
|
+
dataId: string;
|
|
405
469
|
}
|
|
406
470
|
|
|
407
|
-
export interface
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
471
|
+
export interface StorageListPaymentsRequest {
|
|
472
|
+
typeFilter?: PaymentType[];
|
|
473
|
+
statusFilter?: PaymentStatus[];
|
|
474
|
+
assetFilter?: AssetFilter;
|
|
475
|
+
paymentDetailsFilter?: StoragePaymentDetailsFilter[];
|
|
476
|
+
fromTimestamp?: number;
|
|
477
|
+
toTimestamp?: number;
|
|
478
|
+
offset?: number;
|
|
479
|
+
limit?: number;
|
|
480
|
+
sortAscending?: boolean;
|
|
416
481
|
}
|
|
417
482
|
|
|
418
|
-
export interface
|
|
419
|
-
|
|
483
|
+
export interface BitcoinAddressDetails {
|
|
484
|
+
address: string;
|
|
485
|
+
network: BitcoinNetwork;
|
|
486
|
+
source: PaymentRequestSource;
|
|
420
487
|
}
|
|
421
488
|
|
|
422
|
-
export interface
|
|
423
|
-
|
|
489
|
+
export interface SparkInvoiceDetails {
|
|
490
|
+
invoice: string;
|
|
491
|
+
identityPublicKey: string;
|
|
492
|
+
network: BitcoinNetwork;
|
|
493
|
+
amount?: string;
|
|
424
494
|
tokenIdentifier?: string;
|
|
495
|
+
expiryTime?: number;
|
|
496
|
+
description?: string;
|
|
497
|
+
senderPublicKey?: string;
|
|
425
498
|
}
|
|
426
499
|
|
|
427
|
-
export
|
|
428
|
-
userFeeSat: number;
|
|
429
|
-
l1BroadcastFeeSat: number;
|
|
430
|
-
}
|
|
500
|
+
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
431
501
|
|
|
432
|
-
export interface
|
|
433
|
-
|
|
434
|
-
|
|
502
|
+
export interface ConversionDetails {
|
|
503
|
+
from: ConversionStep;
|
|
504
|
+
to: ConversionStep;
|
|
435
505
|
}
|
|
436
506
|
|
|
437
|
-
export type
|
|
507
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
438
508
|
|
|
439
|
-
export interface
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
509
|
+
export interface ConversionStep {
|
|
510
|
+
paymentId: string;
|
|
511
|
+
amount: bigint;
|
|
512
|
+
fee: bigint;
|
|
513
|
+
method: PaymentMethod;
|
|
514
|
+
tokenMetadata?: TokenMetadata;
|
|
444
515
|
}
|
|
445
516
|
|
|
446
|
-
export interface
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
517
|
+
export interface PrepareLnurlPayResponse {
|
|
518
|
+
amountSats: number;
|
|
519
|
+
comment?: string;
|
|
520
|
+
payRequest: LnurlPayRequestDetails;
|
|
521
|
+
feeSats: number;
|
|
522
|
+
invoiceDetails: Bolt11InvoiceDetails;
|
|
523
|
+
successAction?: SuccessAction;
|
|
524
|
+
conversionEstimate?: ConversionEstimate;
|
|
525
|
+
feePolicy: FeePolicy;
|
|
454
526
|
}
|
|
455
527
|
|
|
456
|
-
export
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
url: string;
|
|
460
|
-
bech32: string;
|
|
528
|
+
export interface SignMessageResponse {
|
|
529
|
+
pubkey: string;
|
|
530
|
+
signature: string;
|
|
461
531
|
}
|
|
462
532
|
|
|
463
533
|
export interface LocaleOverrides {
|
|
@@ -466,228 +536,176 @@ export interface LocaleOverrides {
|
|
|
466
536
|
symbol: Symbol;
|
|
467
537
|
}
|
|
468
538
|
|
|
469
|
-
export
|
|
470
|
-
description: string;
|
|
471
|
-
plaintext: string;
|
|
472
|
-
}
|
|
539
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
473
540
|
|
|
474
|
-
export interface
|
|
475
|
-
|
|
541
|
+
export interface PrepareSendPaymentResponse {
|
|
542
|
+
paymentMethod: SendPaymentMethod;
|
|
543
|
+
amount: bigint;
|
|
544
|
+
tokenIdentifier?: string;
|
|
545
|
+
conversionEstimate?: ConversionEstimate;
|
|
546
|
+
feePolicy: FeePolicy;
|
|
476
547
|
}
|
|
477
548
|
|
|
478
|
-
export interface
|
|
479
|
-
|
|
480
|
-
|
|
549
|
+
export interface GetInfoResponse {
|
|
550
|
+
identityPubkey: string;
|
|
551
|
+
balanceSats: number;
|
|
552
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
481
553
|
}
|
|
482
554
|
|
|
483
|
-
export interface
|
|
484
|
-
|
|
555
|
+
export interface FetchConversionLimitsRequest {
|
|
556
|
+
conversionType: ConversionType;
|
|
557
|
+
tokenIdentifier?: string;
|
|
485
558
|
}
|
|
486
559
|
|
|
487
|
-
export interface
|
|
488
|
-
|
|
560
|
+
export interface ReceivePaymentResponse {
|
|
561
|
+
paymentRequest: string;
|
|
562
|
+
fee: bigint;
|
|
489
563
|
}
|
|
490
564
|
|
|
491
|
-
export interface
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
565
|
+
export interface AesSuccessActionData {
|
|
566
|
+
description: string;
|
|
567
|
+
ciphertext: string;
|
|
568
|
+
iv: string;
|
|
495
569
|
}
|
|
496
570
|
|
|
497
|
-
export interface
|
|
498
|
-
|
|
499
|
-
bip353Address?: string;
|
|
571
|
+
export interface ListPaymentsResponse {
|
|
572
|
+
payments: Payment[];
|
|
500
573
|
}
|
|
501
574
|
|
|
502
|
-
export
|
|
503
|
-
|
|
504
|
-
export interface SparkHtlcOptions {
|
|
505
|
-
paymentHash: string;
|
|
506
|
-
expiryDurationSecs: number;
|
|
575
|
+
export interface MessageSuccessActionData {
|
|
576
|
+
message: string;
|
|
507
577
|
}
|
|
508
578
|
|
|
509
|
-
export interface
|
|
510
|
-
|
|
579
|
+
export interface Bolt12OfferBlindedPath {
|
|
580
|
+
blindedHops: string[];
|
|
511
581
|
}
|
|
512
582
|
|
|
513
|
-
export interface
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
completionTimeoutSecs?: number;
|
|
583
|
+
export interface RefundDepositResponse {
|
|
584
|
+
txId: string;
|
|
585
|
+
txHex: string;
|
|
517
586
|
}
|
|
518
587
|
|
|
519
|
-
export interface
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
totalRounds: number;
|
|
588
|
+
export interface Bip21Extra {
|
|
589
|
+
key: string;
|
|
590
|
+
value: string;
|
|
523
591
|
}
|
|
524
592
|
|
|
525
|
-
export
|
|
526
|
-
pubkey: string;
|
|
527
|
-
signature: string;
|
|
528
|
-
}
|
|
593
|
+
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
529
594
|
|
|
530
|
-
export interface
|
|
531
|
-
|
|
532
|
-
template?: string;
|
|
533
|
-
rtl?: boolean;
|
|
534
|
-
position?: number;
|
|
595
|
+
export interface UpdateUserSettingsRequest {
|
|
596
|
+
sparkPrivateModeEnabled?: boolean;
|
|
535
597
|
}
|
|
536
598
|
|
|
537
|
-
export interface
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
fee: Fee;
|
|
599
|
+
export interface LnurlReceiveMetadata {
|
|
600
|
+
nostrZapRequest?: string;
|
|
601
|
+
nostrZapReceipt?: string;
|
|
602
|
+
senderComment?: string;
|
|
542
603
|
}
|
|
543
604
|
|
|
544
|
-
export interface
|
|
545
|
-
|
|
605
|
+
export interface ClaimHtlcPaymentRequest {
|
|
606
|
+
preimage: string;
|
|
546
607
|
}
|
|
547
608
|
|
|
548
|
-
export type
|
|
549
|
-
|
|
550
|
-
export type ConversionPurpose = { type: "ongoingPayment"; paymentRequest: string } | { type: "selfTransfer" } | { type: "autoConversion" };
|
|
551
|
-
|
|
552
|
-
export type Network = "mainnet" | "regtest";
|
|
553
|
-
|
|
554
|
-
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
609
|
+
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
555
610
|
|
|
556
|
-
export interface
|
|
557
|
-
|
|
558
|
-
comment?: string;
|
|
559
|
-
payRequest: LnurlPayRequestDetails;
|
|
560
|
-
validateSuccessActionUrl?: boolean;
|
|
561
|
-
conversionOptions?: ConversionOptions;
|
|
562
|
-
feePolicy?: FeePolicy;
|
|
611
|
+
export interface CheckLightningAddressRequest {
|
|
612
|
+
username: string;
|
|
563
613
|
}
|
|
564
614
|
|
|
565
|
-
export
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
updatedFields: Map<string, string>;
|
|
571
|
-
localRevision: number;
|
|
615
|
+
export interface SparkHtlcDetails {
|
|
616
|
+
paymentHash: string;
|
|
617
|
+
preimage?: string;
|
|
618
|
+
expiryTime: number;
|
|
619
|
+
status: SparkHtlcStatus;
|
|
572
620
|
}
|
|
573
621
|
|
|
622
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
623
|
+
|
|
574
624
|
export interface UnversionedRecordChange {
|
|
575
625
|
id: RecordId;
|
|
576
626
|
schemaVersion: string;
|
|
577
627
|
updatedFields: Map<string, string>;
|
|
578
628
|
}
|
|
579
629
|
|
|
580
|
-
export
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
630
|
+
export interface Symbol {
|
|
631
|
+
grapheme?: string;
|
|
632
|
+
template?: string;
|
|
633
|
+
rtl?: boolean;
|
|
634
|
+
position?: number;
|
|
585
635
|
}
|
|
586
636
|
|
|
587
|
-
export
|
|
588
|
-
nostrZapRequest?: string;
|
|
589
|
-
nostrZapReceipt?: string;
|
|
590
|
-
senderComment?: string;
|
|
591
|
-
}
|
|
637
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
592
638
|
|
|
593
|
-
export type
|
|
639
|
+
export type Network = "mainnet" | "regtest";
|
|
594
640
|
|
|
595
|
-
export interface
|
|
596
|
-
|
|
597
|
-
thresholdSats?: number;
|
|
598
|
-
maxSlippageBps?: number;
|
|
599
|
-
reservedSats?: number;
|
|
641
|
+
export interface GetTokensMetadataResponse {
|
|
642
|
+
tokensMetadata: TokenMetadata[];
|
|
600
643
|
}
|
|
601
644
|
|
|
602
|
-
export interface
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
tokenBalances: Map<string, TokenBalance>;
|
|
645
|
+
export interface SignMessageRequest {
|
|
646
|
+
message: string;
|
|
647
|
+
compact: boolean;
|
|
606
648
|
}
|
|
607
649
|
|
|
608
|
-
export
|
|
609
|
-
poolId: string;
|
|
610
|
-
conversionId: string;
|
|
611
|
-
status: ConversionStatus;
|
|
612
|
-
fee?: string;
|
|
613
|
-
purpose?: ConversionPurpose;
|
|
614
|
-
}
|
|
650
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
615
651
|
|
|
616
|
-
export interface
|
|
617
|
-
|
|
618
|
-
|
|
652
|
+
export interface PrepareSendPaymentRequest {
|
|
653
|
+
paymentRequest: string;
|
|
654
|
+
amount?: bigint;
|
|
655
|
+
tokenIdentifier?: string;
|
|
656
|
+
conversionOptions?: ConversionOptions;
|
|
657
|
+
feePolicy?: FeePolicy;
|
|
619
658
|
}
|
|
620
659
|
|
|
621
|
-
export interface
|
|
622
|
-
|
|
623
|
-
issuerPublicKey: string;
|
|
624
|
-
name: string;
|
|
625
|
-
ticker: string;
|
|
626
|
-
decimals: number;
|
|
627
|
-
maxSupply: string;
|
|
628
|
-
isFreezable: boolean;
|
|
660
|
+
export interface ListFiatRatesResponse {
|
|
661
|
+
rates: Rate[];
|
|
629
662
|
}
|
|
630
663
|
|
|
631
|
-
export
|
|
632
|
-
sparkPrivateModeEnabled: boolean;
|
|
633
|
-
}
|
|
664
|
+
export type DepositClaimError = { type: "maxDepositClaimFeeExceeded"; tx: string; vout: number; maxFee?: Fee; requiredFeeSats: number; requiredFeeRateSatPerVbyte: number } | { type: "missingUtxo"; tx: string; vout: number } | { type: "generic"; message: string };
|
|
634
665
|
|
|
635
|
-
export type
|
|
666
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
636
667
|
|
|
637
|
-
export interface
|
|
638
|
-
|
|
639
|
-
|
|
668
|
+
export interface LnurlPayRequest {
|
|
669
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
670
|
+
idempotencyKey?: string;
|
|
640
671
|
}
|
|
641
672
|
|
|
642
|
-
export interface
|
|
643
|
-
|
|
644
|
-
|
|
673
|
+
export interface SendPaymentRequest {
|
|
674
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
675
|
+
options?: SendPaymentOptions;
|
|
676
|
+
idempotencyKey?: string;
|
|
645
677
|
}
|
|
646
678
|
|
|
647
|
-
export
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
statusFilter?: PaymentStatus[];
|
|
652
|
-
assetFilter?: AssetFilter;
|
|
653
|
-
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
654
|
-
fromTimestamp?: number;
|
|
655
|
-
toTimestamp?: number;
|
|
656
|
-
offset?: number;
|
|
657
|
-
limit?: number;
|
|
658
|
-
sortAscending?: boolean;
|
|
679
|
+
export interface ClaimDepositRequest {
|
|
680
|
+
txid: string;
|
|
681
|
+
vout: number;
|
|
682
|
+
maxFee?: MaxFee;
|
|
659
683
|
}
|
|
660
684
|
|
|
661
|
-
export interface
|
|
662
|
-
|
|
685
|
+
export interface CheckMessageRequest {
|
|
686
|
+
message: string;
|
|
687
|
+
pubkey: string;
|
|
688
|
+
signature: string;
|
|
663
689
|
}
|
|
664
690
|
|
|
665
|
-
export
|
|
666
|
-
ensureSynced?: boolean;
|
|
667
|
-
}
|
|
691
|
+
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
668
692
|
|
|
669
|
-
export interface
|
|
670
|
-
|
|
693
|
+
export interface SparkInvoicePaymentDetails {
|
|
694
|
+
description?: string;
|
|
695
|
+
invoice: string;
|
|
671
696
|
}
|
|
672
697
|
|
|
673
|
-
export interface
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
fee: bigint;
|
|
679
|
-
method: PaymentMethod;
|
|
680
|
-
tokenMetadata?: TokenMetadata;
|
|
698
|
+
export interface Record {
|
|
699
|
+
id: RecordId;
|
|
700
|
+
revision: number;
|
|
701
|
+
schemaVersion: string;
|
|
702
|
+
data: Map<string, string>;
|
|
681
703
|
}
|
|
682
704
|
|
|
683
|
-
export type
|
|
705
|
+
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: string; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress" } | { type: "bolt11Invoice"; description: string; amountSats?: number; expirySecs?: number; paymentHash?: string };
|
|
684
706
|
|
|
685
|
-
export interface
|
|
686
|
-
|
|
687
|
-
amount: bigint;
|
|
688
|
-
tokenIdentifier?: string;
|
|
689
|
-
conversionEstimate?: ConversionEstimate;
|
|
690
|
-
feePolicy: FeePolicy;
|
|
707
|
+
export interface UserSettings {
|
|
708
|
+
sparkPrivateModeEnabled: boolean;
|
|
691
709
|
}
|
|
692
710
|
|
|
693
711
|
export interface Bolt11RouteHintHop {
|
|
@@ -700,68 +718,116 @@ export interface Bolt11RouteHintHop {
|
|
|
700
718
|
htlcMaximumMsat?: number;
|
|
701
719
|
}
|
|
702
720
|
|
|
703
|
-
export interface
|
|
704
|
-
|
|
705
|
-
|
|
721
|
+
export interface LogEntry {
|
|
722
|
+
line: string;
|
|
723
|
+
level: string;
|
|
706
724
|
}
|
|
707
725
|
|
|
708
|
-
export
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
726
|
+
export type PaymentType = "send" | "receive";
|
|
727
|
+
|
|
728
|
+
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
729
|
+
|
|
730
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
731
|
+
userFeeSat: number;
|
|
732
|
+
l1BroadcastFeeSat: number;
|
|
714
733
|
}
|
|
715
734
|
|
|
716
|
-
export interface
|
|
735
|
+
export interface CheckMessageResponse {
|
|
736
|
+
isValid: boolean;
|
|
737
|
+
}
|
|
717
738
|
|
|
718
|
-
export
|
|
739
|
+
export interface ConversionInfo {
|
|
740
|
+
poolId: string;
|
|
741
|
+
conversionId: string;
|
|
742
|
+
status: ConversionStatus;
|
|
743
|
+
fee?: string;
|
|
744
|
+
purpose?: ConversionPurpose;
|
|
745
|
+
}
|
|
719
746
|
|
|
720
|
-
export
|
|
747
|
+
export interface ListUnclaimedDepositsRequest {}
|
|
721
748
|
|
|
722
|
-
export
|
|
749
|
+
export interface GetPaymentResponse {
|
|
750
|
+
payment: Payment;
|
|
751
|
+
}
|
|
723
752
|
|
|
724
|
-
export interface
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
753
|
+
export interface Credentials {
|
|
754
|
+
username: string;
|
|
755
|
+
password: string;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export interface TokenBalance {
|
|
759
|
+
balance: bigint;
|
|
760
|
+
tokenMetadata: TokenMetadata;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export interface LnurlPayResponse {
|
|
764
|
+
payment: Payment;
|
|
765
|
+
successAction?: SuccessActionProcessed;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
export interface LnurlInfo {
|
|
769
|
+
url: string;
|
|
770
|
+
bech32: string;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export interface Bolt12InvoiceDetails {
|
|
774
|
+
amountMsat: number;
|
|
775
|
+
invoice: Bolt12Invoice;
|
|
728
776
|
}
|
|
729
777
|
|
|
730
|
-
export interface
|
|
731
|
-
|
|
778
|
+
export interface GetTokensMetadataRequest {
|
|
779
|
+
tokenIdentifiers: string[];
|
|
732
780
|
}
|
|
733
781
|
|
|
734
|
-
export interface
|
|
735
|
-
|
|
736
|
-
vout: number;
|
|
737
|
-
maxFee?: MaxFee;
|
|
782
|
+
export interface BuyBitcoinResponse {
|
|
783
|
+
url: string;
|
|
738
784
|
}
|
|
739
785
|
|
|
740
|
-
export
|
|
786
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
741
787
|
|
|
742
|
-
export interface
|
|
743
|
-
|
|
744
|
-
|
|
788
|
+
export interface RegisterLightningAddressRequest {
|
|
789
|
+
username: string;
|
|
790
|
+
description?: string;
|
|
745
791
|
}
|
|
746
792
|
|
|
747
|
-
export interface
|
|
748
|
-
|
|
749
|
-
dataId: string;
|
|
793
|
+
export interface ClaimHtlcPaymentResponse {
|
|
794
|
+
payment: Payment;
|
|
750
795
|
}
|
|
751
796
|
|
|
752
|
-
export interface
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
797
|
+
export interface Config {
|
|
798
|
+
apiKey?: string;
|
|
799
|
+
network: Network;
|
|
800
|
+
syncIntervalSecs: number;
|
|
801
|
+
maxDepositClaimFee?: MaxFee;
|
|
802
|
+
lnurlDomain?: string;
|
|
803
|
+
preferSparkOverLightning: boolean;
|
|
804
|
+
externalInputParsers?: ExternalInputParser[];
|
|
805
|
+
useDefaultExternalInputParsers: boolean;
|
|
806
|
+
realTimeSyncServerUrl?: string;
|
|
807
|
+
privateEnabledDefault: boolean;
|
|
808
|
+
optimizationConfig: OptimizationConfig;
|
|
809
|
+
stableBalanceConfig?: StableBalanceConfig;
|
|
810
|
+
/**
|
|
811
|
+
* Maximum number of concurrent transfer claims.
|
|
812
|
+
*
|
|
813
|
+
* Controls how many pending Spark transfers can be claimed in parallel.
|
|
814
|
+
* Default is 4. Increase for server environments with high incoming
|
|
815
|
+
* payment volume to improve throughput.
|
|
816
|
+
*/
|
|
817
|
+
maxConcurrentClaims: number;
|
|
818
|
+
supportLnurlVerify: boolean;
|
|
756
819
|
}
|
|
757
820
|
|
|
758
|
-
export interface
|
|
821
|
+
export interface SilentPaymentAddressDetails {
|
|
759
822
|
address: string;
|
|
760
823
|
network: BitcoinNetwork;
|
|
761
824
|
source: PaymentRequestSource;
|
|
762
825
|
}
|
|
763
826
|
|
|
764
|
-
export
|
|
827
|
+
export interface LocalizedName {
|
|
828
|
+
locale: string;
|
|
829
|
+
name: string;
|
|
830
|
+
}
|
|
765
831
|
|
|
766
832
|
export interface UrlSuccessActionData {
|
|
767
833
|
description: string;
|
|
@@ -769,11 +835,17 @@ export interface UrlSuccessActionData {
|
|
|
769
835
|
matchesCallbackDomain: boolean;
|
|
770
836
|
}
|
|
771
837
|
|
|
772
|
-
export
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
838
|
+
export type OptimizationEvent = { type: "started"; totalRounds: number } | { type: "roundCompleted"; currentRound: number; totalRounds: number } | { type: "completed" } | { type: "cancelled" } | { type: "failed"; error: string } | { type: "skipped" };
|
|
839
|
+
|
|
840
|
+
export interface Bolt12Invoice {
|
|
841
|
+
invoice: string;
|
|
842
|
+
source: PaymentRequestSource;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export interface Bolt12InvoiceRequestDetails {}
|
|
846
|
+
|
|
847
|
+
export interface GetInfoRequest {
|
|
848
|
+
ensureSynced?: boolean;
|
|
777
849
|
}
|
|
778
850
|
|
|
779
851
|
export interface PaymentMetadata {
|
|
@@ -784,66 +856,11 @@ export interface PaymentMetadata {
|
|
|
784
856
|
conversionInfo?: ConversionInfo;
|
|
785
857
|
}
|
|
786
858
|
|
|
787
|
-
export
|
|
788
|
-
|
|
789
|
-
export interface CheckMessageResponse {
|
|
790
|
-
isValid: boolean;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
export interface Bolt11InvoiceDetails {
|
|
794
|
-
amountMsat?: number;
|
|
795
|
-
description?: string;
|
|
796
|
-
descriptionHash?: string;
|
|
797
|
-
expiry: number;
|
|
798
|
-
invoice: Bolt11Invoice;
|
|
799
|
-
minFinalCltvExpiryDelta: number;
|
|
800
|
-
network: BitcoinNetwork;
|
|
801
|
-
payeePubkey: string;
|
|
802
|
-
paymentHash: string;
|
|
803
|
-
paymentSecret: string;
|
|
804
|
-
routingHints: Bolt11RouteHint[];
|
|
805
|
-
timestamp: number;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
export type ConversionStatus = "completed" | "refundNeeded" | "refunded";
|
|
809
|
-
|
|
810
|
-
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
811
|
-
|
|
812
|
-
export interface ClaimHtlcPaymentResponse {
|
|
813
|
-
payment: Payment;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
export interface Bolt12OfferDetails {
|
|
817
|
-
absoluteExpiry?: number;
|
|
818
|
-
chains: string[];
|
|
819
|
-
description?: string;
|
|
820
|
-
issuer?: string;
|
|
821
|
-
minAmount?: Amount;
|
|
822
|
-
offer: Bolt12Offer;
|
|
823
|
-
paths: Bolt12OfferBlindedPath[];
|
|
824
|
-
signingPubkey?: string;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
export interface CheckMessageRequest {
|
|
828
|
-
message: string;
|
|
829
|
-
pubkey: string;
|
|
830
|
-
signature: string;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
export interface CurrencyInfo {
|
|
834
|
-
name: string;
|
|
835
|
-
fractionSize: number;
|
|
836
|
-
spacing?: number;
|
|
837
|
-
symbol?: Symbol;
|
|
838
|
-
uniqSymbol?: Symbol;
|
|
839
|
-
localizedName: LocalizedName[];
|
|
840
|
-
localeOverrides: LocaleOverrides[];
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
859
|
+
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
844
860
|
|
|
845
|
-
export interface
|
|
846
|
-
|
|
861
|
+
export interface UnfreezeIssuerTokenResponse {
|
|
862
|
+
impactedOutputIds: string[];
|
|
863
|
+
impactedTokenAmount: bigint;
|
|
847
864
|
}
|
|
848
865
|
|
|
849
866
|
export interface UnfreezeIssuerTokenRequest {
|
|
@@ -854,10 +871,6 @@ export interface FreezeIssuerTokenRequest {
|
|
|
854
871
|
address: string;
|
|
855
872
|
}
|
|
856
873
|
|
|
857
|
-
export interface BurnIssuerTokenRequest {
|
|
858
|
-
amount: bigint;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
874
|
export interface FreezeIssuerTokenResponse {
|
|
862
875
|
impactedOutputIds: string[];
|
|
863
876
|
impactedTokenAmount: bigint;
|
|
@@ -871,9 +884,12 @@ export interface CreateIssuerTokenRequest {
|
|
|
871
884
|
maxSupply: bigint;
|
|
872
885
|
}
|
|
873
886
|
|
|
874
|
-
export interface
|
|
875
|
-
|
|
876
|
-
|
|
887
|
+
export interface MintIssuerTokenRequest {
|
|
888
|
+
amount: bigint;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export interface BurnIssuerTokenRequest {
|
|
892
|
+
amount: bigint;
|
|
877
893
|
}
|
|
878
894
|
|
|
879
895
|
export interface ExternalSigner {
|
|
@@ -899,14 +915,21 @@ export interface ExternalSigner {
|
|
|
899
915
|
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
900
916
|
}
|
|
901
917
|
|
|
902
|
-
export
|
|
903
|
-
|
|
918
|
+
export type ExternalSecretToSplit = { type: "secretSource"; source: ExternalSecretSource } | { type: "preimage"; data: number[] };
|
|
919
|
+
|
|
920
|
+
export interface ExternalSignFrostRequest {
|
|
921
|
+
message: number[];
|
|
922
|
+
publicKey: number[];
|
|
923
|
+
secret: ExternalSecretSource;
|
|
924
|
+
verifyingKey: number[];
|
|
925
|
+
selfNonceCommitment: ExternalFrostCommitments;
|
|
926
|
+
statechainCommitments: IdentifierCommitmentPair[];
|
|
927
|
+
adaptorPublicKey?: number[];
|
|
904
928
|
}
|
|
905
929
|
|
|
906
|
-
export interface
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
noncesCiphertext: number[];
|
|
930
|
+
export interface ExternalSigningCommitments {
|
|
931
|
+
hiding: number[];
|
|
932
|
+
binding: number[];
|
|
910
933
|
}
|
|
911
934
|
|
|
912
935
|
export interface ExternalTreeNodeId {
|
|
@@ -917,26 +940,19 @@ export interface SecretBytes {
|
|
|
917
940
|
bytes: number[];
|
|
918
941
|
}
|
|
919
942
|
|
|
920
|
-
export interface
|
|
921
|
-
identifier: ExternalIdentifier;
|
|
922
|
-
commitment: ExternalSigningCommitments;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
export interface ExternalFrostSignatureShare {
|
|
943
|
+
export interface ExternalIdentifier {
|
|
926
944
|
bytes: number[];
|
|
927
945
|
}
|
|
928
946
|
|
|
929
|
-
export interface
|
|
930
|
-
|
|
947
|
+
export interface ExternalFrostCommitments {
|
|
948
|
+
hidingCommitment: number[];
|
|
949
|
+
bindingCommitment: number[];
|
|
950
|
+
noncesCiphertext: number[];
|
|
931
951
|
}
|
|
932
952
|
|
|
933
|
-
export type
|
|
934
|
-
|
|
935
|
-
export interface ExternalFrostSignature {
|
|
936
|
-
bytes: number[];
|
|
937
|
-
}
|
|
953
|
+
export type ExternalSecretSource = { type: "derived"; nodeId: ExternalTreeNodeId } | { type: "encrypted"; key: ExternalEncryptedSecret };
|
|
938
954
|
|
|
939
|
-
export interface
|
|
955
|
+
export interface EcdsaSignatureBytes {
|
|
940
956
|
bytes: number[];
|
|
941
957
|
}
|
|
942
958
|
|
|
@@ -944,7 +960,7 @@ export interface MessageBytes {
|
|
|
944
960
|
bytes: number[];
|
|
945
961
|
}
|
|
946
962
|
|
|
947
|
-
export interface
|
|
963
|
+
export interface ExternalScalar {
|
|
948
964
|
bytes: number[];
|
|
949
965
|
}
|
|
950
966
|
|
|
@@ -952,65 +968,65 @@ export interface HashedMessageBytes {
|
|
|
952
968
|
bytes: number[];
|
|
953
969
|
}
|
|
954
970
|
|
|
955
|
-
export
|
|
971
|
+
export interface IdentifierCommitmentPair {
|
|
972
|
+
identifier: ExternalIdentifier;
|
|
973
|
+
commitment: ExternalSigningCommitments;
|
|
974
|
+
}
|
|
956
975
|
|
|
957
|
-
export interface
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
selfCommitment: ExternalSigningCommitments;
|
|
976
|
+
export interface ExternalEncryptedSecret {
|
|
977
|
+
ciphertext: number[];
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export interface IdentifierPublicKeyPair {
|
|
981
|
+
identifier: ExternalIdentifier;
|
|
964
982
|
publicKey: number[];
|
|
965
|
-
selfSignature: ExternalFrostSignatureShare;
|
|
966
|
-
adaptorPublicKey?: number[];
|
|
967
983
|
}
|
|
968
984
|
|
|
969
|
-
export interface
|
|
970
|
-
|
|
971
|
-
|
|
985
|
+
export interface ExternalSecretShare {
|
|
986
|
+
threshold: number;
|
|
987
|
+
index: ExternalScalar;
|
|
988
|
+
share: ExternalScalar;
|
|
972
989
|
}
|
|
973
990
|
|
|
974
|
-
export interface
|
|
975
|
-
|
|
991
|
+
export interface ExternalFrostSignature {
|
|
992
|
+
bytes: number[];
|
|
976
993
|
}
|
|
977
994
|
|
|
978
|
-
export interface
|
|
979
|
-
|
|
980
|
-
signature: ExternalFrostSignatureShare;
|
|
995
|
+
export interface SchnorrSignatureBytes {
|
|
996
|
+
bytes: number[];
|
|
981
997
|
}
|
|
982
998
|
|
|
983
|
-
export interface
|
|
999
|
+
export interface IdentifierSignaturePair {
|
|
984
1000
|
identifier: ExternalIdentifier;
|
|
985
|
-
|
|
1001
|
+
signature: ExternalFrostSignatureShare;
|
|
986
1002
|
}
|
|
987
1003
|
|
|
988
|
-
export interface
|
|
1004
|
+
export interface PublicKeyBytes {
|
|
989
1005
|
bytes: number[];
|
|
990
1006
|
}
|
|
991
1007
|
|
|
992
|
-
export interface
|
|
1008
|
+
export interface ExternalAggregateFrostRequest {
|
|
993
1009
|
message: number[];
|
|
994
|
-
|
|
995
|
-
|
|
1010
|
+
statechainSignatures: IdentifierSignaturePair[];
|
|
1011
|
+
statechainPublicKeys: IdentifierPublicKeyPair[];
|
|
996
1012
|
verifyingKey: number[];
|
|
997
|
-
selfNonceCommitment: ExternalFrostCommitments;
|
|
998
1013
|
statechainCommitments: IdentifierCommitmentPair[];
|
|
1014
|
+
selfCommitment: ExternalSigningCommitments;
|
|
1015
|
+
publicKey: number[];
|
|
1016
|
+
selfSignature: ExternalFrostSignatureShare;
|
|
999
1017
|
adaptorPublicKey?: number[];
|
|
1000
1018
|
}
|
|
1001
1019
|
|
|
1002
|
-
export interface
|
|
1003
|
-
|
|
1004
|
-
index: ExternalScalar;
|
|
1005
|
-
share: ExternalScalar;
|
|
1020
|
+
export interface RecoverableEcdsaSignatureBytes {
|
|
1021
|
+
bytes: number[];
|
|
1006
1022
|
}
|
|
1007
1023
|
|
|
1008
|
-
export interface
|
|
1009
|
-
|
|
1010
|
-
|
|
1024
|
+
export interface ExternalVerifiableSecretShare {
|
|
1025
|
+
secretShare: ExternalSecretShare;
|
|
1026
|
+
proofs: number[][];
|
|
1011
1027
|
}
|
|
1012
1028
|
|
|
1013
|
-
export interface
|
|
1029
|
+
export interface ExternalFrostSignatureShare {
|
|
1014
1030
|
bytes: number[];
|
|
1015
1031
|
}
|
|
1016
1032
|
|
|
@@ -1018,7 +1034,7 @@ export interface Storage {
|
|
|
1018
1034
|
getCachedItem: (key: string) => Promise<string | null>;
|
|
1019
1035
|
setCachedItem: (key: string, value: string) => Promise<void>;
|
|
1020
1036
|
deleteCachedItem: (key: string) => Promise<void>;
|
|
1021
|
-
listPayments: (request:
|
|
1037
|
+
listPayments: (request: StorageListPaymentsRequest) => Promise<Payment[]>;
|
|
1022
1038
|
insertPayment: (payment: Payment) => Promise<void>;
|
|
1023
1039
|
insertPaymentMetadata: (paymentId: string, metadata: PaymentMetadata) => Promise<void>;
|
|
1024
1040
|
getPaymentById: (id: string) => Promise<Payment>;
|
|
@@ -1274,9 +1290,9 @@ export interface InitOutput {
|
|
|
1274
1290
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
1275
1291
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
1276
1292
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
1277
|
-
readonly
|
|
1278
|
-
readonly
|
|
1279
|
-
readonly
|
|
1293
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hce61e5994b0c00ad: (a: number, b: number) => void;
|
|
1294
|
+
readonly closure1048_externref_shim: (a: number, b: number, c: any) => void;
|
|
1295
|
+
readonly closure642_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
1280
1296
|
readonly __wbindgen_start: () => void;
|
|
1281
1297
|
}
|
|
1282
1298
|
|