@breeztech/breez-sdk-spark 0.8.2 → 0.9.0
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 +551 -543
- package/bundler/breez_sdk_spark_wasm_bg.js +33 -32
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/bundler/storage/index.js +81 -7
- package/deno/breez_sdk_spark_wasm.d.ts +551 -543
- package/deno/breez_sdk_spark_wasm.js +33 -32
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +551 -543
- package/nodejs/breez_sdk_spark_wasm.js +33 -32
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/nodejs/storage/index.cjs +38 -13
- package/nodejs/storage/migrations.cjs +25 -3
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +554 -546
- package/web/breez_sdk_spark_wasm.js +33 -32
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/web/storage/index.js +81 -7
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
4
|
-
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
5
3
|
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
6
4
|
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
5
|
+
export function defaultConfig(network: Network): Config;
|
|
7
6
|
/**
|
|
8
7
|
* Creates a default external signer from a mnemonic phrase.
|
|
9
8
|
*
|
|
10
9
|
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
11
10
|
*/
|
|
12
11
|
export function getSparkStatus(): Promise<SparkStatus>;
|
|
13
|
-
export function
|
|
12
|
+
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
13
|
+
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
14
14
|
/**
|
|
15
15
|
* Entry point invoked by JavaScript in a worker.
|
|
16
16
|
*/
|
|
@@ -53,6 +53,12 @@ export interface BitcoinChainService {
|
|
|
53
53
|
recommendedFees(): Promise<RecommendedFees>;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
export interface TxStatus {
|
|
57
|
+
confirmed: boolean;
|
|
58
|
+
blockHeight?: number;
|
|
59
|
+
blockTime?: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
export interface Utxo {
|
|
57
63
|
txid: string;
|
|
58
64
|
vout: number;
|
|
@@ -60,12 +66,6 @@ export interface Utxo {
|
|
|
60
66
|
status: TxStatus;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
export interface TxStatus {
|
|
64
|
-
confirmed: boolean;
|
|
65
|
-
blockHeight?: number;
|
|
66
|
-
blockTime?: number;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
69
|
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
70
70
|
|
|
71
71
|
export interface RecommendedFees {
|
|
@@ -80,126 +80,104 @@ export interface PaymentObserver {
|
|
|
80
80
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export interface
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
id: RecordId;
|
|
87
|
-
schemaVersion: string;
|
|
88
|
-
updatedFields: Map<string, string>;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface SparkHtlcOptions {
|
|
92
|
-
paymentHash: string;
|
|
93
|
-
expiryDurationSecs: number;
|
|
83
|
+
export interface ConversionDetails {
|
|
84
|
+
from: ConversionStep;
|
|
85
|
+
to: ConversionStep;
|
|
94
86
|
}
|
|
95
87
|
|
|
96
|
-
export interface
|
|
97
|
-
amountMsat
|
|
98
|
-
|
|
99
|
-
descriptionHash?: string;
|
|
100
|
-
expiry: number;
|
|
101
|
-
invoice: Bolt11Invoice;
|
|
102
|
-
minFinalCltvExpiryDelta: number;
|
|
103
|
-
network: BitcoinNetwork;
|
|
104
|
-
payeePubkey: string;
|
|
105
|
-
paymentHash: string;
|
|
106
|
-
paymentSecret: string;
|
|
107
|
-
routingHints: Bolt11RouteHint[];
|
|
108
|
-
timestamp: number;
|
|
88
|
+
export interface Bolt12InvoiceDetails {
|
|
89
|
+
amountMsat: number;
|
|
90
|
+
invoice: Bolt12Invoice;
|
|
109
91
|
}
|
|
110
92
|
|
|
111
|
-
export type
|
|
93
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
112
94
|
|
|
113
|
-
export interface
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
iv: string;
|
|
95
|
+
export interface LnurlPayResponse {
|
|
96
|
+
payment: Payment;
|
|
97
|
+
successAction?: SuccessActionProcessed;
|
|
117
98
|
}
|
|
118
99
|
|
|
100
|
+
export type OptimizationEvent = { type: "started"; totalRounds: number } | { type: "roundCompleted"; currentRound: number; totalRounds: number } | { type: "completed" } | { type: "cancelled" } | { type: "failed"; error: string } | { type: "skipped" };
|
|
101
|
+
|
|
119
102
|
export interface ReceivePaymentResponse {
|
|
120
103
|
paymentRequest: string;
|
|
121
104
|
fee: bigint;
|
|
122
105
|
}
|
|
123
106
|
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
export interface BuyBitcoinRequest {
|
|
129
|
-
lockedAmountSat?: number;
|
|
130
|
-
redirectUrl?: string;
|
|
107
|
+
export interface SignMessageRequest {
|
|
108
|
+
message: string;
|
|
109
|
+
compact: boolean;
|
|
131
110
|
}
|
|
132
111
|
|
|
133
|
-
export
|
|
134
|
-
config: Config;
|
|
135
|
-
seed: Seed;
|
|
136
|
-
storageDir: string;
|
|
137
|
-
}
|
|
112
|
+
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 };
|
|
138
113
|
|
|
139
|
-
export interface
|
|
140
|
-
|
|
141
|
-
|
|
114
|
+
export interface Config {
|
|
115
|
+
apiKey?: string;
|
|
116
|
+
network: Network;
|
|
117
|
+
syncIntervalSecs: number;
|
|
118
|
+
maxDepositClaimFee?: MaxFee;
|
|
119
|
+
lnurlDomain?: string;
|
|
120
|
+
preferSparkOverLightning: boolean;
|
|
121
|
+
externalInputParsers?: ExternalInputParser[];
|
|
122
|
+
useDefaultExternalInputParsers: boolean;
|
|
123
|
+
realTimeSyncServerUrl?: string;
|
|
124
|
+
privateEnabledDefault: boolean;
|
|
125
|
+
optimizationConfig: OptimizationConfig;
|
|
126
|
+
stableBalanceConfig?: StableBalanceConfig;
|
|
142
127
|
}
|
|
143
128
|
|
|
144
|
-
export interface
|
|
145
|
-
|
|
146
|
-
|
|
129
|
+
export interface SparkInvoicePaymentDetails {
|
|
130
|
+
description?: string;
|
|
131
|
+
invoice: string;
|
|
147
132
|
}
|
|
148
133
|
|
|
149
|
-
export interface
|
|
150
|
-
|
|
151
|
-
|
|
134
|
+
export interface SparkInvoiceDetails {
|
|
135
|
+
invoice: string;
|
|
136
|
+
identityPublicKey: string;
|
|
137
|
+
network: BitcoinNetwork;
|
|
138
|
+
amount?: string;
|
|
152
139
|
tokenIdentifier?: string;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
export interface TokenBalance {
|
|
158
|
-
balance: bigint;
|
|
159
|
-
tokenMetadata: TokenMetadata;
|
|
140
|
+
expiryTime?: number;
|
|
141
|
+
description?: string;
|
|
142
|
+
senderPublicKey?: string;
|
|
160
143
|
}
|
|
161
144
|
|
|
162
|
-
export
|
|
163
|
-
|
|
164
|
-
export interface SetLnurlMetadataItem {
|
|
165
|
-
paymentHash: string;
|
|
166
|
-
senderComment?: string;
|
|
167
|
-
nostrZapRequest?: string;
|
|
168
|
-
nostrZapReceipt?: string;
|
|
145
|
+
export interface LnurlErrorDetails {
|
|
146
|
+
reason: string;
|
|
169
147
|
}
|
|
170
148
|
|
|
171
|
-
export
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
status: ServiceStatus;
|
|
175
|
-
lastUpdated: number;
|
|
149
|
+
export interface RefundDepositResponse {
|
|
150
|
+
txId: string;
|
|
151
|
+
txHex: string;
|
|
176
152
|
}
|
|
177
153
|
|
|
178
|
-
export interface
|
|
179
|
-
description: string;
|
|
154
|
+
export interface BuyBitcoinResponse {
|
|
180
155
|
url: string;
|
|
181
|
-
matchesCallbackDomain: boolean;
|
|
182
156
|
}
|
|
183
157
|
|
|
184
|
-
export interface
|
|
185
|
-
|
|
158
|
+
export interface Payment {
|
|
159
|
+
id: string;
|
|
160
|
+
paymentType: PaymentType;
|
|
161
|
+
status: PaymentStatus;
|
|
162
|
+
amount: bigint;
|
|
163
|
+
fees: bigint;
|
|
164
|
+
timestamp: number;
|
|
165
|
+
method: PaymentMethod;
|
|
166
|
+
details?: PaymentDetails;
|
|
167
|
+
conversionDetails?: ConversionDetails;
|
|
186
168
|
}
|
|
187
169
|
|
|
188
|
-
export interface
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
tokenBalances: Map<string, TokenBalance>;
|
|
170
|
+
export interface FetchConversionLimitsResponse {
|
|
171
|
+
minFromAmount?: bigint;
|
|
172
|
+
minToAmount?: bigint;
|
|
192
173
|
}
|
|
193
174
|
|
|
194
|
-
export interface
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
199
|
-
|
|
200
|
-
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 };
|
|
175
|
+
export interface LightningAddressDetails {
|
|
176
|
+
address: string;
|
|
177
|
+
payRequest: LnurlPayRequestDetails;
|
|
178
|
+
}
|
|
201
179
|
|
|
202
|
-
export type
|
|
180
|
+
export type PaymentType = "send" | "receive";
|
|
203
181
|
|
|
204
182
|
export interface LnurlPayRequestDetails {
|
|
205
183
|
callback: string;
|
|
@@ -214,102 +192,80 @@ export interface LnurlPayRequestDetails {
|
|
|
214
192
|
nostrPubkey?: string;
|
|
215
193
|
}
|
|
216
194
|
|
|
217
|
-
export interface
|
|
195
|
+
export interface GetTokensMetadataResponse {
|
|
196
|
+
tokensMetadata: TokenMetadata[];
|
|
197
|
+
}
|
|
218
198
|
|
|
219
|
-
export type
|
|
199
|
+
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 };
|
|
220
200
|
|
|
221
|
-
export
|
|
222
|
-
paymentRequest: string;
|
|
223
|
-
payment?: Payment;
|
|
224
|
-
}
|
|
201
|
+
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
225
202
|
|
|
226
|
-
export interface
|
|
227
|
-
|
|
228
|
-
source: PaymentRequestSource;
|
|
203
|
+
export interface ListFiatCurrenciesResponse {
|
|
204
|
+
currencies: FiatCurrency[];
|
|
229
205
|
}
|
|
230
206
|
|
|
231
|
-
export interface
|
|
232
|
-
|
|
233
|
-
idempotencyKey?: string;
|
|
207
|
+
export interface UpdateUserSettingsRequest {
|
|
208
|
+
sparkPrivateModeEnabled?: boolean;
|
|
234
209
|
}
|
|
235
210
|
|
|
236
|
-
export
|
|
237
|
-
message: string;
|
|
238
|
-
}
|
|
211
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
239
212
|
|
|
240
|
-
export interface
|
|
241
|
-
|
|
242
|
-
|
|
213
|
+
export interface OptimizationConfig {
|
|
214
|
+
autoEnabled: boolean;
|
|
215
|
+
multiplicity: number;
|
|
243
216
|
}
|
|
244
217
|
|
|
245
|
-
export interface
|
|
246
|
-
|
|
247
|
-
|
|
218
|
+
export interface Record {
|
|
219
|
+
id: RecordId;
|
|
220
|
+
revision: number;
|
|
221
|
+
schemaVersion: string;
|
|
222
|
+
data: Map<string, string>;
|
|
248
223
|
}
|
|
249
224
|
|
|
250
|
-
export
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
absoluteExpiry?: number;
|
|
254
|
-
chains: string[];
|
|
255
|
-
description?: string;
|
|
256
|
-
issuer?: string;
|
|
257
|
-
minAmount?: Amount;
|
|
258
|
-
offer: Bolt12Offer;
|
|
259
|
-
paths: Bolt12OfferBlindedPath[];
|
|
260
|
-
signingPubkey?: string;
|
|
225
|
+
export interface Bolt11Invoice {
|
|
226
|
+
bolt11: string;
|
|
227
|
+
source: PaymentRequestSource;
|
|
261
228
|
}
|
|
262
229
|
|
|
263
|
-
export interface
|
|
264
|
-
|
|
265
|
-
lightningAddress: string;
|
|
266
|
-
lnurl: LnurlInfo;
|
|
267
|
-
username: string;
|
|
230
|
+
export interface ListPaymentsResponse {
|
|
231
|
+
payments: Payment[];
|
|
268
232
|
}
|
|
269
233
|
|
|
270
|
-
export
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
symbol?: Symbol;
|
|
277
|
-
uniqSymbol?: Symbol;
|
|
278
|
-
localizedName: LocalizedName[];
|
|
279
|
-
localeOverrides: LocaleOverrides[];
|
|
234
|
+
export interface LnurlWithdrawRequestDetails {
|
|
235
|
+
callback: string;
|
|
236
|
+
k1: string;
|
|
237
|
+
defaultDescription: string;
|
|
238
|
+
minWithdrawable: number;
|
|
239
|
+
maxWithdrawable: number;
|
|
280
240
|
}
|
|
281
241
|
|
|
282
|
-
export interface
|
|
283
|
-
|
|
242
|
+
export interface DepositInfo {
|
|
243
|
+
txid: string;
|
|
244
|
+
vout: number;
|
|
245
|
+
amountSats: number;
|
|
246
|
+
refundTx?: string;
|
|
247
|
+
refundTxId?: string;
|
|
248
|
+
claimError?: DepositClaimError;
|
|
284
249
|
}
|
|
285
250
|
|
|
286
|
-
export interface
|
|
287
|
-
|
|
251
|
+
export interface ConnectRequest {
|
|
252
|
+
config: Config;
|
|
253
|
+
seed: Seed;
|
|
254
|
+
storageDir: string;
|
|
288
255
|
}
|
|
289
256
|
|
|
290
|
-
export interface
|
|
291
|
-
|
|
292
|
-
l1BroadcastFeeSat: number;
|
|
257
|
+
export interface ClaimDepositResponse {
|
|
258
|
+
payment: Payment;
|
|
293
259
|
}
|
|
294
260
|
|
|
295
|
-
export interface
|
|
296
|
-
|
|
297
|
-
comment?: string;
|
|
298
|
-
domain?: string;
|
|
299
|
-
metadata?: string;
|
|
300
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
301
|
-
rawSuccessAction?: SuccessAction;
|
|
261
|
+
export interface LnurlWithdrawInfo {
|
|
262
|
+
withdrawUrl: string;
|
|
302
263
|
}
|
|
303
264
|
|
|
304
|
-
export interface
|
|
265
|
+
export interface LnurlWithdrawRequest {
|
|
305
266
|
amountSats: number;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
feeSats: number;
|
|
309
|
-
invoiceDetails: Bolt11InvoiceDetails;
|
|
310
|
-
successAction?: SuccessAction;
|
|
311
|
-
conversionEstimate?: ConversionEstimate;
|
|
312
|
-
feePolicy: FeePolicy;
|
|
267
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
268
|
+
completionTimeoutSecs?: number;
|
|
313
269
|
}
|
|
314
270
|
|
|
315
271
|
export interface LogEntry {
|
|
@@ -317,107 +273,166 @@ export interface LogEntry {
|
|
|
317
273
|
level: string;
|
|
318
274
|
}
|
|
319
275
|
|
|
320
|
-
export interface
|
|
321
|
-
|
|
276
|
+
export interface Bolt11RouteHint {
|
|
277
|
+
hops: Bolt11RouteHintHop[];
|
|
322
278
|
}
|
|
323
279
|
|
|
324
|
-
export
|
|
325
|
-
|
|
280
|
+
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
281
|
+
|
|
282
|
+
export interface BuyBitcoinRequest {
|
|
283
|
+
lockedAmountSat?: number;
|
|
284
|
+
redirectUrl?: string;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface ExternalInputParser {
|
|
288
|
+
providerId: string;
|
|
289
|
+
inputRegex: string;
|
|
290
|
+
parserUrl: string;
|
|
326
291
|
}
|
|
327
292
|
|
|
328
293
|
export interface CheckLightningAddressRequest {
|
|
329
294
|
username: string;
|
|
330
295
|
}
|
|
331
296
|
|
|
332
|
-
export interface
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
297
|
+
export interface LnurlAuthRequestDetails {
|
|
298
|
+
k1: string;
|
|
299
|
+
action?: string;
|
|
300
|
+
domain: string;
|
|
301
|
+
url: string;
|
|
337
302
|
}
|
|
338
303
|
|
|
339
|
-
export type
|
|
304
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
340
305
|
|
|
341
|
-
export
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
306
|
+
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
307
|
+
|
|
308
|
+
export interface LnurlPayInfo {
|
|
309
|
+
lnAddress?: string;
|
|
310
|
+
comment?: string;
|
|
311
|
+
domain?: string;
|
|
312
|
+
metadata?: string;
|
|
313
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
314
|
+
rawSuccessAction?: SuccessAction;
|
|
345
315
|
}
|
|
346
316
|
|
|
347
|
-
export interface
|
|
348
|
-
|
|
349
|
-
|
|
317
|
+
export interface LocalizedName {
|
|
318
|
+
locale: string;
|
|
319
|
+
name: string;
|
|
350
320
|
}
|
|
351
321
|
|
|
352
|
-
export
|
|
353
|
-
|
|
354
|
-
|
|
322
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
323
|
+
|
|
324
|
+
export interface Credentials {
|
|
325
|
+
username: string;
|
|
326
|
+
password: string;
|
|
355
327
|
}
|
|
356
328
|
|
|
357
|
-
export interface
|
|
329
|
+
export interface LnurlWithdrawResponse {
|
|
358
330
|
paymentRequest: string;
|
|
359
|
-
|
|
360
|
-
tokenIdentifier?: string;
|
|
361
|
-
conversionOptions?: ConversionOptions;
|
|
362
|
-
feePolicy?: FeePolicy;
|
|
331
|
+
payment?: Payment;
|
|
363
332
|
}
|
|
364
333
|
|
|
365
|
-
export interface
|
|
366
|
-
|
|
367
|
-
|
|
334
|
+
export interface SendOnchainFeeQuote {
|
|
335
|
+
id: string;
|
|
336
|
+
expiresAt: number;
|
|
337
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
338
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
339
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
368
340
|
}
|
|
369
341
|
|
|
370
|
-
export interface
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
342
|
+
export interface SparkAddressDetails {
|
|
343
|
+
address: string;
|
|
344
|
+
identityPublicKey: string;
|
|
345
|
+
network: BitcoinNetwork;
|
|
346
|
+
source: PaymentRequestSource;
|
|
375
347
|
}
|
|
376
348
|
|
|
377
|
-
export
|
|
349
|
+
export interface SilentPaymentAddressDetails {
|
|
350
|
+
address: string;
|
|
351
|
+
network: BitcoinNetwork;
|
|
352
|
+
source: PaymentRequestSource;
|
|
353
|
+
}
|
|
378
354
|
|
|
379
|
-
export interface
|
|
380
|
-
|
|
381
|
-
|
|
355
|
+
export interface OutgoingChange {
|
|
356
|
+
change: RecordChange;
|
|
357
|
+
parent?: Record;
|
|
382
358
|
}
|
|
383
359
|
|
|
384
|
-
export interface
|
|
385
|
-
|
|
386
|
-
|
|
360
|
+
export interface TokenBalance {
|
|
361
|
+
balance: bigint;
|
|
362
|
+
tokenMetadata: TokenMetadata;
|
|
387
363
|
}
|
|
388
364
|
|
|
389
|
-
export
|
|
365
|
+
export interface LnurlPayRequest {
|
|
366
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
367
|
+
idempotencyKey?: string;
|
|
368
|
+
}
|
|
390
369
|
|
|
391
|
-
export interface
|
|
392
|
-
|
|
370
|
+
export interface SetLnurlMetadataItem {
|
|
371
|
+
paymentHash: string;
|
|
372
|
+
senderComment?: string;
|
|
373
|
+
nostrZapRequest?: string;
|
|
374
|
+
nostrZapReceipt?: string;
|
|
393
375
|
}
|
|
394
376
|
|
|
395
|
-
export
|
|
396
|
-
|
|
377
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
378
|
+
|
|
379
|
+
export interface KeySetConfig {
|
|
380
|
+
keySetType: KeySetType;
|
|
381
|
+
useAddressIndex: boolean;
|
|
382
|
+
accountNumber?: number;
|
|
397
383
|
}
|
|
398
384
|
|
|
399
|
-
export
|
|
400
|
-
|
|
401
|
-
|
|
385
|
+
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
386
|
+
|
|
387
|
+
export interface GetPaymentResponse {
|
|
388
|
+
payment: Payment;
|
|
402
389
|
}
|
|
403
390
|
|
|
404
|
-
export
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
391
|
+
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
392
|
+
|
|
393
|
+
export interface SendPaymentRequest {
|
|
394
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
395
|
+
options?: SendPaymentOptions;
|
|
396
|
+
idempotencyKey?: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface PrepareLnurlPayResponse {
|
|
400
|
+
amountSats: number;
|
|
401
|
+
comment?: string;
|
|
402
|
+
payRequest: LnurlPayRequestDetails;
|
|
403
|
+
feeSats: number;
|
|
404
|
+
invoiceDetails: Bolt11InvoiceDetails;
|
|
405
|
+
successAction?: SuccessAction;
|
|
406
|
+
conversionEstimate?: ConversionEstimate;
|
|
407
|
+
feePolicy: FeePolicy;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface Bolt12OfferBlindedPath {
|
|
411
|
+
blindedHops: string[];
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface FetchConversionLimitsRequest {
|
|
415
|
+
conversionType: ConversionType;
|
|
409
416
|
tokenIdentifier?: string;
|
|
410
|
-
expiryTime?: number;
|
|
411
|
-
description?: string;
|
|
412
|
-
senderPublicKey?: string;
|
|
413
417
|
}
|
|
414
418
|
|
|
415
|
-
export interface
|
|
416
|
-
|
|
419
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
420
|
+
userFeeSat: number;
|
|
421
|
+
l1BroadcastFeeSat: number;
|
|
417
422
|
}
|
|
418
423
|
|
|
419
|
-
export interface
|
|
420
|
-
|
|
424
|
+
export interface Bip21Extra {
|
|
425
|
+
key: string;
|
|
426
|
+
value: string;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
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 };
|
|
430
|
+
|
|
431
|
+
export interface SparkHtlcDetails {
|
|
432
|
+
paymentHash: string;
|
|
433
|
+
preimage?: string;
|
|
434
|
+
expiryTime: number;
|
|
435
|
+
status: SparkHtlcStatus;
|
|
421
436
|
}
|
|
422
437
|
|
|
423
438
|
export interface Bip21Details {
|
|
@@ -430,75 +445,85 @@ export interface Bip21Details {
|
|
|
430
445
|
paymentMethods: InputType[];
|
|
431
446
|
}
|
|
432
447
|
|
|
433
|
-
export
|
|
434
|
-
address: string;
|
|
435
|
-
network: BitcoinNetwork;
|
|
436
|
-
source: PaymentRequestSource;
|
|
437
|
-
}
|
|
448
|
+
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
438
449
|
|
|
439
|
-
export interface
|
|
440
|
-
|
|
441
|
-
|
|
450
|
+
export interface LnurlInfo {
|
|
451
|
+
url: string;
|
|
452
|
+
bech32: string;
|
|
442
453
|
}
|
|
443
454
|
|
|
444
|
-
export interface
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
455
|
+
export interface LocaleOverrides {
|
|
456
|
+
locale: string;
|
|
457
|
+
spacing?: number;
|
|
458
|
+
symbol: Symbol;
|
|
448
459
|
}
|
|
449
460
|
|
|
450
|
-
export interface
|
|
451
|
-
|
|
452
|
-
|
|
461
|
+
export interface AesSuccessActionDataDecrypted {
|
|
462
|
+
description: string;
|
|
463
|
+
plaintext: string;
|
|
453
464
|
}
|
|
454
465
|
|
|
455
|
-
export interface
|
|
466
|
+
export interface SendPaymentResponse {
|
|
467
|
+
payment: Payment;
|
|
468
|
+
}
|
|
456
469
|
|
|
457
|
-
export
|
|
470
|
+
export interface Rate {
|
|
471
|
+
coin: string;
|
|
472
|
+
value: number;
|
|
473
|
+
}
|
|
458
474
|
|
|
459
|
-
export interface
|
|
460
|
-
|
|
461
|
-
vout: number;
|
|
462
|
-
amountSats: number;
|
|
463
|
-
refundTx?: string;
|
|
464
|
-
refundTxId?: string;
|
|
465
|
-
claimError?: DepositClaimError;
|
|
475
|
+
export interface ClaimHtlcPaymentRequest {
|
|
476
|
+
preimage: string;
|
|
466
477
|
}
|
|
467
478
|
|
|
468
|
-
export interface
|
|
469
|
-
|
|
479
|
+
export interface ListFiatRatesResponse {
|
|
480
|
+
rates: Rate[];
|
|
470
481
|
}
|
|
471
482
|
|
|
472
|
-
export interface
|
|
483
|
+
export interface ProvisionalPayment {
|
|
473
484
|
paymentId: string;
|
|
485
|
+
amount: bigint;
|
|
486
|
+
details: ProvisionalPaymentDetails;
|
|
474
487
|
}
|
|
475
488
|
|
|
476
|
-
export
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
key: string;
|
|
480
|
-
value: string;
|
|
489
|
+
export interface PaymentRequestSource {
|
|
490
|
+
bip21Uri?: string;
|
|
491
|
+
bip353Address?: string;
|
|
481
492
|
}
|
|
482
493
|
|
|
483
|
-
export
|
|
484
|
-
|
|
485
|
-
|
|
494
|
+
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
495
|
+
|
|
496
|
+
export interface SparkHtlcOptions {
|
|
497
|
+
paymentHash: string;
|
|
498
|
+
expiryDurationSecs: number;
|
|
486
499
|
}
|
|
487
500
|
|
|
488
|
-
export interface
|
|
489
|
-
|
|
490
|
-
spacing?: number;
|
|
491
|
-
symbol: Symbol;
|
|
501
|
+
export interface ReceivePaymentRequest {
|
|
502
|
+
paymentMethod: ReceivePaymentMethod;
|
|
492
503
|
}
|
|
493
504
|
|
|
494
|
-
export
|
|
505
|
+
export interface ConversionOptions {
|
|
506
|
+
conversionType: ConversionType;
|
|
507
|
+
maxSlippageBps?: number;
|
|
508
|
+
completionTimeoutSecs?: number;
|
|
509
|
+
}
|
|
495
510
|
|
|
496
|
-
export interface
|
|
497
|
-
|
|
511
|
+
export interface OptimizationProgress {
|
|
512
|
+
isRunning: boolean;
|
|
513
|
+
currentRound: number;
|
|
514
|
+
totalRounds: number;
|
|
498
515
|
}
|
|
499
516
|
|
|
500
|
-
export interface
|
|
501
|
-
|
|
517
|
+
export interface SignMessageResponse {
|
|
518
|
+
pubkey: string;
|
|
519
|
+
signature: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface Symbol {
|
|
523
|
+
grapheme?: string;
|
|
524
|
+
template?: string;
|
|
525
|
+
rtl?: boolean;
|
|
526
|
+
position?: number;
|
|
502
527
|
}
|
|
503
528
|
|
|
504
529
|
export interface RefundDepositRequest {
|
|
@@ -508,149 +533,153 @@ export interface RefundDepositRequest {
|
|
|
508
533
|
fee: Fee;
|
|
509
534
|
}
|
|
510
535
|
|
|
511
|
-
export interface
|
|
512
|
-
|
|
513
|
-
compact: boolean;
|
|
536
|
+
export interface ListUnclaimedDepositsResponse {
|
|
537
|
+
deposits: DepositInfo[];
|
|
514
538
|
}
|
|
515
539
|
|
|
516
|
-
export
|
|
517
|
-
|
|
518
|
-
|
|
540
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
541
|
+
|
|
542
|
+
export type ConversionPurpose = { type: "ongoingPayment"; paymentRequest: string } | { type: "selfTransfer" } | { type: "autoConversion" };
|
|
543
|
+
|
|
544
|
+
export type Network = "mainnet" | "regtest";
|
|
545
|
+
|
|
546
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
547
|
+
|
|
548
|
+
export interface PrepareLnurlPayRequest {
|
|
549
|
+
amountSats: number;
|
|
550
|
+
comment?: string;
|
|
551
|
+
payRequest: LnurlPayRequestDetails;
|
|
552
|
+
validateSuccessActionUrl?: boolean;
|
|
553
|
+
conversionOptions?: ConversionOptions;
|
|
554
|
+
feePolicy?: FeePolicy;
|
|
519
555
|
}
|
|
520
556
|
|
|
521
|
-
export
|
|
522
|
-
|
|
523
|
-
|
|
557
|
+
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);
|
|
558
|
+
|
|
559
|
+
export interface RecordChange {
|
|
560
|
+
id: RecordId;
|
|
561
|
+
schemaVersion: string;
|
|
562
|
+
updatedFields: Map<string, string>;
|
|
563
|
+
localRevision: number;
|
|
524
564
|
}
|
|
525
565
|
|
|
526
|
-
export interface
|
|
527
|
-
id:
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
amount: bigint;
|
|
531
|
-
fees: bigint;
|
|
532
|
-
timestamp: number;
|
|
533
|
-
method: PaymentMethod;
|
|
534
|
-
details?: PaymentDetails;
|
|
535
|
-
conversionDetails?: ConversionDetails;
|
|
566
|
+
export interface UnversionedRecordChange {
|
|
567
|
+
id: RecordId;
|
|
568
|
+
schemaVersion: string;
|
|
569
|
+
updatedFields: Map<string, string>;
|
|
536
570
|
}
|
|
537
571
|
|
|
538
|
-
export type
|
|
572
|
+
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 };
|
|
539
573
|
|
|
540
|
-
export
|
|
574
|
+
export interface FiatCurrency {
|
|
575
|
+
id: string;
|
|
576
|
+
info: CurrencyInfo;
|
|
577
|
+
}
|
|
541
578
|
|
|
542
|
-
export interface
|
|
543
|
-
|
|
544
|
-
|
|
579
|
+
export interface LnurlReceiveMetadata {
|
|
580
|
+
nostrZapRequest?: string;
|
|
581
|
+
nostrZapReceipt?: string;
|
|
582
|
+
senderComment?: string;
|
|
545
583
|
}
|
|
546
584
|
|
|
547
|
-
export type
|
|
585
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
548
586
|
|
|
549
|
-
export interface
|
|
550
|
-
|
|
551
|
-
|
|
587
|
+
export interface StableBalanceConfig {
|
|
588
|
+
tokenIdentifier: string;
|
|
589
|
+
thresholdSats?: number;
|
|
590
|
+
maxSlippageBps?: number;
|
|
591
|
+
reservedSats?: number;
|
|
552
592
|
}
|
|
553
593
|
|
|
554
|
-
export interface
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
594
|
+
export interface GetInfoResponse {
|
|
595
|
+
identityPubkey: string;
|
|
596
|
+
balanceSats: number;
|
|
597
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
558
598
|
}
|
|
559
599
|
|
|
560
|
-
export interface
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
600
|
+
export interface ConversionInfo {
|
|
601
|
+
poolId: string;
|
|
602
|
+
conversionId: string;
|
|
603
|
+
status: ConversionStatus;
|
|
604
|
+
fee?: string;
|
|
605
|
+
purpose?: ConversionPurpose;
|
|
565
606
|
}
|
|
566
607
|
|
|
567
|
-
export interface
|
|
568
|
-
|
|
608
|
+
export interface IncomingChange {
|
|
609
|
+
newState: Record;
|
|
610
|
+
oldState?: Record;
|
|
569
611
|
}
|
|
570
612
|
|
|
571
|
-
export
|
|
613
|
+
export interface TokenMetadata {
|
|
614
|
+
identifier: string;
|
|
615
|
+
issuerPublicKey: string;
|
|
616
|
+
name: string;
|
|
617
|
+
ticker: string;
|
|
618
|
+
decimals: number;
|
|
619
|
+
maxSupply: string;
|
|
620
|
+
isFreezable: boolean;
|
|
621
|
+
}
|
|
572
622
|
|
|
573
623
|
export interface UserSettings {
|
|
574
624
|
sparkPrivateModeEnabled: boolean;
|
|
575
625
|
}
|
|
576
626
|
|
|
577
|
-
export type
|
|
578
|
-
|
|
579
|
-
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
580
|
-
|
|
581
|
-
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
627
|
+
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 };
|
|
582
628
|
|
|
583
|
-
export interface
|
|
584
|
-
|
|
629
|
+
export interface Bolt12Invoice {
|
|
630
|
+
invoice: string;
|
|
585
631
|
source: PaymentRequestSource;
|
|
586
632
|
}
|
|
587
633
|
|
|
588
|
-
export interface
|
|
589
|
-
|
|
634
|
+
export interface RegisterLightningAddressRequest {
|
|
635
|
+
username: string;
|
|
636
|
+
description?: string;
|
|
590
637
|
}
|
|
591
638
|
|
|
592
|
-
export
|
|
593
|
-
tokenIdentifiers: string[];
|
|
594
|
-
}
|
|
639
|
+
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
595
640
|
|
|
596
|
-
export interface
|
|
597
|
-
|
|
598
|
-
|
|
641
|
+
export interface ListPaymentsRequest {
|
|
642
|
+
typeFilter?: PaymentType[];
|
|
643
|
+
statusFilter?: PaymentStatus[];
|
|
644
|
+
assetFilter?: AssetFilter;
|
|
645
|
+
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
646
|
+
fromTimestamp?: number;
|
|
647
|
+
toTimestamp?: number;
|
|
648
|
+
offset?: number;
|
|
649
|
+
limit?: number;
|
|
650
|
+
sortAscending?: boolean;
|
|
599
651
|
}
|
|
600
652
|
|
|
601
|
-
export
|
|
602
|
-
|
|
603
|
-
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
604
|
-
|
|
605
|
-
export interface KeySetConfig {
|
|
606
|
-
keySetType: KeySetType;
|
|
607
|
-
useAddressIndex: boolean;
|
|
608
|
-
accountNumber?: number;
|
|
653
|
+
export interface GetTokensMetadataRequest {
|
|
654
|
+
tokenIdentifiers: string[];
|
|
609
655
|
}
|
|
610
656
|
|
|
611
|
-
export interface
|
|
612
|
-
|
|
657
|
+
export interface GetInfoRequest {
|
|
658
|
+
ensureSynced?: boolean;
|
|
613
659
|
}
|
|
614
660
|
|
|
615
|
-
export interface
|
|
616
|
-
|
|
617
|
-
network: BitcoinNetwork;
|
|
618
|
-
source: PaymentRequestSource;
|
|
661
|
+
export interface MessageSuccessActionData {
|
|
662
|
+
message: string;
|
|
619
663
|
}
|
|
620
664
|
|
|
621
|
-
export interface
|
|
622
|
-
parentPaymentId?: string;
|
|
623
|
-
lnurlPayInfo?: LnurlPayInfo;
|
|
624
|
-
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
625
|
-
lnurlDescription?: string;
|
|
626
|
-
conversionInfo?: ConversionInfo;
|
|
627
|
-
}
|
|
665
|
+
export interface SyncWalletRequest {}
|
|
628
666
|
|
|
629
|
-
export interface
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
preferSparkOverLightning: boolean;
|
|
636
|
-
externalInputParsers?: ExternalInputParser[];
|
|
637
|
-
useDefaultExternalInputParsers: boolean;
|
|
638
|
-
realTimeSyncServerUrl?: string;
|
|
639
|
-
privateEnabledDefault: boolean;
|
|
640
|
-
optimizationConfig: OptimizationConfig;
|
|
667
|
+
export interface ConversionStep {
|
|
668
|
+
paymentId: string;
|
|
669
|
+
amount: bigint;
|
|
670
|
+
fee: bigint;
|
|
671
|
+
method: PaymentMethod;
|
|
672
|
+
tokenMetadata?: TokenMetadata;
|
|
641
673
|
}
|
|
642
674
|
|
|
643
|
-
export
|
|
644
|
-
callback: string;
|
|
645
|
-
k1: string;
|
|
646
|
-
defaultDescription: string;
|
|
647
|
-
minWithdrawable: number;
|
|
648
|
-
maxWithdrawable: number;
|
|
649
|
-
}
|
|
675
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
650
676
|
|
|
651
|
-
export interface
|
|
652
|
-
|
|
653
|
-
|
|
677
|
+
export interface PrepareSendPaymentResponse {
|
|
678
|
+
paymentMethod: SendPaymentMethod;
|
|
679
|
+
amount: bigint;
|
|
680
|
+
tokenIdentifier?: string;
|
|
681
|
+
conversionEstimate?: ConversionEstimate;
|
|
682
|
+
feePolicy: FeePolicy;
|
|
654
683
|
}
|
|
655
684
|
|
|
656
685
|
export interface Bolt11RouteHintHop {
|
|
@@ -663,188 +692,167 @@ export interface Bolt11RouteHintHop {
|
|
|
663
692
|
htlcMaximumMsat?: number;
|
|
664
693
|
}
|
|
665
694
|
|
|
666
|
-
export interface
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
signature: string;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
export interface FiatCurrency {
|
|
673
|
-
id: string;
|
|
674
|
-
info: CurrencyInfo;
|
|
695
|
+
export interface Bolt12Offer {
|
|
696
|
+
offer: string;
|
|
697
|
+
source: PaymentRequestSource;
|
|
675
698
|
}
|
|
676
699
|
|
|
677
|
-
export interface
|
|
678
|
-
|
|
700
|
+
export interface PrepareSendPaymentRequest {
|
|
701
|
+
paymentRequest: string;
|
|
702
|
+
amount?: bigint;
|
|
703
|
+
tokenIdentifier?: string;
|
|
704
|
+
conversionOptions?: ConversionOptions;
|
|
705
|
+
feePolicy?: FeePolicy;
|
|
679
706
|
}
|
|
680
707
|
|
|
681
|
-
export interface
|
|
682
|
-
description?: string;
|
|
683
|
-
invoice: string;
|
|
684
|
-
}
|
|
708
|
+
export interface SyncWalletResponse {}
|
|
685
709
|
|
|
686
|
-
export type
|
|
710
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
687
711
|
|
|
688
|
-
export
|
|
689
|
-
prepareResponse: PrepareSendPaymentResponse;
|
|
690
|
-
options?: SendPaymentOptions;
|
|
691
|
-
idempotencyKey?: string;
|
|
692
|
-
}
|
|
712
|
+
export type TokenTransactionType = "transfer" | "mint" | "burn";
|
|
693
713
|
|
|
694
|
-
export type
|
|
714
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
695
715
|
|
|
696
|
-
export interface
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
source: PaymentRequestSource;
|
|
716
|
+
export interface ConversionEstimate {
|
|
717
|
+
options: ConversionOptions;
|
|
718
|
+
amount: bigint;
|
|
719
|
+
fee: bigint;
|
|
701
720
|
}
|
|
702
721
|
|
|
703
|
-
export interface
|
|
704
|
-
|
|
722
|
+
export interface GetPaymentRequest {
|
|
723
|
+
paymentId: string;
|
|
705
724
|
}
|
|
706
725
|
|
|
707
|
-
export
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
amount: bigint;
|
|
712
|
-
fee: bigint;
|
|
713
|
-
method: PaymentMethod;
|
|
714
|
-
tokenMetadata?: TokenMetadata;
|
|
726
|
+
export interface ClaimDepositRequest {
|
|
727
|
+
txid: string;
|
|
728
|
+
vout: number;
|
|
729
|
+
maxFee?: MaxFee;
|
|
715
730
|
}
|
|
716
731
|
|
|
717
|
-
export interface
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
732
|
+
export interface ListUnclaimedDepositsRequest {}
|
|
733
|
+
|
|
734
|
+
export interface SparkStatus {
|
|
735
|
+
status: ServiceStatus;
|
|
736
|
+
lastUpdated: number;
|
|
723
737
|
}
|
|
724
738
|
|
|
725
|
-
export interface
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
completionTimeoutSecs?: number;
|
|
739
|
+
export interface RecordId {
|
|
740
|
+
type: string;
|
|
741
|
+
dataId: string;
|
|
729
742
|
}
|
|
730
743
|
|
|
731
|
-
export interface
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
744
|
+
export interface AesSuccessActionData {
|
|
745
|
+
description: string;
|
|
746
|
+
ciphertext: string;
|
|
747
|
+
iv: string;
|
|
735
748
|
}
|
|
736
749
|
|
|
737
|
-
export interface
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
750
|
+
export interface BitcoinAddressDetails {
|
|
751
|
+
address: string;
|
|
752
|
+
network: BitcoinNetwork;
|
|
753
|
+
source: PaymentRequestSource;
|
|
741
754
|
}
|
|
742
755
|
|
|
743
|
-
export type
|
|
756
|
+
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
744
757
|
|
|
745
|
-
export interface
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
position?: number;
|
|
758
|
+
export interface UrlSuccessActionData {
|
|
759
|
+
description: string;
|
|
760
|
+
url: string;
|
|
761
|
+
matchesCallbackDomain: boolean;
|
|
750
762
|
}
|
|
751
763
|
|
|
752
|
-
export interface
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
decimals: number;
|
|
758
|
-
maxSupply: string;
|
|
759
|
-
isFreezable: boolean;
|
|
764
|
+
export interface LightningAddressInfo {
|
|
765
|
+
description: string;
|
|
766
|
+
lightningAddress: string;
|
|
767
|
+
lnurl: LnurlInfo;
|
|
768
|
+
username: string;
|
|
760
769
|
}
|
|
761
770
|
|
|
762
|
-
export interface
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
771
|
+
export interface PaymentMetadata {
|
|
772
|
+
parentPaymentId?: string;
|
|
773
|
+
lnurlPayInfo?: LnurlPayInfo;
|
|
774
|
+
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
775
|
+
lnurlDescription?: string;
|
|
776
|
+
conversionInfo?: ConversionInfo;
|
|
768
777
|
}
|
|
769
778
|
|
|
770
|
-
export interface
|
|
771
|
-
currencies: FiatCurrency[];
|
|
772
|
-
}
|
|
779
|
+
export interface Bolt12InvoiceRequestDetails {}
|
|
773
780
|
|
|
774
|
-
export interface
|
|
775
|
-
|
|
776
|
-
comment?: string;
|
|
777
|
-
payRequest: LnurlPayRequestDetails;
|
|
778
|
-
validateSuccessActionUrl?: boolean;
|
|
779
|
-
conversionOptions?: ConversionOptions;
|
|
780
|
-
feePolicy?: FeePolicy;
|
|
781
|
+
export interface CheckMessageResponse {
|
|
782
|
+
isValid: boolean;
|
|
781
783
|
}
|
|
782
784
|
|
|
783
|
-
export interface
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
785
|
+
export interface Bolt11InvoiceDetails {
|
|
786
|
+
amountMsat?: number;
|
|
787
|
+
description?: string;
|
|
788
|
+
descriptionHash?: string;
|
|
789
|
+
expiry: number;
|
|
790
|
+
invoice: Bolt11Invoice;
|
|
791
|
+
minFinalCltvExpiryDelta: number;
|
|
792
|
+
network: BitcoinNetwork;
|
|
793
|
+
payeePubkey: string;
|
|
794
|
+
paymentHash: string;
|
|
795
|
+
paymentSecret: string;
|
|
796
|
+
routingHints: Bolt11RouteHint[];
|
|
797
|
+
timestamp: number;
|
|
788
798
|
}
|
|
789
799
|
|
|
790
|
-
export type
|
|
800
|
+
export type ConversionStatus = "completed" | "refundNeeded" | "refunded";
|
|
791
801
|
|
|
792
|
-
export type
|
|
802
|
+
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
793
803
|
|
|
794
|
-
export interface
|
|
795
|
-
|
|
804
|
+
export interface ClaimHtlcPaymentResponse {
|
|
805
|
+
payment: Payment;
|
|
796
806
|
}
|
|
797
807
|
|
|
798
|
-
export interface
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
808
|
+
export interface Bolt12OfferDetails {
|
|
809
|
+
absoluteExpiry?: number;
|
|
810
|
+
chains: string[];
|
|
811
|
+
description?: string;
|
|
812
|
+
issuer?: string;
|
|
813
|
+
minAmount?: Amount;
|
|
814
|
+
offer: Bolt12Offer;
|
|
815
|
+
paths: Bolt12OfferBlindedPath[];
|
|
816
|
+
signingPubkey?: string;
|
|
802
817
|
}
|
|
803
818
|
|
|
804
|
-
export interface
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
809
|
-
fromTimestamp?: number;
|
|
810
|
-
toTimestamp?: number;
|
|
811
|
-
offset?: number;
|
|
812
|
-
limit?: number;
|
|
813
|
-
sortAscending?: boolean;
|
|
819
|
+
export interface CheckMessageRequest {
|
|
820
|
+
message: string;
|
|
821
|
+
pubkey: string;
|
|
822
|
+
signature: string;
|
|
814
823
|
}
|
|
815
824
|
|
|
816
|
-
export interface
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
825
|
+
export interface CurrencyInfo {
|
|
826
|
+
name: string;
|
|
827
|
+
fractionSize: number;
|
|
828
|
+
spacing?: number;
|
|
829
|
+
symbol?: Symbol;
|
|
830
|
+
uniqSymbol?: Symbol;
|
|
831
|
+
localizedName: LocalizedName[];
|
|
832
|
+
localeOverrides: LocaleOverrides[];
|
|
820
833
|
}
|
|
821
834
|
|
|
822
|
-
export type
|
|
835
|
+
export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
823
836
|
|
|
824
|
-
export interface
|
|
825
|
-
|
|
826
|
-
oldState?: Record;
|
|
837
|
+
export interface MintIssuerTokenRequest {
|
|
838
|
+
amount: bigint;
|
|
827
839
|
}
|
|
828
840
|
|
|
829
|
-
export interface
|
|
841
|
+
export interface UnfreezeIssuerTokenRequest {
|
|
830
842
|
address: string;
|
|
831
843
|
}
|
|
832
844
|
|
|
833
|
-
export interface
|
|
834
|
-
|
|
835
|
-
impactedTokenAmount: bigint;
|
|
845
|
+
export interface FreezeIssuerTokenRequest {
|
|
846
|
+
address: string;
|
|
836
847
|
}
|
|
837
848
|
|
|
838
849
|
export interface BurnIssuerTokenRequest {
|
|
839
850
|
amount: bigint;
|
|
840
851
|
}
|
|
841
852
|
|
|
842
|
-
export interface
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
export interface UnfreezeIssuerTokenRequest {
|
|
847
|
-
address: string;
|
|
853
|
+
export interface FreezeIssuerTokenResponse {
|
|
854
|
+
impactedOutputIds: string[];
|
|
855
|
+
impactedTokenAmount: bigint;
|
|
848
856
|
}
|
|
849
857
|
|
|
850
858
|
export interface CreateIssuerTokenRequest {
|
|
@@ -883,18 +891,21 @@ export interface ExternalSigner {
|
|
|
883
891
|
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
884
892
|
}
|
|
885
893
|
|
|
886
|
-
export interface
|
|
887
|
-
|
|
888
|
-
proofs: number[][];
|
|
894
|
+
export interface PublicKeyBytes {
|
|
895
|
+
bytes: number[];
|
|
889
896
|
}
|
|
890
897
|
|
|
891
|
-
export interface
|
|
892
|
-
|
|
898
|
+
export interface ExternalFrostCommitments {
|
|
899
|
+
hidingCommitment: number[];
|
|
900
|
+
bindingCommitment: number[];
|
|
901
|
+
noncesCiphertext: number[];
|
|
893
902
|
}
|
|
894
903
|
|
|
895
|
-
export
|
|
904
|
+
export interface ExternalTreeNodeId {
|
|
905
|
+
id: string;
|
|
906
|
+
}
|
|
896
907
|
|
|
897
|
-
export interface
|
|
908
|
+
export interface SecretBytes {
|
|
898
909
|
bytes: number[];
|
|
899
910
|
}
|
|
900
911
|
|
|
@@ -903,10 +914,38 @@ export interface IdentifierCommitmentPair {
|
|
|
903
914
|
commitment: ExternalSigningCommitments;
|
|
904
915
|
}
|
|
905
916
|
|
|
917
|
+
export interface ExternalFrostSignatureShare {
|
|
918
|
+
bytes: number[];
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export interface SchnorrSignatureBytes {
|
|
922
|
+
bytes: number[];
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
export type ExternalSecretToSplit = { type: "secretSource"; source: ExternalSecretSource } | { type: "preimage"; data: number[] };
|
|
926
|
+
|
|
927
|
+
export interface ExternalFrostSignature {
|
|
928
|
+
bytes: number[];
|
|
929
|
+
}
|
|
930
|
+
|
|
906
931
|
export interface ExternalScalar {
|
|
907
932
|
bytes: number[];
|
|
908
933
|
}
|
|
909
934
|
|
|
935
|
+
export interface MessageBytes {
|
|
936
|
+
bytes: number[];
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export interface ExternalIdentifier {
|
|
940
|
+
bytes: number[];
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
export interface HashedMessageBytes {
|
|
944
|
+
bytes: number[];
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export type ExternalSecretSource = { type: "derived"; nodeId: ExternalTreeNodeId } | { type: "encrypted"; key: ExternalEncryptedSecret };
|
|
948
|
+
|
|
910
949
|
export interface ExternalAggregateFrostRequest {
|
|
911
950
|
message: number[];
|
|
912
951
|
statechainSignatures: IdentifierSignaturePair[];
|
|
@@ -919,27 +958,29 @@ export interface ExternalAggregateFrostRequest {
|
|
|
919
958
|
adaptorPublicKey?: number[];
|
|
920
959
|
}
|
|
921
960
|
|
|
922
|
-
export interface
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
export interface MessageBytes {
|
|
927
|
-
bytes: number[];
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
export interface EcdsaSignatureBytes {
|
|
931
|
-
bytes: number[];
|
|
961
|
+
export interface ExternalVerifiableSecretShare {
|
|
962
|
+
secretShare: ExternalSecretShare;
|
|
963
|
+
proofs: number[][];
|
|
932
964
|
}
|
|
933
965
|
|
|
934
966
|
export interface ExternalEncryptedSecret {
|
|
935
967
|
ciphertext: number[];
|
|
936
968
|
}
|
|
937
969
|
|
|
970
|
+
export interface IdentifierSignaturePair {
|
|
971
|
+
identifier: ExternalIdentifier;
|
|
972
|
+
signature: ExternalFrostSignatureShare;
|
|
973
|
+
}
|
|
974
|
+
|
|
938
975
|
export interface IdentifierPublicKeyPair {
|
|
939
976
|
identifier: ExternalIdentifier;
|
|
940
977
|
publicKey: number[];
|
|
941
978
|
}
|
|
942
979
|
|
|
980
|
+
export interface EcdsaSignatureBytes {
|
|
981
|
+
bytes: number[];
|
|
982
|
+
}
|
|
983
|
+
|
|
943
984
|
export interface ExternalSignFrostRequest {
|
|
944
985
|
message: number[];
|
|
945
986
|
publicKey: number[];
|
|
@@ -956,45 +997,12 @@ export interface ExternalSecretShare {
|
|
|
956
997
|
share: ExternalScalar;
|
|
957
998
|
}
|
|
958
999
|
|
|
959
|
-
export interface PublicKeyBytes {
|
|
960
|
-
bytes: number[];
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
export interface ExternalTreeNodeId {
|
|
964
|
-
id: string;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
export interface SecretBytes {
|
|
968
|
-
bytes: number[];
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
export type ExternalSecretToSplit = { type: "secretSource"; source: ExternalSecretSource } | { type: "preimage"; data: number[] };
|
|
972
|
-
|
|
973
|
-
export interface ExternalFrostCommitments {
|
|
974
|
-
hidingCommitment: number[];
|
|
975
|
-
bindingCommitment: number[];
|
|
976
|
-
noncesCiphertext: number[];
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
export interface IdentifierSignaturePair {
|
|
980
|
-
identifier: ExternalIdentifier;
|
|
981
|
-
signature: ExternalFrostSignatureShare;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
export interface SchnorrSignatureBytes {
|
|
985
|
-
bytes: number[];
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
export interface ExternalFrostSignature {
|
|
989
|
-
bytes: number[];
|
|
990
|
-
}
|
|
991
|
-
|
|
992
1000
|
export interface ExternalSigningCommitments {
|
|
993
1001
|
hiding: number[];
|
|
994
1002
|
binding: number[];
|
|
995
1003
|
}
|
|
996
1004
|
|
|
997
|
-
export interface
|
|
1005
|
+
export interface RecoverableEcdsaSignatureBytes {
|
|
998
1006
|
bytes: number[];
|
|
999
1007
|
}
|
|
1000
1008
|
|