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