@breeztech/breez-sdk-spark 0.11.0 → 0.12.2-dev1
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 +621 -621
- package/bundler/breez_sdk_spark_wasm_bg.js +84 -84
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
- package/deno/breez_sdk_spark_wasm.d.ts +621 -621
- package/deno/breez_sdk_spark_wasm.js +84 -84
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
- package/nodejs/breez_sdk_spark_wasm.d.ts +621 -621
- package/nodejs/breez_sdk_spark_wasm.js +86 -86
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +626 -626
- package/web/breez_sdk_spark_wasm.js +84 -84
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
* - `recycleTimeoutSecs`: 10 (10 seconds idle before disconnect)
|
|
10
10
|
*/
|
|
11
11
|
export function defaultPostgresStorageConfig(connection_string: string): PostgresStorageConfig;
|
|
12
|
-
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
13
|
-
export function defaultConfig(network: Network): Config;
|
|
14
|
-
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
15
|
-
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
16
12
|
/**
|
|
17
13
|
* Creates a default external signer from a mnemonic phrase.
|
|
18
14
|
*
|
|
@@ -20,6 +16,10 @@ export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
|
20
16
|
*/
|
|
21
17
|
export function getSparkStatus(): Promise<SparkStatus>;
|
|
22
18
|
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
19
|
+
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
20
|
+
export function defaultConfig(network: Network): Config;
|
|
21
|
+
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
22
|
+
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
23
23
|
/**
|
|
24
24
|
* Entry point invoked by JavaScript in a worker.
|
|
25
25
|
*/
|
|
@@ -127,14 +127,6 @@ export interface BitcoinChainService {
|
|
|
127
127
|
recommendedFees(): Promise<RecommendedFees>;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
export interface RecommendedFees {
|
|
131
|
-
fastestFee: number;
|
|
132
|
-
halfHourFee: number;
|
|
133
|
-
hourFee: number;
|
|
134
|
-
economyFee: number;
|
|
135
|
-
minimumFee: number;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
130
|
export interface TxStatus {
|
|
139
131
|
confirmed: boolean;
|
|
140
132
|
blockHeight?: number;
|
|
@@ -143,6 +135,14 @@ export interface TxStatus {
|
|
|
143
135
|
|
|
144
136
|
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
145
137
|
|
|
138
|
+
export interface RecommendedFees {
|
|
139
|
+
fastestFee: number;
|
|
140
|
+
halfHourFee: number;
|
|
141
|
+
hourFee: number;
|
|
142
|
+
economyFee: number;
|
|
143
|
+
minimumFee: number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
146
|
export interface Utxo {
|
|
147
147
|
txid: string;
|
|
148
148
|
vout: number;
|
|
@@ -154,135 +154,105 @@ export interface PaymentObserver {
|
|
|
154
154
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
export
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
invoice: Bolt12Invoice;
|
|
157
|
+
export interface BitcoinAddressDetails {
|
|
158
|
+
address: string;
|
|
159
|
+
network: BitcoinNetwork;
|
|
160
|
+
source: PaymentRequestSource;
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
export interface
|
|
165
|
-
|
|
166
|
-
seed: Seed;
|
|
167
|
-
storageDir: string;
|
|
163
|
+
export interface GetPaymentResponse {
|
|
164
|
+
payment: Payment;
|
|
168
165
|
}
|
|
169
166
|
|
|
170
|
-
export type
|
|
167
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
171
168
|
|
|
172
|
-
export interface
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
169
|
+
export interface ListPaymentsRequest {
|
|
170
|
+
typeFilter?: PaymentType[];
|
|
171
|
+
statusFilter?: PaymentStatus[];
|
|
172
|
+
assetFilter?: AssetFilter;
|
|
173
|
+
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
174
|
+
fromTimestamp?: number;
|
|
175
|
+
toTimestamp?: number;
|
|
176
|
+
offset?: number;
|
|
177
|
+
limit?: number;
|
|
178
|
+
sortAscending?: boolean;
|
|
180
179
|
}
|
|
181
180
|
|
|
182
|
-
export interface
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
export interface ReceivePaymentResponse {
|
|
182
|
+
paymentRequest: string;
|
|
183
|
+
fee: bigint;
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
export
|
|
188
|
-
k1: string;
|
|
189
|
-
action?: string;
|
|
190
|
-
domain: string;
|
|
191
|
-
url: string;
|
|
192
|
-
}
|
|
186
|
+
export type Network = "mainnet" | "regtest";
|
|
193
187
|
|
|
194
|
-
export interface
|
|
195
|
-
|
|
196
|
-
|
|
188
|
+
export interface PrepareLnurlPayRequest {
|
|
189
|
+
amountSats: number;
|
|
190
|
+
comment?: string;
|
|
191
|
+
payRequest: LnurlPayRequestDetails;
|
|
192
|
+
validateSuccessActionUrl?: boolean;
|
|
193
|
+
conversionOptions?: ConversionOptions;
|
|
194
|
+
feePolicy?: FeePolicy;
|
|
197
195
|
}
|
|
198
196
|
|
|
199
|
-
export interface
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
export interface ConversionOptions {
|
|
198
|
+
conversionType: ConversionType;
|
|
199
|
+
maxSlippageBps?: number;
|
|
200
|
+
completionTimeoutSecs?: number;
|
|
202
201
|
}
|
|
203
202
|
|
|
204
|
-
export
|
|
205
|
-
|
|
206
|
-
export interface TokenMetadata {
|
|
207
|
-
identifier: string;
|
|
208
|
-
issuerPublicKey: string;
|
|
203
|
+
export interface UpdateContactRequest {
|
|
204
|
+
id: string;
|
|
209
205
|
name: string;
|
|
210
|
-
|
|
211
|
-
decimals: number;
|
|
212
|
-
maxSupply: string;
|
|
213
|
-
isFreezable: boolean;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface OutgoingChange {
|
|
217
|
-
change: RecordChange;
|
|
218
|
-
parent?: Record;
|
|
206
|
+
paymentIdentifier: string;
|
|
219
207
|
}
|
|
220
208
|
|
|
221
209
|
export interface GetInfoRequest {
|
|
222
210
|
ensureSynced?: boolean;
|
|
223
211
|
}
|
|
224
212
|
|
|
225
|
-
export
|
|
226
|
-
amountSat?: number;
|
|
227
|
-
assetId?: string;
|
|
228
|
-
uri: string;
|
|
229
|
-
extras: Bip21Extra[];
|
|
230
|
-
label?: string;
|
|
231
|
-
message?: string;
|
|
232
|
-
paymentMethods: InputType[];
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface ListPaymentsResponse {
|
|
236
|
-
payments: Payment[];
|
|
237
|
-
}
|
|
213
|
+
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 };
|
|
238
214
|
|
|
239
|
-
export interface
|
|
240
|
-
|
|
241
|
-
|
|
215
|
+
export interface RecordId {
|
|
216
|
+
type: string;
|
|
217
|
+
dataId: string;
|
|
242
218
|
}
|
|
243
219
|
|
|
244
|
-
export interface
|
|
245
|
-
|
|
246
|
-
compact: boolean;
|
|
220
|
+
export interface CheckMessageResponse {
|
|
221
|
+
isValid: boolean;
|
|
247
222
|
}
|
|
248
223
|
|
|
249
|
-
export type
|
|
224
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
250
225
|
|
|
251
|
-
export interface
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
signature: string;
|
|
226
|
+
export interface BuyBitcoinRequest {
|
|
227
|
+
lockedAmountSat?: number;
|
|
228
|
+
redirectUrl?: string;
|
|
255
229
|
}
|
|
256
230
|
|
|
257
|
-
export
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
payment: Payment;
|
|
231
|
+
export interface RefundDepositResponse {
|
|
232
|
+
txId: string;
|
|
233
|
+
txHex: string;
|
|
261
234
|
}
|
|
262
235
|
|
|
263
|
-
export
|
|
264
|
-
bolt11: string;
|
|
265
|
-
source: PaymentRequestSource;
|
|
266
|
-
}
|
|
236
|
+
export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
267
237
|
|
|
268
|
-
export interface
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
defaultDescription: string;
|
|
272
|
-
minWithdrawable: number;
|
|
273
|
-
maxWithdrawable: number;
|
|
238
|
+
export interface FiatCurrency {
|
|
239
|
+
id: string;
|
|
240
|
+
info: CurrencyInfo;
|
|
274
241
|
}
|
|
275
242
|
|
|
276
|
-
export interface
|
|
277
|
-
|
|
278
|
-
|
|
243
|
+
export interface PrepareSendPaymentResponse {
|
|
244
|
+
paymentMethod: SendPaymentMethod;
|
|
245
|
+
amount: bigint;
|
|
246
|
+
tokenIdentifier?: string;
|
|
247
|
+
conversionEstimate?: ConversionEstimate;
|
|
248
|
+
feePolicy: FeePolicy;
|
|
279
249
|
}
|
|
280
250
|
|
|
281
|
-
export interface
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
251
|
+
export interface StableBalanceConfig {
|
|
252
|
+
tokenIdentifier: string;
|
|
253
|
+
thresholdSats?: number;
|
|
254
|
+
maxSlippageBps?: number;
|
|
255
|
+
reservedSats?: number;
|
|
286
256
|
}
|
|
287
257
|
|
|
288
258
|
export interface Payment {
|
|
@@ -297,246 +267,191 @@ export interface Payment {
|
|
|
297
267
|
conversionDetails?: ConversionDetails;
|
|
298
268
|
}
|
|
299
269
|
|
|
300
|
-
export
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
export interface Bip21Extra {
|
|
307
|
-
key: string;
|
|
308
|
-
value: string;
|
|
270
|
+
export interface ConversionInfo {
|
|
271
|
+
poolId: string;
|
|
272
|
+
conversionId: string;
|
|
273
|
+
status: ConversionStatus;
|
|
274
|
+
fee?: string;
|
|
275
|
+
purpose?: ConversionPurpose;
|
|
309
276
|
}
|
|
310
277
|
|
|
311
|
-
export
|
|
312
|
-
currencies: FiatCurrency[];
|
|
313
|
-
}
|
|
278
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
314
279
|
|
|
315
|
-
export interface
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
speedFast: SendOnchainSpeedFeeQuote;
|
|
319
|
-
speedMedium: SendOnchainSpeedFeeQuote;
|
|
320
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
280
|
+
export interface Bolt12Invoice {
|
|
281
|
+
invoice: string;
|
|
282
|
+
source: PaymentRequestSource;
|
|
321
283
|
}
|
|
322
284
|
|
|
323
|
-
export interface
|
|
324
|
-
|
|
325
|
-
|
|
285
|
+
export interface Bip21Details {
|
|
286
|
+
amountSat?: number;
|
|
287
|
+
assetId?: string;
|
|
288
|
+
uri: string;
|
|
289
|
+
extras: Bip21Extra[];
|
|
290
|
+
label?: string;
|
|
291
|
+
message?: string;
|
|
292
|
+
paymentMethods: InputType[];
|
|
326
293
|
}
|
|
327
294
|
|
|
328
295
|
export type PaymentType = "send" | "receive";
|
|
329
296
|
|
|
330
|
-
export
|
|
331
|
-
|
|
332
|
-
export interface TokenBalance {
|
|
333
|
-
balance: bigint;
|
|
334
|
-
tokenMetadata: TokenMetadata;
|
|
297
|
+
export interface GetTokensMetadataResponse {
|
|
298
|
+
tokensMetadata: TokenMetadata[];
|
|
335
299
|
}
|
|
336
300
|
|
|
337
|
-
export
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
301
|
+
export interface LightningAddressInfo {
|
|
302
|
+
description: string;
|
|
303
|
+
lightningAddress: string;
|
|
304
|
+
lnurl: LnurlInfo;
|
|
305
|
+
username: string;
|
|
306
|
+
}
|
|
342
307
|
|
|
343
|
-
export interface
|
|
308
|
+
export interface UrlSuccessActionData {
|
|
309
|
+
description: string;
|
|
344
310
|
url: string;
|
|
311
|
+
matchesCallbackDomain: boolean;
|
|
345
312
|
}
|
|
346
313
|
|
|
347
|
-
export interface
|
|
314
|
+
export interface ProvisionalPayment {
|
|
348
315
|
paymentId: string;
|
|
349
316
|
amount: bigint;
|
|
350
|
-
|
|
351
|
-
method: PaymentMethod;
|
|
352
|
-
tokenMetadata?: TokenMetadata;
|
|
317
|
+
details: ProvisionalPaymentDetails;
|
|
353
318
|
}
|
|
354
319
|
|
|
355
|
-
export interface
|
|
320
|
+
export interface Record {
|
|
356
321
|
id: RecordId;
|
|
322
|
+
revision: number;
|
|
357
323
|
schemaVersion: string;
|
|
358
|
-
|
|
359
|
-
localRevision: number;
|
|
324
|
+
data: Map<string, string>;
|
|
360
325
|
}
|
|
361
326
|
|
|
362
|
-
export
|
|
363
|
-
locale: string;
|
|
364
|
-
name: string;
|
|
365
|
-
}
|
|
327
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
366
328
|
|
|
367
|
-
export
|
|
368
|
-
paymentMethod: SendPaymentMethod;
|
|
369
|
-
amount: bigint;
|
|
370
|
-
tokenIdentifier?: string;
|
|
371
|
-
conversionEstimate?: ConversionEstimate;
|
|
372
|
-
feePolicy: FeePolicy;
|
|
373
|
-
}
|
|
329
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
374
330
|
|
|
375
|
-
export
|
|
376
|
-
txid: string;
|
|
377
|
-
vout: number;
|
|
378
|
-
maxFee?: MaxFee;
|
|
379
|
-
}
|
|
331
|
+
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
380
332
|
|
|
381
|
-
export interface
|
|
382
|
-
|
|
383
|
-
|
|
333
|
+
export interface GetInfoResponse {
|
|
334
|
+
identityPubkey: string;
|
|
335
|
+
balanceSats: number;
|
|
336
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
384
337
|
}
|
|
385
338
|
|
|
386
|
-
export
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
id: string;
|
|
390
|
-
name: string;
|
|
391
|
-
paymentIdentifier: string;
|
|
339
|
+
export interface OutgoingChange {
|
|
340
|
+
change: RecordChange;
|
|
341
|
+
parent?: Record;
|
|
392
342
|
}
|
|
393
343
|
|
|
394
|
-
export interface
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
source: PaymentRequestSource;
|
|
344
|
+
export interface AesSuccessActionDataDecrypted {
|
|
345
|
+
description: string;
|
|
346
|
+
plaintext: string;
|
|
398
347
|
}
|
|
399
348
|
|
|
400
|
-
export interface
|
|
401
|
-
|
|
402
|
-
|
|
349
|
+
export interface FetchConversionLimitsResponse {
|
|
350
|
+
minFromAmount?: bigint;
|
|
351
|
+
minToAmount?: bigint;
|
|
403
352
|
}
|
|
404
353
|
|
|
405
|
-
export interface
|
|
406
|
-
|
|
354
|
+
export interface LnurlInfo {
|
|
355
|
+
url: string;
|
|
356
|
+
bech32: string;
|
|
407
357
|
}
|
|
408
358
|
|
|
409
|
-
export interface
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
realTimeSyncServerUrl?: string;
|
|
419
|
-
privateEnabledDefault: boolean;
|
|
420
|
-
optimizationConfig: OptimizationConfig;
|
|
421
|
-
stableBalanceConfig?: StableBalanceConfig;
|
|
422
|
-
/**
|
|
423
|
-
* Maximum number of concurrent transfer claims.
|
|
424
|
-
*
|
|
425
|
-
* Controls how many pending Spark transfers can be claimed in parallel.
|
|
426
|
-
* Default is 4. Increase for server environments with high incoming
|
|
427
|
-
* payment volume to improve throughput.
|
|
428
|
-
*/
|
|
429
|
-
maxConcurrentClaims: number;
|
|
430
|
-
supportLnurlVerify: boolean;
|
|
359
|
+
export interface Bolt12OfferDetails {
|
|
360
|
+
absoluteExpiry?: number;
|
|
361
|
+
chains: string[];
|
|
362
|
+
description?: string;
|
|
363
|
+
issuer?: string;
|
|
364
|
+
minAmount?: Amount;
|
|
365
|
+
offer: Bolt12Offer;
|
|
366
|
+
paths: Bolt12OfferBlindedPath[];
|
|
367
|
+
signingPubkey?: string;
|
|
431
368
|
}
|
|
432
369
|
|
|
433
|
-
export
|
|
434
|
-
payment: Payment;
|
|
435
|
-
}
|
|
370
|
+
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
436
371
|
|
|
437
|
-
export
|
|
438
|
-
newState: Record;
|
|
439
|
-
oldState?: Record;
|
|
440
|
-
}
|
|
372
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
441
373
|
|
|
442
|
-
export type
|
|
374
|
+
export type StoragePaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[]; hasLnurlPreimage?: boolean };
|
|
443
375
|
|
|
444
|
-
export interface
|
|
445
|
-
|
|
446
|
-
|
|
376
|
+
export interface SparkHtlcOptions {
|
|
377
|
+
paymentHash: string;
|
|
378
|
+
expiryDurationSecs: number;
|
|
447
379
|
}
|
|
448
380
|
|
|
449
|
-
export interface
|
|
381
|
+
export interface ConnectRequest {
|
|
382
|
+
config: Config;
|
|
383
|
+
seed: Seed;
|
|
384
|
+
storageDir: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface LnurlWithdrawResponse {
|
|
450
388
|
paymentRequest: string;
|
|
451
|
-
|
|
452
|
-
tokenIdentifier?: string;
|
|
453
|
-
conversionOptions?: ConversionOptions;
|
|
454
|
-
feePolicy?: FeePolicy;
|
|
389
|
+
payment?: Payment;
|
|
455
390
|
}
|
|
456
391
|
|
|
457
|
-
export interface
|
|
458
|
-
|
|
392
|
+
export interface SendPaymentResponse {
|
|
393
|
+
payment: Payment;
|
|
459
394
|
}
|
|
460
395
|
|
|
461
|
-
export type
|
|
396
|
+
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
462
397
|
|
|
463
|
-
export interface
|
|
464
|
-
|
|
465
|
-
signature: string;
|
|
398
|
+
export interface Bolt11RouteHint {
|
|
399
|
+
hops: Bolt11RouteHintHop[];
|
|
466
400
|
}
|
|
467
401
|
|
|
468
|
-
export interface
|
|
469
|
-
|
|
470
|
-
useAddressIndex: boolean;
|
|
471
|
-
accountNumber?: number;
|
|
402
|
+
export interface CheckLightningAddressRequest {
|
|
403
|
+
username: string;
|
|
472
404
|
}
|
|
473
405
|
|
|
474
|
-
export type
|
|
475
|
-
|
|
476
|
-
export interface UnversionedRecordChange {
|
|
477
|
-
id: RecordId;
|
|
478
|
-
schemaVersion: string;
|
|
479
|
-
updatedFields: Map<string, string>;
|
|
480
|
-
}
|
|
406
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
481
407
|
|
|
482
|
-
export
|
|
483
|
-
name: string;
|
|
484
|
-
paymentIdentifier: string;
|
|
485
|
-
}
|
|
408
|
+
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
486
409
|
|
|
487
|
-
export interface
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
410
|
+
export interface SparkInvoiceDetails {
|
|
411
|
+
invoice: string;
|
|
412
|
+
identityPublicKey: string;
|
|
413
|
+
network: BitcoinNetwork;
|
|
414
|
+
amount?: string;
|
|
415
|
+
tokenIdentifier?: string;
|
|
416
|
+
expiryTime?: number;
|
|
417
|
+
description?: string;
|
|
418
|
+
senderPublicKey?: string;
|
|
494
419
|
}
|
|
495
420
|
|
|
496
|
-
export interface
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
nostrZapReceipt?: string;
|
|
501
|
-
preimage?: string;
|
|
421
|
+
export interface KeySetConfig {
|
|
422
|
+
keySetType: KeySetType;
|
|
423
|
+
useAddressIndex: boolean;
|
|
424
|
+
accountNumber?: number;
|
|
502
425
|
}
|
|
503
426
|
|
|
504
|
-
export interface
|
|
427
|
+
export interface AesSuccessActionData {
|
|
505
428
|
description: string;
|
|
506
|
-
|
|
429
|
+
ciphertext: string;
|
|
430
|
+
iv: string;
|
|
507
431
|
}
|
|
508
432
|
|
|
509
|
-
export
|
|
510
|
-
|
|
511
|
-
export interface UserSettings {
|
|
512
|
-
sparkPrivateModeEnabled: boolean;
|
|
513
|
-
}
|
|
433
|
+
export interface SyncWalletResponse {}
|
|
514
434
|
|
|
515
|
-
export interface
|
|
516
|
-
|
|
435
|
+
export interface GetPaymentRequest {
|
|
436
|
+
paymentId: string;
|
|
517
437
|
}
|
|
518
438
|
|
|
519
|
-
export type
|
|
439
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
520
440
|
|
|
521
|
-
export
|
|
441
|
+
export interface ListFiatRatesResponse {
|
|
442
|
+
rates: Rate[];
|
|
443
|
+
}
|
|
522
444
|
|
|
523
|
-
export type
|
|
445
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
524
446
|
|
|
525
447
|
export interface Credentials {
|
|
526
448
|
username: string;
|
|
527
449
|
password: string;
|
|
528
450
|
}
|
|
529
451
|
|
|
530
|
-
export interface
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
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 } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo };
|
|
535
|
-
|
|
536
|
-
export interface AesSuccessActionData {
|
|
537
|
-
description: string;
|
|
538
|
-
ciphertext: string;
|
|
539
|
-
iv: string;
|
|
452
|
+
export interface SignMessageRequest {
|
|
453
|
+
message: string;
|
|
454
|
+
compact: boolean;
|
|
540
455
|
}
|
|
541
456
|
|
|
542
457
|
export interface SparkHtlcDetails {
|
|
@@ -546,7 +461,35 @@ export interface SparkHtlcDetails {
|
|
|
546
461
|
status: SparkHtlcStatus;
|
|
547
462
|
}
|
|
548
463
|
|
|
549
|
-
export
|
|
464
|
+
export interface LnurlPayRequest {
|
|
465
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
466
|
+
idempotencyKey?: string;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export interface Bolt11InvoiceDetails {
|
|
470
|
+
amountMsat?: number;
|
|
471
|
+
description?: string;
|
|
472
|
+
descriptionHash?: string;
|
|
473
|
+
expiry: number;
|
|
474
|
+
invoice: Bolt11Invoice;
|
|
475
|
+
minFinalCltvExpiryDelta: number;
|
|
476
|
+
network: BitcoinNetwork;
|
|
477
|
+
payeePubkey: string;
|
|
478
|
+
paymentHash: string;
|
|
479
|
+
paymentSecret: string;
|
|
480
|
+
routingHints: Bolt11RouteHint[];
|
|
481
|
+
timestamp: number;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface PaymentRequestSource {
|
|
485
|
+
bip21Uri?: string;
|
|
486
|
+
bip353Address?: string;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface LocalizedName {
|
|
490
|
+
locale: string;
|
|
491
|
+
name: string;
|
|
492
|
+
}
|
|
550
493
|
|
|
551
494
|
export interface Symbol {
|
|
552
495
|
grapheme?: string;
|
|
@@ -555,61 +498,35 @@ export interface Symbol {
|
|
|
555
498
|
position?: number;
|
|
556
499
|
}
|
|
557
500
|
|
|
558
|
-
export interface
|
|
559
|
-
|
|
560
|
-
|
|
501
|
+
export interface LightningAddressDetails {
|
|
502
|
+
address: string;
|
|
503
|
+
payRequest: LnurlPayRequestDetails;
|
|
561
504
|
}
|
|
562
505
|
|
|
563
|
-
export
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
lnAddress?: string;
|
|
569
|
-
comment?: string;
|
|
570
|
-
domain?: string;
|
|
571
|
-
metadata?: string;
|
|
572
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
573
|
-
rawSuccessAction?: SuccessAction;
|
|
506
|
+
export interface RecordChange {
|
|
507
|
+
id: RecordId;
|
|
508
|
+
schemaVersion: string;
|
|
509
|
+
updatedFields: Map<string, string>;
|
|
510
|
+
localRevision: number;
|
|
574
511
|
}
|
|
575
512
|
|
|
576
|
-
export
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
paymentId: string;
|
|
580
|
-
amount: bigint;
|
|
581
|
-
details: ProvisionalPaymentDetails;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
export interface FetchConversionLimitsResponse {
|
|
585
|
-
minFromAmount?: bigint;
|
|
586
|
-
minToAmount?: bigint;
|
|
513
|
+
export interface Bolt11Invoice {
|
|
514
|
+
bolt11: string;
|
|
515
|
+
source: PaymentRequestSource;
|
|
587
516
|
}
|
|
588
517
|
|
|
589
|
-
export interface
|
|
590
|
-
|
|
518
|
+
export interface ClaimHtlcPaymentRequest {
|
|
519
|
+
preimage: string;
|
|
591
520
|
}
|
|
592
521
|
|
|
593
|
-
export interface
|
|
594
|
-
|
|
595
|
-
chains: string[];
|
|
596
|
-
description?: string;
|
|
597
|
-
issuer?: string;
|
|
598
|
-
minAmount?: Amount;
|
|
599
|
-
offer: Bolt12Offer;
|
|
600
|
-
paths: Bolt12OfferBlindedPath[];
|
|
601
|
-
signingPubkey?: string;
|
|
522
|
+
export interface GetTokensMetadataRequest {
|
|
523
|
+
tokenIdentifiers: string[];
|
|
602
524
|
}
|
|
603
525
|
|
|
604
|
-
export type
|
|
605
|
-
|
|
606
|
-
export interface ClaimHtlcPaymentResponse {
|
|
607
|
-
payment: Payment;
|
|
608
|
-
}
|
|
526
|
+
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 };
|
|
609
527
|
|
|
610
|
-
export interface
|
|
611
|
-
|
|
612
|
-
idempotencyKey?: string;
|
|
528
|
+
export interface LnurlErrorDetails {
|
|
529
|
+
reason: string;
|
|
613
530
|
}
|
|
614
531
|
|
|
615
532
|
export interface SparkAddressDetails {
|
|
@@ -619,23 +536,71 @@ export interface SparkAddressDetails {
|
|
|
619
536
|
source: PaymentRequestSource;
|
|
620
537
|
}
|
|
621
538
|
|
|
539
|
+
export interface ReceivePaymentRequest {
|
|
540
|
+
paymentMethod: ReceivePaymentMethod;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
544
|
+
userFeeSat: number;
|
|
545
|
+
l1BroadcastFeeSat: number;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export interface Bolt11RouteHintHop {
|
|
549
|
+
srcNodeId: string;
|
|
550
|
+
shortChannelId: string;
|
|
551
|
+
feesBaseMsat: number;
|
|
552
|
+
feesProportionalMillionths: number;
|
|
553
|
+
cltvExpiryDelta: number;
|
|
554
|
+
htlcMinimumMsat?: number;
|
|
555
|
+
htlcMaximumMsat?: number;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
559
|
+
|
|
560
|
+
export interface ConversionDetails {
|
|
561
|
+
from: ConversionStep;
|
|
562
|
+
to: ConversionStep;
|
|
563
|
+
}
|
|
564
|
+
|
|
622
565
|
export interface ConversionEstimate {
|
|
623
566
|
options: ConversionOptions;
|
|
624
567
|
amount: bigint;
|
|
625
568
|
fee: bigint;
|
|
626
569
|
}
|
|
627
570
|
|
|
628
|
-
export interface
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
571
|
+
export interface PrepareSendPaymentRequest {
|
|
572
|
+
paymentRequest: string;
|
|
573
|
+
amount?: bigint;
|
|
574
|
+
tokenIdentifier?: string;
|
|
575
|
+
conversionOptions?: ConversionOptions;
|
|
576
|
+
feePolicy?: FeePolicy;
|
|
632
577
|
}
|
|
633
578
|
|
|
634
|
-
export interface
|
|
579
|
+
export interface ClaimDepositResponse {
|
|
580
|
+
payment: Payment;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export interface RefundDepositRequest {
|
|
584
|
+
txid: string;
|
|
585
|
+
vout: number;
|
|
586
|
+
destinationAddress: string;
|
|
587
|
+
fee: Fee;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export interface ListFiatCurrenciesResponse {
|
|
591
|
+
currencies: FiatCurrency[];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export interface OptimizationConfig {
|
|
595
|
+
autoEnabled: boolean;
|
|
596
|
+
multiplicity: number;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
export interface StorageListPaymentsRequest {
|
|
635
600
|
typeFilter?: PaymentType[];
|
|
636
601
|
statusFilter?: PaymentStatus[];
|
|
637
602
|
assetFilter?: AssetFilter;
|
|
638
|
-
paymentDetailsFilter?:
|
|
603
|
+
paymentDetailsFilter?: StoragePaymentDetailsFilter[];
|
|
639
604
|
fromTimestamp?: number;
|
|
640
605
|
toTimestamp?: number;
|
|
641
606
|
offset?: number;
|
|
@@ -643,131 +608,172 @@ export interface ListPaymentsRequest {
|
|
|
643
608
|
sortAscending?: boolean;
|
|
644
609
|
}
|
|
645
610
|
|
|
646
|
-
export
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
callback: string;
|
|
650
|
-
minSendable: number;
|
|
651
|
-
maxSendable: number;
|
|
652
|
-
metadataStr: string;
|
|
653
|
-
commentAllowed: number;
|
|
654
|
-
domain: string;
|
|
655
|
-
url: string;
|
|
656
|
-
address?: string;
|
|
657
|
-
allowsNostr?: boolean;
|
|
658
|
-
nostrPubkey?: string;
|
|
611
|
+
export interface LogEntry {
|
|
612
|
+
line: string;
|
|
613
|
+
level: string;
|
|
659
614
|
}
|
|
660
615
|
|
|
661
|
-
export
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
feePolicy: FeePolicy;
|
|
616
|
+
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
617
|
+
|
|
618
|
+
export interface ConversionStep {
|
|
619
|
+
paymentId: string;
|
|
620
|
+
amount: bigint;
|
|
621
|
+
fee: bigint;
|
|
622
|
+
method: PaymentMethod;
|
|
623
|
+
tokenMetadata?: TokenMetadata;
|
|
670
624
|
}
|
|
671
625
|
|
|
672
|
-
export interface
|
|
673
|
-
|
|
674
|
-
options?: SendPaymentOptions;
|
|
675
|
-
idempotencyKey?: string;
|
|
626
|
+
export interface Bolt12OfferBlindedPath {
|
|
627
|
+
blindedHops: string[];
|
|
676
628
|
}
|
|
677
629
|
|
|
678
630
|
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 };
|
|
679
631
|
|
|
680
|
-
export interface
|
|
681
|
-
|
|
682
|
-
|
|
632
|
+
export interface LnurlWithdrawRequest {
|
|
633
|
+
amountSats: number;
|
|
634
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
635
|
+
completionTimeoutSecs?: number;
|
|
683
636
|
}
|
|
684
637
|
|
|
685
|
-
export interface
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
username: string;
|
|
638
|
+
export interface ClaimDepositRequest {
|
|
639
|
+
txid: string;
|
|
640
|
+
vout: number;
|
|
641
|
+
maxFee?: MaxFee;
|
|
690
642
|
}
|
|
691
643
|
|
|
692
|
-
export interface
|
|
693
|
-
|
|
644
|
+
export interface Rate {
|
|
645
|
+
coin: string;
|
|
646
|
+
value: number;
|
|
694
647
|
}
|
|
695
648
|
|
|
696
|
-
export
|
|
697
|
-
|
|
698
|
-
|
|
649
|
+
export interface Bolt12InvoiceDetails {
|
|
650
|
+
amountMsat: number;
|
|
651
|
+
invoice: Bolt12Invoice;
|
|
652
|
+
}
|
|
699
653
|
|
|
700
|
-
export
|
|
654
|
+
export interface ListPaymentsResponse {
|
|
655
|
+
payments: Payment[];
|
|
656
|
+
}
|
|
701
657
|
|
|
702
|
-
export interface
|
|
658
|
+
export interface LnurlPayInfo {
|
|
659
|
+
lnAddress?: string;
|
|
660
|
+
comment?: string;
|
|
661
|
+
domain?: string;
|
|
662
|
+
metadata?: string;
|
|
663
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
664
|
+
rawSuccessAction?: SuccessAction;
|
|
665
|
+
}
|
|
703
666
|
|
|
704
|
-
export interface
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
source: PaymentRequestSource;
|
|
667
|
+
export interface IncomingChange {
|
|
668
|
+
newState: Record;
|
|
669
|
+
oldState?: Record;
|
|
708
670
|
}
|
|
709
671
|
|
|
710
|
-
export interface
|
|
711
|
-
|
|
712
|
-
conversionId: string;
|
|
713
|
-
status: ConversionStatus;
|
|
714
|
-
fee?: string;
|
|
715
|
-
purpose?: ConversionPurpose;
|
|
672
|
+
export interface UserSettings {
|
|
673
|
+
sparkPrivateModeEnabled: boolean;
|
|
716
674
|
}
|
|
717
675
|
|
|
718
|
-
export
|
|
676
|
+
export interface DepositInfo {
|
|
677
|
+
txid: string;
|
|
678
|
+
vout: number;
|
|
679
|
+
amountSats: number;
|
|
680
|
+
refundTx?: string;
|
|
681
|
+
refundTxId?: string;
|
|
682
|
+
claimError?: DepositClaimError;
|
|
683
|
+
}
|
|
719
684
|
|
|
720
|
-
export interface
|
|
721
|
-
|
|
722
|
-
nostrZapReceipt?: string;
|
|
723
|
-
senderComment?: string;
|
|
685
|
+
export interface UpdateUserSettingsRequest {
|
|
686
|
+
sparkPrivateModeEnabled?: boolean;
|
|
724
687
|
}
|
|
725
688
|
|
|
726
|
-
export interface
|
|
727
|
-
|
|
728
|
-
|
|
689
|
+
export interface Config {
|
|
690
|
+
apiKey?: string;
|
|
691
|
+
network: Network;
|
|
692
|
+
syncIntervalSecs: number;
|
|
693
|
+
maxDepositClaimFee?: MaxFee;
|
|
694
|
+
lnurlDomain?: string;
|
|
695
|
+
preferSparkOverLightning: boolean;
|
|
696
|
+
externalInputParsers?: ExternalInputParser[];
|
|
697
|
+
useDefaultExternalInputParsers: boolean;
|
|
698
|
+
realTimeSyncServerUrl?: string;
|
|
699
|
+
privateEnabledDefault: boolean;
|
|
700
|
+
optimizationConfig: OptimizationConfig;
|
|
701
|
+
stableBalanceConfig?: StableBalanceConfig;
|
|
702
|
+
/**
|
|
703
|
+
* Maximum number of concurrent transfer claims.
|
|
704
|
+
*
|
|
705
|
+
* Controls how many pending Spark transfers can be claimed in parallel.
|
|
706
|
+
* Default is 4. Increase for server environments with high incoming
|
|
707
|
+
* payment volume to improve throughput.
|
|
708
|
+
*/
|
|
709
|
+
maxConcurrentClaims: number;
|
|
710
|
+
supportLnurlVerify: boolean;
|
|
729
711
|
}
|
|
730
712
|
|
|
731
|
-
export
|
|
713
|
+
export interface TokenMetadata {
|
|
714
|
+
identifier: string;
|
|
715
|
+
issuerPublicKey: string;
|
|
716
|
+
name: string;
|
|
717
|
+
ticker: string;
|
|
718
|
+
decimals: number;
|
|
719
|
+
maxSupply: string;
|
|
720
|
+
isFreezable: boolean;
|
|
721
|
+
}
|
|
732
722
|
|
|
733
|
-
export interface
|
|
734
|
-
|
|
723
|
+
export interface CheckMessageRequest {
|
|
724
|
+
message: string;
|
|
725
|
+
pubkey: string;
|
|
726
|
+
signature: string;
|
|
735
727
|
}
|
|
736
728
|
|
|
737
|
-
export
|
|
738
|
-
|
|
739
|
-
|
|
729
|
+
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 } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo };
|
|
730
|
+
|
|
731
|
+
export interface LnurlPayRequestDetails {
|
|
732
|
+
callback: string;
|
|
733
|
+
minSendable: number;
|
|
734
|
+
maxSendable: number;
|
|
735
|
+
metadataStr: string;
|
|
736
|
+
commentAllowed: number;
|
|
737
|
+
domain: string;
|
|
738
|
+
url: string;
|
|
739
|
+
address?: string;
|
|
740
|
+
allowsNostr?: boolean;
|
|
741
|
+
nostrPubkey?: string;
|
|
740
742
|
}
|
|
741
743
|
|
|
742
|
-
export interface
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
validateSuccessActionUrl?: boolean;
|
|
747
|
-
conversionOptions?: ConversionOptions;
|
|
748
|
-
feePolicy?: FeePolicy;
|
|
744
|
+
export interface OptimizationProgress {
|
|
745
|
+
isRunning: boolean;
|
|
746
|
+
currentRound: number;
|
|
747
|
+
totalRounds: number;
|
|
749
748
|
}
|
|
750
749
|
|
|
751
|
-
export interface
|
|
752
|
-
|
|
753
|
-
|
|
750
|
+
export interface LnurlAuthRequestDetails {
|
|
751
|
+
k1: string;
|
|
752
|
+
action?: string;
|
|
753
|
+
domain: string;
|
|
754
|
+
url: string;
|
|
754
755
|
}
|
|
755
756
|
|
|
756
|
-
export interface
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
localizedName: LocalizedName[];
|
|
763
|
-
localeOverrides: LocaleOverrides[];
|
|
757
|
+
export interface PaymentMetadata {
|
|
758
|
+
parentPaymentId?: string;
|
|
759
|
+
lnurlPayInfo?: LnurlPayInfo;
|
|
760
|
+
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
761
|
+
lnurlDescription?: string;
|
|
762
|
+
conversionInfo?: ConversionInfo;
|
|
764
763
|
}
|
|
765
764
|
|
|
766
|
-
export interface
|
|
767
|
-
|
|
768
|
-
|
|
765
|
+
export interface LnurlWithdrawRequestDetails {
|
|
766
|
+
callback: string;
|
|
767
|
+
k1: string;
|
|
768
|
+
defaultDescription: string;
|
|
769
|
+
minWithdrawable: number;
|
|
770
|
+
maxWithdrawable: number;
|
|
769
771
|
}
|
|
770
772
|
|
|
773
|
+
export type OptimizationEvent = { type: "started"; totalRounds: number } | { type: "roundCompleted"; currentRound: number; totalRounds: number } | { type: "completed" } | { type: "cancelled" } | { type: "failed"; error: string } | { type: "skipped" };
|
|
774
|
+
|
|
775
|
+
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
776
|
+
|
|
771
777
|
export interface Contact {
|
|
772
778
|
id: string;
|
|
773
779
|
name: string;
|
|
@@ -776,186 +782,180 @@ export interface Contact {
|
|
|
776
782
|
updatedAt: number;
|
|
777
783
|
}
|
|
778
784
|
|
|
779
|
-
export interface
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
matchesCallbackDomain: boolean;
|
|
785
|
+
export interface ListContactsRequest {
|
|
786
|
+
offset?: number;
|
|
787
|
+
limit?: number;
|
|
783
788
|
}
|
|
784
789
|
|
|
785
|
-
export type
|
|
786
|
-
|
|
787
|
-
export interface Bolt11InvoiceDetails {
|
|
788
|
-
amountMsat?: number;
|
|
789
|
-
description?: string;
|
|
790
|
-
descriptionHash?: string;
|
|
791
|
-
expiry: number;
|
|
792
|
-
invoice: Bolt11Invoice;
|
|
793
|
-
minFinalCltvExpiryDelta: number;
|
|
794
|
-
network: BitcoinNetwork;
|
|
795
|
-
payeePubkey: string;
|
|
796
|
-
paymentHash: string;
|
|
797
|
-
paymentSecret: string;
|
|
798
|
-
routingHints: Bolt11RouteHint[];
|
|
799
|
-
timestamp: number;
|
|
800
|
-
}
|
|
790
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
801
791
|
|
|
802
|
-
export interface
|
|
803
|
-
|
|
804
|
-
vout: number;
|
|
805
|
-
destinationAddress: string;
|
|
806
|
-
fee: Fee;
|
|
792
|
+
export interface BuyBitcoinResponse {
|
|
793
|
+
url: string;
|
|
807
794
|
}
|
|
808
795
|
|
|
809
|
-
export type
|
|
810
|
-
|
|
811
|
-
export interface BuyBitcoinRequest {
|
|
812
|
-
lockedAmountSat?: number;
|
|
813
|
-
redirectUrl?: string;
|
|
814
|
-
}
|
|
796
|
+
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
815
797
|
|
|
816
|
-
export interface
|
|
817
|
-
|
|
818
|
-
|
|
798
|
+
export interface Bip21Extra {
|
|
799
|
+
key: string;
|
|
800
|
+
value: string;
|
|
819
801
|
}
|
|
820
802
|
|
|
821
|
-
export
|
|
822
|
-
identityPubkey: string;
|
|
823
|
-
balanceSats: number;
|
|
824
|
-
tokenBalances: Map<string, TokenBalance>;
|
|
825
|
-
}
|
|
803
|
+
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);
|
|
826
804
|
|
|
827
805
|
export interface Bolt12Offer {
|
|
828
806
|
offer: string;
|
|
829
807
|
source: PaymentRequestSource;
|
|
830
808
|
}
|
|
831
809
|
|
|
832
|
-
export
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
810
|
+
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 };
|
|
811
|
+
|
|
812
|
+
export interface SendPaymentRequest {
|
|
813
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
814
|
+
options?: SendPaymentOptions;
|
|
815
|
+
idempotencyKey?: string;
|
|
838
816
|
}
|
|
839
817
|
|
|
840
|
-
export interface
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
818
|
+
export interface UnversionedRecordChange {
|
|
819
|
+
id: RecordId;
|
|
820
|
+
schemaVersion: string;
|
|
821
|
+
updatedFields: Map<string, string>;
|
|
844
822
|
}
|
|
845
823
|
|
|
846
|
-
export interface
|
|
847
|
-
|
|
848
|
-
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
849
|
-
completionTimeoutSecs?: number;
|
|
824
|
+
export interface MessageSuccessActionData {
|
|
825
|
+
message: string;
|
|
850
826
|
}
|
|
851
827
|
|
|
852
|
-
export interface
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
828
|
+
export interface Bolt12InvoiceRequestDetails {}
|
|
829
|
+
|
|
830
|
+
export interface TokenBalance {
|
|
831
|
+
balance: bigint;
|
|
832
|
+
tokenMetadata: TokenMetadata;
|
|
856
833
|
}
|
|
857
834
|
|
|
858
|
-
export interface
|
|
859
|
-
|
|
835
|
+
export interface FetchConversionLimitsRequest {
|
|
836
|
+
conversionType: ConversionType;
|
|
837
|
+
tokenIdentifier?: string;
|
|
860
838
|
}
|
|
861
839
|
|
|
862
|
-
export interface
|
|
863
|
-
|
|
864
|
-
|
|
840
|
+
export interface SyncWalletRequest {}
|
|
841
|
+
|
|
842
|
+
export interface ExternalInputParser {
|
|
843
|
+
providerId: string;
|
|
844
|
+
inputRegex: string;
|
|
845
|
+
parserUrl: string;
|
|
865
846
|
}
|
|
866
847
|
|
|
867
|
-
export interface
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
senderPublicKey?: string;
|
|
848
|
+
export interface CurrencyInfo {
|
|
849
|
+
name: string;
|
|
850
|
+
fractionSize: number;
|
|
851
|
+
spacing?: number;
|
|
852
|
+
symbol?: Symbol;
|
|
853
|
+
uniqSymbol?: Symbol;
|
|
854
|
+
localizedName: LocalizedName[];
|
|
855
|
+
localeOverrides: LocaleOverrides[];
|
|
876
856
|
}
|
|
877
857
|
|
|
878
|
-
export interface
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
assetFilter?: AssetFilter;
|
|
882
|
-
paymentDetailsFilter?: StoragePaymentDetailsFilter[];
|
|
883
|
-
fromTimestamp?: number;
|
|
884
|
-
toTimestamp?: number;
|
|
885
|
-
offset?: number;
|
|
886
|
-
limit?: number;
|
|
887
|
-
sortAscending?: boolean;
|
|
858
|
+
export interface LnurlPayResponse {
|
|
859
|
+
payment: Payment;
|
|
860
|
+
successAction?: SuccessActionProcessed;
|
|
888
861
|
}
|
|
889
862
|
|
|
890
|
-
export
|
|
891
|
-
|
|
863
|
+
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
864
|
+
|
|
865
|
+
export interface AddContactRequest {
|
|
866
|
+
name: string;
|
|
867
|
+
paymentIdentifier: string;
|
|
892
868
|
}
|
|
893
869
|
|
|
894
|
-
export interface
|
|
895
|
-
|
|
870
|
+
export interface SetLnurlMetadataItem {
|
|
871
|
+
paymentHash: string;
|
|
872
|
+
senderComment?: string;
|
|
873
|
+
nostrZapRequest?: string;
|
|
874
|
+
nostrZapReceipt?: string;
|
|
875
|
+
preimage?: string;
|
|
896
876
|
}
|
|
897
877
|
|
|
898
|
-
export interface
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
maxSlippageBps?: number;
|
|
902
|
-
reservedSats?: number;
|
|
878
|
+
export interface SparkInvoicePaymentDetails {
|
|
879
|
+
description?: string;
|
|
880
|
+
invoice: string;
|
|
903
881
|
}
|
|
904
882
|
|
|
905
|
-
export interface
|
|
906
|
-
|
|
883
|
+
export interface LocaleOverrides {
|
|
884
|
+
locale: string;
|
|
885
|
+
spacing?: number;
|
|
886
|
+
symbol: Symbol;
|
|
907
887
|
}
|
|
908
888
|
|
|
909
|
-
export
|
|
910
|
-
|
|
911
|
-
|
|
889
|
+
export type ConversionStatus = "completed" | "refundNeeded" | "refunded";
|
|
890
|
+
|
|
891
|
+
export interface LnurlReceiveMetadata {
|
|
892
|
+
nostrZapRequest?: string;
|
|
893
|
+
nostrZapReceipt?: string;
|
|
894
|
+
senderComment?: string;
|
|
912
895
|
}
|
|
913
896
|
|
|
914
|
-
export interface
|
|
915
|
-
|
|
897
|
+
export interface SilentPaymentAddressDetails {
|
|
898
|
+
address: string;
|
|
899
|
+
network: BitcoinNetwork;
|
|
900
|
+
source: PaymentRequestSource;
|
|
916
901
|
}
|
|
917
902
|
|
|
903
|
+
export type TokenTransactionType = "transfer" | "mint" | "burn";
|
|
904
|
+
|
|
918
905
|
export interface ListUnclaimedDepositsResponse {
|
|
919
906
|
deposits: DepositInfo[];
|
|
920
907
|
}
|
|
921
908
|
|
|
922
|
-
export interface
|
|
923
|
-
|
|
909
|
+
export interface RegisterLightningAddressRequest {
|
|
910
|
+
username: string;
|
|
911
|
+
description?: string;
|
|
924
912
|
}
|
|
925
913
|
|
|
926
|
-
export interface
|
|
927
|
-
hops: Bolt11RouteHintHop[];
|
|
928
|
-
}
|
|
914
|
+
export interface ListUnclaimedDepositsRequest {}
|
|
929
915
|
|
|
930
|
-
export interface
|
|
931
|
-
|
|
932
|
-
currentRound: number;
|
|
933
|
-
totalRounds: number;
|
|
916
|
+
export interface LnurlWithdrawInfo {
|
|
917
|
+
withdrawUrl: string;
|
|
934
918
|
}
|
|
935
919
|
|
|
936
|
-
export interface
|
|
937
|
-
|
|
938
|
-
|
|
920
|
+
export interface SendOnchainFeeQuote {
|
|
921
|
+
id: string;
|
|
922
|
+
expiresAt: number;
|
|
923
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
924
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
925
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
939
926
|
}
|
|
940
927
|
|
|
941
|
-
export interface
|
|
942
|
-
|
|
943
|
-
|
|
928
|
+
export interface SparkStatus {
|
|
929
|
+
status: ServiceStatus;
|
|
930
|
+
lastUpdated: number;
|
|
944
931
|
}
|
|
945
932
|
|
|
933
|
+
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
934
|
+
|
|
946
935
|
export type ConversionPurpose = { type: "ongoingPayment"; paymentRequest: string } | { type: "selfTransfer" } | { type: "autoConversion" };
|
|
947
936
|
|
|
948
|
-
export interface
|
|
949
|
-
|
|
950
|
-
payment?: Payment;
|
|
937
|
+
export interface ClaimHtlcPaymentResponse {
|
|
938
|
+
payment: Payment;
|
|
951
939
|
}
|
|
952
940
|
|
|
953
|
-
export interface
|
|
941
|
+
export interface SignMessageResponse {
|
|
942
|
+
pubkey: string;
|
|
943
|
+
signature: string;
|
|
944
|
+
}
|
|
954
945
|
|
|
955
|
-
export interface
|
|
956
|
-
|
|
946
|
+
export interface PrepareLnurlPayResponse {
|
|
947
|
+
amountSats: number;
|
|
948
|
+
comment?: string;
|
|
949
|
+
payRequest: LnurlPayRequestDetails;
|
|
950
|
+
feeSats: number;
|
|
951
|
+
invoiceDetails: Bolt11InvoiceDetails;
|
|
952
|
+
successAction?: SuccessAction;
|
|
953
|
+
conversionEstimate?: ConversionEstimate;
|
|
954
|
+
feePolicy: FeePolicy;
|
|
957
955
|
}
|
|
958
956
|
|
|
957
|
+
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
958
|
+
|
|
959
959
|
/**
|
|
960
960
|
* Interface for passkey PRF (Pseudo-Random Function) operations.
|
|
961
961
|
*
|
|
@@ -1008,23 +1008,6 @@ export interface PasskeyPrfProvider {
|
|
|
1008
1008
|
isPrfAvailable(): Promise<boolean>;
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
-
export interface FreezeIssuerTokenRequest {
|
|
1012
|
-
address: string;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
export interface FreezeIssuerTokenResponse {
|
|
1016
|
-
impactedOutputIds: string[];
|
|
1017
|
-
impactedTokenAmount: bigint;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
export interface MintIssuerTokenRequest {
|
|
1021
|
-
amount: bigint;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
export interface UnfreezeIssuerTokenRequest {
|
|
1025
|
-
address: string;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
1011
|
export interface UnfreezeIssuerTokenResponse {
|
|
1029
1012
|
impactedOutputIds: string[];
|
|
1030
1013
|
impactedTokenAmount: bigint;
|
|
@@ -1038,10 +1021,27 @@ export interface CreateIssuerTokenRequest {
|
|
|
1038
1021
|
maxSupply: bigint;
|
|
1039
1022
|
}
|
|
1040
1023
|
|
|
1024
|
+
export interface MintIssuerTokenRequest {
|
|
1025
|
+
amount: bigint;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1041
1028
|
export interface BurnIssuerTokenRequest {
|
|
1042
1029
|
amount: bigint;
|
|
1043
1030
|
}
|
|
1044
1031
|
|
|
1032
|
+
export interface UnfreezeIssuerTokenRequest {
|
|
1033
|
+
address: string;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
export interface FreezeIssuerTokenRequest {
|
|
1037
|
+
address: string;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export interface FreezeIssuerTokenResponse {
|
|
1041
|
+
impactedOutputIds: string[];
|
|
1042
|
+
impactedTokenAmount: bigint;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
1045
|
export interface ExternalSigner {
|
|
1046
1046
|
identityPublicKey(): PublicKeyBytes;
|
|
1047
1047
|
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
@@ -1065,119 +1065,119 @@ export interface ExternalSigner {
|
|
|
1065
1065
|
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
|
-
export interface
|
|
1069
|
-
|
|
1070
|
-
bindingCommitment: number[];
|
|
1071
|
-
noncesCiphertext: number[];
|
|
1068
|
+
export interface ExternalTreeNodeId {
|
|
1069
|
+
id: string;
|
|
1072
1070
|
}
|
|
1073
1071
|
|
|
1074
|
-
export interface
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
verifyingKey: number[];
|
|
1079
|
-
statechainCommitments: IdentifierCommitmentPair[];
|
|
1080
|
-
selfCommitment: ExternalSigningCommitments;
|
|
1081
|
-
publicKey: number[];
|
|
1082
|
-
selfSignature: ExternalFrostSignatureShare;
|
|
1083
|
-
adaptorPublicKey?: number[];
|
|
1072
|
+
export interface ExternalSecretShare {
|
|
1073
|
+
threshold: number;
|
|
1074
|
+
index: ExternalScalar;
|
|
1075
|
+
share: ExternalScalar;
|
|
1084
1076
|
}
|
|
1085
1077
|
|
|
1086
|
-
export interface
|
|
1078
|
+
export interface EcdsaSignatureBytes {
|
|
1087
1079
|
bytes: number[];
|
|
1088
1080
|
}
|
|
1089
1081
|
|
|
1090
|
-
export interface
|
|
1091
|
-
|
|
1082
|
+
export interface ExternalSigningCommitments {
|
|
1083
|
+
hiding: number[];
|
|
1084
|
+
binding: number[];
|
|
1092
1085
|
}
|
|
1093
1086
|
|
|
1094
|
-
export interface
|
|
1095
|
-
|
|
1087
|
+
export interface IdentifierCommitmentPair {
|
|
1088
|
+
identifier: ExternalIdentifier;
|
|
1089
|
+
commitment: ExternalSigningCommitments;
|
|
1096
1090
|
}
|
|
1097
1091
|
|
|
1098
1092
|
export interface ExternalIdentifier {
|
|
1099
1093
|
bytes: number[];
|
|
1100
1094
|
}
|
|
1101
1095
|
|
|
1102
|
-
export interface
|
|
1103
|
-
|
|
1096
|
+
export interface ExternalVerifiableSecretShare {
|
|
1097
|
+
secretShare: ExternalSecretShare;
|
|
1098
|
+
proofs: number[][];
|
|
1104
1099
|
}
|
|
1105
1100
|
|
|
1106
|
-
export interface
|
|
1107
|
-
|
|
1101
|
+
export interface IdentifierPublicKeyPair {
|
|
1102
|
+
identifier: ExternalIdentifier;
|
|
1103
|
+
publicKey: number[];
|
|
1108
1104
|
}
|
|
1109
1105
|
|
|
1110
|
-
export interface
|
|
1111
|
-
|
|
1112
|
-
binding: number[];
|
|
1106
|
+
export interface ExternalEncryptedSecret {
|
|
1107
|
+
ciphertext: number[];
|
|
1113
1108
|
}
|
|
1114
1109
|
|
|
1115
|
-
export interface
|
|
1110
|
+
export interface ExternalScalar {
|
|
1116
1111
|
bytes: number[];
|
|
1117
1112
|
}
|
|
1118
1113
|
|
|
1119
|
-
export interface
|
|
1120
|
-
|
|
1121
|
-
publicKey: number[];
|
|
1122
|
-
secret: ExternalSecretSource;
|
|
1123
|
-
verifyingKey: number[];
|
|
1124
|
-
selfNonceCommitment: ExternalFrostCommitments;
|
|
1125
|
-
statechainCommitments: IdentifierCommitmentPair[];
|
|
1126
|
-
adaptorPublicKey?: number[];
|
|
1114
|
+
export interface RecoverableEcdsaSignatureBytes {
|
|
1115
|
+
bytes: number[];
|
|
1127
1116
|
}
|
|
1128
1117
|
|
|
1129
1118
|
export type ExternalSecretToSplit = { type: "secretSource"; source: ExternalSecretSource } | { type: "preimage"; data: number[] };
|
|
1130
1119
|
|
|
1131
|
-
export interface
|
|
1120
|
+
export interface MessageBytes {
|
|
1132
1121
|
bytes: number[];
|
|
1133
1122
|
}
|
|
1134
1123
|
|
|
1135
|
-
export interface
|
|
1136
|
-
|
|
1137
|
-
publicKey: number[];
|
|
1124
|
+
export interface SecretBytes {
|
|
1125
|
+
bytes: number[];
|
|
1138
1126
|
}
|
|
1139
1127
|
|
|
1140
|
-
export interface
|
|
1128
|
+
export interface PublicKeyBytes {
|
|
1141
1129
|
bytes: number[];
|
|
1142
1130
|
}
|
|
1143
1131
|
|
|
1144
|
-
export
|
|
1132
|
+
export interface ExternalFrostCommitments {
|
|
1133
|
+
hidingCommitment: number[];
|
|
1134
|
+
bindingCommitment: number[];
|
|
1135
|
+
noncesCiphertext: number[];
|
|
1136
|
+
}
|
|
1145
1137
|
|
|
1146
|
-
export interface
|
|
1138
|
+
export interface ExternalFrostSignatureShare {
|
|
1147
1139
|
bytes: number[];
|
|
1148
1140
|
}
|
|
1149
1141
|
|
|
1150
|
-
export interface
|
|
1151
|
-
|
|
1142
|
+
export interface ExternalAggregateFrostRequest {
|
|
1143
|
+
message: number[];
|
|
1144
|
+
statechainSignatures: IdentifierSignaturePair[];
|
|
1145
|
+
statechainPublicKeys: IdentifierPublicKeyPair[];
|
|
1146
|
+
verifyingKey: number[];
|
|
1147
|
+
statechainCommitments: IdentifierCommitmentPair[];
|
|
1148
|
+
selfCommitment: ExternalSigningCommitments;
|
|
1149
|
+
publicKey: number[];
|
|
1150
|
+
selfSignature: ExternalFrostSignatureShare;
|
|
1151
|
+
adaptorPublicKey?: number[];
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
export interface
|
|
1154
|
+
export interface SchnorrSignatureBytes {
|
|
1155
1155
|
bytes: number[];
|
|
1156
1156
|
}
|
|
1157
1157
|
|
|
1158
|
-
export
|
|
1159
|
-
threshold: number;
|
|
1160
|
-
index: ExternalScalar;
|
|
1161
|
-
share: ExternalScalar;
|
|
1162
|
-
}
|
|
1158
|
+
export type ExternalSecretSource = { type: "derived"; nodeId: ExternalTreeNodeId } | { type: "encrypted"; key: ExternalEncryptedSecret };
|
|
1163
1159
|
|
|
1164
|
-
export interface
|
|
1165
|
-
|
|
1166
|
-
signature: ExternalFrostSignatureShare;
|
|
1160
|
+
export interface HashedMessageBytes {
|
|
1161
|
+
bytes: number[];
|
|
1167
1162
|
}
|
|
1168
1163
|
|
|
1169
|
-
export interface
|
|
1170
|
-
|
|
1171
|
-
|
|
1164
|
+
export interface ExternalSignFrostRequest {
|
|
1165
|
+
message: number[];
|
|
1166
|
+
publicKey: number[];
|
|
1167
|
+
secret: ExternalSecretSource;
|
|
1168
|
+
verifyingKey: number[];
|
|
1169
|
+
selfNonceCommitment: ExternalFrostCommitments;
|
|
1170
|
+
statechainCommitments: IdentifierCommitmentPair[];
|
|
1171
|
+
adaptorPublicKey?: number[];
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
|
-
export interface
|
|
1174
|
+
export interface ExternalFrostSignature {
|
|
1175
1175
|
bytes: number[];
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
-
export interface
|
|
1178
|
+
export interface IdentifierSignaturePair {
|
|
1179
1179
|
identifier: ExternalIdentifier;
|
|
1180
|
-
|
|
1180
|
+
signature: ExternalFrostSignatureShare;
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
1183
|
/**
|
|
@@ -1189,15 +1189,15 @@ export interface Wallet {
|
|
|
1189
1189
|
*/
|
|
1190
1190
|
seed: Seed;
|
|
1191
1191
|
/**
|
|
1192
|
-
* The
|
|
1192
|
+
* The label used for derivation.
|
|
1193
1193
|
*/
|
|
1194
|
-
|
|
1194
|
+
label: string;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
/**
|
|
1198
|
-
* Nostr relay configuration for passkey
|
|
1198
|
+
* Nostr relay configuration for passkey label operations.
|
|
1199
1199
|
*
|
|
1200
|
-
* Used by `Passkey.
|
|
1200
|
+
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
1201
1201
|
*/
|
|
1202
1202
|
export interface NostrRelayConfig {
|
|
1203
1203
|
/**
|
|
@@ -1340,35 +1340,35 @@ export class IntoUnderlyingSource {
|
|
|
1340
1340
|
* Passkey-based wallet operations using WebAuthn PRF extension.
|
|
1341
1341
|
*
|
|
1342
1342
|
* Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
|
|
1343
|
-
* wallet derivation and
|
|
1343
|
+
* wallet derivation and label management via Nostr relays.
|
|
1344
1344
|
*/
|
|
1345
1345
|
export class Passkey {
|
|
1346
1346
|
free(): void;
|
|
1347
1347
|
/**
|
|
1348
|
-
* Derive a wallet for a given
|
|
1348
|
+
* Derive a wallet for a given label.
|
|
1349
1349
|
*
|
|
1350
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1350
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1351
1351
|
*
|
|
1352
|
-
* @param
|
|
1352
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1353
1353
|
*/
|
|
1354
|
-
getWallet(
|
|
1354
|
+
getWallet(label?: string | null): Promise<Wallet>;
|
|
1355
1355
|
/**
|
|
1356
|
-
*
|
|
1357
|
-
*/
|
|
1358
|
-
isAvailable(): Promise<boolean>;
|
|
1359
|
-
/**
|
|
1360
|
-
* List all wallet names published to Nostr for this passkey's identity.
|
|
1356
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1361
1357
|
*
|
|
1362
1358
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1363
1359
|
*/
|
|
1364
|
-
|
|
1360
|
+
listLabels(): Promise<string[]>;
|
|
1365
1361
|
/**
|
|
1366
|
-
* Publish a
|
|
1362
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1367
1363
|
*
|
|
1368
|
-
* Idempotent: if the
|
|
1364
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1369
1365
|
* Requires 1 PRF call.
|
|
1370
1366
|
*/
|
|
1371
|
-
|
|
1367
|
+
storeLabel(label: string): Promise<void>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Check if passkey PRF is available on this device.
|
|
1370
|
+
*/
|
|
1371
|
+
isAvailable(): Promise<boolean>;
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Create a new `Passkey` instance.
|
|
1374
1374
|
*
|