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