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