@breeztech/breez-sdk-spark 0.6.4-rc2 → 0.6.5
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 +436 -419
- package/bundler/breez_sdk_spark_wasm_bg.js +35 -18
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -3
- package/deno/breez_sdk_spark_wasm.d.ts +436 -419
- package/deno/breez_sdk_spark_wasm.js +35 -18
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +436 -419
- package/nodejs/breez_sdk_spark_wasm.js +35 -18
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -3
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +442 -422
- package/web/breez_sdk_spark_wasm.js +35 -18
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +6 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
4
3
|
export function defaultConfig(network: Network): Config;
|
|
4
|
+
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
5
5
|
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
6
6
|
/**
|
|
7
7
|
* Entry point invoked by JavaScript in a worker.
|
|
@@ -53,6 +53,8 @@ export interface RecommendedFees {
|
|
|
53
53
|
minimumFee: number;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
57
|
+
|
|
56
58
|
export interface TxStatus {
|
|
57
59
|
confirmed: boolean;
|
|
58
60
|
blockHeight?: number;
|
|
@@ -66,313 +68,288 @@ export interface Utxo {
|
|
|
66
68
|
status: TxStatus;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
70
|
-
|
|
71
71
|
export interface PaymentObserver {
|
|
72
72
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
source: PaymentRequestSource;
|
|
75
|
+
export interface RecordChange {
|
|
76
|
+
id: RecordId;
|
|
77
|
+
schemaVersion: string;
|
|
78
|
+
updatedFields: Map<string, string>;
|
|
79
|
+
revision: number;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
export interface
|
|
84
|
-
|
|
82
|
+
export interface CurrencyInfo {
|
|
83
|
+
name: string;
|
|
84
|
+
fractionSize: number;
|
|
85
|
+
spacing?: number;
|
|
86
|
+
symbol?: Symbol;
|
|
87
|
+
uniqSymbol?: Symbol;
|
|
88
|
+
localizedName: LocalizedName[];
|
|
89
|
+
localeOverrides: LocaleOverrides[];
|
|
85
90
|
}
|
|
86
91
|
|
|
87
|
-
export interface
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
export interface LnurlWithdrawRequestDetails {
|
|
93
|
+
callback: string;
|
|
94
|
+
k1: string;
|
|
95
|
+
defaultDescription: string;
|
|
96
|
+
minWithdrawable: number;
|
|
97
|
+
maxWithdrawable: number;
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
export
|
|
93
|
-
|
|
94
|
-
export interface DepositInfo {
|
|
95
|
-
txid: string;
|
|
96
|
-
vout: number;
|
|
97
|
-
amountSats: number;
|
|
98
|
-
refundTx?: string;
|
|
99
|
-
refundTxId?: string;
|
|
100
|
-
claimError?: DepositClaimError;
|
|
100
|
+
export interface UserSettings {
|
|
101
|
+
sparkPrivateModeEnabled: boolean;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
export interface
|
|
104
|
-
|
|
105
|
-
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
106
|
-
lnurlDescription?: string;
|
|
104
|
+
export interface ListFiatCurrenciesResponse {
|
|
105
|
+
currencies: FiatCurrency[];
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
export interface
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
export interface Bolt12OfferDetails {
|
|
109
|
+
absoluteExpiry?: number;
|
|
110
|
+
chains: string[];
|
|
111
|
+
description?: string;
|
|
112
|
+
issuer?: string;
|
|
113
|
+
minAmount?: Amount;
|
|
114
|
+
offer: Bolt12Offer;
|
|
115
|
+
paths: Bolt12OfferBlindedPath[];
|
|
116
|
+
signingPubkey?: string;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
export
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
source: PaymentRequestSource;
|
|
119
|
+
export interface PrepareLnurlPayRequest {
|
|
120
|
+
amountSats: number;
|
|
121
|
+
comment?: string;
|
|
122
|
+
payRequest: LnurlPayRequestDetails;
|
|
123
|
+
validateSuccessActionUrl?: boolean;
|
|
121
124
|
}
|
|
122
125
|
|
|
123
|
-
export interface
|
|
124
|
-
|
|
126
|
+
export interface GetTokensMetadataResponse {
|
|
127
|
+
tokensMetadata: TokenMetadata[];
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
export interface Bolt11RouteHint {
|
|
128
131
|
hops: Bolt11RouteHintHop[];
|
|
129
132
|
}
|
|
130
133
|
|
|
131
|
-
export interface
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
export interface LnurlPayInfo {
|
|
135
|
+
lnAddress?: string;
|
|
136
|
+
comment?: string;
|
|
137
|
+
domain?: string;
|
|
138
|
+
metadata?: string;
|
|
139
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
140
|
+
rawSuccessAction?: SuccessAction;
|
|
134
141
|
}
|
|
135
142
|
|
|
136
|
-
export interface
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
idempotencyKey?: string;
|
|
143
|
+
export interface TokenBalance {
|
|
144
|
+
balance: bigint;
|
|
145
|
+
tokenMetadata: TokenMetadata;
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
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);
|
|
143
149
|
|
|
144
|
-
export interface
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
export interface PaymentMetadata {
|
|
151
|
+
lnurlPayInfo?: LnurlPayInfo;
|
|
152
|
+
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
153
|
+
lnurlDescription?: string;
|
|
148
154
|
}
|
|
149
155
|
|
|
150
|
-
export interface
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
export interface ConnectRequest {
|
|
157
|
+
config: Config;
|
|
158
|
+
seed: Seed;
|
|
159
|
+
storageDir: string;
|
|
153
160
|
}
|
|
154
161
|
|
|
155
|
-
export interface
|
|
156
|
-
newState: Record;
|
|
157
|
-
oldState?: Record;
|
|
158
|
-
}
|
|
162
|
+
export interface Bolt12InvoiceRequestDetails {}
|
|
159
163
|
|
|
160
|
-
export interface
|
|
161
|
-
description?: string;
|
|
164
|
+
export interface Bolt12Invoice {
|
|
162
165
|
invoice: string;
|
|
166
|
+
source: PaymentRequestSource;
|
|
163
167
|
}
|
|
164
168
|
|
|
165
|
-
export interface
|
|
166
|
-
|
|
169
|
+
export interface SilentPaymentAddressDetails {
|
|
170
|
+
address: string;
|
|
171
|
+
network: BitcoinNetwork;
|
|
167
172
|
source: PaymentRequestSource;
|
|
168
173
|
}
|
|
169
174
|
|
|
170
|
-
export interface
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
export interface LnurlWithdrawRequest {
|
|
176
|
+
amountSats: number;
|
|
177
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
178
|
+
completionTimeoutSecs?: number;
|
|
173
179
|
}
|
|
174
180
|
|
|
175
|
-
export interface
|
|
176
|
-
|
|
177
|
-
tokenMetadata: TokenMetadata;
|
|
181
|
+
export interface ListUnclaimedDepositsResponse {
|
|
182
|
+
deposits: DepositInfo[];
|
|
178
183
|
}
|
|
179
184
|
|
|
180
|
-
export interface
|
|
181
|
-
|
|
182
|
-
|
|
185
|
+
export interface Bolt12Offer {
|
|
186
|
+
offer: string;
|
|
187
|
+
source: PaymentRequestSource;
|
|
183
188
|
}
|
|
184
189
|
|
|
185
|
-
export interface
|
|
190
|
+
export interface SparkAddressDetails {
|
|
191
|
+
address: string;
|
|
192
|
+
identityPublicKey: string;
|
|
193
|
+
network: BitcoinNetwork;
|
|
194
|
+
source: PaymentRequestSource;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface LnurlPayResponse {
|
|
186
198
|
payment: Payment;
|
|
199
|
+
successAction?: SuccessActionProcessed;
|
|
187
200
|
}
|
|
188
201
|
|
|
189
|
-
export type
|
|
202
|
+
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 };
|
|
190
203
|
|
|
191
|
-
export interface
|
|
192
|
-
|
|
193
|
-
name: string;
|
|
204
|
+
export interface UpdateUserSettingsRequest {
|
|
205
|
+
sparkPrivateModeEnabled?: boolean;
|
|
194
206
|
}
|
|
195
207
|
|
|
196
|
-
export interface
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
export interface LnurlPayRequestDetails {
|
|
209
|
+
callback: string;
|
|
210
|
+
minSendable: number;
|
|
211
|
+
maxSendable: number;
|
|
212
|
+
metadataStr: string;
|
|
213
|
+
commentAllowed: number;
|
|
214
|
+
domain: string;
|
|
215
|
+
url: string;
|
|
216
|
+
address?: string;
|
|
217
|
+
allowsNostr?: boolean;
|
|
218
|
+
nostrPubkey?: string;
|
|
203
219
|
}
|
|
204
220
|
|
|
205
|
-
export interface
|
|
206
|
-
|
|
221
|
+
export interface UnversionedRecordChange {
|
|
222
|
+
id: RecordId;
|
|
223
|
+
schemaVersion: string;
|
|
224
|
+
updatedFields: Map<string, string>;
|
|
207
225
|
}
|
|
208
226
|
|
|
209
|
-
export type
|
|
210
|
-
|
|
211
|
-
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
212
|
-
|
|
213
|
-
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
227
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
214
228
|
|
|
215
|
-
export interface
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
rtl?: boolean;
|
|
219
|
-
position?: number;
|
|
229
|
+
export interface SignMessageResponse {
|
|
230
|
+
pubkey: string;
|
|
231
|
+
signature: string;
|
|
220
232
|
}
|
|
221
233
|
|
|
222
|
-
export
|
|
234
|
+
export interface CheckLightningAddressRequest {
|
|
235
|
+
username: string;
|
|
236
|
+
}
|
|
223
237
|
|
|
224
|
-
export interface
|
|
225
|
-
|
|
238
|
+
export interface RecordId {
|
|
239
|
+
type: string;
|
|
240
|
+
dataId: string;
|
|
226
241
|
}
|
|
227
242
|
|
|
228
|
-
export interface
|
|
229
|
-
|
|
230
|
-
description?: string;
|
|
243
|
+
export interface Bolt12OfferBlindedPath {
|
|
244
|
+
blindedHops: string[];
|
|
231
245
|
}
|
|
232
246
|
|
|
233
247
|
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
234
248
|
|
|
249
|
+
export interface SendPaymentRequest {
|
|
250
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
251
|
+
options?: SendPaymentOptions;
|
|
252
|
+
idempotencyKey?: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export type PaymentDetails = { type: "spark"; invoiceDetails?: SparkInvoicePaymentDetails; htlcDetails?: SparkHtlcDetails } | { type: "token"; metadata: TokenMetadata; txHash: string; invoiceDetails?: SparkInvoicePaymentDetails } | { 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 };
|
|
256
|
+
|
|
257
|
+
export type Network = "mainnet" | "regtest";
|
|
258
|
+
|
|
235
259
|
export interface LocaleOverrides {
|
|
236
260
|
locale: string;
|
|
237
261
|
spacing?: number;
|
|
238
262
|
symbol: Symbol;
|
|
239
263
|
}
|
|
240
264
|
|
|
241
|
-
export
|
|
265
|
+
export interface ClaimDepositResponse {
|
|
266
|
+
payment: Payment;
|
|
267
|
+
}
|
|
242
268
|
|
|
243
|
-
export interface
|
|
244
|
-
|
|
269
|
+
export interface SparkHtlcOptions {
|
|
270
|
+
paymentHash: string;
|
|
271
|
+
expiryDurationSecs: number;
|
|
245
272
|
}
|
|
246
273
|
|
|
247
|
-
export interface
|
|
248
|
-
|
|
249
|
-
lightningAddress: string;
|
|
250
|
-
lnurl: string;
|
|
251
|
-
username: string;
|
|
274
|
+
export interface ListPaymentsResponse {
|
|
275
|
+
payments: Payment[];
|
|
252
276
|
}
|
|
253
277
|
|
|
254
|
-
export interface
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
decimals: number;
|
|
260
|
-
maxSupply: bigint;
|
|
261
|
-
isFreezable: boolean;
|
|
278
|
+
export interface RefundDepositRequest {
|
|
279
|
+
txid: string;
|
|
280
|
+
vout: number;
|
|
281
|
+
destinationAddress: string;
|
|
282
|
+
fee: Fee;
|
|
262
283
|
}
|
|
263
284
|
|
|
264
|
-
export interface
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
syncIntervalSecs: number;
|
|
268
|
-
maxDepositClaimFee?: MaxFee;
|
|
269
|
-
lnurlDomain?: string;
|
|
270
|
-
preferSparkOverLightning: boolean;
|
|
271
|
-
externalInputParsers?: ExternalInputParser[];
|
|
272
|
-
useDefaultExternalInputParsers: boolean;
|
|
273
|
-
realTimeSyncServerUrl?: string;
|
|
274
|
-
privateEnabledDefault: boolean;
|
|
285
|
+
export interface PaymentRequestSource {
|
|
286
|
+
bip21Uri?: string;
|
|
287
|
+
bip353Address?: string;
|
|
275
288
|
}
|
|
276
289
|
|
|
277
|
-
export interface
|
|
278
|
-
|
|
290
|
+
export interface Payment {
|
|
291
|
+
id: string;
|
|
292
|
+
paymentType: PaymentType;
|
|
293
|
+
status: PaymentStatus;
|
|
279
294
|
amount: bigint;
|
|
280
|
-
|
|
295
|
+
fees: bigint;
|
|
296
|
+
timestamp: number;
|
|
297
|
+
method: PaymentMethod;
|
|
298
|
+
details?: PaymentDetails;
|
|
281
299
|
}
|
|
282
300
|
|
|
283
|
-
export interface
|
|
284
|
-
|
|
285
|
-
expiryDurationSecs: number;
|
|
301
|
+
export interface GetTokensMetadataRequest {
|
|
302
|
+
tokenIdentifiers: string[];
|
|
286
303
|
}
|
|
287
304
|
|
|
288
|
-
export interface
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
305
|
+
export interface ClaimDepositRequest {
|
|
306
|
+
txid: string;
|
|
307
|
+
vout: number;
|
|
308
|
+
maxFee?: MaxFee;
|
|
292
309
|
}
|
|
293
310
|
|
|
294
|
-
export interface
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
311
|
+
export interface LnurlReceiveMetadata {
|
|
312
|
+
nostrZapRequest?: string;
|
|
313
|
+
nostrZapReceipt?: string;
|
|
314
|
+
senderComment?: string;
|
|
298
315
|
}
|
|
299
316
|
|
|
300
|
-
export interface
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
revision: number;
|
|
317
|
+
export interface OptimizationProgress {
|
|
318
|
+
isRunning: boolean;
|
|
319
|
+
currentRound: number;
|
|
320
|
+
totalRounds: number;
|
|
305
321
|
}
|
|
306
322
|
|
|
307
|
-
export
|
|
308
|
-
|
|
309
|
-
export interface LogEntry {
|
|
310
|
-
line: string;
|
|
311
|
-
level: string;
|
|
323
|
+
export interface LnurlWithdrawInfo {
|
|
324
|
+
withdrawUrl: string;
|
|
312
325
|
}
|
|
313
326
|
|
|
314
|
-
export
|
|
315
|
-
|
|
316
|
-
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
317
|
-
|
|
318
|
-
export interface GetInfoResponse {
|
|
319
|
-
balanceSats: number;
|
|
320
|
-
tokenBalances: Map<string, TokenBalance>;
|
|
321
|
-
}
|
|
327
|
+
export type OptimizationEvent = { type: "started"; totalRounds: number } | { type: "roundCompleted"; currentRound: number; totalRounds: number } | { type: "completed" } | { type: "cancelled" } | { type: "failed"; error: string } | { type: "skipped" };
|
|
322
328
|
|
|
323
|
-
export interface
|
|
324
|
-
|
|
325
|
-
|
|
329
|
+
export interface ListPaymentsRequest {
|
|
330
|
+
typeFilter?: PaymentType[];
|
|
331
|
+
statusFilter?: PaymentStatus[];
|
|
332
|
+
assetFilter?: AssetFilter;
|
|
333
|
+
sparkHtlcStatusFilter?: SparkHtlcStatus[];
|
|
334
|
+
fromTimestamp?: number;
|
|
335
|
+
toTimestamp?: number;
|
|
336
|
+
offset?: number;
|
|
337
|
+
limit?: number;
|
|
338
|
+
sortAscending?: boolean;
|
|
326
339
|
}
|
|
327
340
|
|
|
328
341
|
export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: bigint; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: bigint; tokenIdentifier?: string };
|
|
329
342
|
|
|
330
|
-
export interface
|
|
331
|
-
|
|
332
|
-
expiresAt: number;
|
|
333
|
-
speedFast: SendOnchainSpeedFeeQuote;
|
|
334
|
-
speedMedium: SendOnchainSpeedFeeQuote;
|
|
335
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
export interface Bolt12Invoice {
|
|
339
|
-
invoice: string;
|
|
340
|
-
source: PaymentRequestSource;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
344
|
-
|
|
345
|
-
export interface LnurlWithdrawRequestDetails {
|
|
346
|
-
callback: string;
|
|
347
|
-
k1: string;
|
|
348
|
-
defaultDescription: string;
|
|
349
|
-
minWithdrawable: number;
|
|
350
|
-
maxWithdrawable: number;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
export interface OutgoingChange {
|
|
354
|
-
change: RecordChange;
|
|
355
|
-
parent?: Record;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export interface Bolt12OfferBlindedPath {
|
|
359
|
-
blindedHops: string[];
|
|
343
|
+
export interface GetInfoRequest {
|
|
344
|
+
ensureSynced?: boolean;
|
|
360
345
|
}
|
|
361
346
|
|
|
362
|
-
export type
|
|
363
|
-
|
|
364
|
-
export interface LnurlAuthRequestDetails {
|
|
365
|
-
k1: string;
|
|
366
|
-
action?: string;
|
|
367
|
-
domain: string;
|
|
368
|
-
url: string;
|
|
369
|
-
}
|
|
347
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
370
348
|
|
|
371
|
-
export interface
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
nostrZapReceipt?: string;
|
|
349
|
+
export interface PrepareSendPaymentRequest {
|
|
350
|
+
paymentRequest: string;
|
|
351
|
+
amount?: bigint;
|
|
352
|
+
tokenIdentifier?: string;
|
|
376
353
|
}
|
|
377
354
|
|
|
378
355
|
export interface Record {
|
|
@@ -382,80 +359,82 @@ export interface Record {
|
|
|
382
359
|
data: Map<string, string>;
|
|
383
360
|
}
|
|
384
361
|
|
|
385
|
-
export interface
|
|
386
|
-
|
|
387
|
-
|
|
362
|
+
export interface PrepareLnurlPayResponse {
|
|
363
|
+
amountSats: number;
|
|
364
|
+
comment?: string;
|
|
365
|
+
payRequest: LnurlPayRequestDetails;
|
|
366
|
+
feeSats: number;
|
|
367
|
+
invoiceDetails: Bolt11InvoiceDetails;
|
|
368
|
+
successAction?: SuccessAction;
|
|
388
369
|
}
|
|
389
370
|
|
|
390
|
-
export interface
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
371
|
+
export interface BitcoinAddressDetails {
|
|
372
|
+
address: string;
|
|
373
|
+
network: BitcoinNetwork;
|
|
374
|
+
source: PaymentRequestSource;
|
|
394
375
|
}
|
|
395
376
|
|
|
396
|
-
export
|
|
397
|
-
payment: Payment;
|
|
398
|
-
successAction?: SuccessActionProcessed;
|
|
399
|
-
}
|
|
377
|
+
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
400
378
|
|
|
401
|
-
export interface
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
commentAllowed: number;
|
|
407
|
-
domain: string;
|
|
408
|
-
url: string;
|
|
409
|
-
address?: string;
|
|
410
|
-
allowsNostr?: boolean;
|
|
411
|
-
nostrPubkey?: string;
|
|
379
|
+
export interface Symbol {
|
|
380
|
+
grapheme?: string;
|
|
381
|
+
template?: string;
|
|
382
|
+
rtl?: boolean;
|
|
383
|
+
position?: number;
|
|
412
384
|
}
|
|
413
385
|
|
|
414
|
-
export interface
|
|
415
|
-
|
|
416
|
-
|
|
386
|
+
export interface LogEntry {
|
|
387
|
+
line: string;
|
|
388
|
+
level: string;
|
|
417
389
|
}
|
|
418
390
|
|
|
419
|
-
export interface
|
|
420
|
-
|
|
391
|
+
export interface Bip21Details {
|
|
392
|
+
amountSat?: number;
|
|
393
|
+
assetId?: string;
|
|
394
|
+
uri: string;
|
|
395
|
+
extras: Bip21Extra[];
|
|
396
|
+
label?: string;
|
|
397
|
+
message?: string;
|
|
398
|
+
paymentMethods: InputType[];
|
|
421
399
|
}
|
|
422
400
|
|
|
423
|
-
export
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
description: string;
|
|
427
|
-
url: string;
|
|
428
|
-
matchesCallbackDomain: boolean;
|
|
401
|
+
export interface RegisterLightningAddressRequest {
|
|
402
|
+
username: string;
|
|
403
|
+
description?: string;
|
|
429
404
|
}
|
|
430
405
|
|
|
431
|
-
export interface
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
validateSuccessActionUrl?: boolean;
|
|
406
|
+
export interface PrepareSendPaymentResponse {
|
|
407
|
+
paymentMethod: SendPaymentMethod;
|
|
408
|
+
amount: bigint;
|
|
409
|
+
tokenIdentifier?: string;
|
|
436
410
|
}
|
|
437
411
|
|
|
438
|
-
export interface
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
fee: Fee;
|
|
412
|
+
export interface ProvisionalPayment {
|
|
413
|
+
paymentId: string;
|
|
414
|
+
amount: bigint;
|
|
415
|
+
details: ProvisionalPaymentDetails;
|
|
443
416
|
}
|
|
444
417
|
|
|
445
|
-
export interface
|
|
446
|
-
|
|
418
|
+
export interface IncomingChange {
|
|
419
|
+
newState: Record;
|
|
420
|
+
oldState?: Record;
|
|
447
421
|
}
|
|
448
422
|
|
|
449
|
-
export
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
423
|
+
export interface CheckMessageRequest {
|
|
424
|
+
message: string;
|
|
425
|
+
pubkey: string;
|
|
426
|
+
signature: string;
|
|
453
427
|
}
|
|
454
428
|
|
|
455
|
-
export
|
|
429
|
+
export interface ListFiatRatesResponse {
|
|
430
|
+
rates: Rate[];
|
|
431
|
+
}
|
|
456
432
|
|
|
457
|
-
export interface
|
|
458
|
-
|
|
433
|
+
export interface LnurlAuthRequestDetails {
|
|
434
|
+
k1: string;
|
|
435
|
+
action?: string;
|
|
436
|
+
domain: string;
|
|
437
|
+
url: string;
|
|
459
438
|
}
|
|
460
439
|
|
|
461
440
|
export interface Bolt11RouteHintHop {
|
|
@@ -468,11 +447,7 @@ export interface Bolt11RouteHintHop {
|
|
|
468
447
|
htlcMaximumMsat?: number;
|
|
469
448
|
}
|
|
470
449
|
|
|
471
|
-
export interface
|
|
472
|
-
rates: Rate[];
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
450
|
+
export interface SyncWalletResponse {}
|
|
476
451
|
|
|
477
452
|
export interface SparkInvoiceDetails {
|
|
478
453
|
invoice: string;
|
|
@@ -485,85 +460,133 @@ export interface SparkInvoiceDetails {
|
|
|
485
460
|
senderPublicKey?: string;
|
|
486
461
|
}
|
|
487
462
|
|
|
488
|
-
export interface
|
|
489
|
-
|
|
490
|
-
|
|
463
|
+
export interface TokenMetadata {
|
|
464
|
+
identifier: string;
|
|
465
|
+
issuerPublicKey: string;
|
|
466
|
+
name: string;
|
|
467
|
+
ticker: string;
|
|
468
|
+
decimals: number;
|
|
469
|
+
maxSupply: bigint;
|
|
470
|
+
isFreezable: boolean;
|
|
491
471
|
}
|
|
492
472
|
|
|
493
|
-
export
|
|
494
|
-
|
|
473
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
474
|
+
|
|
475
|
+
export interface LightningAddressDetails {
|
|
476
|
+
address: string;
|
|
477
|
+
payRequest: LnurlPayRequestDetails;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export interface GetInfoResponse {
|
|
481
|
+
balanceSats: number;
|
|
482
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export interface SparkInvoicePaymentDetails {
|
|
495
486
|
description?: string;
|
|
496
|
-
|
|
497
|
-
expiry: number;
|
|
498
|
-
invoice: Bolt11Invoice;
|
|
499
|
-
minFinalCltvExpiryDelta: number;
|
|
500
|
-
network: BitcoinNetwork;
|
|
501
|
-
payeePubkey: string;
|
|
502
|
-
paymentHash: string;
|
|
503
|
-
paymentSecret: string;
|
|
504
|
-
routingHints: Bolt11RouteHint[];
|
|
505
|
-
timestamp: number;
|
|
487
|
+
invoice: string;
|
|
506
488
|
}
|
|
507
489
|
|
|
508
|
-
export
|
|
509
|
-
|
|
490
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
491
|
+
|
|
492
|
+
export interface ClaimHtlcPaymentResponse {
|
|
493
|
+
payment: Payment;
|
|
510
494
|
}
|
|
511
495
|
|
|
512
|
-
export interface
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
496
|
+
export interface Config {
|
|
497
|
+
apiKey?: string;
|
|
498
|
+
network: Network;
|
|
499
|
+
syncIntervalSecs: number;
|
|
500
|
+
maxDepositClaimFee?: MaxFee;
|
|
501
|
+
lnurlDomain?: string;
|
|
502
|
+
preferSparkOverLightning: boolean;
|
|
503
|
+
externalInputParsers?: ExternalInputParser[];
|
|
504
|
+
useDefaultExternalInputParsers: boolean;
|
|
505
|
+
realTimeSyncServerUrl?: string;
|
|
506
|
+
privateEnabledDefault: boolean;
|
|
507
|
+
optimizationConfig: OptimizationConfig;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export interface LightningAddressInfo {
|
|
511
|
+
description: string;
|
|
512
|
+
lightningAddress: string;
|
|
513
|
+
lnurl: string;
|
|
514
|
+
username: string;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface AesSuccessActionData {
|
|
518
|
+
description: string;
|
|
519
|
+
ciphertext: string;
|
|
520
|
+
iv: string;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
524
|
+
|
|
525
|
+
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
526
|
+
|
|
527
|
+
export interface Bolt11Invoice {
|
|
528
|
+
bolt11: string;
|
|
516
529
|
source: PaymentRequestSource;
|
|
517
530
|
}
|
|
518
531
|
|
|
519
|
-
export
|
|
532
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
533
|
+
|
|
534
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
535
|
+
|
|
536
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
537
|
+
userFeeSat: number;
|
|
538
|
+
l1BroadcastFeeSat: number;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface SendPaymentResponse {
|
|
542
|
+
payment: Payment;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export interface UrlSuccessActionData {
|
|
546
|
+
description: string;
|
|
547
|
+
url: string;
|
|
548
|
+
matchesCallbackDomain: boolean;
|
|
549
|
+
}
|
|
520
550
|
|
|
521
|
-
export
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
sparkHtlcStatusFilter?: SparkHtlcStatus[];
|
|
526
|
-
fromTimestamp?: number;
|
|
527
|
-
toTimestamp?: number;
|
|
528
|
-
offset?: number;
|
|
529
|
-
limit?: number;
|
|
530
|
-
sortAscending?: boolean;
|
|
551
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
552
|
+
|
|
553
|
+
export interface ReceivePaymentRequest {
|
|
554
|
+
paymentMethod: ReceivePaymentMethod;
|
|
531
555
|
}
|
|
532
556
|
|
|
533
|
-
export interface
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
557
|
+
export interface DepositInfo {
|
|
558
|
+
txid: string;
|
|
559
|
+
vout: number;
|
|
560
|
+
amountSats: number;
|
|
561
|
+
refundTx?: string;
|
|
562
|
+
refundTxId?: string;
|
|
563
|
+
claimError?: DepositClaimError;
|
|
537
564
|
}
|
|
538
565
|
|
|
539
|
-
export interface
|
|
540
|
-
|
|
541
|
-
|
|
566
|
+
export interface OutgoingChange {
|
|
567
|
+
change: RecordChange;
|
|
568
|
+
parent?: Record;
|
|
542
569
|
}
|
|
543
570
|
|
|
544
|
-
export type
|
|
571
|
+
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
545
572
|
|
|
546
|
-
export interface
|
|
547
|
-
|
|
573
|
+
export interface Bip21Extra {
|
|
574
|
+
key: string;
|
|
575
|
+
value: string;
|
|
548
576
|
}
|
|
549
577
|
|
|
550
|
-
export type
|
|
578
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
551
579
|
|
|
552
|
-
export interface
|
|
553
|
-
|
|
580
|
+
export interface LocalizedName {
|
|
581
|
+
locale: string;
|
|
582
|
+
name: string;
|
|
554
583
|
}
|
|
555
584
|
|
|
556
|
-
export type
|
|
585
|
+
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 };
|
|
557
586
|
|
|
558
|
-
export interface
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
status: PaymentStatus;
|
|
562
|
-
amount: bigint;
|
|
563
|
-
fees: bigint;
|
|
564
|
-
timestamp: number;
|
|
565
|
-
method: PaymentMethod;
|
|
566
|
-
details?: PaymentDetails;
|
|
587
|
+
export interface ReceivePaymentResponse {
|
|
588
|
+
paymentRequest: string;
|
|
589
|
+
fee: bigint;
|
|
567
590
|
}
|
|
568
591
|
|
|
569
592
|
export interface AesSuccessActionDataDecrypted {
|
|
@@ -571,80 +594,70 @@ export interface AesSuccessActionDataDecrypted {
|
|
|
571
594
|
plaintext: string;
|
|
572
595
|
}
|
|
573
596
|
|
|
574
|
-
export interface
|
|
575
|
-
|
|
576
|
-
comment?: string;
|
|
577
|
-
domain?: string;
|
|
578
|
-
metadata?: string;
|
|
579
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
580
|
-
rawSuccessAction?: SuccessAction;
|
|
597
|
+
export interface ClaimHtlcPaymentRequest {
|
|
598
|
+
preimage: string;
|
|
581
599
|
}
|
|
582
600
|
|
|
583
|
-
export interface
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
601
|
+
export interface ExternalInputParser {
|
|
602
|
+
providerId: string;
|
|
603
|
+
inputRegex: string;
|
|
604
|
+
parserUrl: string;
|
|
587
605
|
}
|
|
588
606
|
|
|
589
|
-
export interface
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
expiryTime: number;
|
|
593
|
-
status: SparkHtlcStatus;
|
|
607
|
+
export interface LnurlPayRequest {
|
|
608
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
609
|
+
idempotencyKey?: string;
|
|
594
610
|
}
|
|
595
611
|
|
|
596
|
-
export interface
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
uri: string;
|
|
600
|
-
extras: Bip21Extra[];
|
|
601
|
-
label?: string;
|
|
602
|
-
message?: string;
|
|
603
|
-
paymentMethods: InputType[];
|
|
612
|
+
export interface Credentials {
|
|
613
|
+
username: string;
|
|
614
|
+
password: string;
|
|
604
615
|
}
|
|
605
616
|
|
|
606
|
-
export interface
|
|
607
|
-
|
|
617
|
+
export interface Bolt11InvoiceDetails {
|
|
618
|
+
amountMsat?: number;
|
|
619
|
+
description?: string;
|
|
620
|
+
descriptionHash?: string;
|
|
621
|
+
expiry: number;
|
|
622
|
+
invoice: Bolt11Invoice;
|
|
623
|
+
minFinalCltvExpiryDelta: number;
|
|
624
|
+
network: BitcoinNetwork;
|
|
625
|
+
payeePubkey: string;
|
|
626
|
+
paymentHash: string;
|
|
627
|
+
paymentSecret: string;
|
|
628
|
+
routingHints: Bolt11RouteHint[];
|
|
629
|
+
timestamp: number;
|
|
608
630
|
}
|
|
609
631
|
|
|
610
|
-
export interface
|
|
611
|
-
|
|
612
|
-
payRequest: LnurlPayRequestDetails;
|
|
632
|
+
export interface MessageSuccessActionData {
|
|
633
|
+
message: string;
|
|
613
634
|
}
|
|
614
635
|
|
|
615
|
-
export interface
|
|
616
|
-
|
|
636
|
+
export interface SparkHtlcDetails {
|
|
637
|
+
paymentHash: string;
|
|
638
|
+
preimage?: string;
|
|
639
|
+
expiryTime: number;
|
|
640
|
+
status: SparkHtlcStatus;
|
|
617
641
|
}
|
|
618
642
|
|
|
619
|
-
export
|
|
620
|
-
paymentId: string;
|
|
621
|
-
}
|
|
643
|
+
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
622
644
|
|
|
623
|
-
export
|
|
624
|
-
bolt11: string;
|
|
625
|
-
source: PaymentRequestSource;
|
|
626
|
-
}
|
|
645
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
627
646
|
|
|
628
|
-
export interface
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
iv: string;
|
|
647
|
+
export interface RefundDepositResponse {
|
|
648
|
+
txId: string;
|
|
649
|
+
txHex: string;
|
|
632
650
|
}
|
|
633
651
|
|
|
634
|
-
export
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
minAmount?: Amount;
|
|
640
|
-
offer: Bolt12Offer;
|
|
641
|
-
paths: Bolt12OfferBlindedPath[];
|
|
642
|
-
signingPubkey?: string;
|
|
652
|
+
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: bigint; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress" } | { type: "bolt11Invoice"; description: string; amountSats?: number; expirySecs?: number };
|
|
653
|
+
|
|
654
|
+
export interface LnurlWithdrawResponse {
|
|
655
|
+
paymentRequest: string;
|
|
656
|
+
payment?: Payment;
|
|
643
657
|
}
|
|
644
658
|
|
|
645
|
-
export interface
|
|
646
|
-
|
|
647
|
-
value: string;
|
|
659
|
+
export interface GetPaymentRequest {
|
|
660
|
+
paymentId: string;
|
|
648
661
|
}
|
|
649
662
|
|
|
650
663
|
export interface Rate {
|
|
@@ -652,61 +665,57 @@ export interface Rate {
|
|
|
652
665
|
value: number;
|
|
653
666
|
}
|
|
654
667
|
|
|
655
|
-
export
|
|
668
|
+
export interface ListUnclaimedDepositsRequest {}
|
|
656
669
|
|
|
657
|
-
export interface
|
|
670
|
+
export interface SyncWalletRequest {}
|
|
658
671
|
|
|
659
|
-
export interface
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
672
|
+
export interface SetLnurlMetadataItem {
|
|
673
|
+
paymentHash: string;
|
|
674
|
+
senderComment?: string;
|
|
675
|
+
nostrZapRequest?: string;
|
|
676
|
+
nostrZapReceipt?: string;
|
|
663
677
|
}
|
|
664
678
|
|
|
665
|
-
export
|
|
666
|
-
payment: Payment;
|
|
667
|
-
}
|
|
679
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
668
680
|
|
|
669
|
-
export
|
|
670
|
-
paymentRequest: string;
|
|
671
|
-
fee: bigint;
|
|
672
|
-
}
|
|
681
|
+
export type PaymentType = "send" | "receive";
|
|
673
682
|
|
|
674
|
-
export interface
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
spacing?: number;
|
|
678
|
-
symbol?: Symbol;
|
|
679
|
-
uniqSymbol?: Symbol;
|
|
680
|
-
localizedName: LocalizedName[];
|
|
681
|
-
localeOverrides: LocaleOverrides[];
|
|
683
|
+
export interface SignMessageRequest {
|
|
684
|
+
message: string;
|
|
685
|
+
compact: boolean;
|
|
682
686
|
}
|
|
683
687
|
|
|
684
|
-
export
|
|
685
|
-
|
|
688
|
+
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
689
|
+
|
|
690
|
+
export interface SendOnchainFeeQuote {
|
|
691
|
+
id: string;
|
|
692
|
+
expiresAt: number;
|
|
693
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
694
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
695
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
686
696
|
}
|
|
687
697
|
|
|
688
|
-
export interface
|
|
689
|
-
|
|
690
|
-
|
|
698
|
+
export interface OptimizationConfig {
|
|
699
|
+
autoEnabled: boolean;
|
|
700
|
+
multiplicity: number;
|
|
691
701
|
}
|
|
692
702
|
|
|
693
|
-
export interface
|
|
694
|
-
|
|
695
|
-
seed: Seed;
|
|
696
|
-
storageDir: string;
|
|
703
|
+
export interface CheckMessageResponse {
|
|
704
|
+
isValid: boolean;
|
|
697
705
|
}
|
|
698
706
|
|
|
699
|
-
export
|
|
707
|
+
export interface GetPaymentResponse {
|
|
708
|
+
payment: Payment;
|
|
709
|
+
}
|
|
700
710
|
|
|
701
|
-
export interface
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
maxFee?: MaxFee;
|
|
711
|
+
export interface Bolt12InvoiceDetails {
|
|
712
|
+
amountMsat: number;
|
|
713
|
+
invoice: Bolt12Invoice;
|
|
705
714
|
}
|
|
706
715
|
|
|
707
|
-
export interface
|
|
708
|
-
|
|
709
|
-
|
|
716
|
+
export interface FiatCurrency {
|
|
717
|
+
id: string;
|
|
718
|
+
info: CurrencyInfo;
|
|
710
719
|
}
|
|
711
720
|
|
|
712
721
|
export interface UnfreezeIssuerTokenResponse {
|
|
@@ -718,26 +727,31 @@ export interface MintIssuerTokenRequest {
|
|
|
718
727
|
amount: bigint;
|
|
719
728
|
}
|
|
720
729
|
|
|
721
|
-
export interface CreateIssuerTokenRequest {
|
|
722
|
-
name: string;
|
|
723
|
-
ticker: string;
|
|
724
|
-
decimals: number;
|
|
725
|
-
isFreezable: boolean;
|
|
726
|
-
maxSupply: bigint;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
730
|
export interface BurnIssuerTokenRequest {
|
|
730
731
|
amount: bigint;
|
|
731
732
|
}
|
|
732
733
|
|
|
733
|
-
export interface
|
|
734
|
+
export interface UnfreezeIssuerTokenRequest {
|
|
734
735
|
address: string;
|
|
735
736
|
}
|
|
736
737
|
|
|
737
|
-
export interface
|
|
738
|
+
export interface FreezeIssuerTokenRequest {
|
|
738
739
|
address: string;
|
|
739
740
|
}
|
|
740
741
|
|
|
742
|
+
export interface FreezeIssuerTokenResponse {
|
|
743
|
+
impactedOutputIds: string[];
|
|
744
|
+
impactedTokenAmount: bigint;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export interface CreateIssuerTokenRequest {
|
|
748
|
+
name: string;
|
|
749
|
+
ticker: string;
|
|
750
|
+
decimals: number;
|
|
751
|
+
isFreezable: boolean;
|
|
752
|
+
maxSupply: bigint;
|
|
753
|
+
}
|
|
754
|
+
|
|
741
755
|
export interface Storage {
|
|
742
756
|
getCachedItem: (key: string) => Promise<string | null>;
|
|
743
757
|
setCachedItem: (key: string, value: string) => Promise<void>;
|
|
@@ -792,8 +806,11 @@ export class BreezSdk {
|
|
|
792
806
|
getLightningAddress(): Promise<LightningAddressInfo | undefined>;
|
|
793
807
|
removeEventListener(id: string): Promise<boolean>;
|
|
794
808
|
listUnclaimedDeposits(request: ListUnclaimedDepositsRequest): Promise<ListUnclaimedDepositsResponse>;
|
|
809
|
+
startLeafOptimization(): void;
|
|
810
|
+
cancelLeafOptimization(): Promise<void>;
|
|
795
811
|
deleteLightningAddress(): Promise<void>;
|
|
796
812
|
registerLightningAddress(request: RegisterLightningAddressRequest): Promise<LightningAddressInfo>;
|
|
813
|
+
getLeafOptimizationProgress(): OptimizationProgress;
|
|
797
814
|
checkLightningAddressAvailable(request: CheckLightningAddressRequest): Promise<boolean>;
|
|
798
815
|
parse(input: string): Promise<InputType>;
|
|
799
816
|
getInfo(request: GetInfoRequest): Promise<GetInfoResponse>;
|