@breeztech/breez-sdk-spark 0.7.3 → 0.7.4
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 +385 -368
- package/bundler/breez_sdk_spark_wasm_bg.js +64 -36
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -4
- package/deno/breez_sdk_spark_wasm.d.ts +385 -368
- package/deno/breez_sdk_spark_wasm.js +63 -36
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -4
- package/nodejs/breez_sdk_spark_wasm.d.ts +385 -368
- package/nodejs/breez_sdk_spark_wasm.js +64 -36
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -4
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +391 -372
- package/web/breez_sdk_spark_wasm.js +63 -36
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -4
|
@@ -79,92 +79,84 @@ export interface PaymentObserver {
|
|
|
79
79
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
export interface
|
|
83
|
-
|
|
82
|
+
export interface LocalizedName {
|
|
83
|
+
locale: string;
|
|
84
|
+
name: string;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
export interface ListUnclaimedDepositsResponse {
|
|
87
88
|
deposits: DepositInfo[];
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
export
|
|
91
|
+
export interface SyncWalletRequest {}
|
|
91
92
|
|
|
92
|
-
export
|
|
93
|
-
paymentHash: string;
|
|
94
|
-
preimage?: string;
|
|
95
|
-
expiryTime: number;
|
|
96
|
-
status: SparkHtlcStatus;
|
|
97
|
-
}
|
|
93
|
+
export type PaymentDetails = { type: "spark"; invoiceDetails?: SparkInvoicePaymentDetails; htlcDetails?: SparkHtlcDetails; conversionInfo?: ConversionInfo } | { type: "token"; metadata: TokenMetadata; txHash: string; invoiceDetails?: SparkInvoicePaymentDetails; conversionInfo?: ConversionInfo } | { type: "lightning"; description?: string; preimage?: string; invoice: string; paymentHash: string; destinationPubkey: string; lnurlPayInfo?: LnurlPayInfo; lnurlWithdrawInfo?: LnurlWithdrawInfo; lnurlReceiveMetadata?: LnurlReceiveMetadata } | { type: "withdraw"; txId: string } | { type: "deposit"; txId: string };
|
|
98
94
|
|
|
99
|
-
export type
|
|
95
|
+
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string };
|
|
100
96
|
|
|
101
97
|
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);
|
|
102
98
|
|
|
103
|
-
export interface
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
symbol: Symbol;
|
|
99
|
+
export interface FiatCurrency {
|
|
100
|
+
id: string;
|
|
101
|
+
info: CurrencyInfo;
|
|
107
102
|
}
|
|
108
103
|
|
|
109
|
-
export interface
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
payRequest: LnurlPayRequestDetails;
|
|
113
|
-
feeSats: number;
|
|
114
|
-
invoiceDetails: Bolt11InvoiceDetails;
|
|
115
|
-
successAction?: SuccessAction;
|
|
104
|
+
export interface ReceivePaymentResponse {
|
|
105
|
+
paymentRequest: string;
|
|
106
|
+
fee: bigint;
|
|
116
107
|
}
|
|
117
108
|
|
|
118
|
-
export interface
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
conversionOptions?: ConversionOptions;
|
|
109
|
+
export interface LnurlWithdrawRequest {
|
|
110
|
+
amountSats: number;
|
|
111
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
112
|
+
completionTimeoutSecs?: number;
|
|
123
113
|
}
|
|
124
114
|
|
|
125
|
-
export interface
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
spacing?: number;
|
|
129
|
-
symbol?: Symbol;
|
|
130
|
-
uniqSymbol?: Symbol;
|
|
131
|
-
localizedName: LocalizedName[];
|
|
132
|
-
localeOverrides: LocaleOverrides[];
|
|
115
|
+
export interface Rate {
|
|
116
|
+
coin: string;
|
|
117
|
+
value: number;
|
|
133
118
|
}
|
|
134
119
|
|
|
135
|
-
export
|
|
120
|
+
export interface SendOnchainFeeQuote {
|
|
121
|
+
id: string;
|
|
122
|
+
expiresAt: number;
|
|
123
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
124
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
125
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
126
|
+
}
|
|
136
127
|
|
|
137
|
-
export interface
|
|
138
|
-
|
|
128
|
+
export interface SetLnurlMetadataItem {
|
|
129
|
+
paymentHash: string;
|
|
130
|
+
senderComment?: string;
|
|
131
|
+
nostrZapRequest?: string;
|
|
132
|
+
nostrZapReceipt?: string;
|
|
139
133
|
}
|
|
140
134
|
|
|
141
|
-
export interface
|
|
142
|
-
|
|
143
|
-
schemaVersion: string;
|
|
144
|
-
updatedFields: Map<string, string>;
|
|
135
|
+
export interface CheckMessageResponse {
|
|
136
|
+
isValid: boolean;
|
|
145
137
|
}
|
|
146
138
|
|
|
147
|
-
export
|
|
139
|
+
export interface PrepareSendPaymentResponse {
|
|
140
|
+
paymentMethod: SendPaymentMethod;
|
|
141
|
+
amount: bigint;
|
|
142
|
+
tokenIdentifier?: string;
|
|
143
|
+
conversionEstimate?: ConversionEstimate;
|
|
144
|
+
}
|
|
148
145
|
|
|
149
146
|
export interface Bolt12Offer {
|
|
150
147
|
offer: string;
|
|
151
148
|
source: PaymentRequestSource;
|
|
152
149
|
}
|
|
153
150
|
|
|
154
|
-
export interface
|
|
151
|
+
export interface UrlSuccessActionData {
|
|
155
152
|
description: string;
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
url: string;
|
|
154
|
+
matchesCallbackDomain: boolean;
|
|
158
155
|
}
|
|
159
156
|
|
|
160
|
-
export interface
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
name: string;
|
|
164
|
-
ticker: string;
|
|
165
|
-
decimals: number;
|
|
166
|
-
maxSupply: string;
|
|
167
|
-
isFreezable: boolean;
|
|
157
|
+
export interface GetInfoResponse {
|
|
158
|
+
balanceSats: number;
|
|
159
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
168
160
|
}
|
|
169
161
|
|
|
170
162
|
export interface BitcoinAddressDetails {
|
|
@@ -173,20 +165,21 @@ export interface BitcoinAddressDetails {
|
|
|
173
165
|
source: PaymentRequestSource;
|
|
174
166
|
}
|
|
175
167
|
|
|
176
|
-
export interface SetLnurlMetadataItem {
|
|
177
|
-
paymentHash: string;
|
|
178
|
-
senderComment?: string;
|
|
179
|
-
nostrZapRequest?: string;
|
|
180
|
-
nostrZapReceipt?: string;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string };
|
|
184
|
-
|
|
185
168
|
export interface LogEntry {
|
|
186
169
|
line: string;
|
|
187
170
|
level: string;
|
|
188
171
|
}
|
|
189
172
|
|
|
173
|
+
export interface SendPaymentRequest {
|
|
174
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
175
|
+
options?: SendPaymentOptions;
|
|
176
|
+
idempotencyKey?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface GetPaymentRequest {
|
|
180
|
+
paymentId: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
190
183
|
export interface Bip21Details {
|
|
191
184
|
amountSat?: number;
|
|
192
185
|
assetId?: string;
|
|
@@ -197,7 +190,7 @@ export interface Bip21Details {
|
|
|
197
190
|
paymentMethods: InputType[];
|
|
198
191
|
}
|
|
199
192
|
|
|
200
|
-
export type
|
|
193
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
201
194
|
|
|
202
195
|
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 };
|
|
203
196
|
|
|
@@ -208,46 +201,28 @@ export interface RefundDepositRequest {
|
|
|
208
201
|
fee: Fee;
|
|
209
202
|
}
|
|
210
203
|
|
|
211
|
-
export interface
|
|
212
|
-
id: string;
|
|
213
|
-
expiresAt: number;
|
|
214
|
-
speedFast: SendOnchainSpeedFeeQuote;
|
|
215
|
-
speedMedium: SendOnchainSpeedFeeQuote;
|
|
216
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
217
|
-
}
|
|
204
|
+
export interface SyncWalletResponse {}
|
|
218
205
|
|
|
219
|
-
export interface
|
|
220
|
-
|
|
221
|
-
statusFilter?: PaymentStatus[];
|
|
222
|
-
assetFilter?: AssetFilter;
|
|
223
|
-
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
224
|
-
fromTimestamp?: number;
|
|
225
|
-
toTimestamp?: number;
|
|
226
|
-
offset?: number;
|
|
227
|
-
limit?: number;
|
|
228
|
-
sortAscending?: boolean;
|
|
206
|
+
export interface SendPaymentResponse {
|
|
207
|
+
payment: Payment;
|
|
229
208
|
}
|
|
230
209
|
|
|
231
|
-
export interface
|
|
232
|
-
|
|
233
|
-
|
|
210
|
+
export interface ProvisionalPayment {
|
|
211
|
+
paymentId: string;
|
|
212
|
+
amount: bigint;
|
|
213
|
+
details: ProvisionalPaymentDetails;
|
|
234
214
|
}
|
|
235
215
|
|
|
236
|
-
export interface
|
|
237
|
-
|
|
238
|
-
|
|
216
|
+
export interface PrepareLnurlPayRequest {
|
|
217
|
+
amountSats: number;
|
|
218
|
+
comment?: string;
|
|
219
|
+
payRequest: LnurlPayRequestDetails;
|
|
220
|
+
validateSuccessActionUrl?: boolean;
|
|
239
221
|
}
|
|
240
222
|
|
|
241
|
-
export
|
|
242
|
-
minFromAmount?: bigint;
|
|
243
|
-
minToAmount?: bigint;
|
|
244
|
-
}
|
|
223
|
+
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
245
224
|
|
|
246
|
-
export
|
|
247
|
-
providerId: string;
|
|
248
|
-
inputRegex: string;
|
|
249
|
-
parserUrl: string;
|
|
250
|
-
}
|
|
225
|
+
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
251
226
|
|
|
252
227
|
export interface SilentPaymentAddressDetails {
|
|
253
228
|
address: string;
|
|
@@ -255,31 +230,24 @@ export interface SilentPaymentAddressDetails {
|
|
|
255
230
|
source: PaymentRequestSource;
|
|
256
231
|
}
|
|
257
232
|
|
|
258
|
-
export
|
|
259
|
-
withdrawUrl: string;
|
|
260
|
-
}
|
|
233
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
261
234
|
|
|
262
|
-
export interface
|
|
263
|
-
|
|
235
|
+
export interface ExternalInputParser {
|
|
236
|
+
providerId: string;
|
|
237
|
+
inputRegex: string;
|
|
238
|
+
parserUrl: string;
|
|
264
239
|
}
|
|
265
240
|
|
|
241
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
242
|
+
|
|
266
243
|
export interface SignMessageResponse {
|
|
267
244
|
pubkey: string;
|
|
268
245
|
signature: string;
|
|
269
246
|
}
|
|
270
247
|
|
|
271
|
-
export
|
|
272
|
-
isValid: boolean;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export interface GetPaymentRequest {
|
|
276
|
-
paymentId: string;
|
|
277
|
-
}
|
|
248
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
278
249
|
|
|
279
|
-
export
|
|
280
|
-
description: string;
|
|
281
|
-
plaintext: string;
|
|
282
|
-
}
|
|
250
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
283
251
|
|
|
284
252
|
export interface Bolt11Invoice {
|
|
285
253
|
bolt11: string;
|
|
@@ -316,29 +284,32 @@ export interface PaymentRequestSource {
|
|
|
316
284
|
bip353Address?: string;
|
|
317
285
|
}
|
|
318
286
|
|
|
319
|
-
export
|
|
320
|
-
id: string;
|
|
321
|
-
paymentType: PaymentType;
|
|
322
|
-
status: PaymentStatus;
|
|
323
|
-
amount: bigint;
|
|
324
|
-
fees: bigint;
|
|
325
|
-
timestamp: number;
|
|
326
|
-
method: PaymentMethod;
|
|
327
|
-
details?: PaymentDetails;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
287
|
+
export type PaymentType = "send" | "receive";
|
|
331
288
|
|
|
332
|
-
export
|
|
289
|
+
export interface Config {
|
|
290
|
+
apiKey?: string;
|
|
291
|
+
network: Network;
|
|
292
|
+
syncIntervalSecs: number;
|
|
293
|
+
maxDepositClaimFee?: MaxFee;
|
|
294
|
+
lnurlDomain?: string;
|
|
295
|
+
preferSparkOverLightning: boolean;
|
|
296
|
+
externalInputParsers?: ExternalInputParser[];
|
|
297
|
+
useDefaultExternalInputParsers: boolean;
|
|
298
|
+
realTimeSyncServerUrl?: string;
|
|
299
|
+
privateEnabledDefault: boolean;
|
|
300
|
+
optimizationConfig: OptimizationConfig;
|
|
301
|
+
}
|
|
333
302
|
|
|
334
|
-
export interface
|
|
335
|
-
|
|
336
|
-
multiplicity: number;
|
|
303
|
+
export interface GetTokensMetadataResponse {
|
|
304
|
+
tokensMetadata: TokenMetadata[];
|
|
337
305
|
}
|
|
338
306
|
|
|
339
|
-
export
|
|
307
|
+
export type Network = "mainnet" | "regtest";
|
|
308
|
+
|
|
309
|
+
export interface ConversionOptions {
|
|
340
310
|
conversionType: ConversionType;
|
|
341
|
-
|
|
311
|
+
maxSlippageBps?: number;
|
|
312
|
+
completionTimeoutSecs?: number;
|
|
342
313
|
}
|
|
343
314
|
|
|
344
315
|
export interface Bolt11InvoiceDetails {
|
|
@@ -356,29 +327,32 @@ export interface Bolt11InvoiceDetails {
|
|
|
356
327
|
timestamp: number;
|
|
357
328
|
}
|
|
358
329
|
|
|
359
|
-
export
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
message: string;
|
|
330
|
+
export interface OptimizationConfig {
|
|
331
|
+
autoEnabled: boolean;
|
|
332
|
+
multiplicity: number;
|
|
363
333
|
}
|
|
364
334
|
|
|
365
|
-
export type
|
|
335
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
366
336
|
|
|
367
|
-
export
|
|
337
|
+
export interface OptimizationProgress {
|
|
338
|
+
isRunning: boolean;
|
|
339
|
+
currentRound: number;
|
|
340
|
+
totalRounds: number;
|
|
341
|
+
}
|
|
368
342
|
|
|
369
|
-
export interface
|
|
343
|
+
export interface LnurlErrorDetails {
|
|
344
|
+
reason: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export interface UnversionedRecordChange {
|
|
370
348
|
id: RecordId;
|
|
371
|
-
revision: number;
|
|
372
349
|
schemaVersion: string;
|
|
373
|
-
|
|
350
|
+
updatedFields: Map<string, string>;
|
|
374
351
|
}
|
|
375
352
|
|
|
376
353
|
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 };
|
|
377
354
|
|
|
378
|
-
export interface
|
|
379
|
-
description: string;
|
|
380
|
-
lightningAddress: string;
|
|
381
|
-
lnurl: string;
|
|
355
|
+
export interface CheckLightningAddressRequest {
|
|
382
356
|
username: string;
|
|
383
357
|
}
|
|
384
358
|
|
|
@@ -387,21 +361,20 @@ export interface LightningAddressDetails {
|
|
|
387
361
|
payRequest: LnurlPayRequestDetails;
|
|
388
362
|
}
|
|
389
363
|
|
|
390
|
-
export interface
|
|
391
|
-
|
|
364
|
+
export interface OutgoingChange {
|
|
365
|
+
change: RecordChange;
|
|
366
|
+
parent?: Record;
|
|
392
367
|
}
|
|
393
368
|
|
|
394
|
-
export interface
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
updatedFields: Map<string, string>;
|
|
398
|
-
revision: number;
|
|
369
|
+
export interface RecordId {
|
|
370
|
+
type: string;
|
|
371
|
+
dataId: string;
|
|
399
372
|
}
|
|
400
373
|
|
|
401
|
-
export interface
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
374
|
+
export interface LnurlReceiveMetadata {
|
|
375
|
+
nostrZapRequest?: string;
|
|
376
|
+
nostrZapReceipt?: string;
|
|
377
|
+
senderComment?: string;
|
|
405
378
|
}
|
|
406
379
|
|
|
407
380
|
export interface LnurlWithdrawRequestDetails {
|
|
@@ -418,80 +391,72 @@ export interface KeySetConfig {
|
|
|
418
391
|
accountNumber?: number;
|
|
419
392
|
}
|
|
420
393
|
|
|
421
|
-
export interface
|
|
422
|
-
|
|
423
|
-
network: Network;
|
|
424
|
-
syncIntervalSecs: number;
|
|
425
|
-
maxDepositClaimFee?: MaxFee;
|
|
426
|
-
lnurlDomain?: string;
|
|
427
|
-
preferSparkOverLightning: boolean;
|
|
428
|
-
externalInputParsers?: ExternalInputParser[];
|
|
429
|
-
useDefaultExternalInputParsers: boolean;
|
|
430
|
-
realTimeSyncServerUrl?: string;
|
|
431
|
-
privateEnabledDefault: boolean;
|
|
432
|
-
optimizationConfig: OptimizationConfig;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
export interface LnurlReceiveMetadata {
|
|
436
|
-
nostrZapRequest?: string;
|
|
437
|
-
nostrZapReceipt?: string;
|
|
438
|
-
senderComment?: string;
|
|
394
|
+
export interface LnurlWithdrawInfo {
|
|
395
|
+
withdrawUrl: string;
|
|
439
396
|
}
|
|
440
397
|
|
|
441
|
-
export interface
|
|
442
|
-
|
|
443
|
-
template?: string;
|
|
444
|
-
rtl?: boolean;
|
|
445
|
-
position?: number;
|
|
398
|
+
export interface ClaimHtlcPaymentRequest {
|
|
399
|
+
preimage: string;
|
|
446
400
|
}
|
|
447
401
|
|
|
448
|
-
export interface
|
|
449
|
-
|
|
402
|
+
export interface LocaleOverrides {
|
|
403
|
+
locale: string;
|
|
404
|
+
spacing?: number;
|
|
405
|
+
symbol: Symbol;
|
|
450
406
|
}
|
|
451
407
|
|
|
452
|
-
export interface
|
|
408
|
+
export interface RegisterLightningAddressRequest {
|
|
409
|
+
username: string;
|
|
453
410
|
description?: string;
|
|
454
|
-
invoice: string;
|
|
455
411
|
}
|
|
456
412
|
|
|
457
|
-
export interface
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
413
|
+
export interface Payment {
|
|
414
|
+
id: string;
|
|
415
|
+
paymentType: PaymentType;
|
|
416
|
+
status: PaymentStatus;
|
|
417
|
+
amount: bigint;
|
|
418
|
+
fees: bigint;
|
|
419
|
+
timestamp: number;
|
|
420
|
+
method: PaymentMethod;
|
|
421
|
+
details?: PaymentDetails;
|
|
461
422
|
}
|
|
462
423
|
|
|
463
|
-
export
|
|
464
|
-
payments: Payment[];
|
|
465
|
-
}
|
|
424
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
466
425
|
|
|
467
|
-
export interface
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
426
|
+
export interface ListPaymentsRequest {
|
|
427
|
+
typeFilter?: PaymentType[];
|
|
428
|
+
statusFilter?: PaymentStatus[];
|
|
429
|
+
assetFilter?: AssetFilter;
|
|
430
|
+
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
431
|
+
fromTimestamp?: number;
|
|
432
|
+
toTimestamp?: number;
|
|
433
|
+
offset?: number;
|
|
434
|
+
limit?: number;
|
|
435
|
+
sortAscending?: boolean;
|
|
471
436
|
}
|
|
472
437
|
|
|
473
|
-
export
|
|
438
|
+
export type ConversionStatus = "completed" | "refundNeeded" | "refunded";
|
|
474
439
|
|
|
475
|
-
export interface
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
440
|
+
export interface TokenMetadata {
|
|
441
|
+
identifier: string;
|
|
442
|
+
issuerPublicKey: string;
|
|
443
|
+
name: string;
|
|
444
|
+
ticker: string;
|
|
445
|
+
decimals: number;
|
|
446
|
+
maxSupply: string;
|
|
447
|
+
isFreezable: boolean;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export interface LnurlPayRequest {
|
|
451
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
452
|
+
idempotencyKey?: string;
|
|
479
453
|
}
|
|
480
454
|
|
|
481
455
|
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
482
456
|
|
|
483
|
-
export
|
|
484
|
-
poolId: string;
|
|
485
|
-
conversionId: string;
|
|
486
|
-
status: ConversionStatus;
|
|
487
|
-
fee?: string;
|
|
488
|
-
purpose?: ConversionPurpose;
|
|
489
|
-
}
|
|
457
|
+
export type ConversionPurpose = { type: "ongoingPayment"; paymentRequest: string } | { type: "selfTransfer" };
|
|
490
458
|
|
|
491
|
-
export
|
|
492
|
-
userFeeSat: number;
|
|
493
|
-
l1BroadcastFeeSat: number;
|
|
494
|
-
}
|
|
459
|
+
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 };
|
|
495
460
|
|
|
496
461
|
export interface DepositInfo {
|
|
497
462
|
txid: string;
|
|
@@ -502,64 +467,62 @@ export interface DepositInfo {
|
|
|
502
467
|
claimError?: DepositClaimError;
|
|
503
468
|
}
|
|
504
469
|
|
|
505
|
-
export interface
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
470
|
+
export interface GetTokensMetadataRequest {
|
|
471
|
+
tokenIdentifiers: string[];
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export interface FetchConversionLimitsResponse {
|
|
475
|
+
minFromAmount?: bigint;
|
|
476
|
+
minToAmount?: bigint;
|
|
509
477
|
}
|
|
510
478
|
|
|
511
479
|
export interface Bolt12OfferBlindedPath {
|
|
512
480
|
blindedHops: string[];
|
|
513
481
|
}
|
|
514
482
|
|
|
515
|
-
export interface
|
|
516
|
-
|
|
517
|
-
comment?: string;
|
|
518
|
-
payRequest: LnurlPayRequestDetails;
|
|
519
|
-
validateSuccessActionUrl?: boolean;
|
|
483
|
+
export interface ReceivePaymentRequest {
|
|
484
|
+
paymentMethod: ReceivePaymentMethod;
|
|
520
485
|
}
|
|
521
486
|
|
|
522
|
-
export interface
|
|
523
|
-
|
|
524
|
-
|
|
487
|
+
export interface Credentials {
|
|
488
|
+
username: string;
|
|
489
|
+
password: string;
|
|
525
490
|
}
|
|
526
491
|
|
|
527
492
|
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
528
493
|
|
|
529
|
-
export interface
|
|
530
|
-
|
|
531
|
-
|
|
494
|
+
export interface PrepareLnurlPayResponse {
|
|
495
|
+
amountSats: number;
|
|
496
|
+
comment?: string;
|
|
497
|
+
payRequest: LnurlPayRequestDetails;
|
|
498
|
+
feeSats: number;
|
|
499
|
+
invoiceDetails: Bolt11InvoiceDetails;
|
|
500
|
+
successAction?: SuccessAction;
|
|
532
501
|
}
|
|
533
502
|
|
|
534
|
-
export interface
|
|
535
|
-
|
|
503
|
+
export interface SparkHtlcOptions {
|
|
504
|
+
paymentHash: string;
|
|
505
|
+
expiryDurationSecs: number;
|
|
536
506
|
}
|
|
537
507
|
|
|
538
|
-
export
|
|
539
|
-
username: string;
|
|
540
|
-
description?: string;
|
|
541
|
-
}
|
|
508
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
542
509
|
|
|
543
|
-
export
|
|
544
|
-
lnAddress?: string;
|
|
545
|
-
comment?: string;
|
|
546
|
-
domain?: string;
|
|
547
|
-
metadata?: string;
|
|
548
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
549
|
-
rawSuccessAction?: SuccessAction;
|
|
550
|
-
}
|
|
510
|
+
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
551
511
|
|
|
552
|
-
export
|
|
512
|
+
export interface SparkHtlcDetails {
|
|
513
|
+
paymentHash: string;
|
|
514
|
+
preimage?: string;
|
|
515
|
+
expiryTime: number;
|
|
516
|
+
status: SparkHtlcStatus;
|
|
517
|
+
}
|
|
553
518
|
|
|
554
|
-
export interface
|
|
555
|
-
|
|
556
|
-
tokenMetadata: TokenMetadata;
|
|
519
|
+
export interface GetInfoRequest {
|
|
520
|
+
ensureSynced?: boolean;
|
|
557
521
|
}
|
|
558
522
|
|
|
559
|
-
export interface
|
|
523
|
+
export interface SignMessageRequest {
|
|
560
524
|
message: string;
|
|
561
|
-
|
|
562
|
-
signature: string;
|
|
525
|
+
compact: boolean;
|
|
563
526
|
}
|
|
564
527
|
|
|
565
528
|
export interface Bolt12OfferDetails {
|
|
@@ -573,36 +536,50 @@ export interface Bolt12OfferDetails {
|
|
|
573
536
|
signingPubkey?: string;
|
|
574
537
|
}
|
|
575
538
|
|
|
576
|
-
export
|
|
539
|
+
export interface AesSuccessActionData {
|
|
540
|
+
description: string;
|
|
541
|
+
ciphertext: string;
|
|
542
|
+
iv: string;
|
|
543
|
+
}
|
|
577
544
|
|
|
578
545
|
export interface RefundDepositResponse {
|
|
579
546
|
txId: string;
|
|
580
547
|
txHex: string;
|
|
581
548
|
}
|
|
582
549
|
|
|
583
|
-
export type
|
|
550
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
584
551
|
|
|
585
|
-
export interface
|
|
586
|
-
|
|
587
|
-
|
|
552
|
+
export interface CheckMessageRequest {
|
|
553
|
+
message: string;
|
|
554
|
+
pubkey: string;
|
|
555
|
+
signature: string;
|
|
588
556
|
}
|
|
589
557
|
|
|
590
|
-
export interface
|
|
591
|
-
|
|
592
|
-
info: CurrencyInfo;
|
|
558
|
+
export interface ListFiatRatesResponse {
|
|
559
|
+
rates: Rate[];
|
|
593
560
|
}
|
|
594
561
|
|
|
595
|
-
export
|
|
562
|
+
export interface MessageSuccessActionData {
|
|
563
|
+
message: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export interface CurrencyInfo {
|
|
567
|
+
name: string;
|
|
568
|
+
fractionSize: number;
|
|
569
|
+
spacing?: number;
|
|
570
|
+
symbol?: Symbol;
|
|
571
|
+
uniqSymbol?: Symbol;
|
|
572
|
+
localizedName: LocalizedName[];
|
|
573
|
+
localeOverrides: LocaleOverrides[];
|
|
574
|
+
}
|
|
596
575
|
|
|
597
|
-
export interface
|
|
598
|
-
|
|
599
|
-
|
|
576
|
+
export interface FetchConversionLimitsRequest {
|
|
577
|
+
conversionType: ConversionType;
|
|
578
|
+
tokenIdentifier?: string;
|
|
600
579
|
}
|
|
601
580
|
|
|
602
|
-
export interface
|
|
603
|
-
|
|
604
|
-
currentRound: number;
|
|
605
|
-
totalRounds: number;
|
|
581
|
+
export interface ClaimHtlcPaymentResponse {
|
|
582
|
+
payment: Payment;
|
|
606
583
|
}
|
|
607
584
|
|
|
608
585
|
export interface LnurlAuthRequestDetails {
|
|
@@ -612,12 +589,16 @@ export interface LnurlAuthRequestDetails {
|
|
|
612
589
|
url: string;
|
|
613
590
|
}
|
|
614
591
|
|
|
615
|
-
export interface
|
|
592
|
+
export interface TokenBalance {
|
|
593
|
+
balance: bigint;
|
|
594
|
+
tokenMetadata: TokenMetadata;
|
|
595
|
+
}
|
|
616
596
|
|
|
617
597
|
export interface ListUnclaimedDepositsRequest {}
|
|
618
598
|
|
|
619
|
-
export interface
|
|
620
|
-
|
|
599
|
+
export interface IncomingChange {
|
|
600
|
+
newState: Record;
|
|
601
|
+
oldState?: Record;
|
|
621
602
|
}
|
|
622
603
|
|
|
623
604
|
export interface Bolt11RouteHintHop {
|
|
@@ -635,38 +616,33 @@ export interface Bip21Extra {
|
|
|
635
616
|
value: string;
|
|
636
617
|
}
|
|
637
618
|
|
|
638
|
-
export interface
|
|
639
|
-
|
|
619
|
+
export interface LightningAddressInfo {
|
|
620
|
+
description: string;
|
|
621
|
+
lightningAddress: string;
|
|
622
|
+
lnurl: string;
|
|
623
|
+
username: string;
|
|
640
624
|
}
|
|
641
625
|
|
|
642
|
-
export interface
|
|
643
|
-
|
|
626
|
+
export interface UpdateUserSettingsRequest {
|
|
627
|
+
sparkPrivateModeEnabled?: boolean;
|
|
644
628
|
}
|
|
645
629
|
|
|
646
|
-
export
|
|
647
|
-
paymentHash: string;
|
|
648
|
-
expiryDurationSecs: number;
|
|
649
|
-
}
|
|
630
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
650
631
|
|
|
651
|
-
export interface
|
|
652
|
-
|
|
653
|
-
lnurlPayInfo?: LnurlPayInfo;
|
|
654
|
-
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
655
|
-
lnurlDescription?: string;
|
|
656
|
-
conversionInfo?: ConversionInfo;
|
|
632
|
+
export interface GetPaymentResponse {
|
|
633
|
+
payment: Payment;
|
|
657
634
|
}
|
|
658
635
|
|
|
659
636
|
export interface ClaimDepositResponse {
|
|
660
637
|
payment: Payment;
|
|
661
638
|
}
|
|
662
639
|
|
|
663
|
-
export interface
|
|
664
|
-
|
|
665
|
-
value: number;
|
|
640
|
+
export interface ListFiatCurrenciesResponse {
|
|
641
|
+
currencies: FiatCurrency[];
|
|
666
642
|
}
|
|
667
643
|
|
|
668
|
-
export interface
|
|
669
|
-
|
|
644
|
+
export interface UserSettings {
|
|
645
|
+
sparkPrivateModeEnabled: boolean;
|
|
670
646
|
}
|
|
671
647
|
|
|
672
648
|
export interface ConnectRequest {
|
|
@@ -677,19 +653,28 @@ export interface ConnectRequest {
|
|
|
677
653
|
|
|
678
654
|
export interface Bolt12InvoiceRequestDetails {}
|
|
679
655
|
|
|
680
|
-
export
|
|
656
|
+
export interface SparkInvoicePaymentDetails {
|
|
657
|
+
description?: string;
|
|
658
|
+
invoice: string;
|
|
659
|
+
}
|
|
681
660
|
|
|
682
661
|
export interface Bolt12Invoice {
|
|
683
662
|
invoice: string;
|
|
684
663
|
source: PaymentRequestSource;
|
|
685
664
|
}
|
|
686
665
|
|
|
687
|
-
export interface
|
|
688
|
-
|
|
689
|
-
|
|
666
|
+
export interface LnurlPayResponse {
|
|
667
|
+
payment: Payment;
|
|
668
|
+
successAction?: SuccessActionProcessed;
|
|
690
669
|
}
|
|
691
670
|
|
|
692
|
-
export
|
|
671
|
+
export interface PaymentMetadata {
|
|
672
|
+
parentPaymentId?: string;
|
|
673
|
+
lnurlPayInfo?: LnurlPayInfo;
|
|
674
|
+
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
675
|
+
lnurlDescription?: string;
|
|
676
|
+
conversionInfo?: ConversionInfo;
|
|
677
|
+
}
|
|
693
678
|
|
|
694
679
|
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
695
680
|
|
|
@@ -699,25 +684,39 @@ export interface Bolt11RouteHint {
|
|
|
699
684
|
hops: Bolt11RouteHintHop[];
|
|
700
685
|
}
|
|
701
686
|
|
|
702
|
-
export
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
687
|
+
export interface PrepareSendPaymentRequest {
|
|
688
|
+
paymentRequest: string;
|
|
689
|
+
amount?: bigint;
|
|
690
|
+
tokenIdentifier?: string;
|
|
691
|
+
conversionOptions?: ConversionOptions;
|
|
706
692
|
}
|
|
707
693
|
|
|
708
|
-
export
|
|
694
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
695
|
+
userFeeSat: number;
|
|
696
|
+
l1BroadcastFeeSat: number;
|
|
697
|
+
}
|
|
709
698
|
|
|
710
|
-
export type
|
|
699
|
+
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
711
700
|
|
|
712
|
-
export interface
|
|
713
|
-
|
|
714
|
-
|
|
701
|
+
export interface LnurlPayInfo {
|
|
702
|
+
lnAddress?: string;
|
|
703
|
+
comment?: string;
|
|
704
|
+
domain?: string;
|
|
705
|
+
metadata?: string;
|
|
706
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
707
|
+
rawSuccessAction?: SuccessAction;
|
|
715
708
|
}
|
|
716
709
|
|
|
717
|
-
export type
|
|
710
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
718
711
|
|
|
719
|
-
export interface
|
|
720
|
-
|
|
712
|
+
export interface ConversionEstimate {
|
|
713
|
+
options: ConversionOptions;
|
|
714
|
+
amount: bigint;
|
|
715
|
+
fee: bigint;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export interface ListPaymentsResponse {
|
|
719
|
+
payments: Payment[];
|
|
721
720
|
}
|
|
722
721
|
|
|
723
722
|
export interface SparkInvoiceDetails {
|
|
@@ -731,10 +730,19 @@ export interface SparkInvoiceDetails {
|
|
|
731
730
|
senderPublicKey?: string;
|
|
732
731
|
}
|
|
733
732
|
|
|
734
|
-
export
|
|
733
|
+
export interface ConversionInfo {
|
|
734
|
+
poolId: string;
|
|
735
|
+
conversionId: string;
|
|
736
|
+
status: ConversionStatus;
|
|
737
|
+
fee?: string;
|
|
738
|
+
purpose?: ConversionPurpose;
|
|
739
|
+
}
|
|
735
740
|
|
|
736
|
-
export interface
|
|
737
|
-
|
|
741
|
+
export interface Symbol {
|
|
742
|
+
grapheme?: string;
|
|
743
|
+
template?: string;
|
|
744
|
+
rtl?: boolean;
|
|
745
|
+
position?: number;
|
|
738
746
|
}
|
|
739
747
|
|
|
740
748
|
export interface ClaimDepositRequest {
|
|
@@ -745,32 +753,30 @@ export interface ClaimDepositRequest {
|
|
|
745
753
|
|
|
746
754
|
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
747
755
|
|
|
748
|
-
export interface
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
tokenIdentifier?: string;
|
|
752
|
-
conversionEstimate?: ConversionEstimate;
|
|
756
|
+
export interface LnurlWithdrawResponse {
|
|
757
|
+
paymentRequest: string;
|
|
758
|
+
payment?: Payment;
|
|
753
759
|
}
|
|
754
760
|
|
|
755
|
-
export interface
|
|
756
|
-
|
|
757
|
-
|
|
761
|
+
export interface Record {
|
|
762
|
+
id: RecordId;
|
|
763
|
+
revision: number;
|
|
764
|
+
schemaVersion: string;
|
|
765
|
+
data: Map<string, string>;
|
|
758
766
|
}
|
|
759
767
|
|
|
760
|
-
export interface
|
|
768
|
+
export interface AesSuccessActionDataDecrypted {
|
|
761
769
|
description: string;
|
|
762
|
-
|
|
763
|
-
matchesCallbackDomain: boolean;
|
|
770
|
+
plaintext: string;
|
|
764
771
|
}
|
|
765
772
|
|
|
766
|
-
export
|
|
767
|
-
paymentRequest: string;
|
|
768
|
-
fee: bigint;
|
|
769
|
-
}
|
|
773
|
+
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 };
|
|
770
774
|
|
|
771
|
-
export interface
|
|
772
|
-
|
|
773
|
-
|
|
775
|
+
export interface RecordChange {
|
|
776
|
+
id: RecordId;
|
|
777
|
+
schemaVersion: string;
|
|
778
|
+
updatedFields: Map<string, string>;
|
|
779
|
+
revision: number;
|
|
774
780
|
}
|
|
775
781
|
|
|
776
782
|
export interface MintIssuerTokenRequest {
|
|
@@ -810,8 +816,8 @@ export interface UnfreezeIssuerTokenRequest {
|
|
|
810
816
|
export interface ExternalSigner {
|
|
811
817
|
identityPublicKey(): PublicKeyBytes;
|
|
812
818
|
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
813
|
-
signEcdsa(message:
|
|
814
|
-
signEcdsaRecoverable(message:
|
|
819
|
+
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
820
|
+
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
815
821
|
eciesEncrypt(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
816
822
|
eciesDecrypt(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
817
823
|
signHashSchnorr(hash: Uint8Array, path: string): Promise<SchnorrSignatureBytes>;
|
|
@@ -827,24 +833,28 @@ export interface ExternalSigner {
|
|
|
827
833
|
getPublicKeyFromPrivateKeySource(privateKey: ExternalPrivateKeySource): Promise<PublicKeyBytes>;
|
|
828
834
|
signFrost(request: ExternalSignFrostRequest): Promise<ExternalFrostSignatureShare>;
|
|
829
835
|
aggregateFrost(request: ExternalAggregateFrostRequest): Promise<ExternalFrostSignature>;
|
|
836
|
+
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
830
837
|
}
|
|
831
838
|
|
|
832
|
-
export interface
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
privateKey: ExternalPrivateKeySource;
|
|
836
|
-
verifyingKey: number[];
|
|
837
|
-
selfNonceCommitment: ExternalFrostCommitments;
|
|
838
|
-
statechainCommitments: IdentifierCommitmentPair[];
|
|
839
|
-
adaptorPublicKey?: number[];
|
|
839
|
+
export interface IdentifierSignaturePair {
|
|
840
|
+
identifier: ExternalIdentifier;
|
|
841
|
+
signature: ExternalFrostSignatureShare;
|
|
840
842
|
}
|
|
841
843
|
|
|
842
844
|
export interface PrivateKeyBytes {
|
|
843
845
|
bytes: number[];
|
|
844
846
|
}
|
|
845
847
|
|
|
846
|
-
export interface
|
|
847
|
-
|
|
848
|
+
export interface ExternalAggregateFrostRequest {
|
|
849
|
+
message: number[];
|
|
850
|
+
statechainSignatures: IdentifierSignaturePair[];
|
|
851
|
+
statechainPublicKeys: IdentifierPublicKeyPair[];
|
|
852
|
+
verifyingKey: number[];
|
|
853
|
+
statechainCommitments: IdentifierCommitmentPair[];
|
|
854
|
+
selfCommitment: ExternalSigningCommitments;
|
|
855
|
+
publicKey: number[];
|
|
856
|
+
selfSignature: ExternalFrostSignatureShare;
|
|
857
|
+
adaptorPublicKey?: number[];
|
|
848
858
|
}
|
|
849
859
|
|
|
850
860
|
export interface RecoverableEcdsaSignatureBytes {
|
|
@@ -859,15 +869,14 @@ export interface EcdsaSignatureBytes {
|
|
|
859
869
|
bytes: number[];
|
|
860
870
|
}
|
|
861
871
|
|
|
862
|
-
export interface
|
|
863
|
-
|
|
864
|
-
bindingCommitment: number[];
|
|
865
|
-
noncesCiphertext: number[];
|
|
872
|
+
export interface ExternalFrostSignatureShare {
|
|
873
|
+
bytes: number[];
|
|
866
874
|
}
|
|
867
875
|
|
|
868
|
-
export interface
|
|
869
|
-
|
|
870
|
-
|
|
876
|
+
export interface ExternalSecretShare {
|
|
877
|
+
threshold: number;
|
|
878
|
+
index: ExternalScalar;
|
|
879
|
+
share: ExternalScalar;
|
|
871
880
|
}
|
|
872
881
|
|
|
873
882
|
export interface ExternalSigningCommitments {
|
|
@@ -875,32 +884,33 @@ export interface ExternalSigningCommitments {
|
|
|
875
884
|
binding: number[];
|
|
876
885
|
}
|
|
877
886
|
|
|
878
|
-
export interface
|
|
879
|
-
|
|
887
|
+
export interface ExternalFrostCommitments {
|
|
888
|
+
hidingCommitment: number[];
|
|
889
|
+
bindingCommitment: number[];
|
|
890
|
+
noncesCiphertext: number[];
|
|
880
891
|
}
|
|
881
892
|
|
|
882
|
-
export
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
bytes: number[];
|
|
893
|
+
export interface ExternalVerifiableSecretShare {
|
|
894
|
+
secretShare: ExternalSecretShare;
|
|
895
|
+
proofs: number[][];
|
|
886
896
|
}
|
|
887
897
|
|
|
888
|
-
export
|
|
898
|
+
export interface ExternalEncryptedPrivateKey {
|
|
899
|
+
ciphertext: number[];
|
|
900
|
+
}
|
|
889
901
|
|
|
890
|
-
export interface
|
|
902
|
+
export interface ExternalSignFrostRequest {
|
|
891
903
|
message: number[];
|
|
892
|
-
|
|
893
|
-
|
|
904
|
+
publicKey: number[];
|
|
905
|
+
privateKey: ExternalPrivateKeySource;
|
|
894
906
|
verifyingKey: number[];
|
|
907
|
+
selfNonceCommitment: ExternalFrostCommitments;
|
|
895
908
|
statechainCommitments: IdentifierCommitmentPair[];
|
|
896
|
-
selfCommitment: ExternalSigningCommitments;
|
|
897
|
-
publicKey: number[];
|
|
898
|
-
selfSignature: ExternalFrostSignatureShare;
|
|
899
909
|
adaptorPublicKey?: number[];
|
|
900
910
|
}
|
|
901
911
|
|
|
902
|
-
export interface
|
|
903
|
-
|
|
912
|
+
export interface ExternalTreeNodeId {
|
|
913
|
+
id: string;
|
|
904
914
|
}
|
|
905
915
|
|
|
906
916
|
export interface IdentifierPublicKeyPair {
|
|
@@ -908,32 +918,37 @@ export interface IdentifierPublicKeyPair {
|
|
|
908
918
|
publicKey: number[];
|
|
909
919
|
}
|
|
910
920
|
|
|
911
|
-
export interface
|
|
921
|
+
export interface MessageBytes {
|
|
912
922
|
bytes: number[];
|
|
913
923
|
}
|
|
914
924
|
|
|
915
|
-
export interface
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
925
|
+
export interface IdentifierCommitmentPair {
|
|
926
|
+
identifier: ExternalIdentifier;
|
|
927
|
+
commitment: ExternalSigningCommitments;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export type ExternalPrivateKeySource = { type: "derived"; nodeId: ExternalTreeNodeId } | { type: "encrypted"; key: ExternalEncryptedPrivateKey };
|
|
931
|
+
|
|
932
|
+
export type ExternalSecretToSplit = { type: "privateKey"; source: ExternalPrivateKeySource } | { type: "preimage"; data: number[] };
|
|
933
|
+
|
|
934
|
+
export interface ExternalFrostSignature {
|
|
935
|
+
bytes: number[];
|
|
919
936
|
}
|
|
920
937
|
|
|
921
938
|
export interface PublicKeyBytes {
|
|
922
939
|
bytes: number[];
|
|
923
940
|
}
|
|
924
941
|
|
|
925
|
-
export interface
|
|
926
|
-
|
|
927
|
-
commitment: ExternalSigningCommitments;
|
|
942
|
+
export interface ExternalIdentifier {
|
|
943
|
+
bytes: number[];
|
|
928
944
|
}
|
|
929
945
|
|
|
930
|
-
export interface
|
|
931
|
-
|
|
932
|
-
proofs: number[][];
|
|
946
|
+
export interface ExternalScalar {
|
|
947
|
+
bytes: number[];
|
|
933
948
|
}
|
|
934
949
|
|
|
935
|
-
export interface
|
|
936
|
-
|
|
950
|
+
export interface HashedMessageBytes {
|
|
951
|
+
bytes: number[];
|
|
937
952
|
}
|
|
938
953
|
|
|
939
954
|
export interface Storage {
|
|
@@ -966,6 +981,7 @@ export class BreezSdk {
|
|
|
966
981
|
private constructor();
|
|
967
982
|
free(): void;
|
|
968
983
|
disconnect(): Promise<void>;
|
|
984
|
+
lnurlAuth(request_data: LnurlAuthRequestDetails): Promise<LnurlCallbackStatus>;
|
|
969
985
|
getPayment(request: GetPaymentRequest): Promise<GetPaymentResponse>;
|
|
970
986
|
syncWallet(request: SyncWalletRequest): Promise<SyncWalletResponse>;
|
|
971
987
|
sendPayment(request: SendPaymentRequest): Promise<SendPaymentResponse>;
|
|
@@ -1008,8 +1024,9 @@ export class BreezSdk {
|
|
|
1008
1024
|
export class DefaultSigner {
|
|
1009
1025
|
private constructor();
|
|
1010
1026
|
free(): void;
|
|
1011
|
-
signEcdsa(message:
|
|
1027
|
+
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
1012
1028
|
signFrost(request: ExternalSignFrostRequest): Promise<ExternalFrostSignatureShare>;
|
|
1029
|
+
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
1013
1030
|
eciesDecrypt(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
1014
1031
|
eciesEncrypt(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
1015
1032
|
aggregateFrost(request: ExternalAggregateFrostRequest): Promise<ExternalFrostSignature>;
|
|
@@ -1018,7 +1035,7 @@ export class DefaultSigner {
|
|
|
1018
1035
|
generateRandomKey(): Promise<ExternalPrivateKeySource>;
|
|
1019
1036
|
identityPublicKey(): PublicKeyBytes;
|
|
1020
1037
|
subtractPrivateKeys(signing_key: ExternalPrivateKeySource, new_signing_key: ExternalPrivateKeySource): Promise<ExternalPrivateKeySource>;
|
|
1021
|
-
signEcdsaRecoverable(message:
|
|
1038
|
+
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
1022
1039
|
getPublicKeyForNode(id: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
1023
1040
|
splitSecretWithProofs(secret: ExternalSecretToSplit, threshold: number, num_shares: number): Promise<ExternalVerifiableSecretShare[]>;
|
|
1024
1041
|
getStaticDepositPublicKey(index: number): Promise<PublicKeyBytes>;
|