@breeztech/breez-sdk-spark 0.13.9-debug → 0.13.10-dev
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 +1075 -1045
- package/bundler/breez_sdk_spark_wasm.js +5 -1
- package/bundler/breez_sdk_spark_wasm_bg.js +1455 -1632
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +11 -5
- package/deno/breez_sdk_spark_wasm.d.ts +1075 -1045
- package/deno/breez_sdk_spark_wasm.js +1351 -1283
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +11 -5
- package/nodejs/breez_sdk_spark_wasm.d.ts +1075 -1045
- package/nodejs/breez_sdk_spark_wasm.js +2492 -2662
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +11 -5
- package/nodejs/index.mjs +4 -4
- package/nodejs/postgres-token-store/index.cjs +10 -12
- package/nodejs/postgres-tree-store/index.cjs +9 -10
- package/package.json +1 -1
- package/ssr/index.js +14 -14
- package/web/breez_sdk_spark_wasm.d.ts +1234 -1197
- package/web/breez_sdk_spark_wasm.js +2257 -2173
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +11 -5
|
@@ -1,34 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Creates a default PostgreSQL storage configuration with sensible defaults.
|
|
5
|
-
*
|
|
6
|
-
* Default values (from pg.Pool):
|
|
7
|
-
* - `maxPoolSize`: 10
|
|
8
|
-
* - `createTimeoutSecs`: 0 (no timeout)
|
|
9
|
-
* - `recycleTimeoutSecs`: 10 (10 seconds idle before disconnect)
|
|
10
|
-
*/
|
|
11
|
-
export function defaultPostgresStorageConfig(connection_string: string): PostgresStorageConfig;
|
|
12
|
-
export function defaultConfig(network: Network): Config;
|
|
13
|
-
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
14
|
-
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
15
|
-
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a default external signer from a mnemonic phrase.
|
|
18
|
-
*
|
|
19
|
-
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
20
|
-
*/
|
|
21
|
-
export function getSparkStatus(): Promise<SparkStatus>;
|
|
22
|
-
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
23
|
-
/**
|
|
24
|
-
* Entry point invoked by JavaScript in a worker.
|
|
25
|
-
*/
|
|
26
|
-
export function task_worker_entry_point(ptr: number): void;
|
|
27
3
|
/**
|
|
28
4
|
* The `ReadableStreamType` enum.
|
|
29
5
|
*
|
|
30
6
|
* *This API requires the following crate features to be activated: `ReadableStreamType`*
|
|
31
7
|
*/
|
|
8
|
+
|
|
32
9
|
type ReadableStreamType = "bytes";
|
|
33
10
|
|
|
34
11
|
/** Serialized tree node. Key fields used by store implementations: id, status, value. */
|
|
@@ -54,18 +31,18 @@ interface LeavesReservation {
|
|
|
54
31
|
}
|
|
55
32
|
|
|
56
33
|
type TargetAmounts =
|
|
57
|
-
|
|
58
|
-
|
|
34
|
+
| { type: 'amountAndFee'; amountSats: number; feeSats: number | null }
|
|
35
|
+
| { type: 'exactDenominations'; denominations: number[] };
|
|
59
36
|
|
|
60
37
|
type ReserveResult =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
38
|
+
| { type: 'success'; reservation: LeavesReservation }
|
|
39
|
+
| { type: 'insufficientFunds' }
|
|
40
|
+
| { type: 'waitForPending'; needed: number; available: number; pending: number };
|
|
64
41
|
|
|
65
42
|
export interface TreeStore {
|
|
66
43
|
addLeaves: (leaves: TreeNode[]) => Promise<void>;
|
|
67
44
|
getLeaves: () => Promise<Leaves>;
|
|
68
|
-
getAvailableBalance: () => Promise<bigint
|
|
45
|
+
getAvailableBalance: () => Promise<bigint>;
|
|
69
46
|
setLeaves: (leaves: TreeNode[], missingLeaves: TreeNode[], refreshStartedAtMs: number) => Promise<void>;
|
|
70
47
|
cancelReservation: (id: string, leavesToKeep: TreeNode[]) => Promise<void>;
|
|
71
48
|
finalizeReservation: (id: string, newLeaves: TreeNode[] | null) => Promise<void>;
|
|
@@ -74,28 +51,6 @@ export interface TreeStore {
|
|
|
74
51
|
updateReservation: (reservationId: string, reservedLeaves: TreeNode[], changeLeaves: TreeNode[]) => Promise<LeavesReservation>;
|
|
75
52
|
}
|
|
76
53
|
|
|
77
|
-
/**
|
|
78
|
-
* Configuration for PostgreSQL storage connection pool.
|
|
79
|
-
*/
|
|
80
|
-
export interface PostgresStorageConfig {
|
|
81
|
-
/**
|
|
82
|
-
* PostgreSQL connection string (URI format).
|
|
83
|
-
*/
|
|
84
|
-
connectionString: string;
|
|
85
|
-
/**
|
|
86
|
-
* Maximum number of connections in the pool.
|
|
87
|
-
*/
|
|
88
|
-
maxPoolSize: number;
|
|
89
|
-
/**
|
|
90
|
-
* Timeout in seconds for establishing a new connection (0 = no timeout).
|
|
91
|
-
*/
|
|
92
|
-
createTimeoutSecs: number;
|
|
93
|
-
/**
|
|
94
|
-
* Timeout in seconds before recycling an idle connection.
|
|
95
|
-
*/
|
|
96
|
-
recycleTimeoutSecs: number;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
54
|
|
|
100
55
|
interface WasmTokenMetadata {
|
|
101
56
|
identifier: string;
|
|
@@ -142,13 +97,18 @@ interface WasmTokenOutputsReservation {
|
|
|
142
97
|
tokenOutputs: WasmTokenOutputs;
|
|
143
98
|
}
|
|
144
99
|
|
|
100
|
+
interface WasmTokenBalance {
|
|
101
|
+
metadata: WasmTokenMetadata;
|
|
102
|
+
balance: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
145
105
|
type WasmGetTokenOutputsFilter =
|
|
146
|
-
|
|
147
|
-
|
|
106
|
+
| { type: 'identifier'; identifier: string }
|
|
107
|
+
| { type: 'issuerPublicKey'; issuerPublicKey: string };
|
|
148
108
|
|
|
149
109
|
type WasmReservationTarget =
|
|
150
|
-
|
|
151
|
-
|
|
110
|
+
| { type: 'minTotalValue'; value: string }
|
|
111
|
+
| { type: 'maxOutputCount'; value: number };
|
|
152
112
|
|
|
153
113
|
export interface TokenStore {
|
|
154
114
|
setTokensOutputs: (tokenOutputs: WasmTokenOutputs[], refreshStartedAtMs: number) => Promise<void>;
|
|
@@ -157,39 +117,157 @@ export interface TokenStore {
|
|
|
157
117
|
getTokenOutputs: (filter: WasmGetTokenOutputsFilter) => Promise<WasmTokenOutputsPerStatus>;
|
|
158
118
|
insertTokenOutputs: (tokenOutputs: WasmTokenOutputs) => Promise<void>;
|
|
159
119
|
reserveTokenOutputs: (
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
120
|
+
tokenIdentifier: string,
|
|
121
|
+
target: WasmReservationTarget,
|
|
122
|
+
purpose: string,
|
|
123
|
+
preferredOutputs: WasmTokenOutputWithPrevOut[] | null,
|
|
124
|
+
selectionStrategy: string | null
|
|
165
125
|
) => Promise<WasmTokenOutputsReservation>;
|
|
166
126
|
cancelReservation: (id: string) => Promise<void>;
|
|
167
127
|
finalizeReservation: (id: string) => Promise<void>;
|
|
168
128
|
now: () => Promise<number>;
|
|
169
129
|
}
|
|
170
130
|
|
|
171
|
-
|
|
172
|
-
|
|
131
|
+
/**
|
|
132
|
+
* A wallet derived from a passkey.
|
|
133
|
+
*/
|
|
134
|
+
export interface Wallet {
|
|
135
|
+
/**
|
|
136
|
+
* The derived seed.
|
|
137
|
+
*/
|
|
138
|
+
seed: Seed;
|
|
139
|
+
/**
|
|
140
|
+
* The label used for derivation.
|
|
141
|
+
*/
|
|
142
|
+
label: string;
|
|
173
143
|
}
|
|
174
144
|
|
|
175
|
-
|
|
176
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Configuration for PostgreSQL storage connection pool.
|
|
147
|
+
*/
|
|
148
|
+
export interface PostgresStorageConfig {
|
|
149
|
+
/**
|
|
150
|
+
* PostgreSQL connection string (URI format).
|
|
151
|
+
*/
|
|
152
|
+
connectionString: string;
|
|
153
|
+
/**
|
|
154
|
+
* Maximum number of connections in the pool.
|
|
155
|
+
*/
|
|
156
|
+
maxPoolSize: number;
|
|
157
|
+
/**
|
|
158
|
+
* Timeout in seconds for establishing a new connection (0 = no timeout).
|
|
159
|
+
*/
|
|
160
|
+
createTimeoutSecs: number;
|
|
161
|
+
/**
|
|
162
|
+
* Timeout in seconds before recycling an idle connection.
|
|
163
|
+
*/
|
|
164
|
+
recycleTimeoutSecs: number;
|
|
177
165
|
}
|
|
178
166
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Interface for passkey PRF (Pseudo-Random Function) operations.
|
|
169
|
+
*
|
|
170
|
+
* Implement this interface to provide passkey PRF functionality for seedless wallet restore.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```typescript
|
|
174
|
+
* class BrowserPasskeyPrfProvider implements PasskeyPrfProvider {
|
|
175
|
+
* async derivePrfSeed(salt: string): Promise<Uint8Array> {
|
|
176
|
+
* const credential = await navigator.credentials.get({
|
|
177
|
+
* publicKey: {
|
|
178
|
+
* challenge: new Uint8Array(32),
|
|
179
|
+
* rpId: window.location.hostname,
|
|
180
|
+
* allowCredentials: [], // or specific credential IDs
|
|
181
|
+
* extensions: {
|
|
182
|
+
* prf: { eval: { first: new TextEncoder().encode(salt) } }
|
|
183
|
+
* }
|
|
184
|
+
* }
|
|
185
|
+
* });
|
|
186
|
+
* const results = credential.getClientExtensionResults();
|
|
187
|
+
* return new Uint8Array(results.prf.results.first);
|
|
188
|
+
* }
|
|
189
|
+
*
|
|
190
|
+
* async isPrfAvailable(): Promise<boolean> {
|
|
191
|
+
* return window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable?.() ?? false;
|
|
192
|
+
* }
|
|
193
|
+
* }
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
export interface PasskeyPrfProvider {
|
|
197
|
+
/**
|
|
198
|
+
* Derive a 32-byte seed from passkey PRF with the given salt.
|
|
199
|
+
*
|
|
200
|
+
* The platform authenticates the user via passkey and evaluates the PRF extension.
|
|
201
|
+
* The salt is used as input to the PRF to derive a deterministic output.
|
|
202
|
+
*
|
|
203
|
+
* @param salt - The salt string to use for PRF evaluation
|
|
204
|
+
* @returns A Promise resolving to the 32-byte PRF output
|
|
205
|
+
* @throws If authentication fails or PRF is not supported
|
|
206
|
+
*/
|
|
207
|
+
derivePrfSeed(salt: string): Promise<Uint8Array>;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Check if a PRF-capable passkey is available on this device.
|
|
211
|
+
*
|
|
212
|
+
* This allows applications to gracefully degrade if passkey PRF is not supported.
|
|
213
|
+
*
|
|
214
|
+
* @returns A Promise resolving to true if PRF-capable passkey is available
|
|
215
|
+
*/
|
|
216
|
+
isPrfAvailable(): Promise<boolean>;
|
|
183
217
|
}
|
|
184
218
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Nostr relay configuration for passkey label operations.
|
|
221
|
+
*
|
|
222
|
+
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
223
|
+
*/
|
|
224
|
+
export interface NostrRelayConfig {
|
|
225
|
+
/**
|
|
226
|
+
* Optional Breez API key for authenticated access to the Breez relay.
|
|
227
|
+
* When provided, the Breez relay is added and NIP-42 authentication is enabled.
|
|
228
|
+
*/
|
|
229
|
+
breezApiKey?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Connection timeout in seconds. Defaults to 30 when `None`.
|
|
232
|
+
*/
|
|
233
|
+
timeoutSecs?: number;
|
|
188
234
|
}
|
|
189
235
|
|
|
190
|
-
export interface
|
|
191
|
-
|
|
192
|
-
|
|
236
|
+
export interface AddContactRequest {
|
|
237
|
+
name: string;
|
|
238
|
+
paymentIdentifier: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface AesSuccessActionData {
|
|
242
|
+
description: string;
|
|
243
|
+
ciphertext: string;
|
|
244
|
+
iv: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface AesSuccessActionDataDecrypted {
|
|
248
|
+
description: string;
|
|
249
|
+
plaintext: string;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface Bip21Details {
|
|
253
|
+
amountSat?: number;
|
|
254
|
+
assetId?: string;
|
|
255
|
+
uri: string;
|
|
256
|
+
extras: Bip21Extra[];
|
|
257
|
+
label?: string;
|
|
258
|
+
message?: string;
|
|
259
|
+
paymentMethods: InputType[];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface Bip21Extra {
|
|
263
|
+
key: string;
|
|
264
|
+
value: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface BitcoinAddressDetails {
|
|
268
|
+
address: string;
|
|
269
|
+
network: BitcoinNetwork;
|
|
270
|
+
source: PaymentRequestSource;
|
|
193
271
|
}
|
|
194
272
|
|
|
195
273
|
export interface BitcoinChainService {
|
|
@@ -200,209 +278,109 @@ export interface BitcoinChainService {
|
|
|
200
278
|
recommendedFees(): Promise<RecommendedFees>;
|
|
201
279
|
}
|
|
202
280
|
|
|
203
|
-
export interface
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
blockTime?: number;
|
|
281
|
+
export interface Bolt11Invoice {
|
|
282
|
+
bolt11: string;
|
|
283
|
+
source: PaymentRequestSource;
|
|
207
284
|
}
|
|
208
285
|
|
|
209
|
-
export
|
|
286
|
+
export interface Bolt11InvoiceDetails {
|
|
287
|
+
amountMsat?: number;
|
|
288
|
+
description?: string;
|
|
289
|
+
descriptionHash?: string;
|
|
290
|
+
expiry: number;
|
|
291
|
+
invoice: Bolt11Invoice;
|
|
292
|
+
minFinalCltvExpiryDelta: number;
|
|
293
|
+
network: BitcoinNetwork;
|
|
294
|
+
payeePubkey: string;
|
|
295
|
+
paymentHash: string;
|
|
296
|
+
paymentSecret: string;
|
|
297
|
+
routingHints: Bolt11RouteHint[];
|
|
298
|
+
timestamp: number;
|
|
299
|
+
}
|
|
210
300
|
|
|
211
|
-
export interface
|
|
212
|
-
|
|
213
|
-
halfHourFee: number;
|
|
214
|
-
hourFee: number;
|
|
215
|
-
economyFee: number;
|
|
216
|
-
minimumFee: number;
|
|
301
|
+
export interface Bolt11RouteHint {
|
|
302
|
+
hops: Bolt11RouteHintHop[];
|
|
217
303
|
}
|
|
218
304
|
|
|
219
|
-
export interface
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
305
|
+
export interface Bolt11RouteHintHop {
|
|
306
|
+
srcNodeId: string;
|
|
307
|
+
shortChannelId: string;
|
|
308
|
+
feesBaseMsat: number;
|
|
309
|
+
feesProportionalMillionths: number;
|
|
310
|
+
cltvExpiryDelta: number;
|
|
311
|
+
htlcMinimumMsat?: number;
|
|
312
|
+
htlcMaximumMsat?: number;
|
|
224
313
|
}
|
|
225
314
|
|
|
226
|
-
export interface
|
|
227
|
-
|
|
315
|
+
export interface Bolt12Invoice {
|
|
316
|
+
invoice: string;
|
|
317
|
+
source: PaymentRequestSource;
|
|
228
318
|
}
|
|
229
319
|
|
|
230
|
-
export interface
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
spacing?: number;
|
|
234
|
-
symbol?: Symbol;
|
|
235
|
-
uniqSymbol?: Symbol;
|
|
236
|
-
localizedName: LocalizedName[];
|
|
237
|
-
localeOverrides: LocaleOverrides[];
|
|
320
|
+
export interface Bolt12InvoiceDetails {
|
|
321
|
+
amountMsat: number;
|
|
322
|
+
invoice: Bolt12Invoice;
|
|
238
323
|
}
|
|
239
324
|
|
|
240
|
-
export interface
|
|
241
|
-
message: string;
|
|
242
|
-
compact: boolean;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface GetPaymentRequest {
|
|
246
|
-
paymentId: string;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export interface PaymentMetadata {
|
|
250
|
-
parentPaymentId?: string;
|
|
251
|
-
lnurlPayInfo?: LnurlPayInfo;
|
|
252
|
-
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
253
|
-
lnurlDescription?: string;
|
|
254
|
-
conversionInfo?: ConversionInfo;
|
|
255
|
-
conversionStatus?: ConversionStatus;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: string; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress"; newAddress?: boolean } | { type: "bolt11Invoice"; description: string; amountSats?: number; expirySecs?: number; paymentHash?: string };
|
|
259
|
-
|
|
260
|
-
export interface AesSuccessActionDataDecrypted {
|
|
261
|
-
description: string;
|
|
262
|
-
plaintext: string;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
325
|
+
export interface Bolt12InvoiceRequestDetails {}
|
|
266
326
|
|
|
267
|
-
export interface
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
to?: ConversionStep;
|
|
327
|
+
export interface Bolt12Offer {
|
|
328
|
+
offer: string;
|
|
329
|
+
source: PaymentRequestSource;
|
|
271
330
|
}
|
|
272
331
|
|
|
273
|
-
export interface
|
|
274
|
-
|
|
275
|
-
parent?: Record;
|
|
332
|
+
export interface Bolt12OfferBlindedPath {
|
|
333
|
+
blindedHops: string[];
|
|
276
334
|
}
|
|
277
335
|
|
|
278
|
-
export interface
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
336
|
+
export interface Bolt12OfferDetails {
|
|
337
|
+
absoluteExpiry?: number;
|
|
338
|
+
chains: string[];
|
|
339
|
+
description?: string;
|
|
340
|
+
issuer?: string;
|
|
341
|
+
minAmount?: Amount;
|
|
342
|
+
offer: Bolt12Offer;
|
|
343
|
+
paths: Bolt12OfferBlindedPath[];
|
|
344
|
+
signingPubkey?: string;
|
|
282
345
|
}
|
|
283
346
|
|
|
284
|
-
export interface
|
|
285
|
-
|
|
286
|
-
bech32: string;
|
|
347
|
+
export interface BurnIssuerTokenRequest {
|
|
348
|
+
amount: bigint;
|
|
287
349
|
}
|
|
288
350
|
|
|
289
|
-
export interface
|
|
351
|
+
export interface BuyBitcoinResponse {
|
|
290
352
|
url: string;
|
|
291
|
-
secret: string;
|
|
292
|
-
eventTypes: WebhookEventType[];
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export interface PrepareLnurlPayResponse {
|
|
296
|
-
amountSats: number;
|
|
297
|
-
comment?: string;
|
|
298
|
-
payRequest: LnurlPayRequestDetails;
|
|
299
|
-
feeSats: number;
|
|
300
|
-
invoiceDetails: Bolt11InvoiceDetails;
|
|
301
|
-
successAction?: SuccessAction;
|
|
302
|
-
conversionEstimate?: ConversionEstimate;
|
|
303
|
-
feePolicy: FeePolicy;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export interface LightningAddressDetails {
|
|
307
|
-
address: string;
|
|
308
|
-
payRequest: LnurlPayRequestDetails;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
export interface Payment {
|
|
312
|
-
id: string;
|
|
313
|
-
paymentType: PaymentType;
|
|
314
|
-
status: PaymentStatus;
|
|
315
|
-
amount: bigint;
|
|
316
|
-
fees: bigint;
|
|
317
|
-
timestamp: number;
|
|
318
|
-
method: PaymentMethod;
|
|
319
|
-
details?: PaymentDetails;
|
|
320
|
-
conversionDetails?: ConversionDetails;
|
|
321
353
|
}
|
|
322
354
|
|
|
323
|
-
export interface
|
|
324
|
-
|
|
325
|
-
vout: number;
|
|
326
|
-
destinationAddress: string;
|
|
327
|
-
fee: Fee;
|
|
355
|
+
export interface CheckLightningAddressRequest {
|
|
356
|
+
username: string;
|
|
328
357
|
}
|
|
329
358
|
|
|
330
|
-
export interface
|
|
359
|
+
export interface CheckMessageRequest {
|
|
360
|
+
message: string;
|
|
331
361
|
pubkey: string;
|
|
332
362
|
signature: string;
|
|
333
363
|
}
|
|
334
364
|
|
|
335
|
-
export interface
|
|
336
|
-
|
|
337
|
-
statusFilter?: PaymentStatus[];
|
|
338
|
-
assetFilter?: AssetFilter;
|
|
339
|
-
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
340
|
-
fromTimestamp?: number;
|
|
341
|
-
toTimestamp?: number;
|
|
342
|
-
offset?: number;
|
|
343
|
-
limit?: number;
|
|
344
|
-
sortAscending?: boolean;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export interface Bolt11Invoice {
|
|
348
|
-
bolt11: string;
|
|
349
|
-
source: PaymentRequestSource;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
353
|
-
|
|
354
|
-
export interface LightningAddressInfo {
|
|
355
|
-
description: string;
|
|
356
|
-
lightningAddress: string;
|
|
357
|
-
lnurl: LnurlInfo;
|
|
358
|
-
username: string;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
362
|
-
|
|
363
|
-
export interface Bolt11RouteHint {
|
|
364
|
-
hops: Bolt11RouteHintHop[];
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
368
|
-
|
|
369
|
-
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
370
|
-
|
|
371
|
-
export interface SendOnchainFeeQuote {
|
|
372
|
-
id: string;
|
|
373
|
-
expiresAt: number;
|
|
374
|
-
speedFast: SendOnchainSpeedFeeQuote;
|
|
375
|
-
speedMedium: SendOnchainSpeedFeeQuote;
|
|
376
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export type ConversionStatus = "pending" | "completed" | "failed" | "refundNeeded" | "refunded";
|
|
380
|
-
|
|
381
|
-
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
382
|
-
|
|
383
|
-
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
384
|
-
|
|
385
|
-
export interface Bip21Extra {
|
|
386
|
-
key: string;
|
|
387
|
-
value: string;
|
|
365
|
+
export interface CheckMessageResponse {
|
|
366
|
+
isValid: boolean;
|
|
388
367
|
}
|
|
389
368
|
|
|
390
|
-
export interface
|
|
391
|
-
|
|
392
|
-
|
|
369
|
+
export interface ClaimDepositRequest {
|
|
370
|
+
txid: string;
|
|
371
|
+
vout: number;
|
|
372
|
+
maxFee?: MaxFee;
|
|
393
373
|
}
|
|
394
374
|
|
|
395
|
-
export interface
|
|
396
|
-
|
|
397
|
-
info: CurrencyInfo;
|
|
375
|
+
export interface ClaimDepositResponse {
|
|
376
|
+
payment: Payment;
|
|
398
377
|
}
|
|
399
378
|
|
|
400
|
-
export interface
|
|
401
|
-
|
|
402
|
-
name: string;
|
|
379
|
+
export interface ClaimHtlcPaymentRequest {
|
|
380
|
+
preimage: string;
|
|
403
381
|
}
|
|
404
382
|
|
|
405
|
-
export interface
|
|
383
|
+
export interface ClaimHtlcPaymentResponse {
|
|
406
384
|
payment: Payment;
|
|
407
385
|
}
|
|
408
386
|
|
|
@@ -430,319 +408,311 @@ export interface Config {
|
|
|
430
408
|
sparkConfig?: SparkConfig;
|
|
431
409
|
}
|
|
432
410
|
|
|
433
|
-
export interface
|
|
434
|
-
|
|
411
|
+
export interface ConnectRequest {
|
|
412
|
+
config: Config;
|
|
413
|
+
seed: Seed;
|
|
414
|
+
storageDir: string;
|
|
435
415
|
}
|
|
436
416
|
|
|
437
|
-
export interface
|
|
438
|
-
|
|
439
|
-
|
|
417
|
+
export interface Contact {
|
|
418
|
+
id: string;
|
|
419
|
+
name: string;
|
|
420
|
+
paymentIdentifier: string;
|
|
421
|
+
createdAt: number;
|
|
422
|
+
updatedAt: number;
|
|
440
423
|
}
|
|
441
424
|
|
|
442
|
-
export interface
|
|
443
|
-
|
|
425
|
+
export interface ConversionDetails {
|
|
426
|
+
status: ConversionStatus;
|
|
427
|
+
from?: ConversionStep;
|
|
428
|
+
to?: ConversionStep;
|
|
444
429
|
}
|
|
445
430
|
|
|
446
|
-
export interface
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
431
|
+
export interface ConversionEstimate {
|
|
432
|
+
options: ConversionOptions;
|
|
433
|
+
amountIn: bigint;
|
|
434
|
+
amountOut: bigint;
|
|
435
|
+
fee: bigint;
|
|
436
|
+
amountAdjustment?: AmountAdjustmentReason;
|
|
450
437
|
}
|
|
451
438
|
|
|
452
|
-
export
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
nostrZapRequest?: string;
|
|
460
|
-
nostrZapReceipt?: string;
|
|
439
|
+
export interface ConversionInfo {
|
|
440
|
+
poolId: string;
|
|
441
|
+
conversionId: string;
|
|
442
|
+
status: ConversionStatus;
|
|
443
|
+
fee?: string;
|
|
444
|
+
purpose?: ConversionPurpose;
|
|
445
|
+
amountAdjustment?: AmountAdjustmentReason;
|
|
461
446
|
}
|
|
462
447
|
|
|
463
|
-
export interface
|
|
464
|
-
|
|
465
|
-
|
|
448
|
+
export interface ConversionOptions {
|
|
449
|
+
conversionType: ConversionType;
|
|
450
|
+
maxSlippageBps?: number;
|
|
451
|
+
completionTimeoutSecs?: number;
|
|
466
452
|
}
|
|
467
453
|
|
|
468
|
-
export interface
|
|
469
|
-
|
|
454
|
+
export interface ConversionStep {
|
|
455
|
+
paymentId: string;
|
|
456
|
+
amount: bigint;
|
|
457
|
+
fee: bigint;
|
|
458
|
+
method: PaymentMethod;
|
|
459
|
+
tokenMetadata?: TokenMetadata;
|
|
460
|
+
amountAdjustment?: AmountAdjustmentReason;
|
|
470
461
|
}
|
|
471
462
|
|
|
472
|
-
export
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
463
|
+
export interface CreateIssuerTokenRequest {
|
|
464
|
+
name: string;
|
|
465
|
+
ticker: string;
|
|
466
|
+
decimals: number;
|
|
467
|
+
isFreezable: boolean;
|
|
468
|
+
maxSupply: bigint;
|
|
478
469
|
}
|
|
479
470
|
|
|
480
|
-
export interface
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
paymentIdentifier: string;
|
|
471
|
+
export interface Credentials {
|
|
472
|
+
username: string;
|
|
473
|
+
password: string;
|
|
484
474
|
}
|
|
485
475
|
|
|
486
|
-
export interface
|
|
487
|
-
|
|
488
|
-
|
|
476
|
+
export interface CurrencyInfo {
|
|
477
|
+
name: string;
|
|
478
|
+
fractionSize: number;
|
|
479
|
+
spacing?: number;
|
|
480
|
+
symbol?: Symbol;
|
|
481
|
+
uniqSymbol?: Symbol;
|
|
482
|
+
localizedName: LocalizedName[];
|
|
483
|
+
localeOverrides: LocaleOverrides[];
|
|
489
484
|
}
|
|
490
485
|
|
|
491
|
-
export interface
|
|
492
|
-
|
|
493
|
-
|
|
486
|
+
export interface DepositInfo {
|
|
487
|
+
txid: string;
|
|
488
|
+
vout: number;
|
|
489
|
+
amountSats: number;
|
|
490
|
+
isMature: boolean;
|
|
491
|
+
refundTx?: string;
|
|
492
|
+
refundTxId?: string;
|
|
493
|
+
claimError?: DepositClaimError;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
export interface
|
|
497
|
-
|
|
498
|
-
comment?: string;
|
|
499
|
-
domain?: string;
|
|
500
|
-
metadata?: string;
|
|
501
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
502
|
-
rawSuccessAction?: SuccessAction;
|
|
496
|
+
export interface EcdsaSignatureBytes {
|
|
497
|
+
bytes: number[];
|
|
503
498
|
}
|
|
504
499
|
|
|
505
|
-
export
|
|
506
|
-
|
|
507
|
-
export interface ClaimHtlcPaymentRequest {
|
|
508
|
-
preimage: string;
|
|
500
|
+
export interface EventListener {
|
|
501
|
+
onEvent: (e: SdkEvent) => void;
|
|
509
502
|
}
|
|
510
503
|
|
|
511
|
-
export
|
|
504
|
+
export interface ExternalAggregateFrostRequest {
|
|
505
|
+
message: number[];
|
|
506
|
+
statechainSignatures: IdentifierSignaturePair[];
|
|
507
|
+
statechainPublicKeys: IdentifierPublicKeyPair[];
|
|
508
|
+
verifyingKey: number[];
|
|
509
|
+
statechainCommitments: IdentifierCommitmentPair[];
|
|
510
|
+
selfCommitment: ExternalSigningCommitments;
|
|
511
|
+
publicKey: number[];
|
|
512
|
+
selfSignature: ExternalFrostSignatureShare;
|
|
513
|
+
adaptorPublicKey?: number[];
|
|
514
|
+
}
|
|
512
515
|
|
|
513
|
-
export interface
|
|
514
|
-
|
|
515
|
-
url: string;
|
|
516
|
-
matchesCallbackDomain: boolean;
|
|
516
|
+
export interface ExternalEncryptedSecret {
|
|
517
|
+
ciphertext: number[];
|
|
517
518
|
}
|
|
518
519
|
|
|
519
|
-
export
|
|
520
|
+
export interface ExternalFrostCommitments {
|
|
521
|
+
hidingCommitment: number[];
|
|
522
|
+
bindingCommitment: number[];
|
|
523
|
+
noncesCiphertext: number[];
|
|
524
|
+
}
|
|
520
525
|
|
|
521
|
-
export interface
|
|
522
|
-
|
|
523
|
-
network: BitcoinNetwork;
|
|
524
|
-
source: PaymentRequestSource;
|
|
526
|
+
export interface ExternalFrostSignature {
|
|
527
|
+
bytes: number[];
|
|
525
528
|
}
|
|
526
529
|
|
|
527
|
-
export interface
|
|
528
|
-
|
|
529
|
-
minToAmount?: bigint;
|
|
530
|
+
export interface ExternalFrostSignatureShare {
|
|
531
|
+
bytes: number[];
|
|
530
532
|
}
|
|
531
533
|
|
|
532
|
-
export
|
|
534
|
+
export interface ExternalIdentifier {
|
|
535
|
+
bytes: number[];
|
|
536
|
+
}
|
|
533
537
|
|
|
534
|
-
export interface
|
|
535
|
-
|
|
538
|
+
export interface ExternalInputParser {
|
|
539
|
+
providerId: string;
|
|
540
|
+
inputRegex: string;
|
|
541
|
+
parserUrl: string;
|
|
536
542
|
}
|
|
537
543
|
|
|
538
|
-
export
|
|
544
|
+
export interface ExternalScalar {
|
|
545
|
+
bytes: number[];
|
|
546
|
+
}
|
|
539
547
|
|
|
540
|
-
export
|
|
548
|
+
export interface ExternalSecretShare {
|
|
549
|
+
threshold: number;
|
|
550
|
+
index: ExternalScalar;
|
|
551
|
+
share: ExternalScalar;
|
|
552
|
+
}
|
|
541
553
|
|
|
542
|
-
export interface
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
554
|
+
export interface ExternalSignFrostRequest {
|
|
555
|
+
message: number[];
|
|
556
|
+
publicKey: number[];
|
|
557
|
+
secret: ExternalSecretSource;
|
|
558
|
+
verifyingKey: number[];
|
|
559
|
+
selfNonceCommitment: ExternalFrostCommitments;
|
|
560
|
+
statechainCommitments: IdentifierCommitmentPair[];
|
|
561
|
+
adaptorPublicKey?: number[];
|
|
546
562
|
}
|
|
547
563
|
|
|
548
|
-
export interface
|
|
549
|
-
|
|
550
|
-
|
|
564
|
+
export interface ExternalSigner {
|
|
565
|
+
identityPublicKey(): PublicKeyBytes;
|
|
566
|
+
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
567
|
+
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
568
|
+
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
569
|
+
encryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
570
|
+
decryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
571
|
+
signHashSchnorr(hash: Uint8Array, path: string): Promise<SchnorrSignatureBytes>;
|
|
572
|
+
generateRandomSigningCommitment(): Promise<ExternalFrostCommitments>;
|
|
573
|
+
getPublicKeyForNode(id: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
574
|
+
generateRandomSecret(): Promise<ExternalEncryptedSecret>;
|
|
575
|
+
staticDepositSecretEncrypted(index: number): Promise<ExternalSecretSource>;
|
|
576
|
+
staticDepositSecret(index: number): Promise<SecretBytes>;
|
|
577
|
+
staticDepositSigningKey(index: number): Promise<PublicKeyBytes>;
|
|
578
|
+
subtractSecrets(signingKey: ExternalSecretSource, newSigningKey: ExternalSecretSource): Promise<ExternalSecretSource>;
|
|
579
|
+
splitSecretWithProofs(secret: ExternalSecretToSplit, threshold: number, numShares: number): Promise<ExternalVerifiableSecretShare[]>;
|
|
580
|
+
encryptPrivateKeyForReceiver(privateKey: ExternalEncryptedSecret, receiverPublicKey: PublicKeyBytes): Promise<Uint8Array>;
|
|
581
|
+
publicKeyFromSecret(privateKey: ExternalSecretSource): Promise<PublicKeyBytes>;
|
|
582
|
+
signFrost(request: ExternalSignFrostRequest): Promise<ExternalFrostSignatureShare>;
|
|
583
|
+
aggregateFrost(request: ExternalAggregateFrostRequest): Promise<ExternalFrostSignature>;
|
|
584
|
+
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
551
585
|
}
|
|
552
586
|
|
|
553
|
-
export
|
|
587
|
+
export interface ExternalSigningCommitments {
|
|
588
|
+
hiding: number[];
|
|
589
|
+
binding: number[];
|
|
590
|
+
}
|
|
554
591
|
|
|
555
|
-
export interface
|
|
556
|
-
|
|
557
|
-
shortChannelId: string;
|
|
558
|
-
feesBaseMsat: number;
|
|
559
|
-
feesProportionalMillionths: number;
|
|
560
|
-
cltvExpiryDelta: number;
|
|
561
|
-
htlcMinimumMsat?: number;
|
|
562
|
-
htlcMaximumMsat?: number;
|
|
592
|
+
export interface ExternalTreeNodeId {
|
|
593
|
+
id: string;
|
|
563
594
|
}
|
|
564
595
|
|
|
565
|
-
export
|
|
596
|
+
export interface ExternalVerifiableSecretShare {
|
|
597
|
+
secretShare: ExternalSecretShare;
|
|
598
|
+
proofs: number[][];
|
|
599
|
+
}
|
|
566
600
|
|
|
567
|
-
export interface
|
|
568
|
-
|
|
601
|
+
export interface FetchConversionLimitsRequest {
|
|
602
|
+
conversionType: ConversionType;
|
|
603
|
+
tokenIdentifier?: string;
|
|
569
604
|
}
|
|
570
605
|
|
|
571
|
-
export interface
|
|
572
|
-
|
|
573
|
-
|
|
606
|
+
export interface FetchConversionLimitsResponse {
|
|
607
|
+
minFromAmount?: bigint;
|
|
608
|
+
minToAmount?: bigint;
|
|
574
609
|
}
|
|
575
610
|
|
|
576
|
-
export interface
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
storageDir: string;
|
|
611
|
+
export interface FiatCurrency {
|
|
612
|
+
id: string;
|
|
613
|
+
info: CurrencyInfo;
|
|
580
614
|
}
|
|
581
615
|
|
|
582
|
-
export
|
|
616
|
+
export interface FiatService {
|
|
617
|
+
fetchFiatCurrencies(): Promise<FiatCurrency[]>;
|
|
618
|
+
fetchFiatRates(): Promise<Rate[]>;
|
|
619
|
+
}
|
|
583
620
|
|
|
584
|
-
export
|
|
621
|
+
export interface FreezeIssuerTokenRequest {
|
|
622
|
+
address: string;
|
|
623
|
+
}
|
|
585
624
|
|
|
586
|
-
export interface
|
|
587
|
-
|
|
588
|
-
|
|
625
|
+
export interface FreezeIssuerTokenResponse {
|
|
626
|
+
impactedOutputIds: string[];
|
|
627
|
+
impactedTokenAmount: bigint;
|
|
589
628
|
}
|
|
590
629
|
|
|
591
|
-
export interface
|
|
592
|
-
|
|
593
|
-
stableBalanceActiveLabel?: string;
|
|
630
|
+
export interface GetInfoRequest {
|
|
631
|
+
ensureSynced?: boolean;
|
|
594
632
|
}
|
|
595
633
|
|
|
596
|
-
export interface
|
|
597
|
-
|
|
598
|
-
|
|
634
|
+
export interface GetInfoResponse {
|
|
635
|
+
identityPubkey: string;
|
|
636
|
+
balanceSats: number;
|
|
637
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
599
638
|
}
|
|
600
639
|
|
|
601
|
-
export interface
|
|
602
|
-
|
|
603
|
-
currentRound: number;
|
|
604
|
-
totalRounds: number;
|
|
640
|
+
export interface GetPaymentRequest {
|
|
641
|
+
paymentId: string;
|
|
605
642
|
}
|
|
606
643
|
|
|
607
|
-
export interface
|
|
608
|
-
|
|
644
|
+
export interface GetPaymentResponse {
|
|
645
|
+
payment: Payment;
|
|
609
646
|
}
|
|
610
647
|
|
|
611
|
-
export
|
|
648
|
+
export interface GetTokensMetadataRequest {
|
|
649
|
+
tokenIdentifiers: string[];
|
|
650
|
+
}
|
|
612
651
|
|
|
613
|
-
export interface
|
|
614
|
-
|
|
615
|
-
defaultActiveLabel?: string;
|
|
616
|
-
thresholdSats?: number;
|
|
617
|
-
maxSlippageBps?: number;
|
|
652
|
+
export interface GetTokensMetadataResponse {
|
|
653
|
+
tokensMetadata: TokenMetadata[];
|
|
618
654
|
}
|
|
619
655
|
|
|
620
|
-
export interface
|
|
621
|
-
|
|
622
|
-
network: BitcoinNetwork;
|
|
623
|
-
source: PaymentRequestSource;
|
|
656
|
+
export interface HashedMessageBytes {
|
|
657
|
+
bytes: number[];
|
|
624
658
|
}
|
|
625
659
|
|
|
626
|
-
export interface
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
domain: string;
|
|
630
|
-
url: string;
|
|
660
|
+
export interface IdentifierCommitmentPair {
|
|
661
|
+
identifier: ExternalIdentifier;
|
|
662
|
+
commitment: ExternalSigningCommitments;
|
|
631
663
|
}
|
|
632
664
|
|
|
633
|
-
export interface
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
senderComment?: string;
|
|
665
|
+
export interface IdentifierPublicKeyPair {
|
|
666
|
+
identifier: ExternalIdentifier;
|
|
667
|
+
publicKey: number[];
|
|
637
668
|
}
|
|
638
669
|
|
|
639
|
-
export
|
|
670
|
+
export interface IdentifierSignaturePair {
|
|
671
|
+
identifier: ExternalIdentifier;
|
|
672
|
+
signature: ExternalFrostSignatureShare;
|
|
673
|
+
}
|
|
640
674
|
|
|
641
|
-
export interface
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
status: ConversionStatus;
|
|
645
|
-
fee?: string;
|
|
646
|
-
purpose?: ConversionPurpose;
|
|
647
|
-
amountAdjustment?: AmountAdjustmentReason;
|
|
675
|
+
export interface IncomingChange {
|
|
676
|
+
newState: Record;
|
|
677
|
+
oldState?: Record;
|
|
648
678
|
}
|
|
649
679
|
|
|
650
|
-
export interface
|
|
651
|
-
|
|
652
|
-
|
|
680
|
+
export interface KeySetConfig {
|
|
681
|
+
keySetType: KeySetType;
|
|
682
|
+
useAddressIndex: boolean;
|
|
683
|
+
accountNumber?: number;
|
|
653
684
|
}
|
|
654
685
|
|
|
655
|
-
export interface
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
descriptionHash?: string;
|
|
659
|
-
expiry: number;
|
|
660
|
-
invoice: Bolt11Invoice;
|
|
661
|
-
minFinalCltvExpiryDelta: number;
|
|
662
|
-
network: BitcoinNetwork;
|
|
663
|
-
payeePubkey: string;
|
|
664
|
-
paymentHash: string;
|
|
665
|
-
paymentSecret: string;
|
|
666
|
-
routingHints: Bolt11RouteHint[];
|
|
667
|
-
timestamp: number;
|
|
686
|
+
export interface LightningAddressDetails {
|
|
687
|
+
address: string;
|
|
688
|
+
payRequest: LnurlPayRequestDetails;
|
|
668
689
|
}
|
|
669
690
|
|
|
670
|
-
export interface
|
|
671
|
-
|
|
672
|
-
|
|
691
|
+
export interface LightningAddressInfo {
|
|
692
|
+
description: string;
|
|
693
|
+
lightningAddress: string;
|
|
694
|
+
lnurl: LnurlInfo;
|
|
695
|
+
username: string;
|
|
673
696
|
}
|
|
674
697
|
|
|
675
|
-
export interface
|
|
676
|
-
|
|
677
|
-
|
|
698
|
+
export interface ListContactsRequest {
|
|
699
|
+
offset?: number;
|
|
700
|
+
limit?: number;
|
|
678
701
|
}
|
|
679
702
|
|
|
680
703
|
export interface ListFiatCurrenciesResponse {
|
|
681
704
|
currencies: FiatCurrency[];
|
|
682
705
|
}
|
|
683
706
|
|
|
684
|
-
export interface
|
|
685
|
-
|
|
686
|
-
invoice: string;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
export type PaymentType = "send" | "receive";
|
|
690
|
-
|
|
691
|
-
export interface LnurlWithdrawInfo {
|
|
692
|
-
withdrawUrl: string;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
export interface FetchConversionLimitsRequest {
|
|
696
|
-
conversionType: ConversionType;
|
|
697
|
-
tokenIdentifier?: string;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
export interface IncomingChange {
|
|
701
|
-
newState: Record;
|
|
702
|
-
oldState?: Record;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
export interface LnurlPayRequestDetails {
|
|
706
|
-
callback: string;
|
|
707
|
-
minSendable: number;
|
|
708
|
-
maxSendable: number;
|
|
709
|
-
metadataStr: string;
|
|
710
|
-
commentAllowed: number;
|
|
711
|
-
domain: string;
|
|
712
|
-
url: string;
|
|
713
|
-
address?: string;
|
|
714
|
-
allowsNostr?: boolean;
|
|
715
|
-
nostrPubkey?: string;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
export interface UpdateUserSettingsRequest {
|
|
719
|
-
sparkPrivateModeEnabled?: boolean;
|
|
720
|
-
stableBalanceActiveLabel?: StableBalanceActiveLabel;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
export interface MessageSuccessActionData {
|
|
724
|
-
message: string;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
export interface ConversionStep {
|
|
728
|
-
paymentId: string;
|
|
729
|
-
amount: bigint;
|
|
730
|
-
fee: bigint;
|
|
731
|
-
method: PaymentMethod;
|
|
732
|
-
tokenMetadata?: TokenMetadata;
|
|
733
|
-
amountAdjustment?: AmountAdjustmentReason;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
export interface SendOnchainSpeedFeeQuote {
|
|
737
|
-
userFeeSat: number;
|
|
738
|
-
l1BroadcastFeeSat: number;
|
|
707
|
+
export interface ListFiatRatesResponse {
|
|
708
|
+
rates: Rate[];
|
|
739
709
|
}
|
|
740
710
|
|
|
741
|
-
export interface
|
|
711
|
+
export interface ListPaymentsRequest {
|
|
742
712
|
typeFilter?: PaymentType[];
|
|
743
713
|
statusFilter?: PaymentStatus[];
|
|
744
714
|
assetFilter?: AssetFilter;
|
|
745
|
-
paymentDetailsFilter?:
|
|
715
|
+
paymentDetailsFilter?: PaymentDetailsFilter[];
|
|
746
716
|
fromTimestamp?: number;
|
|
747
717
|
toTimestamp?: number;
|
|
748
718
|
offset?: number;
|
|
@@ -750,74 +720,78 @@ export interface StorageListPaymentsRequest {
|
|
|
750
720
|
sortAscending?: boolean;
|
|
751
721
|
}
|
|
752
722
|
|
|
753
|
-
export interface
|
|
754
|
-
|
|
755
|
-
preimage?: string;
|
|
756
|
-
expiryTime: number;
|
|
757
|
-
status: SparkHtlcStatus;
|
|
723
|
+
export interface ListPaymentsResponse {
|
|
724
|
+
payments: Payment[];
|
|
758
725
|
}
|
|
759
726
|
|
|
760
|
-
export interface
|
|
761
|
-
id: string;
|
|
762
|
-
name: string;
|
|
763
|
-
paymentIdentifier: string;
|
|
764
|
-
createdAt: number;
|
|
765
|
-
updatedAt: number;
|
|
766
|
-
}
|
|
727
|
+
export interface ListUnclaimedDepositsRequest {}
|
|
767
728
|
|
|
768
|
-
export
|
|
729
|
+
export interface ListUnclaimedDepositsResponse {
|
|
730
|
+
deposits: DepositInfo[];
|
|
731
|
+
}
|
|
769
732
|
|
|
770
|
-
export interface
|
|
733
|
+
export interface LnurlAuthRequestDetails {
|
|
734
|
+
k1: string;
|
|
735
|
+
action?: string;
|
|
736
|
+
domain: string;
|
|
771
737
|
url: string;
|
|
772
738
|
}
|
|
773
739
|
|
|
774
|
-
export interface
|
|
775
|
-
|
|
776
|
-
identifier: string;
|
|
777
|
-
address: string;
|
|
778
|
-
identityPublicKey: string;
|
|
740
|
+
export interface LnurlErrorDetails {
|
|
741
|
+
reason: string;
|
|
779
742
|
}
|
|
780
743
|
|
|
781
|
-
export interface
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
description?: string;
|
|
785
|
-
issuer?: string;
|
|
786
|
-
minAmount?: Amount;
|
|
787
|
-
offer: Bolt12Offer;
|
|
788
|
-
paths: Bolt12OfferBlindedPath[];
|
|
789
|
-
signingPubkey?: string;
|
|
744
|
+
export interface LnurlInfo {
|
|
745
|
+
url: string;
|
|
746
|
+
bech32: string;
|
|
790
747
|
}
|
|
791
748
|
|
|
792
|
-
export interface
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
749
|
+
export interface LnurlPayInfo {
|
|
750
|
+
lnAddress?: string;
|
|
751
|
+
comment?: string;
|
|
752
|
+
domain?: string;
|
|
753
|
+
metadata?: string;
|
|
754
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
755
|
+
rawSuccessAction?: SuccessAction;
|
|
796
756
|
}
|
|
797
757
|
|
|
798
|
-
export interface
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
network: BitcoinNetwork;
|
|
802
|
-
source: PaymentRequestSource;
|
|
758
|
+
export interface LnurlPayRequest {
|
|
759
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
760
|
+
idempotencyKey?: string;
|
|
803
761
|
}
|
|
804
762
|
|
|
805
|
-
export interface
|
|
806
|
-
|
|
807
|
-
|
|
763
|
+
export interface LnurlPayRequestDetails {
|
|
764
|
+
callback: string;
|
|
765
|
+
minSendable: number;
|
|
766
|
+
maxSendable: number;
|
|
767
|
+
metadataStr: string;
|
|
768
|
+
commentAllowed: number;
|
|
769
|
+
domain: string;
|
|
770
|
+
url: string;
|
|
771
|
+
address?: string;
|
|
772
|
+
allowsNostr?: boolean;
|
|
773
|
+
nostrPubkey?: string;
|
|
808
774
|
}
|
|
809
775
|
|
|
810
|
-
export interface
|
|
776
|
+
export interface LnurlPayResponse {
|
|
811
777
|
payment: Payment;
|
|
778
|
+
successAction?: SuccessActionProcessed;
|
|
812
779
|
}
|
|
813
780
|
|
|
814
|
-
export
|
|
781
|
+
export interface LnurlReceiveMetadata {
|
|
782
|
+
nostrZapRequest?: string;
|
|
783
|
+
nostrZapReceipt?: string;
|
|
784
|
+
senderComment?: string;
|
|
785
|
+
}
|
|
815
786
|
|
|
816
|
-
export
|
|
787
|
+
export interface LnurlWithdrawInfo {
|
|
788
|
+
withdrawUrl: string;
|
|
789
|
+
}
|
|
817
790
|
|
|
818
|
-
export interface
|
|
819
|
-
|
|
820
|
-
|
|
791
|
+
export interface LnurlWithdrawRequest {
|
|
792
|
+
amountSats: number;
|
|
793
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
794
|
+
completionTimeoutSecs?: number;
|
|
821
795
|
}
|
|
822
796
|
|
|
823
797
|
export interface LnurlWithdrawRequestDetails {
|
|
@@ -828,137 +802,87 @@ export interface LnurlWithdrawRequestDetails {
|
|
|
828
802
|
maxWithdrawable: number;
|
|
829
803
|
}
|
|
830
804
|
|
|
831
|
-
export interface
|
|
832
|
-
|
|
833
|
-
|
|
805
|
+
export interface LnurlWithdrawResponse {
|
|
806
|
+
paymentRequest: string;
|
|
807
|
+
payment?: Payment;
|
|
834
808
|
}
|
|
835
809
|
|
|
836
|
-
export
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
multiplicity: number;
|
|
810
|
+
export interface LocaleOverrides {
|
|
811
|
+
locale: string;
|
|
812
|
+
spacing?: number;
|
|
813
|
+
symbol: Symbol;
|
|
841
814
|
}
|
|
842
815
|
|
|
843
|
-
export interface
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
maxFee?: MaxFee;
|
|
816
|
+
export interface LocalizedName {
|
|
817
|
+
locale: string;
|
|
818
|
+
name: string;
|
|
847
819
|
}
|
|
848
820
|
|
|
849
|
-
export interface
|
|
850
|
-
|
|
821
|
+
export interface LogEntry {
|
|
822
|
+
line: string;
|
|
823
|
+
level: string;
|
|
851
824
|
}
|
|
852
825
|
|
|
853
|
-
export interface
|
|
854
|
-
|
|
855
|
-
export interface ClaimDepositResponse {
|
|
856
|
-
payment: Payment;
|
|
826
|
+
export interface Logger {
|
|
827
|
+
log: (l: LogEntry) => void;
|
|
857
828
|
}
|
|
858
829
|
|
|
859
|
-
export
|
|
860
|
-
|
|
861
|
-
export interface LnurlErrorDetails {
|
|
862
|
-
reason: string;
|
|
830
|
+
export interface MessageBytes {
|
|
831
|
+
bytes: number[];
|
|
863
832
|
}
|
|
864
833
|
|
|
865
|
-
export interface
|
|
866
|
-
|
|
867
|
-
identityPublicKey: string;
|
|
868
|
-
schemaEndpoint?: string;
|
|
834
|
+
export interface MessageSuccessActionData {
|
|
835
|
+
message: string;
|
|
869
836
|
}
|
|
870
837
|
|
|
871
|
-
export
|
|
872
|
-
|
|
873
|
-
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
874
|
-
|
|
875
|
-
export interface Symbol {
|
|
876
|
-
grapheme?: string;
|
|
877
|
-
template?: string;
|
|
878
|
-
rtl?: boolean;
|
|
879
|
-
position?: number;
|
|
838
|
+
export interface MintIssuerTokenRequest {
|
|
839
|
+
amount: bigint;
|
|
880
840
|
}
|
|
881
841
|
|
|
882
|
-
export interface
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
signature: string;
|
|
842
|
+
export interface OptimizationConfig {
|
|
843
|
+
autoEnabled: boolean;
|
|
844
|
+
multiplicity: number;
|
|
886
845
|
}
|
|
887
846
|
|
|
888
|
-
export interface
|
|
889
|
-
|
|
890
|
-
|
|
847
|
+
export interface OptimizationProgress {
|
|
848
|
+
isRunning: boolean;
|
|
849
|
+
currentRound: number;
|
|
850
|
+
totalRounds: number;
|
|
891
851
|
}
|
|
892
852
|
|
|
893
|
-
export interface
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
tokenIdentifier?: string;
|
|
897
|
-
conversionEstimate?: ConversionEstimate;
|
|
898
|
-
feePolicy: FeePolicy;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
902
|
-
|
|
903
|
-
export interface CheckLightningAddressRequest {
|
|
904
|
-
username: string;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
export interface Bolt12Invoice {
|
|
908
|
-
invoice: string;
|
|
909
|
-
source: PaymentRequestSource;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
export interface Bip21Details {
|
|
913
|
-
amountSat?: number;
|
|
914
|
-
assetId?: string;
|
|
915
|
-
uri: string;
|
|
916
|
-
extras: Bip21Extra[];
|
|
917
|
-
label?: string;
|
|
918
|
-
message?: string;
|
|
919
|
-
paymentMethods: InputType[];
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
export interface LocaleOverrides {
|
|
923
|
-
locale: string;
|
|
924
|
-
spacing?: number;
|
|
925
|
-
symbol: Symbol;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
export interface DepositInfo {
|
|
929
|
-
txid: string;
|
|
930
|
-
vout: number;
|
|
931
|
-
amountSats: number;
|
|
932
|
-
isMature: boolean;
|
|
933
|
-
refundTx?: string;
|
|
934
|
-
refundTxId?: string;
|
|
935
|
-
claimError?: DepositClaimError;
|
|
853
|
+
export interface OutgoingChange {
|
|
854
|
+
change: RecordChange;
|
|
855
|
+
parent?: Record;
|
|
936
856
|
}
|
|
937
857
|
|
|
938
|
-
export interface
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
858
|
+
export interface Payment {
|
|
859
|
+
id: string;
|
|
860
|
+
paymentType: PaymentType;
|
|
861
|
+
status: PaymentStatus;
|
|
862
|
+
amount: bigint;
|
|
863
|
+
fees: bigint;
|
|
864
|
+
timestamp: number;
|
|
865
|
+
method: PaymentMethod;
|
|
866
|
+
details?: PaymentDetails;
|
|
867
|
+
conversionDetails?: ConversionDetails;
|
|
942
868
|
}
|
|
943
869
|
|
|
944
|
-
export interface
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
870
|
+
export interface PaymentMetadata {
|
|
871
|
+
parentPaymentId?: string;
|
|
872
|
+
lnurlPayInfo?: LnurlPayInfo;
|
|
873
|
+
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
874
|
+
lnurlDescription?: string;
|
|
875
|
+
conversionInfo?: ConversionInfo;
|
|
876
|
+
conversionStatus?: ConversionStatus;
|
|
948
877
|
}
|
|
949
878
|
|
|
950
|
-
export interface
|
|
951
|
-
|
|
879
|
+
export interface PaymentObserver {
|
|
880
|
+
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
952
881
|
}
|
|
953
882
|
|
|
954
|
-
export interface
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
name: string;
|
|
958
|
-
ticker: string;
|
|
959
|
-
decimals: number;
|
|
960
|
-
maxSupply: string;
|
|
961
|
-
isFreezable: boolean;
|
|
883
|
+
export interface PaymentRequestSource {
|
|
884
|
+
bip21Uri?: string;
|
|
885
|
+
bip353Address?: string;
|
|
962
886
|
}
|
|
963
887
|
|
|
964
888
|
export interface PrepareLnurlPayRequest {
|
|
@@ -971,7 +895,32 @@ export interface PrepareLnurlPayRequest {
|
|
|
971
895
|
feePolicy?: FeePolicy;
|
|
972
896
|
}
|
|
973
897
|
|
|
974
|
-
export interface
|
|
898
|
+
export interface PrepareLnurlPayResponse {
|
|
899
|
+
amountSats: number;
|
|
900
|
+
comment?: string;
|
|
901
|
+
payRequest: LnurlPayRequestDetails;
|
|
902
|
+
feeSats: number;
|
|
903
|
+
invoiceDetails: Bolt11InvoiceDetails;
|
|
904
|
+
successAction?: SuccessAction;
|
|
905
|
+
conversionEstimate?: ConversionEstimate;
|
|
906
|
+
feePolicy: FeePolicy;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
export interface PrepareSendPaymentRequest {
|
|
910
|
+
paymentRequest: string;
|
|
911
|
+
amount?: bigint;
|
|
912
|
+
tokenIdentifier?: string;
|
|
913
|
+
conversionOptions?: ConversionOptions;
|
|
914
|
+
feePolicy?: FeePolicy;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export interface PrepareSendPaymentResponse {
|
|
918
|
+
paymentMethod: SendPaymentMethod;
|
|
919
|
+
amount: bigint;
|
|
920
|
+
tokenIdentifier?: string;
|
|
921
|
+
conversionEstimate?: ConversionEstimate;
|
|
922
|
+
feePolicy: FeePolicy;
|
|
923
|
+
}
|
|
975
924
|
|
|
976
925
|
export interface ProvisionalPayment {
|
|
977
926
|
paymentId: string;
|
|
@@ -979,7 +928,38 @@ export interface ProvisionalPayment {
|
|
|
979
928
|
details: ProvisionalPaymentDetails;
|
|
980
929
|
}
|
|
981
930
|
|
|
982
|
-
export interface
|
|
931
|
+
export interface PublicKeyBytes {
|
|
932
|
+
bytes: number[];
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export interface Rate {
|
|
936
|
+
coin: string;
|
|
937
|
+
value: number;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
export interface ReceivePaymentRequest {
|
|
941
|
+
paymentMethod: ReceivePaymentMethod;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
export interface ReceivePaymentResponse {
|
|
945
|
+
paymentRequest: string;
|
|
946
|
+
fee: bigint;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
export interface RecommendedFees {
|
|
950
|
+
fastestFee: number;
|
|
951
|
+
halfHourFee: number;
|
|
952
|
+
hourFee: number;
|
|
953
|
+
economyFee: number;
|
|
954
|
+
minimumFee: number;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export interface Record {
|
|
958
|
+
id: RecordId;
|
|
959
|
+
revision: number;
|
|
960
|
+
schemaVersion: string;
|
|
961
|
+
data: Map<string, string>;
|
|
962
|
+
}
|
|
983
963
|
|
|
984
964
|
export interface RecordChange {
|
|
985
965
|
id: RecordId;
|
|
@@ -988,489 +968,502 @@ export interface RecordChange {
|
|
|
988
968
|
localRevision: number;
|
|
989
969
|
}
|
|
990
970
|
|
|
991
|
-
export interface
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
export type TokenTransactionType = "transfer" | "mint" | "burn";
|
|
997
|
-
|
|
998
|
-
export interface SparkConfig {
|
|
999
|
-
coordinatorIdentifier: string;
|
|
1000
|
-
threshold: number;
|
|
1001
|
-
signingOperators: SparkSigningOperator[];
|
|
1002
|
-
sspConfig: SparkSspConfig;
|
|
1003
|
-
expectedWithdrawBondSats: number;
|
|
1004
|
-
expectedWithdrawRelativeBlockLocktime: number;
|
|
971
|
+
export interface RecordId {
|
|
972
|
+
type: string;
|
|
973
|
+
dataId: string;
|
|
1005
974
|
}
|
|
1006
975
|
|
|
1007
|
-
export interface
|
|
1008
|
-
|
|
1009
|
-
successAction?: SuccessActionProcessed;
|
|
976
|
+
export interface RecoverableEcdsaSignatureBytes {
|
|
977
|
+
bytes: number[];
|
|
1010
978
|
}
|
|
1011
979
|
|
|
1012
|
-
export interface
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
feePolicy?: FeePolicy;
|
|
980
|
+
export interface RefundDepositRequest {
|
|
981
|
+
txid: string;
|
|
982
|
+
vout: number;
|
|
983
|
+
destinationAddress: string;
|
|
984
|
+
fee: Fee;
|
|
1018
985
|
}
|
|
1019
986
|
|
|
1020
|
-
export interface
|
|
1021
|
-
|
|
1022
|
-
|
|
987
|
+
export interface RefundDepositResponse {
|
|
988
|
+
txId: string;
|
|
989
|
+
txHex: string;
|
|
1023
990
|
}
|
|
1024
991
|
|
|
1025
|
-
export interface
|
|
1026
|
-
|
|
1027
|
-
identityPublicKey: string;
|
|
1028
|
-
network: BitcoinNetwork;
|
|
1029
|
-
amount?: string;
|
|
1030
|
-
tokenIdentifier?: string;
|
|
1031
|
-
expiryTime?: number;
|
|
992
|
+
export interface RegisterLightningAddressRequest {
|
|
993
|
+
username: string;
|
|
1032
994
|
description?: string;
|
|
1033
|
-
senderPublicKey?: string;
|
|
1034
995
|
}
|
|
1035
996
|
|
|
1036
|
-
export interface
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
997
|
+
export interface RegisterWebhookRequest {
|
|
998
|
+
url: string;
|
|
999
|
+
secret: string;
|
|
1000
|
+
eventTypes: WebhookEventType[];
|
|
1040
1001
|
}
|
|
1041
1002
|
|
|
1042
|
-
export interface
|
|
1043
|
-
|
|
1044
|
-
maxSlippageBps?: number;
|
|
1045
|
-
completionTimeoutSecs?: number;
|
|
1003
|
+
export interface RegisterWebhookResponse {
|
|
1004
|
+
webhookId: string;
|
|
1046
1005
|
}
|
|
1047
1006
|
|
|
1048
|
-
export interface
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1007
|
+
export interface RestClient {
|
|
1008
|
+
getRequest(url: string, headers?: Record<string, string>): Promise<RestResponse>;
|
|
1009
|
+
postRequest(url: string, headers?: Record<string, string>, body?: string): Promise<RestResponse>;
|
|
1010
|
+
deleteRequest(url: string, headers?: Record<string, string>, body?: string): Promise<RestResponse>;
|
|
1052
1011
|
}
|
|
1053
1012
|
|
|
1054
|
-
export interface
|
|
1013
|
+
export interface RestResponse {
|
|
1014
|
+
status: number;
|
|
1015
|
+
body: string;
|
|
1016
|
+
}
|
|
1055
1017
|
|
|
1056
|
-
export
|
|
1018
|
+
export interface SchnorrSignatureBytes {
|
|
1019
|
+
bytes: number[];
|
|
1020
|
+
}
|
|
1057
1021
|
|
|
1058
|
-
export interface
|
|
1059
|
-
|
|
1060
|
-
amountIn: bigint;
|
|
1061
|
-
amountOut: bigint;
|
|
1062
|
-
fee: bigint;
|
|
1063
|
-
amountAdjustment?: AmountAdjustmentReason;
|
|
1022
|
+
export interface SecretBytes {
|
|
1023
|
+
bytes: number[];
|
|
1064
1024
|
}
|
|
1065
1025
|
|
|
1066
|
-
export interface
|
|
1067
|
-
id:
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1026
|
+
export interface SendOnchainFeeQuote {
|
|
1027
|
+
id: string;
|
|
1028
|
+
expiresAt: number;
|
|
1029
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
1030
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
1031
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
1071
1032
|
}
|
|
1072
1033
|
|
|
1073
|
-
export interface
|
|
1074
|
-
|
|
1034
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
1035
|
+
userFeeSat: number;
|
|
1036
|
+
l1BroadcastFeeSat: number;
|
|
1075
1037
|
}
|
|
1076
1038
|
|
|
1077
|
-
export interface
|
|
1078
|
-
|
|
1039
|
+
export interface SendPaymentRequest {
|
|
1040
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
1041
|
+
options?: SendPaymentOptions;
|
|
1042
|
+
idempotencyKey?: string;
|
|
1079
1043
|
}
|
|
1080
1044
|
|
|
1081
|
-
export
|
|
1045
|
+
export interface SendPaymentResponse {
|
|
1046
|
+
payment: Payment;
|
|
1047
|
+
}
|
|
1082
1048
|
|
|
1083
|
-
export
|
|
1049
|
+
export interface SetLnurlMetadataItem {
|
|
1050
|
+
paymentHash: string;
|
|
1051
|
+
senderComment?: string;
|
|
1052
|
+
nostrZapRequest?: string;
|
|
1053
|
+
nostrZapReceipt?: string;
|
|
1054
|
+
}
|
|
1084
1055
|
|
|
1085
|
-
export
|
|
1056
|
+
export interface SignMessageRequest {
|
|
1057
|
+
message: string;
|
|
1058
|
+
compact: boolean;
|
|
1059
|
+
}
|
|
1086
1060
|
|
|
1087
|
-
export interface
|
|
1088
|
-
|
|
1061
|
+
export interface SignMessageResponse {
|
|
1062
|
+
pubkey: string;
|
|
1063
|
+
signature: string;
|
|
1089
1064
|
}
|
|
1090
1065
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
* @example
|
|
1097
|
-
* ```typescript
|
|
1098
|
-
* class BrowserPasskeyPrfProvider implements PasskeyPrfProvider {
|
|
1099
|
-
* async derivePrfSeed(salt: string): Promise<Uint8Array> {
|
|
1100
|
-
* const credential = await navigator.credentials.get({
|
|
1101
|
-
* publicKey: {
|
|
1102
|
-
* challenge: new Uint8Array(32),
|
|
1103
|
-
* rpId: window.location.hostname,
|
|
1104
|
-
* allowCredentials: [], // or specific credential IDs
|
|
1105
|
-
* extensions: {
|
|
1106
|
-
* prf: { eval: { first: new TextEncoder().encode(salt) } }
|
|
1107
|
-
* }
|
|
1108
|
-
* }
|
|
1109
|
-
* });
|
|
1110
|
-
* const results = credential.getClientExtensionResults();
|
|
1111
|
-
* return new Uint8Array(results.prf.results.first);
|
|
1112
|
-
* }
|
|
1113
|
-
*
|
|
1114
|
-
* async isPrfAvailable(): Promise<boolean> {
|
|
1115
|
-
* return window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable?.() ?? false;
|
|
1116
|
-
* }
|
|
1117
|
-
* }
|
|
1118
|
-
* ```
|
|
1119
|
-
*/
|
|
1120
|
-
export interface PasskeyPrfProvider {
|
|
1121
|
-
/**
|
|
1122
|
-
* Derive a 32-byte seed from passkey PRF with the given salt.
|
|
1123
|
-
*
|
|
1124
|
-
* The platform authenticates the user via passkey and evaluates the PRF extension.
|
|
1125
|
-
* The salt is used as input to the PRF to derive a deterministic output.
|
|
1126
|
-
*
|
|
1127
|
-
* @param salt - The salt string to use for PRF evaluation
|
|
1128
|
-
* @returns A Promise resolving to the 32-byte PRF output
|
|
1129
|
-
* @throws If authentication fails or PRF is not supported
|
|
1130
|
-
*/
|
|
1131
|
-
derivePrfSeed(salt: string): Promise<Uint8Array>;
|
|
1066
|
+
export interface SilentPaymentAddressDetails {
|
|
1067
|
+
address: string;
|
|
1068
|
+
network: BitcoinNetwork;
|
|
1069
|
+
source: PaymentRequestSource;
|
|
1070
|
+
}
|
|
1132
1071
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
* @returns A Promise resolving to true if PRF-capable passkey is available
|
|
1139
|
-
*/
|
|
1140
|
-
isPrfAvailable(): Promise<boolean>;
|
|
1072
|
+
export interface SparkAddressDetails {
|
|
1073
|
+
address: string;
|
|
1074
|
+
identityPublicKey: string;
|
|
1075
|
+
network: BitcoinNetwork;
|
|
1076
|
+
source: PaymentRequestSource;
|
|
1141
1077
|
}
|
|
1142
1078
|
|
|
1143
|
-
export interface
|
|
1144
|
-
|
|
1079
|
+
export interface SparkConfig {
|
|
1080
|
+
coordinatorIdentifier: string;
|
|
1081
|
+
threshold: number;
|
|
1082
|
+
signingOperators: SparkSigningOperator[];
|
|
1083
|
+
sspConfig: SparkSspConfig;
|
|
1084
|
+
expectedWithdrawBondSats: number;
|
|
1085
|
+
expectedWithdrawRelativeBlockLocktime: number;
|
|
1145
1086
|
}
|
|
1146
1087
|
|
|
1147
|
-
export interface
|
|
1148
|
-
|
|
1149
|
-
|
|
1088
|
+
export interface SparkHtlcDetails {
|
|
1089
|
+
paymentHash: string;
|
|
1090
|
+
preimage?: string;
|
|
1091
|
+
expiryTime: number;
|
|
1092
|
+
status: SparkHtlcStatus;
|
|
1150
1093
|
}
|
|
1151
1094
|
|
|
1152
|
-
export interface
|
|
1095
|
+
export interface SparkHtlcOptions {
|
|
1096
|
+
paymentHash: string;
|
|
1097
|
+
expiryDurationSecs: number;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
export interface SparkInvoiceDetails {
|
|
1101
|
+
invoice: string;
|
|
1102
|
+
identityPublicKey: string;
|
|
1103
|
+
network: BitcoinNetwork;
|
|
1104
|
+
amount?: string;
|
|
1105
|
+
tokenIdentifier?: string;
|
|
1106
|
+
expiryTime?: number;
|
|
1107
|
+
description?: string;
|
|
1108
|
+
senderPublicKey?: string;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
export interface SparkInvoicePaymentDetails {
|
|
1112
|
+
description?: string;
|
|
1113
|
+
invoice: string;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
export interface SparkSigningOperator {
|
|
1117
|
+
id: number;
|
|
1118
|
+
identifier: string;
|
|
1119
|
+
address: string;
|
|
1120
|
+
identityPublicKey: string;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
export interface SparkSspConfig {
|
|
1124
|
+
baseUrl: string;
|
|
1125
|
+
identityPublicKey: string;
|
|
1126
|
+
schemaEndpoint?: string;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
export interface SparkStatus {
|
|
1130
|
+
status: ServiceStatus;
|
|
1131
|
+
lastUpdated: number;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
export interface StableBalanceConfig {
|
|
1135
|
+
tokens: StableBalanceToken[];
|
|
1136
|
+
defaultActiveLabel?: string;
|
|
1137
|
+
thresholdSats?: number;
|
|
1138
|
+
maxSlippageBps?: number;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
export interface StableBalanceToken {
|
|
1142
|
+
label: string;
|
|
1143
|
+
tokenIdentifier: string;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
export interface Storage {
|
|
1147
|
+
getCachedItem: (key: string) => Promise<string | null>;
|
|
1148
|
+
setCachedItem: (key: string, value: string) => Promise<void>;
|
|
1149
|
+
deleteCachedItem: (key: string) => Promise<void>;
|
|
1150
|
+
listPayments: (request: StorageListPaymentsRequest) => Promise<Payment[]>;
|
|
1151
|
+
insertPayment: (payment: Payment) => Promise<void>;
|
|
1152
|
+
insertPaymentMetadata: (paymentId: string, metadata: PaymentMetadata) => Promise<void>;
|
|
1153
|
+
getPaymentById: (id: string) => Promise<Payment>;
|
|
1154
|
+
getPaymentByInvoice: (invoice: string) => Promise<Payment>;
|
|
1155
|
+
addDeposit: (txid: string, vout: number, amount_sats: number, isMature: boolean) => Promise<void>;
|
|
1156
|
+
deleteDeposit: (txid: string, vout: number) => Promise<void>;
|
|
1157
|
+
listDeposits: () => Promise<DepositInfo[]>;
|
|
1158
|
+
updateDeposit: (txid: string, vout: number, payload: UpdateDepositPayload) => Promise<void>;
|
|
1159
|
+
setLnurlMetadata: (metadata: SetLnurlMetadataItem[]) => Promise<void>;
|
|
1160
|
+
getPaymentsByParentIds: (parentPaymentIds: string[]) => Promise<{ [parentId: string]: RelatedPayment[] }>;
|
|
1161
|
+
listContacts: (request: ListContactsRequest) => Promise<Contact[]>;
|
|
1162
|
+
getContact: (id: string) => Promise<Contact>;
|
|
1163
|
+
insertContact: (contact: Contact) => Promise<void>;
|
|
1164
|
+
deleteContact: (id: string) => Promise<void>;
|
|
1165
|
+
syncAddOutgoingChange: (record: UnversionedRecordChange) => Promise<number>;
|
|
1166
|
+
syncCompleteOutgoingSync: (record: Record) => Promise<void>;
|
|
1167
|
+
syncGetPendingOutgoingChanges: (limit: number) => Promise<OutgoingChange[]>;
|
|
1168
|
+
syncGetLastRevision: () => Promise<number>;
|
|
1169
|
+
syncInsertIncomingRecords: (records: Record[]) => Promise<void>;
|
|
1170
|
+
syncDeleteIncomingRecord: (record: Record) => Promise<void>;
|
|
1171
|
+
syncGetIncomingRecords: (limit: number) => Promise<IncomingChange[]>;
|
|
1172
|
+
syncGetLatestOutgoingChange: () => Promise<OutgoingChange | null>;
|
|
1173
|
+
syncUpdateRecordFromIncoming: (record: Record) => Promise<void>;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export interface StorageListPaymentsRequest {
|
|
1177
|
+
typeFilter?: PaymentType[];
|
|
1178
|
+
statusFilter?: PaymentStatus[];
|
|
1179
|
+
assetFilter?: AssetFilter;
|
|
1180
|
+
paymentDetailsFilter?: StoragePaymentDetailsFilter[];
|
|
1181
|
+
fromTimestamp?: number;
|
|
1182
|
+
toTimestamp?: number;
|
|
1183
|
+
offset?: number;
|
|
1184
|
+
limit?: number;
|
|
1185
|
+
sortAscending?: boolean;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
export interface Symbol {
|
|
1189
|
+
grapheme?: string;
|
|
1190
|
+
template?: string;
|
|
1191
|
+
rtl?: boolean;
|
|
1192
|
+
position?: number;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
export interface SyncWalletRequest {}
|
|
1196
|
+
|
|
1197
|
+
export interface SyncWalletResponse {}
|
|
1198
|
+
|
|
1199
|
+
export interface TokenBalance {
|
|
1200
|
+
balance: bigint;
|
|
1201
|
+
tokenMetadata: TokenMetadata;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
export interface TokenMetadata {
|
|
1205
|
+
identifier: string;
|
|
1206
|
+
issuerPublicKey: string;
|
|
1153
1207
|
name: string;
|
|
1154
1208
|
ticker: string;
|
|
1155
1209
|
decimals: number;
|
|
1210
|
+
maxSupply: string;
|
|
1156
1211
|
isFreezable: boolean;
|
|
1157
|
-
maxSupply: bigint;
|
|
1158
1212
|
}
|
|
1159
1213
|
|
|
1160
|
-
export interface
|
|
1214
|
+
export interface TxStatus {
|
|
1215
|
+
confirmed: boolean;
|
|
1216
|
+
blockHeight?: number;
|
|
1217
|
+
blockTime?: number;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export interface UnfreezeIssuerTokenRequest {
|
|
1161
1221
|
address: string;
|
|
1162
1222
|
}
|
|
1163
1223
|
|
|
1164
|
-
export interface
|
|
1224
|
+
export interface UnfreezeIssuerTokenResponse {
|
|
1165
1225
|
impactedOutputIds: string[];
|
|
1166
1226
|
impactedTokenAmount: bigint;
|
|
1167
1227
|
}
|
|
1168
1228
|
|
|
1169
|
-
export interface
|
|
1170
|
-
|
|
1229
|
+
export interface UnregisterWebhookRequest {
|
|
1230
|
+
webhookId: string;
|
|
1171
1231
|
}
|
|
1172
1232
|
|
|
1173
|
-
export interface
|
|
1174
|
-
|
|
1233
|
+
export interface UnversionedRecordChange {
|
|
1234
|
+
id: RecordId;
|
|
1235
|
+
schemaVersion: string;
|
|
1236
|
+
updatedFields: Map<string, string>;
|
|
1175
1237
|
}
|
|
1176
1238
|
|
|
1177
|
-
export interface
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1239
|
+
export interface UpdateContactRequest {
|
|
1240
|
+
id: string;
|
|
1241
|
+
name: string;
|
|
1242
|
+
paymentIdentifier: string;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
export interface UpdateUserSettingsRequest {
|
|
1246
|
+
sparkPrivateModeEnabled?: boolean;
|
|
1247
|
+
stableBalanceActiveLabel?: StableBalanceActiveLabel;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
export interface UrlSuccessActionData {
|
|
1251
|
+
description: string;
|
|
1252
|
+
url: string;
|
|
1253
|
+
matchesCallbackDomain: boolean;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
export interface UserSettings {
|
|
1257
|
+
sparkPrivateModeEnabled: boolean;
|
|
1258
|
+
stableBalanceActiveLabel?: string;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
export interface Utxo {
|
|
1262
|
+
txid: string;
|
|
1263
|
+
vout: number;
|
|
1264
|
+
value: number;
|
|
1265
|
+
status: TxStatus;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
export interface Webhook {
|
|
1269
|
+
id: string;
|
|
1270
|
+
url: string;
|
|
1271
|
+
eventTypes: WebhookEventType[];
|
|
1198
1272
|
}
|
|
1199
1273
|
|
|
1200
|
-
export
|
|
1201
|
-
|
|
1202
|
-
}
|
|
1274
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
1275
|
+
|
|
1276
|
+
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
1277
|
+
|
|
1278
|
+
export type AmountAdjustmentReason = "flooredToMinLimit" | "increasedToAvoidDust";
|
|
1279
|
+
|
|
1280
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
1281
|
+
|
|
1282
|
+
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
1283
|
+
|
|
1284
|
+
export type BuyBitcoinRequest = { type: "moonpay"; lockedAmountSat?: number; redirectUrl?: string } | { type: "cashApp"; amountSats: number };
|
|
1285
|
+
|
|
1286
|
+
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
1287
|
+
|
|
1288
|
+
export type ConversionPurpose = { type: "ongoingPayment"; paymentRequest: string } | { type: "selfTransfer" } | { type: "autoConversion" };
|
|
1289
|
+
|
|
1290
|
+
export type ConversionStatus = "pending" | "completed" | "failed" | "refundNeeded" | "refunded";
|
|
1291
|
+
|
|
1292
|
+
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
1293
|
+
|
|
1294
|
+
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 };
|
|
1295
|
+
|
|
1296
|
+
export type ExternalSecretSource = { type: "derived"; nodeId: ExternalTreeNodeId } | { type: "encrypted"; key: ExternalEncryptedSecret };
|
|
1297
|
+
|
|
1298
|
+
export type ExternalSecretToSplit = { type: "secretSource"; source: ExternalSecretSource } | { type: "preimage"; data: number[] };
|
|
1299
|
+
|
|
1300
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
1301
|
+
|
|
1302
|
+
export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
1303
|
+
|
|
1304
|
+
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);
|
|
1203
1305
|
|
|
1204
|
-
export
|
|
1205
|
-
bytes: number[];
|
|
1206
|
-
}
|
|
1306
|
+
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
1207
1307
|
|
|
1208
|
-
export type
|
|
1308
|
+
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
1209
1309
|
|
|
1210
|
-
export
|
|
1211
|
-
bytes: number[];
|
|
1212
|
-
}
|
|
1310
|
+
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
1213
1311
|
|
|
1214
|
-
export
|
|
1215
|
-
identifier: ExternalIdentifier;
|
|
1216
|
-
commitment: ExternalSigningCommitments;
|
|
1217
|
-
}
|
|
1312
|
+
export type Network = "mainnet" | "regtest";
|
|
1218
1313
|
|
|
1219
|
-
export
|
|
1220
|
-
hiding: number[];
|
|
1221
|
-
binding: number[];
|
|
1222
|
-
}
|
|
1314
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
1223
1315
|
|
|
1224
|
-
export
|
|
1225
|
-
id: string;
|
|
1226
|
-
}
|
|
1316
|
+
export type OptimizationEvent = { type: "started"; totalRounds: number } | { type: "roundCompleted"; currentRound: number; totalRounds: number } | { type: "completed" } | { type: "cancelled" } | { type: "failed"; error: string } | { type: "skipped" };
|
|
1227
1317
|
|
|
1228
|
-
export
|
|
1229
|
-
identifier: ExternalIdentifier;
|
|
1230
|
-
signature: ExternalFrostSignatureShare;
|
|
1231
|
-
}
|
|
1318
|
+
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 };
|
|
1232
1319
|
|
|
1233
|
-
export
|
|
1234
|
-
ciphertext: number[];
|
|
1235
|
-
}
|
|
1320
|
+
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
1236
1321
|
|
|
1237
|
-
export
|
|
1238
|
-
bytes: number[];
|
|
1239
|
-
}
|
|
1322
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
1240
1323
|
|
|
1241
|
-
export type
|
|
1324
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
1242
1325
|
|
|
1243
|
-
export
|
|
1244
|
-
bytes: number[];
|
|
1245
|
-
}
|
|
1326
|
+
export type PaymentType = "send" | "receive";
|
|
1246
1327
|
|
|
1247
|
-
export
|
|
1248
|
-
bytes: number[];
|
|
1249
|
-
}
|
|
1328
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
1250
1329
|
|
|
1251
|
-
export
|
|
1252
|
-
message: number[];
|
|
1253
|
-
statechainSignatures: IdentifierSignaturePair[];
|
|
1254
|
-
statechainPublicKeys: IdentifierPublicKeyPair[];
|
|
1255
|
-
verifyingKey: number[];
|
|
1256
|
-
statechainCommitments: IdentifierCommitmentPair[];
|
|
1257
|
-
selfCommitment: ExternalSigningCommitments;
|
|
1258
|
-
publicKey: number[];
|
|
1259
|
-
selfSignature: ExternalFrostSignatureShare;
|
|
1260
|
-
adaptorPublicKey?: number[];
|
|
1261
|
-
}
|
|
1330
|
+
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: string; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress"; newAddress?: boolean } | { type: "bolt11Invoice"; description: string; amountSats?: number; expirySecs?: number; paymentHash?: string };
|
|
1262
1331
|
|
|
1263
|
-
export
|
|
1264
|
-
message: number[];
|
|
1265
|
-
publicKey: number[];
|
|
1266
|
-
secret: ExternalSecretSource;
|
|
1267
|
-
verifyingKey: number[];
|
|
1268
|
-
selfNonceCommitment: ExternalFrostCommitments;
|
|
1269
|
-
statechainCommitments: IdentifierCommitmentPair[];
|
|
1270
|
-
adaptorPublicKey?: number[];
|
|
1271
|
-
}
|
|
1332
|
+
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 } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo } | { type: "newDeposits"; newDeposits: DepositInfo[] };
|
|
1272
1333
|
|
|
1273
|
-
export
|
|
1274
|
-
hidingCommitment: number[];
|
|
1275
|
-
bindingCommitment: number[];
|
|
1276
|
-
noncesCiphertext: number[];
|
|
1277
|
-
}
|
|
1334
|
+
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
1278
1335
|
|
|
1279
|
-
export
|
|
1280
|
-
secretShare: ExternalSecretShare;
|
|
1281
|
-
proofs: number[][];
|
|
1282
|
-
}
|
|
1336
|
+
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 };
|
|
1283
1337
|
|
|
1284
|
-
export
|
|
1285
|
-
bytes: number[];
|
|
1286
|
-
}
|
|
1338
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number } | { type: "sparkAddress"; htlcOptions?: SparkHtlcOptions };
|
|
1287
1339
|
|
|
1288
|
-
export
|
|
1289
|
-
bytes: number[];
|
|
1290
|
-
}
|
|
1340
|
+
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
1291
1341
|
|
|
1292
|
-
export
|
|
1293
|
-
threshold: number;
|
|
1294
|
-
index: ExternalScalar;
|
|
1295
|
-
share: ExternalScalar;
|
|
1296
|
-
}
|
|
1342
|
+
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
1297
1343
|
|
|
1298
|
-
export
|
|
1299
|
-
bytes: number[];
|
|
1300
|
-
}
|
|
1344
|
+
export type StableBalanceActiveLabel = { type: "set"; label: string } | { type: "unset" };
|
|
1301
1345
|
|
|
1302
|
-
export
|
|
1303
|
-
bytes: number[];
|
|
1304
|
-
}
|
|
1346
|
+
export type StoragePaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
1305
1347
|
|
|
1306
|
-
export
|
|
1307
|
-
identifier: ExternalIdentifier;
|
|
1308
|
-
publicKey: number[];
|
|
1309
|
-
}
|
|
1348
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
1310
1349
|
|
|
1311
|
-
export
|
|
1312
|
-
bytes: number[];
|
|
1313
|
-
}
|
|
1350
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
1314
1351
|
|
|
1315
|
-
|
|
1316
|
-
* A wallet derived from a passkey.
|
|
1317
|
-
*/
|
|
1318
|
-
export interface Wallet {
|
|
1319
|
-
/**
|
|
1320
|
-
* The derived seed.
|
|
1321
|
-
*/
|
|
1322
|
-
seed: Seed;
|
|
1323
|
-
/**
|
|
1324
|
-
* The label used for derivation.
|
|
1325
|
-
*/
|
|
1326
|
-
label: string;
|
|
1327
|
-
}
|
|
1352
|
+
export type TokenTransactionType = "transfer" | "mint" | "burn";
|
|
1328
1353
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
1333
|
-
*/
|
|
1334
|
-
export interface NostrRelayConfig {
|
|
1335
|
-
/**
|
|
1336
|
-
* Optional Breez API key for authenticated access to the Breez relay.
|
|
1337
|
-
* When provided, the Breez relay is added and NIP-42 authentication is enabled.
|
|
1338
|
-
*/
|
|
1339
|
-
breezApiKey?: string;
|
|
1340
|
-
/**
|
|
1341
|
-
* Connection timeout in seconds. Defaults to 30 when `None`.
|
|
1342
|
-
*/
|
|
1343
|
-
timeoutSecs?: number;
|
|
1344
|
-
}
|
|
1354
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
1355
|
+
|
|
1356
|
+
export type WebhookEventType = { type: "lightningReceiveFinished" } | { type: "lightningSendFinished" } | { type: "coopExitFinished" } | { type: "staticDepositFinished" } | ({ type: "unknown" } & string);
|
|
1345
1357
|
|
|
1346
|
-
export interface Storage {
|
|
1347
|
-
getCachedItem: (key: string) => Promise<string | null>;
|
|
1348
|
-
setCachedItem: (key: string, value: string) => Promise<void>;
|
|
1349
|
-
deleteCachedItem: (key: string) => Promise<void>;
|
|
1350
|
-
listPayments: (request: StorageListPaymentsRequest) => Promise<Payment[]>;
|
|
1351
|
-
insertPayment: (payment: Payment) => Promise<void>;
|
|
1352
|
-
insertPaymentMetadata: (paymentId: string, metadata: PaymentMetadata) => Promise<void>;
|
|
1353
|
-
getPaymentById: (id: string) => Promise<Payment>;
|
|
1354
|
-
getPaymentByInvoice: (invoice: string) => Promise<Payment>;
|
|
1355
|
-
addDeposit: (txid: string, vout: number, amount_sats: number, isMature: boolean) => Promise<void>;
|
|
1356
|
-
deleteDeposit: (txid: string, vout: number) => Promise<void>;
|
|
1357
|
-
listDeposits: () => Promise<DepositInfo[]>;
|
|
1358
|
-
updateDeposit: (txid: string, vout: number, payload: UpdateDepositPayload) => Promise<void>;
|
|
1359
|
-
setLnurlMetadata: (metadata: SetLnurlMetadataItem[]) => Promise<void>;
|
|
1360
|
-
getPaymentsByParentIds: (parentPaymentIds: string[]) => Promise<{ [parentId: string]: RelatedPayment[] }>;
|
|
1361
|
-
listContacts: (request: ListContactsRequest) => Promise<Contact[]>;
|
|
1362
|
-
getContact: (id: string) => Promise<Contact>;
|
|
1363
|
-
insertContact: (contact: Contact) => Promise<void>;
|
|
1364
|
-
deleteContact: (id: string) => Promise<void>;
|
|
1365
|
-
syncAddOutgoingChange: (record: UnversionedRecordChange) => Promise<number>;
|
|
1366
|
-
syncCompleteOutgoingSync: (record: Record) => Promise<void>;
|
|
1367
|
-
syncGetPendingOutgoingChanges: (limit: number) => Promise<OutgoingChange[]>;
|
|
1368
|
-
syncGetLastRevision: () => Promise<number>;
|
|
1369
|
-
syncInsertIncomingRecords: (records: Record[]) => Promise<void>;
|
|
1370
|
-
syncDeleteIncomingRecord: (record: Record) => Promise<void>;
|
|
1371
|
-
syncGetIncomingRecords: (limit: number) => Promise<IncomingChange[]>;
|
|
1372
|
-
syncGetLatestOutgoingChange: () => Promise<OutgoingChange | null>;
|
|
1373
|
-
syncUpdateRecordFromIncoming: (record: Record) => Promise<void>;
|
|
1374
|
-
}
|
|
1375
1358
|
|
|
1376
1359
|
export class BreezSdk {
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1360
|
+
private constructor();
|
|
1361
|
+
free(): void;
|
|
1362
|
+
[Symbol.dispose](): void;
|
|
1363
|
+
addContact(request: AddContactRequest): Promise<Contact>;
|
|
1364
|
+
addEventListener(listener: EventListener): Promise<string>;
|
|
1365
|
+
buyBitcoin(request: BuyBitcoinRequest): Promise<BuyBitcoinResponse>;
|
|
1366
|
+
cancelLeafOptimization(): Promise<void>;
|
|
1367
|
+
checkLightningAddressAvailable(request: CheckLightningAddressRequest): Promise<boolean>;
|
|
1368
|
+
checkMessage(request: CheckMessageRequest): Promise<CheckMessageResponse>;
|
|
1369
|
+
claimDeposit(request: ClaimDepositRequest): Promise<ClaimDepositResponse>;
|
|
1370
|
+
claimHtlcPayment(request: ClaimHtlcPaymentRequest): Promise<ClaimHtlcPaymentResponse>;
|
|
1371
|
+
deleteContact(id: string): Promise<void>;
|
|
1372
|
+
deleteLightningAddress(): Promise<void>;
|
|
1373
|
+
disconnect(): Promise<void>;
|
|
1374
|
+
fetchConversionLimits(request: FetchConversionLimitsRequest): Promise<FetchConversionLimitsResponse>;
|
|
1375
|
+
getInfo(request: GetInfoRequest): Promise<GetInfoResponse>;
|
|
1376
|
+
getLeafOptimizationProgress(): OptimizationProgress;
|
|
1377
|
+
getLightningAddress(): Promise<LightningAddressInfo | undefined>;
|
|
1378
|
+
getPayment(request: GetPaymentRequest): Promise<GetPaymentResponse>;
|
|
1379
|
+
getTokenIssuer(): TokenIssuer;
|
|
1380
|
+
getTokensMetadata(request: GetTokensMetadataRequest): Promise<GetTokensMetadataResponse>;
|
|
1381
|
+
getUserSettings(): Promise<UserSettings>;
|
|
1382
|
+
listContacts(request: ListContactsRequest): Promise<Contact[]>;
|
|
1383
|
+
listFiatCurrencies(): Promise<ListFiatCurrenciesResponse>;
|
|
1384
|
+
listFiatRates(): Promise<ListFiatRatesResponse>;
|
|
1385
|
+
listPayments(request: ListPaymentsRequest): Promise<ListPaymentsResponse>;
|
|
1386
|
+
listUnclaimedDeposits(request: ListUnclaimedDepositsRequest): Promise<ListUnclaimedDepositsResponse>;
|
|
1387
|
+
listWebhooks(): Promise<Webhook[]>;
|
|
1388
|
+
lnurlAuth(request_data: LnurlAuthRequestDetails): Promise<LnurlCallbackStatus>;
|
|
1389
|
+
lnurlPay(request: LnurlPayRequest): Promise<LnurlPayResponse>;
|
|
1390
|
+
lnurlWithdraw(request: LnurlWithdrawRequest): Promise<LnurlWithdrawResponse>;
|
|
1391
|
+
parse(input: string): Promise<InputType>;
|
|
1392
|
+
prepareLnurlPay(request: PrepareLnurlPayRequest): Promise<PrepareLnurlPayResponse>;
|
|
1393
|
+
prepareSendPayment(request: PrepareSendPaymentRequest): Promise<PrepareSendPaymentResponse>;
|
|
1394
|
+
receivePayment(request: ReceivePaymentRequest): Promise<ReceivePaymentResponse>;
|
|
1395
|
+
recommendedFees(): Promise<RecommendedFees>;
|
|
1396
|
+
refundDeposit(request: RefundDepositRequest): Promise<RefundDepositResponse>;
|
|
1397
|
+
registerLightningAddress(request: RegisterLightningAddressRequest): Promise<LightningAddressInfo>;
|
|
1398
|
+
registerWebhook(request: RegisterWebhookRequest): Promise<RegisterWebhookResponse>;
|
|
1399
|
+
removeEventListener(id: string): Promise<boolean>;
|
|
1400
|
+
sendPayment(request: SendPaymentRequest): Promise<SendPaymentResponse>;
|
|
1401
|
+
signMessage(request: SignMessageRequest): Promise<SignMessageResponse>;
|
|
1402
|
+
startLeafOptimization(): Promise<void>;
|
|
1403
|
+
syncWallet(request: SyncWalletRequest): Promise<SyncWalletResponse>;
|
|
1404
|
+
unregisterWebhook(request: UnregisterWebhookRequest): Promise<void>;
|
|
1405
|
+
updateContact(request: UpdateContactRequest): Promise<Contact>;
|
|
1406
|
+
updateUserSettings(request: UpdateUserSettingsRequest): Promise<void>;
|
|
1423
1407
|
}
|
|
1408
|
+
|
|
1424
1409
|
/**
|
|
1425
1410
|
* A default signer implementation that wraps the core SDK's ExternalSigner.
|
|
1426
1411
|
* This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
|
|
1427
1412
|
*/
|
|
1428
1413
|
export class DefaultSigner {
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1414
|
+
private constructor();
|
|
1415
|
+
free(): void;
|
|
1416
|
+
[Symbol.dispose](): void;
|
|
1417
|
+
aggregateFrost(request: ExternalAggregateFrostRequest): Promise<ExternalFrostSignature>;
|
|
1418
|
+
decryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
1419
|
+
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
1420
|
+
encryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
1421
|
+
encryptPrivateKeyForReceiver(private_key: ExternalEncryptedSecret, receiver_public_key: PublicKeyBytes): Promise<Uint8Array>;
|
|
1422
|
+
generateRandomSecret(): Promise<ExternalEncryptedSecret>;
|
|
1423
|
+
generateRandomSigningCommitment(): Promise<ExternalFrostCommitments>;
|
|
1424
|
+
getPublicKeyForNode(id: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
1425
|
+
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
1426
|
+
identityPublicKey(): PublicKeyBytes;
|
|
1427
|
+
publicKeyFromSecret(private_key: ExternalSecretSource): Promise<PublicKeyBytes>;
|
|
1428
|
+
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
1429
|
+
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
1430
|
+
signFrost(request: ExternalSignFrostRequest): Promise<ExternalFrostSignatureShare>;
|
|
1431
|
+
signHashSchnorr(hash: Uint8Array, path: string): Promise<SchnorrSignatureBytes>;
|
|
1432
|
+
splitSecretWithProofs(secret: ExternalSecretToSplit, threshold: number, num_shares: number): Promise<ExternalVerifiableSecretShare[]>;
|
|
1433
|
+
staticDepositSecret(index: number): Promise<SecretBytes>;
|
|
1434
|
+
staticDepositSecretEncrypted(index: number): Promise<ExternalSecretSource>;
|
|
1435
|
+
staticDepositSigningKey(index: number): Promise<PublicKeyBytes>;
|
|
1436
|
+
subtractSecrets(signing_key: ExternalSecretSource, new_signing_key: ExternalSecretSource): Promise<ExternalSecretSource>;
|
|
1451
1437
|
}
|
|
1438
|
+
|
|
1452
1439
|
export class IntoUnderlyingByteSource {
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1440
|
+
private constructor();
|
|
1441
|
+
free(): void;
|
|
1442
|
+
[Symbol.dispose](): void;
|
|
1443
|
+
cancel(): void;
|
|
1444
|
+
pull(controller: ReadableByteStreamController): Promise<any>;
|
|
1445
|
+
start(controller: ReadableByteStreamController): void;
|
|
1446
|
+
readonly autoAllocateChunkSize: number;
|
|
1447
|
+
readonly type: ReadableStreamType;
|
|
1460
1448
|
}
|
|
1449
|
+
|
|
1461
1450
|
export class IntoUnderlyingSink {
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1451
|
+
private constructor();
|
|
1452
|
+
free(): void;
|
|
1453
|
+
[Symbol.dispose](): void;
|
|
1454
|
+
abort(reason: any): Promise<any>;
|
|
1455
|
+
close(): Promise<any>;
|
|
1456
|
+
write(chunk: any): Promise<any>;
|
|
1467
1457
|
}
|
|
1458
|
+
|
|
1468
1459
|
export class IntoUnderlyingSource {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1460
|
+
private constructor();
|
|
1461
|
+
free(): void;
|
|
1462
|
+
[Symbol.dispose](): void;
|
|
1463
|
+
cancel(): void;
|
|
1464
|
+
pull(controller: ReadableStreamDefaultController): Promise<any>;
|
|
1473
1465
|
}
|
|
1466
|
+
|
|
1474
1467
|
/**
|
|
1475
1468
|
* Passkey-based wallet operations using WebAuthn PRF extension.
|
|
1476
1469
|
*
|
|
@@ -1478,222 +1471,266 @@ export class IntoUnderlyingSource {
|
|
|
1478
1471
|
* wallet derivation and label management via Nostr relays.
|
|
1479
1472
|
*/
|
|
1480
1473
|
export class Passkey {
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1474
|
+
free(): void;
|
|
1475
|
+
[Symbol.dispose](): void;
|
|
1476
|
+
/**
|
|
1477
|
+
* Derive a wallet for a given label.
|
|
1478
|
+
*
|
|
1479
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1480
|
+
*
|
|
1481
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1482
|
+
*/
|
|
1483
|
+
getWallet(label?: string | null): Promise<Wallet>;
|
|
1484
|
+
/**
|
|
1485
|
+
* Check if passkey PRF is available on this device.
|
|
1486
|
+
*/
|
|
1487
|
+
isAvailable(): Promise<boolean>;
|
|
1488
|
+
/**
|
|
1489
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1490
|
+
*
|
|
1491
|
+
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1492
|
+
*/
|
|
1493
|
+
listLabels(): Promise<string[]>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Create a new `Passkey` instance.
|
|
1496
|
+
*
|
|
1497
|
+
* @param prfProvider - Platform implementation of passkey PRF operations
|
|
1498
|
+
* @param relayConfig - Optional configuration for Nostr relay connections
|
|
1499
|
+
*/
|
|
1500
|
+
constructor(prf_provider: PasskeyPrfProvider, relay_config?: NostrRelayConfig | null);
|
|
1501
|
+
/**
|
|
1502
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1503
|
+
*
|
|
1504
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1505
|
+
* Requires 1 PRF call.
|
|
1506
|
+
*/
|
|
1507
|
+
storeLabel(label: string): Promise<void>;
|
|
1514
1508
|
}
|
|
1509
|
+
|
|
1515
1510
|
export class SdkBuilder {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1511
|
+
private constructor();
|
|
1512
|
+
free(): void;
|
|
1513
|
+
[Symbol.dispose](): void;
|
|
1514
|
+
build(): Promise<BreezSdk>;
|
|
1515
|
+
static new(config: Config, seed: Seed): SdkBuilder;
|
|
1516
|
+
static newWithSigner(config: Config, signer: ExternalSigner): SdkBuilder;
|
|
1517
|
+
withChainService(chain_service: BitcoinChainService): SdkBuilder;
|
|
1518
|
+
withDefaultStorage(storage_dir: string): Promise<SdkBuilder>;
|
|
1519
|
+
withFiatService(fiat_service: FiatService): SdkBuilder;
|
|
1520
|
+
withKeySet(config: KeySetConfig): SdkBuilder;
|
|
1521
|
+
withLnurlClient(lnurl_client: RestClient): SdkBuilder;
|
|
1522
|
+
withPaymentObserver(payment_observer: PaymentObserver): SdkBuilder;
|
|
1523
|
+
withPostgresBackend(config: PostgresStorageConfig): SdkBuilder;
|
|
1524
|
+
withRestChainService(url: string, api_type: ChainApiType, credentials?: Credentials | null): SdkBuilder;
|
|
1525
|
+
withStorage(storage: Storage): SdkBuilder;
|
|
1530
1526
|
}
|
|
1527
|
+
|
|
1531
1528
|
export class TokenIssuer {
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1529
|
+
private constructor();
|
|
1530
|
+
free(): void;
|
|
1531
|
+
[Symbol.dispose](): void;
|
|
1532
|
+
burnIssuerToken(request: BurnIssuerTokenRequest): Promise<Payment>;
|
|
1533
|
+
createIssuerToken(request: CreateIssuerTokenRequest): Promise<TokenMetadata>;
|
|
1534
|
+
freezeIssuerToken(request: FreezeIssuerTokenRequest): Promise<FreezeIssuerTokenResponse>;
|
|
1535
|
+
getIssuerTokenBalance(): Promise<TokenBalance>;
|
|
1536
|
+
getIssuerTokenMetadata(): Promise<TokenMetadata>;
|
|
1537
|
+
mintIssuerToken(request: MintIssuerTokenRequest): Promise<Payment>;
|
|
1538
|
+
unfreezeIssuerToken(request: UnfreezeIssuerTokenRequest): Promise<UnfreezeIssuerTokenResponse>;
|
|
1541
1539
|
}
|
|
1542
1540
|
|
|
1541
|
+
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
1542
|
+
|
|
1543
|
+
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
1544
|
+
|
|
1545
|
+
export function defaultConfig(network: Network): Config;
|
|
1546
|
+
|
|
1547
|
+
export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* Creates a default PostgreSQL storage configuration with sensible defaults.
|
|
1551
|
+
*
|
|
1552
|
+
* Default values (from pg.Pool):
|
|
1553
|
+
* - `maxPoolSize`: 10
|
|
1554
|
+
* - `createTimeoutSecs`: 0 (no timeout)
|
|
1555
|
+
* - `recycleTimeoutSecs`: 10 (10 seconds idle before disconnect)
|
|
1556
|
+
*/
|
|
1557
|
+
export function defaultPostgresStorageConfig(connection_string: string): PostgresStorageConfig;
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
1561
|
+
*
|
|
1562
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
1563
|
+
*/
|
|
1564
|
+
export function getSparkStatus(): Promise<SparkStatus>;
|
|
1565
|
+
|
|
1566
|
+
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* Entry point invoked by JavaScript in a worker.
|
|
1570
|
+
*/
|
|
1571
|
+
export function task_worker_entry_point(ptr: number): void;
|
|
1572
|
+
|
|
1543
1573
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1544
1574
|
|
|
1545
1575
|
export interface InitOutput {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1576
|
+
readonly memory: WebAssembly.Memory;
|
|
1577
|
+
readonly __wbg_breezsdk_free: (a: number, b: number) => void;
|
|
1578
|
+
readonly __wbg_defaultsigner_free: (a: number, b: number) => void;
|
|
1579
|
+
readonly __wbg_passkey_free: (a: number, b: number) => void;
|
|
1580
|
+
readonly __wbg_sdkbuilder_free: (a: number, b: number) => void;
|
|
1581
|
+
readonly __wbg_tokenissuer_free: (a: number, b: number) => void;
|
|
1582
|
+
readonly breezsdk_addContact: (a: number, b: any) => any;
|
|
1583
|
+
readonly breezsdk_addEventListener: (a: number, b: any) => any;
|
|
1584
|
+
readonly breezsdk_buyBitcoin: (a: number, b: any) => any;
|
|
1585
|
+
readonly breezsdk_cancelLeafOptimization: (a: number) => any;
|
|
1586
|
+
readonly breezsdk_checkLightningAddressAvailable: (a: number, b: any) => any;
|
|
1587
|
+
readonly breezsdk_checkMessage: (a: number, b: any) => any;
|
|
1588
|
+
readonly breezsdk_claimDeposit: (a: number, b: any) => any;
|
|
1589
|
+
readonly breezsdk_claimHtlcPayment: (a: number, b: any) => any;
|
|
1590
|
+
readonly breezsdk_deleteContact: (a: number, b: number, c: number) => any;
|
|
1591
|
+
readonly breezsdk_deleteLightningAddress: (a: number) => any;
|
|
1592
|
+
readonly breezsdk_disconnect: (a: number) => any;
|
|
1593
|
+
readonly breezsdk_fetchConversionLimits: (a: number, b: any) => any;
|
|
1594
|
+
readonly breezsdk_getInfo: (a: number, b: any) => any;
|
|
1595
|
+
readonly breezsdk_getLeafOptimizationProgress: (a: number) => any;
|
|
1596
|
+
readonly breezsdk_getLightningAddress: (a: number) => any;
|
|
1597
|
+
readonly breezsdk_getPayment: (a: number, b: any) => any;
|
|
1598
|
+
readonly breezsdk_getTokenIssuer: (a: number) => number;
|
|
1599
|
+
readonly breezsdk_getTokensMetadata: (a: number, b: any) => any;
|
|
1600
|
+
readonly breezsdk_getUserSettings: (a: number) => any;
|
|
1601
|
+
readonly breezsdk_listContacts: (a: number, b: any) => any;
|
|
1602
|
+
readonly breezsdk_listFiatCurrencies: (a: number) => any;
|
|
1603
|
+
readonly breezsdk_listFiatRates: (a: number) => any;
|
|
1604
|
+
readonly breezsdk_listPayments: (a: number, b: any) => any;
|
|
1605
|
+
readonly breezsdk_listUnclaimedDeposits: (a: number, b: any) => any;
|
|
1606
|
+
readonly breezsdk_listWebhooks: (a: number) => any;
|
|
1607
|
+
readonly breezsdk_lnurlAuth: (a: number, b: any) => any;
|
|
1608
|
+
readonly breezsdk_lnurlPay: (a: number, b: any) => any;
|
|
1609
|
+
readonly breezsdk_lnurlWithdraw: (a: number, b: any) => any;
|
|
1610
|
+
readonly breezsdk_parse: (a: number, b: number, c: number) => any;
|
|
1611
|
+
readonly breezsdk_prepareLnurlPay: (a: number, b: any) => any;
|
|
1612
|
+
readonly breezsdk_prepareSendPayment: (a: number, b: any) => any;
|
|
1613
|
+
readonly breezsdk_receivePayment: (a: number, b: any) => any;
|
|
1614
|
+
readonly breezsdk_recommendedFees: (a: number) => any;
|
|
1615
|
+
readonly breezsdk_refundDeposit: (a: number, b: any) => any;
|
|
1616
|
+
readonly breezsdk_registerLightningAddress: (a: number, b: any) => any;
|
|
1617
|
+
readonly breezsdk_registerWebhook: (a: number, b: any) => any;
|
|
1618
|
+
readonly breezsdk_removeEventListener: (a: number, b: number, c: number) => any;
|
|
1619
|
+
readonly breezsdk_sendPayment: (a: number, b: any) => any;
|
|
1620
|
+
readonly breezsdk_signMessage: (a: number, b: any) => any;
|
|
1621
|
+
readonly breezsdk_startLeafOptimization: (a: number) => any;
|
|
1622
|
+
readonly breezsdk_syncWallet: (a: number, b: any) => any;
|
|
1623
|
+
readonly breezsdk_unregisterWebhook: (a: number, b: any) => any;
|
|
1624
|
+
readonly breezsdk_updateContact: (a: number, b: any) => any;
|
|
1625
|
+
readonly breezsdk_updateUserSettings: (a: number, b: any) => any;
|
|
1626
|
+
readonly connect: (a: any) => any;
|
|
1627
|
+
readonly connectWithSigner: (a: any, b: any, c: number, d: number) => any;
|
|
1628
|
+
readonly defaultConfig: (a: any) => any;
|
|
1629
|
+
readonly defaultExternalSigner: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
|
|
1630
|
+
readonly defaultPostgresStorageConfig: (a: number, b: number) => any;
|
|
1631
|
+
readonly defaultsigner_aggregateFrost: (a: number, b: any) => any;
|
|
1632
|
+
readonly defaultsigner_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
1633
|
+
readonly defaultsigner_derivePublicKey: (a: number, b: number, c: number) => any;
|
|
1634
|
+
readonly defaultsigner_encryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
1635
|
+
readonly defaultsigner_encryptPrivateKeyForReceiver: (a: number, b: any, c: any) => any;
|
|
1636
|
+
readonly defaultsigner_generateRandomSecret: (a: number) => any;
|
|
1637
|
+
readonly defaultsigner_generateRandomSigningCommitment: (a: number) => any;
|
|
1638
|
+
readonly defaultsigner_getPublicKeyForNode: (a: number, b: any) => any;
|
|
1639
|
+
readonly defaultsigner_hmacSha256: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
1640
|
+
readonly defaultsigner_identityPublicKey: (a: number) => [number, number, number];
|
|
1641
|
+
readonly defaultsigner_publicKeyFromSecret: (a: number, b: any) => any;
|
|
1642
|
+
readonly defaultsigner_signEcdsa: (a: number, b: any, c: number, d: number) => any;
|
|
1643
|
+
readonly defaultsigner_signEcdsaRecoverable: (a: number, b: any, c: number, d: number) => any;
|
|
1644
|
+
readonly defaultsigner_signFrost: (a: number, b: any) => any;
|
|
1645
|
+
readonly defaultsigner_signHashSchnorr: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
1646
|
+
readonly defaultsigner_splitSecretWithProofs: (a: number, b: any, c: number, d: number) => any;
|
|
1647
|
+
readonly defaultsigner_staticDepositSecret: (a: number, b: number) => any;
|
|
1648
|
+
readonly defaultsigner_staticDepositSecretEncrypted: (a: number, b: number) => any;
|
|
1649
|
+
readonly defaultsigner_staticDepositSigningKey: (a: number, b: number) => any;
|
|
1650
|
+
readonly defaultsigner_subtractSecrets: (a: number, b: any, c: any) => any;
|
|
1651
|
+
readonly getSparkStatus: () => any;
|
|
1652
|
+
readonly initLogging: (a: any, b: number, c: number) => any;
|
|
1653
|
+
readonly passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
1654
|
+
readonly passkey_isAvailable: (a: number) => any;
|
|
1655
|
+
readonly passkey_listLabels: (a: number) => any;
|
|
1656
|
+
readonly passkey_new: (a: any, b: number) => number;
|
|
1657
|
+
readonly passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
1658
|
+
readonly sdkbuilder_build: (a: number) => any;
|
|
1659
|
+
readonly sdkbuilder_new: (a: any, b: any) => number;
|
|
1660
|
+
readonly sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
|
1661
|
+
readonly sdkbuilder_withChainService: (a: number, b: any) => number;
|
|
1662
|
+
readonly sdkbuilder_withDefaultStorage: (a: number, b: number, c: number) => any;
|
|
1663
|
+
readonly sdkbuilder_withFiatService: (a: number, b: any) => number;
|
|
1664
|
+
readonly sdkbuilder_withKeySet: (a: number, b: any) => number;
|
|
1665
|
+
readonly sdkbuilder_withLnurlClient: (a: number, b: any) => number;
|
|
1666
|
+
readonly sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
|
|
1667
|
+
readonly sdkbuilder_withPostgresBackend: (a: number, b: any) => number;
|
|
1668
|
+
readonly sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
|
|
1669
|
+
readonly sdkbuilder_withStorage: (a: number, b: any) => number;
|
|
1670
|
+
readonly tokenissuer_burnIssuerToken: (a: number, b: any) => any;
|
|
1671
|
+
readonly tokenissuer_createIssuerToken: (a: number, b: any) => any;
|
|
1672
|
+
readonly tokenissuer_freezeIssuerToken: (a: number, b: any) => any;
|
|
1673
|
+
readonly tokenissuer_getIssuerTokenBalance: (a: number) => any;
|
|
1674
|
+
readonly tokenissuer_getIssuerTokenMetadata: (a: number) => any;
|
|
1675
|
+
readonly tokenissuer_mintIssuerToken: (a: number, b: any) => any;
|
|
1676
|
+
readonly tokenissuer_unfreezeIssuerToken: (a: number, b: any) => any;
|
|
1677
|
+
readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
1678
|
+
readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
1679
|
+
readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
1680
|
+
readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
1681
|
+
readonly task_worker_entry_point: (a: number) => [number, number];
|
|
1682
|
+
readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
1683
|
+
readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
1684
|
+
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
1685
|
+
readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
|
|
1686
|
+
readonly intounderlyingbytesource_cancel: (a: number) => void;
|
|
1687
|
+
readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
|
|
1688
|
+
readonly intounderlyingbytesource_start: (a: number, b: any) => void;
|
|
1689
|
+
readonly intounderlyingbytesource_type: (a: number) => number;
|
|
1690
|
+
readonly intounderlyingsink_abort: (a: number, b: any) => any;
|
|
1691
|
+
readonly intounderlyingsink_close: (a: number) => any;
|
|
1692
|
+
readonly intounderlyingsink_write: (a: number, b: any) => any;
|
|
1693
|
+
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
1694
|
+
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
1695
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84: (a: number, b: number, c: any) => [number, number];
|
|
1696
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4: (a: number, b: number, c: any) => [number, number];
|
|
1697
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5: (a: number, b: number, c: any) => [number, number];
|
|
1698
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6: (a: number, b: number, c: any) => [number, number];
|
|
1699
|
+
readonly wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
|
|
1700
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57: (a: number, b: number, c: any) => void;
|
|
1701
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2: (a: number, b: number, c: any) => void;
|
|
1702
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3: (a: number, b: number, c: any) => void;
|
|
1703
|
+
readonly wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7: (a: number, b: number) => void;
|
|
1704
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1705
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1706
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1707
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1708
|
+
readonly __externref_table_alloc: () => number;
|
|
1709
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
1710
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
1711
|
+
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
1712
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
1713
|
+
readonly __wbindgen_start: () => void;
|
|
1678
1714
|
}
|
|
1679
1715
|
|
|
1680
1716
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1717
|
+
|
|
1681
1718
|
/**
|
|
1682
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
1683
|
-
* a precompiled `WebAssembly.Module`.
|
|
1684
|
-
*
|
|
1685
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1686
|
-
*
|
|
1687
|
-
* @returns {InitOutput}
|
|
1688
|
-
*/
|
|
1719
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1720
|
+
* a precompiled `WebAssembly.Module`.
|
|
1721
|
+
*
|
|
1722
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1723
|
+
*
|
|
1724
|
+
* @returns {InitOutput}
|
|
1725
|
+
*/
|
|
1689
1726
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1690
1727
|
|
|
1691
1728
|
/**
|
|
1692
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1693
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1694
|
-
*
|
|
1695
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1696
|
-
*
|
|
1697
|
-
* @returns {Promise<InitOutput>}
|
|
1698
|
-
*/
|
|
1729
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1730
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1731
|
+
*
|
|
1732
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1733
|
+
*
|
|
1734
|
+
* @returns {Promise<InitOutput>}
|
|
1735
|
+
*/
|
|
1699
1736
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|