@breeztech/breez-sdk-spark 0.15.1 → 0.16.1-dev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +511 -215
- package/bundler/breez_sdk_spark_wasm.js +1 -1
- package/bundler/breez_sdk_spark_wasm_bg.js +567 -414
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
- package/bundler/storage/index.js +205 -15
- package/deno/breez_sdk_spark_wasm.d.ts +511 -215
- package/deno/breez_sdk_spark_wasm.js +567 -414
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
- package/nodejs/breez_sdk_spark_wasm.d.ts +511 -215
- package/nodejs/breez_sdk_spark_wasm.js +578 -421
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
- package/nodejs/index.js +10 -10
- package/nodejs/index.mjs +12 -8
- package/nodejs/mysql-session-store/errors.cjs +13 -0
- package/nodejs/{mysql-session-manager → mysql-session-store}/index.cjs +24 -21
- package/nodejs/{mysql-session-manager → mysql-session-store}/migrations.cjs +17 -11
- package/nodejs/mysql-session-store/package.json +9 -0
- package/nodejs/mysql-storage/index.cjs +229 -111
- package/nodejs/mysql-storage/migrations.cjs +37 -2
- package/nodejs/mysql-token-store/index.cjs +99 -79
- package/nodejs/mysql-token-store/migrations.cjs +59 -2
- package/nodejs/mysql-tree-store/index.cjs +15 -9
- package/nodejs/mysql-tree-store/migrations.cjs +16 -2
- package/nodejs/package.json +2 -2
- package/nodejs/postgres-session-store/errors.cjs +13 -0
- package/nodejs/{postgres-session-manager → postgres-session-store}/index.cjs +23 -23
- package/nodejs/{postgres-session-manager → postgres-session-store}/migrations.cjs +14 -14
- package/nodejs/postgres-session-store/package.json +9 -0
- package/nodejs/postgres-storage/index.cjs +174 -107
- package/nodejs/postgres-storage/migrations.cjs +24 -0
- package/nodejs/postgres-token-store/index.cjs +89 -64
- package/nodejs/postgres-token-store/migrations.cjs +44 -0
- package/nodejs/storage/index.cjs +167 -113
- package/nodejs/storage/migrations.cjs +23 -0
- package/package.json +6 -1
- package/ssr/index.js +52 -28
- package/web/breez_sdk_spark_wasm.d.ts +566 -261
- package/web/breez_sdk_spark_wasm.js +567 -414
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
- package/web/passkey-prf-provider/index.d.ts +203 -0
- package/web/passkey-prf-provider/index.js +733 -0
- package/web/storage/index.js +205 -15
- package/nodejs/mysql-session-manager/errors.cjs +0 -13
- package/nodejs/mysql-session-manager/package.json +0 -9
- package/nodejs/postgres-session-manager/errors.cjs +0 -13
- package/nodejs/postgres-session-manager/package.json +0 -9
|
@@ -128,6 +128,20 @@ export interface TokenStore {
|
|
|
128
128
|
now: () => Promise<number>;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* A passkey credential from `register` or `signIn`. `credentialId` is
|
|
133
|
+
* always set. The attestation fields (`userId`, `aaguid`,
|
|
134
|
+
* `backupEligible`) are populated on registration and null on sign-in
|
|
135
|
+
* (an assertion carries no attestation). AAGUID is unverified: a
|
|
136
|
+
* display hint only, never a trust signal.
|
|
137
|
+
*/
|
|
138
|
+
export interface PasskeyCredential {
|
|
139
|
+
credentialId: Uint8Array;
|
|
140
|
+
userId?: Uint8Array;
|
|
141
|
+
aaguid?: Uint8Array;
|
|
142
|
+
backupEligible?: boolean;
|
|
143
|
+
}
|
|
144
|
+
|
|
131
145
|
/**
|
|
132
146
|
* A wallet derived from a passkey.
|
|
133
147
|
*/
|
|
@@ -206,78 +220,171 @@ export interface PostgresStorageConfig {
|
|
|
206
220
|
runMigration?: boolean;
|
|
207
221
|
}
|
|
208
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Configuration for `PasskeyClient`.
|
|
225
|
+
*/
|
|
226
|
+
export interface PasskeyConfig {
|
|
227
|
+
/**
|
|
228
|
+
* Wallet label for `register` / `signIn` when no label is given.
|
|
229
|
+
* Unset falls back to the internal default `\"Default\"`.
|
|
230
|
+
*/
|
|
231
|
+
defaultLabel?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Relying Party and user identity for the built-in provider on the
|
|
234
|
+
* zero-config path.
|
|
235
|
+
*/
|
|
236
|
+
providerOptions?: PasskeyProviderOptions;
|
|
237
|
+
}
|
|
238
|
+
|
|
209
239
|
/**
|
|
210
240
|
* Controls whether MySQL migrations create database-enforced foreign keys.
|
|
211
241
|
*/
|
|
212
242
|
export type MysqlForeignKeyMode = "Enforced" | "Disabled";
|
|
213
243
|
|
|
214
244
|
/**
|
|
215
|
-
* Interface for
|
|
245
|
+
* Interface for PRF (Pseudo-Random Function) operations backing seedless
|
|
246
|
+
* wallet restore.
|
|
216
247
|
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* class BrowserPasskeyPrfProvider implements PasskeyPrfProvider {
|
|
222
|
-
* async derivePrfSeed(salt: string): Promise<Uint8Array> {
|
|
223
|
-
* const credential = await navigator.credentials.get({
|
|
224
|
-
* publicKey: {
|
|
225
|
-
* challenge: new Uint8Array(32),
|
|
226
|
-
* rpId: window.location.hostname,
|
|
227
|
-
* allowCredentials: [], // or specific credential IDs
|
|
228
|
-
* extensions: {
|
|
229
|
-
* prf: { eval: { first: new TextEncoder().encode(salt) } }
|
|
230
|
-
* }
|
|
231
|
-
* }
|
|
232
|
-
* });
|
|
233
|
-
* const results = credential.getClientExtensionResults();
|
|
234
|
-
* return new Uint8Array(results.prf.results.first);
|
|
235
|
-
* }
|
|
236
|
-
*
|
|
237
|
-
* async isPrfAvailable(): Promise<boolean> {
|
|
238
|
-
* return window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable?.() ?? false;
|
|
239
|
-
* }
|
|
240
|
-
* }
|
|
241
|
-
* ```
|
|
248
|
+
* Implemented by the built-in `PasskeyProvider` (browser passkey via the
|
|
249
|
+
* WebAuthn PRF extension); also implementable directly for custom
|
|
250
|
+
* deterministic sources (YubiKey HMAC challenge, FIDO2 hmac-secret, on-disk
|
|
251
|
+
* key material, hardware HSMs).
|
|
242
252
|
*/
|
|
243
|
-
export interface
|
|
253
|
+
export interface PrfProvider {
|
|
244
254
|
/**
|
|
245
|
-
* Derive
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
255
|
+
* Derive 32-byte PRF outputs for one or more salts, in input order.
|
|
256
|
+
* Implementations with bulk capability (WebAuthn dual-salt via
|
|
257
|
+
* `prf.eval.first` + `prf.eval.second`) pack two salts per ceremony
|
|
258
|
+
* where supported; others loop the single-salt path. `options` carries
|
|
259
|
+
* per-call ceremony shapers that built-in providers forward to the OS
|
|
260
|
+
* call and custom providers may ignore.
|
|
249
261
|
*
|
|
250
|
-
* @param
|
|
251
|
-
* @
|
|
252
|
-
* @
|
|
262
|
+
* @param salts - Salt strings in caller order
|
|
263
|
+
* @param options - Optional per-call overrides
|
|
264
|
+
* @returns Promise of the 32-byte outputs in input order plus the
|
|
265
|
+
* credential ID observed in the same assertion (`null` when the
|
|
266
|
+
* provider surfaces none, e.g. sources without an OS picker)
|
|
253
267
|
*/
|
|
254
|
-
|
|
268
|
+
deriveSeeds(salts: string[], options?: DeriveSeedOptions): Promise<DeriveSeedsResult>;
|
|
255
269
|
|
|
256
270
|
/**
|
|
257
|
-
*
|
|
271
|
+
* Optional explicit registration. Platform passkey providers (browser
|
|
272
|
+
* WebAuthn, iOS / Android) implement this to drive the OS create
|
|
273
|
+
* ceremony and return credential metadata (`credentialId`, `userId`,
|
|
274
|
+
* optional `aaguid` / `backupEligible`) callers need for
|
|
275
|
+
* `excludeCredentials` bookkeeping and server-side correlation. Custom
|
|
276
|
+
* providers without a creation step can omit it.
|
|
258
277
|
*
|
|
259
|
-
*
|
|
278
|
+
* `excludeCredentials` lists already-registered IDs; a match raises
|
|
279
|
+
* `PasskeyAlreadyExistsError`.
|
|
260
280
|
*
|
|
261
|
-
* @
|
|
281
|
+
* @throws `PasskeyAlreadyExistsError` when an entry in
|
|
282
|
+
* `excludeCredentials` matches a credential already on the device.
|
|
262
283
|
*/
|
|
263
|
-
|
|
284
|
+
createPasskey?(excludeCredentials: Uint8Array[]): Promise<PasskeyCredential>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Whether this provider can produce PRF outputs on the current
|
|
288
|
+
* device. Hosts gate UX on the result.
|
|
289
|
+
*/
|
|
290
|
+
isSupported(): Promise<boolean>;
|
|
264
291
|
}
|
|
265
292
|
|
|
266
293
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
|
|
294
|
+
* Per-call options passed as the second argument of
|
|
295
|
+
* {@link PrfProvider.deriveSeeds}.
|
|
296
|
+
*/
|
|
297
|
+
export interface DeriveSeedOptions {
|
|
298
|
+
/**
|
|
299
|
+
* Credential IDs the assertion is restricted to, for reauthenticating
|
|
300
|
+
* a known user without an account picker. Empty or unset lets the
|
|
301
|
+
* provider's default apply.
|
|
302
|
+
*/
|
|
303
|
+
allowCredentials?: Uint8Array[];
|
|
304
|
+
/**
|
|
305
|
+
* Fast-fail when no local credential is available. On the web this maps
|
|
306
|
+
* to WebAuthn `mediation: 'immediate'`: `true` opts in where the browser
|
|
307
|
+
* advertises support, `false` uses the standard picker. Unset uses the
|
|
308
|
+
* provider default.
|
|
309
|
+
*/
|
|
310
|
+
preferImmediatelyAvailableCredentials?: boolean;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Returned by {@link PrfProvider.deriveSeeds}: the derived 32-byte outputs
|
|
315
|
+
* in input order plus the credential ID observed in the same assertion.
|
|
316
|
+
* `credentialId` is `null` when the provider does not surface one (custom
|
|
317
|
+
* deterministic sources without an OS picker).
|
|
318
|
+
*/
|
|
319
|
+
export interface DeriveSeedsResult {
|
|
320
|
+
seeds: Uint8Array[];
|
|
321
|
+
credentialId?: Uint8Array | null;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* One-shot capability + configuration probe returned by
|
|
326
|
+
* `PasskeyClient.checkAvailability`. Collapses `isSupported` +
|
|
327
|
+
* `checkDomainAssociation` into one tagged value hosts branch on.
|
|
328
|
+
*/
|
|
329
|
+
export type PasskeyAvailability = { type: "available" } | { type: "prfUnsupported" } | { type: "notAssociated"; source: string; reason: string } | { type: "skipped"; reason: string };
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Relying Party and user identity for the built-in provider on the
|
|
333
|
+
* zero-config path (ignored when you inject your own provider).
|
|
270
334
|
*/
|
|
271
|
-
export interface
|
|
335
|
+
export interface PasskeyProviderOptions {
|
|
336
|
+
/**
|
|
337
|
+
* Relying Party ID. Unset uses the Breez shared RP.
|
|
338
|
+
*/
|
|
339
|
+
rpId?: string;
|
|
272
340
|
/**
|
|
273
|
-
*
|
|
274
|
-
* When provided, the Breez relay is added and NIP-42 authentication is enabled.
|
|
341
|
+
* Relying Party name. Unset uses the SDK default (`\"Breez\"`).
|
|
275
342
|
*/
|
|
276
|
-
|
|
343
|
+
rpName?: string;
|
|
277
344
|
/**
|
|
278
|
-
*
|
|
345
|
+
* `user.name`: the account identifier the picker shows beneath the
|
|
346
|
+
* display name (e.g. `john@doe.com`). Unset uses `rpName`.
|
|
279
347
|
*/
|
|
280
|
-
|
|
348
|
+
userName?: string;
|
|
349
|
+
/**
|
|
350
|
+
* `user.displayName`: the human-friendly name shown most
|
|
351
|
+
* prominently (e.g. `John Doe`). Unset uses `userName`.
|
|
352
|
+
*/
|
|
353
|
+
userDisplayName?: string;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Request shape for `PasskeyClient.register`.
|
|
358
|
+
*/
|
|
359
|
+
export interface RegisterRequest {
|
|
360
|
+
label?: string;
|
|
361
|
+
excludeCredentials?: Uint8Array[];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Request shape for `PasskeyClient.signIn`.
|
|
366
|
+
*/
|
|
367
|
+
export interface SignInRequest {
|
|
368
|
+
label?: string;
|
|
369
|
+
allowCredentials?: Uint8Array[];
|
|
370
|
+
preferImmediatelyAvailableCredentials?: boolean;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Response shape for `PasskeyClient.register`.
|
|
375
|
+
*/
|
|
376
|
+
export interface RegisterResponse {
|
|
377
|
+
wallet: Wallet;
|
|
378
|
+
credential?: PasskeyCredential;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Response shape for `PasskeyClient.signIn`.
|
|
383
|
+
*/
|
|
384
|
+
export interface SignInResponse {
|
|
385
|
+
wallet: Wallet;
|
|
386
|
+
labels: string[];
|
|
387
|
+
credential?: PasskeyCredential;
|
|
281
388
|
}
|
|
282
389
|
|
|
283
390
|
/**
|
|
@@ -330,6 +437,10 @@ export interface AesSuccessActionDataDecrypted {
|
|
|
330
437
|
plaintext: string;
|
|
331
438
|
}
|
|
332
439
|
|
|
440
|
+
export interface AuthorizeTransferRequest {
|
|
441
|
+
transfereePubkey: string;
|
|
442
|
+
}
|
|
443
|
+
|
|
333
444
|
export interface Bip21Details {
|
|
334
445
|
amountSat?: number;
|
|
335
446
|
assetId?: string;
|
|
@@ -465,6 +576,11 @@ export interface ClaimHtlcPaymentResponse {
|
|
|
465
576
|
payment: Payment;
|
|
466
577
|
}
|
|
467
578
|
|
|
579
|
+
export interface ClaimTransferRequest {
|
|
580
|
+
authorization: TransferAuthorization;
|
|
581
|
+
description?: string;
|
|
582
|
+
}
|
|
583
|
+
|
|
468
584
|
export interface Config {
|
|
469
585
|
apiKey?: string;
|
|
470
586
|
network: Network;
|
|
@@ -584,20 +700,20 @@ export interface EventListener {
|
|
|
584
700
|
onEvent: (e: SdkEvent) => void;
|
|
585
701
|
}
|
|
586
702
|
|
|
587
|
-
export interface
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
selfSignature: ExternalFrostSignatureShare;
|
|
596
|
-
adaptorPublicKey?: number[];
|
|
703
|
+
export interface ExternalBreezSigner {
|
|
704
|
+
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
705
|
+
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
706
|
+
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
707
|
+
encryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
708
|
+
decryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
709
|
+
signHashSchnorr(hash: Uint8Array, path: string): Promise<SchnorrSignatureBytes>;
|
|
710
|
+
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
597
711
|
}
|
|
598
712
|
|
|
599
|
-
export interface
|
|
600
|
-
|
|
713
|
+
export interface ExternalClaimLeafInput {
|
|
714
|
+
nodeId: ExternalTreeNodeId;
|
|
715
|
+
senderSignature: number[];
|
|
716
|
+
leafKeyCiphertext: number[];
|
|
601
717
|
}
|
|
602
718
|
|
|
603
719
|
export interface ExternalFrostCommitments {
|
|
@@ -606,6 +722,19 @@ export interface ExternalFrostCommitments {
|
|
|
606
722
|
noncesCiphertext: number[];
|
|
607
723
|
}
|
|
608
724
|
|
|
725
|
+
export interface ExternalFrostJob {
|
|
726
|
+
derivation: ExternalFrostDerivation;
|
|
727
|
+
sighash: number[];
|
|
728
|
+
verifyingKey: number[];
|
|
729
|
+
operatorCommitments: IdentifierCommitmentPair[];
|
|
730
|
+
adaptorPublicKey?: number[];
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
export interface ExternalFrostShareResult {
|
|
734
|
+
commitment: ExternalFrostCommitments;
|
|
735
|
+
signatureShare: ExternalFrostSignatureShare;
|
|
736
|
+
}
|
|
737
|
+
|
|
609
738
|
export interface ExternalFrostSignature {
|
|
610
739
|
bytes: number[];
|
|
611
740
|
}
|
|
@@ -624,47 +753,105 @@ export interface ExternalInputParser {
|
|
|
624
753
|
parserUrl: string;
|
|
625
754
|
}
|
|
626
755
|
|
|
627
|
-
export interface
|
|
628
|
-
|
|
756
|
+
export interface ExternalNewLeafKey {
|
|
757
|
+
nodeId: ExternalTreeNodeId;
|
|
758
|
+
newSigningPublicKey: number[];
|
|
629
759
|
}
|
|
630
760
|
|
|
631
|
-
export interface
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
share: ExternalScalar;
|
|
761
|
+
export interface ExternalOperatorPackage {
|
|
762
|
+
operatorIdentifier: ExternalIdentifier;
|
|
763
|
+
encryptedPackage: number[];
|
|
635
764
|
}
|
|
636
765
|
|
|
637
|
-
export interface
|
|
638
|
-
|
|
766
|
+
export interface ExternalOperatorRecipient {
|
|
767
|
+
id: number;
|
|
768
|
+
identifier: ExternalIdentifier;
|
|
639
769
|
publicKey: number[];
|
|
640
|
-
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
export interface ExternalPrepareClaimRequest {
|
|
773
|
+
transferId: string;
|
|
774
|
+
senderIdentityPublicKey: number[];
|
|
775
|
+
leaves: ExternalClaimLeafInput[];
|
|
776
|
+
operatorRecipients: ExternalOperatorRecipient[];
|
|
777
|
+
threshold: number;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export interface ExternalPrepareLightningReceiveRequest {
|
|
781
|
+
operatorRecipients: ExternalOperatorRecipient[];
|
|
782
|
+
threshold: number;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export interface ExternalPrepareStaticDepositClaimRequest {
|
|
786
|
+
index: number;
|
|
787
|
+
userStatement: number[];
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export interface ExternalPrepareStaticDepositRequest {
|
|
791
|
+
index: number;
|
|
792
|
+
sspPublicKey: number[];
|
|
793
|
+
frostJobs: ExternalFrostJob[];
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export interface ExternalPrepareTokenTransactionRequest {
|
|
797
|
+
kind: ExternalTokenTransactionKind;
|
|
798
|
+
digest: number[];
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export interface ExternalPrepareTransferRequest {
|
|
802
|
+
transferId: string;
|
|
803
|
+
receiverPublicKey: number[];
|
|
804
|
+
leaves: ExternalTransferLeafInput[];
|
|
805
|
+
operatorRecipients: ExternalOperatorRecipient[];
|
|
806
|
+
threshold: number;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
export interface ExternalPreparedClaim {
|
|
810
|
+
operatorPackages: ExternalOperatorPackage[];
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export interface ExternalPreparedLightningReceive {
|
|
814
|
+
paymentHash: number[];
|
|
815
|
+
operatorPreimagePackages: ExternalOperatorPackage[];
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export interface ExternalPreparedStaticDeposit {
|
|
819
|
+
exportedSecret: number[];
|
|
820
|
+
frostShares: ExternalFrostShareResult[];
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export interface ExternalPreparedStaticDepositClaim {
|
|
824
|
+
depositSecretKey: SecretBytes;
|
|
825
|
+
userSignature: EcdsaSignatureBytes;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export interface ExternalPreparedTokenTransaction {
|
|
829
|
+
signature: SchnorrSignatureBytes;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export interface ExternalPreparedTransfer {
|
|
833
|
+
operatorPackages: ExternalOperatorPackage[];
|
|
834
|
+
newLeafKeys: ExternalNewLeafKey[];
|
|
835
|
+
transferUserSignature: EcdsaSignatureBytes;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export interface ExternalSignSparkInvoiceRequest {
|
|
839
|
+
kind: ExternalSparkInvoiceKind;
|
|
840
|
+
invoiceHash: number[];
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
export interface ExternalSignStaticDepositRefundRequest {
|
|
844
|
+
index: number;
|
|
845
|
+
sighash: number[];
|
|
641
846
|
verifyingKey: number[];
|
|
642
|
-
|
|
847
|
+
nonceCommitment: ExternalFrostCommitments;
|
|
643
848
|
statechainCommitments: IdentifierCommitmentPair[];
|
|
644
|
-
|
|
849
|
+
statechainSignatures: IdentifierSignaturePair[];
|
|
850
|
+
statechainPublicKeys: IdentifierPublicKeyPair[];
|
|
645
851
|
}
|
|
646
852
|
|
|
647
|
-
export interface
|
|
648
|
-
|
|
649
|
-
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
650
|
-
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
651
|
-
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
652
|
-
encryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
653
|
-
decryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
654
|
-
signHashSchnorr(hash: Uint8Array, path: string): Promise<SchnorrSignatureBytes>;
|
|
655
|
-
generateRandomSigningCommitment(): Promise<ExternalFrostCommitments>;
|
|
656
|
-
getPublicKeyForNode(id: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
657
|
-
generateRandomSecret(): Promise<ExternalEncryptedSecret>;
|
|
658
|
-
staticDepositSecretEncrypted(index: number): Promise<ExternalSecretSource>;
|
|
659
|
-
staticDepositSecret(index: number): Promise<SecretBytes>;
|
|
660
|
-
staticDepositSigningKey(index: number): Promise<PublicKeyBytes>;
|
|
661
|
-
subtractSecrets(signingKey: ExternalSecretSource, newSigningKey: ExternalSecretSource): Promise<ExternalSecretSource>;
|
|
662
|
-
splitSecretWithProofs(secret: ExternalSecretToSplit, threshold: number, numShares: number): Promise<ExternalVerifiableSecretShare[]>;
|
|
663
|
-
encryptPrivateKeyForReceiver(privateKey: ExternalEncryptedSecret, receiverPublicKey: PublicKeyBytes): Promise<Uint8Array>;
|
|
664
|
-
publicKeyFromSecret(privateKey: ExternalSecretSource): Promise<PublicKeyBytes>;
|
|
665
|
-
signFrost(request: ExternalSignFrostRequest): Promise<ExternalFrostSignatureShare>;
|
|
666
|
-
aggregateFrost(request: ExternalAggregateFrostRequest): Promise<ExternalFrostSignature>;
|
|
667
|
-
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
853
|
+
export interface ExternalSignedSparkInvoice {
|
|
854
|
+
signature: SchnorrSignatureBytes;
|
|
668
855
|
}
|
|
669
856
|
|
|
670
857
|
export interface ExternalSigningCommitments {
|
|
@@ -672,13 +859,42 @@ export interface ExternalSigningCommitments {
|
|
|
672
859
|
binding: number[];
|
|
673
860
|
}
|
|
674
861
|
|
|
675
|
-
export interface
|
|
676
|
-
|
|
862
|
+
export interface ExternalSparkSigner {
|
|
863
|
+
getIdentityPublicKey(): Promise<PublicKeyBytes>;
|
|
864
|
+
getPublicKeyForLeaf(leafId: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
865
|
+
getStaticDepositPublicKey(index: number): Promise<PublicKeyBytes>;
|
|
866
|
+
signAuthenticationChallenge(challenge: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
867
|
+
signMessage(message: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
868
|
+
signFrost(jobs: ExternalFrostJob[]): Promise<ExternalFrostShareResult[]>;
|
|
869
|
+
prepareTransfer(request: ExternalPrepareTransferRequest): Promise<ExternalPreparedTransfer>;
|
|
870
|
+
prepareClaim(request: ExternalPrepareClaimRequest): Promise<ExternalPreparedClaim>;
|
|
871
|
+
prepareLightningReceive(request: ExternalPrepareLightningReceiveRequest): Promise<ExternalPreparedLightningReceive>;
|
|
872
|
+
prepareStaticDeposit(request: ExternalPrepareStaticDepositRequest): Promise<ExternalPreparedStaticDeposit>;
|
|
873
|
+
startStaticDepositRefund(request: ExternalStartStaticDepositRefundRequest): Promise<ExternalStartedStaticDepositRefund>;
|
|
874
|
+
signStaticDepositRefund(request: ExternalSignStaticDepositRefundRequest): Promise<ExternalFrostSignature>;
|
|
875
|
+
signSparkInvoice(request: ExternalSignSparkInvoiceRequest): Promise<ExternalSignedSparkInvoice>;
|
|
876
|
+
prepareTokenTransaction(request: ExternalPrepareTokenTransactionRequest): Promise<ExternalPreparedTokenTransaction>;
|
|
877
|
+
prepareStaticDepositClaim(request: ExternalPrepareStaticDepositClaimRequest): Promise<ExternalPreparedStaticDepositClaim>;
|
|
677
878
|
}
|
|
678
879
|
|
|
679
|
-
export interface
|
|
680
|
-
|
|
681
|
-
|
|
880
|
+
export interface ExternalStartStaticDepositRefundRequest {
|
|
881
|
+
index: number;
|
|
882
|
+
userStatement: number[];
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export interface ExternalStartedStaticDepositRefund {
|
|
886
|
+
signingPublicKey: number[];
|
|
887
|
+
nonceCommitment: ExternalFrostCommitments;
|
|
888
|
+
userSignature: EcdsaSignatureBytes;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export interface ExternalTransferLeafInput {
|
|
892
|
+
nodeId: ExternalTreeNodeId;
|
|
893
|
+
newLeafId: ExternalTreeNodeId;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export interface ExternalTreeNodeId {
|
|
897
|
+
id: string;
|
|
682
898
|
}
|
|
683
899
|
|
|
684
900
|
export interface FetchConversionLimitsRequest {
|
|
@@ -760,12 +976,6 @@ export interface IncomingChange {
|
|
|
760
976
|
oldState?: Record;
|
|
761
977
|
}
|
|
762
978
|
|
|
763
|
-
export interface KeySetConfig {
|
|
764
|
-
keySetType: KeySetType;
|
|
765
|
-
useAddressIndex: boolean;
|
|
766
|
-
accountNumber?: number;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
979
|
export interface LeafOptimizationConfig {
|
|
770
980
|
autoEnabled: boolean;
|
|
771
981
|
multiplicity: number;
|
|
@@ -927,10 +1137,12 @@ export interface MintIssuerTokenRequest {
|
|
|
927
1137
|
amount: bigint;
|
|
928
1138
|
}
|
|
929
1139
|
|
|
930
|
-
export interface
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1140
|
+
export interface OptimizeLeavesRequest {
|
|
1141
|
+
mode: OptimizationMode;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export interface OptimizeLeavesResponse {
|
|
1145
|
+
outcome: OptimizationOutcome;
|
|
934
1146
|
}
|
|
935
1147
|
|
|
936
1148
|
export interface OutgoingChange {
|
|
@@ -950,6 +1162,11 @@ export interface Payment {
|
|
|
950
1162
|
conversionDetails?: ConversionDetails;
|
|
951
1163
|
}
|
|
952
1164
|
|
|
1165
|
+
export interface PaymentIdUpdate {
|
|
1166
|
+
provisionalPaymentId: string;
|
|
1167
|
+
finalPaymentId: string;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
953
1170
|
export interface PaymentMetadata {
|
|
954
1171
|
parentPaymentId?: string;
|
|
955
1172
|
lnurlPayInfo?: LnurlPayInfo;
|
|
@@ -961,6 +1178,7 @@ export interface PaymentMetadata {
|
|
|
961
1178
|
|
|
962
1179
|
export interface PaymentObserver {
|
|
963
1180
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
1181
|
+
afterSend: (updates: PaymentIdUpdate[]) => Promise<void>;
|
|
964
1182
|
}
|
|
965
1183
|
|
|
966
1184
|
export interface PaymentRequestSource {
|
|
@@ -1134,7 +1352,7 @@ export interface Session {
|
|
|
1134
1352
|
expiration: number;
|
|
1135
1353
|
}
|
|
1136
1354
|
|
|
1137
|
-
export interface
|
|
1355
|
+
export interface SessionStore {
|
|
1138
1356
|
getSession: (serviceIdentityKey: string) => Promise<Session>;
|
|
1139
1357
|
setSession: (serviceIdentityKey: string, session: Session) => Promise<void>;
|
|
1140
1358
|
}
|
|
@@ -1241,7 +1459,15 @@ export interface Storage {
|
|
|
1241
1459
|
setCachedItem: (key: string, value: string) => Promise<void>;
|
|
1242
1460
|
deleteCachedItem: (key: string) => Promise<void>;
|
|
1243
1461
|
listPayments: (request: StorageListPaymentsRequest) => Promise<Payment[]>;
|
|
1244
|
-
|
|
1462
|
+
/**
|
|
1463
|
+
* Insert or update a payment, applying a terminal-status guard.
|
|
1464
|
+
*
|
|
1465
|
+
* Returns `true` when the caller should emit a payment event (the row was
|
|
1466
|
+
* newly inserted, or its status transitioned). Returns `false` for
|
|
1467
|
+
* redundant same-status updates and for rejected updates that would
|
|
1468
|
+
* replace an already-terminal status.
|
|
1469
|
+
*/
|
|
1470
|
+
applyPaymentUpdate: (payment: Payment) => Promise<boolean>;
|
|
1245
1471
|
insertPaymentMetadata: (paymentId: string, metadata: PaymentMetadata) => Promise<void>;
|
|
1246
1472
|
getPaymentById: (id: string) => Promise<Payment>;
|
|
1247
1473
|
getPaymentByInvoice: (invoice: string) => Promise<Payment>;
|
|
@@ -1310,6 +1536,31 @@ export interface TokenOptimizationConfig {
|
|
|
1310
1536
|
minOutputsThreshold: number;
|
|
1311
1537
|
}
|
|
1312
1538
|
|
|
1539
|
+
export interface TransferAuthorization {
|
|
1540
|
+
username: string;
|
|
1541
|
+
pubkey: string;
|
|
1542
|
+
signature: string;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
export interface TurnkeyConfig {
|
|
1546
|
+
baseUrl?: string;
|
|
1547
|
+
organizationId: string;
|
|
1548
|
+
apiPublicKey: string;
|
|
1549
|
+
apiPrivateKey: string;
|
|
1550
|
+
walletId: string;
|
|
1551
|
+
network: Network;
|
|
1552
|
+
accountNumber?: number;
|
|
1553
|
+
retry?: TurnkeyRetryConfig;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
export interface TurnkeyRetryConfig {
|
|
1557
|
+
initialDelayMs: number;
|
|
1558
|
+
multiplier: number;
|
|
1559
|
+
maxDelayMs: number;
|
|
1560
|
+
maxRetries: number;
|
|
1561
|
+
requestTimeoutMs: number;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1313
1564
|
export interface TxStatus {
|
|
1314
1565
|
confirmed: boolean;
|
|
1315
1566
|
blockHeight?: number;
|
|
@@ -1378,6 +1629,8 @@ export type AmountAdjustmentReason = "flooredToMinLimit" | "increasedToAvoidDust
|
|
|
1378
1629
|
|
|
1379
1630
|
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
1380
1631
|
|
|
1632
|
+
export type AutoOptimizationEvent = { type: "started"; totalRounds: number } | { type: "roundCompleted"; currentRound: number; totalRounds: number } | { type: "completed" } | { type: "cancelled" } | { type: "failed"; error: string } | { type: "skipped" };
|
|
1633
|
+
|
|
1381
1634
|
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
1382
1635
|
|
|
1383
1636
|
export type BuyBitcoinRequest = { type: "moonpay"; lockedAmountSat?: number; redirectUrl?: string } | { type: "cashApp"; amountSats: number };
|
|
@@ -1392,9 +1645,11 @@ export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; from
|
|
|
1392
1645
|
|
|
1393
1646
|
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 };
|
|
1394
1647
|
|
|
1395
|
-
export type
|
|
1648
|
+
export type ExternalFrostDerivation = { type: "signingLeaf"; leafId: ExternalTreeNodeId } | { type: "staticDeposit"; index: number } | { type: "htlcPreimage" } | { type: "identity" };
|
|
1649
|
+
|
|
1650
|
+
export type ExternalSparkInvoiceKind = "sats" | "tokens";
|
|
1396
1651
|
|
|
1397
|
-
export type
|
|
1652
|
+
export type ExternalTokenTransactionKind = "freeze" | "partial" | "final";
|
|
1398
1653
|
|
|
1399
1654
|
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
1400
1655
|
|
|
@@ -1402,8 +1657,6 @@ export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
|
1402
1657
|
|
|
1403
1658
|
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);
|
|
1404
1659
|
|
|
1405
|
-
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
1406
|
-
|
|
1407
1660
|
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
1408
1661
|
|
|
1409
1662
|
export type MaxFee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number } | { type: "networkRecommended"; leewaySatPerVbyte: number };
|
|
@@ -1412,9 +1665,11 @@ export type Network = "mainnet" | "regtest";
|
|
|
1412
1665
|
|
|
1413
1666
|
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
1414
1667
|
|
|
1415
|
-
export type
|
|
1668
|
+
export type OptimizationMode = "full" | "singleRound";
|
|
1416
1669
|
|
|
1417
|
-
export type
|
|
1670
|
+
export type OptimizationOutcome = { type: "completed"; roundsExecuted: number } | { type: "inProgress" };
|
|
1671
|
+
|
|
1672
|
+
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; vout: number };
|
|
1418
1673
|
|
|
1419
1674
|
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
1420
1675
|
|
|
@@ -1428,7 +1683,7 @@ export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: st
|
|
|
1428
1683
|
|
|
1429
1684
|
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 };
|
|
1430
1685
|
|
|
1431
|
-
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: "
|
|
1686
|
+
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: "autoOptimization"; optimizationEvent: AutoOptimizationEvent } | { type: "lightningAddressChanged"; lightningAddress?: LightningAddressInfo } | { type: "newDeposits"; newDeposits: DepositInfo[] };
|
|
1432
1687
|
|
|
1433
1688
|
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
1434
1689
|
|
|
@@ -1438,7 +1693,7 @@ export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: On
|
|
|
1438
1693
|
|
|
1439
1694
|
export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" | "major";
|
|
1440
1695
|
|
|
1441
|
-
export type
|
|
1696
|
+
export type SessionStoreError = { type: "notFound" } | ({ type: "generic" } & string);
|
|
1442
1697
|
|
|
1443
1698
|
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
1444
1699
|
|
|
@@ -1482,18 +1737,18 @@ export class BreezSdk {
|
|
|
1482
1737
|
[Symbol.dispose](): void;
|
|
1483
1738
|
addContact(request: AddContactRequest): Promise<Contact>;
|
|
1484
1739
|
addEventListener(listener: EventListener): Promise<string>;
|
|
1740
|
+
authorizeLightningAddressTransfer(request: AuthorizeTransferRequest): Promise<TransferAuthorization>;
|
|
1485
1741
|
buyBitcoin(request: BuyBitcoinRequest): Promise<BuyBitcoinResponse>;
|
|
1486
|
-
cancelLeafOptimization(): Promise<void>;
|
|
1487
1742
|
checkLightningAddressAvailable(request: CheckLightningAddressRequest): Promise<boolean>;
|
|
1488
1743
|
checkMessage(request: CheckMessageRequest): Promise<CheckMessageResponse>;
|
|
1489
1744
|
claimDeposit(request: ClaimDepositRequest): Promise<ClaimDepositResponse>;
|
|
1490
1745
|
claimHtlcPayment(request: ClaimHtlcPaymentRequest): Promise<ClaimHtlcPaymentResponse>;
|
|
1746
|
+
claimLightningAddressTransfer(request: ClaimTransferRequest): Promise<LightningAddressInfo>;
|
|
1491
1747
|
deleteContact(id: string): Promise<void>;
|
|
1492
1748
|
deleteLightningAddress(): Promise<void>;
|
|
1493
1749
|
disconnect(): Promise<void>;
|
|
1494
1750
|
fetchConversionLimits(request: FetchConversionLimitsRequest): Promise<FetchConversionLimitsResponse>;
|
|
1495
1751
|
getInfo(request: GetInfoRequest): Promise<GetInfoResponse>;
|
|
1496
|
-
getLeafOptimizationProgress(): OptimizationProgress;
|
|
1497
1752
|
getLightningAddress(): Promise<LightningAddressInfo | undefined>;
|
|
1498
1753
|
getPayment(request: GetPaymentRequest): Promise<GetPaymentResponse>;
|
|
1499
1754
|
getTokenIssuer(): TokenIssuer;
|
|
@@ -1508,6 +1763,7 @@ export class BreezSdk {
|
|
|
1508
1763
|
lnurlAuth(request_data: LnurlAuthRequestDetails): Promise<LnurlCallbackStatus>;
|
|
1509
1764
|
lnurlPay(request: LnurlPayRequest): Promise<LnurlPayResponse>;
|
|
1510
1765
|
lnurlWithdraw(request: LnurlWithdrawRequest): Promise<LnurlWithdrawResponse>;
|
|
1766
|
+
optimizeLeaves(request: OptimizeLeavesRequest): Promise<OptimizeLeavesResponse>;
|
|
1511
1767
|
parse(input: string): Promise<InputType>;
|
|
1512
1768
|
prepareLnurlPay(request: PrepareLnurlPayRequest): Promise<PrepareLnurlPayResponse>;
|
|
1513
1769
|
prepareSendPayment(request: PrepareSendPaymentRequest): Promise<PrepareSendPaymentResponse>;
|
|
@@ -1520,7 +1776,6 @@ export class BreezSdk {
|
|
|
1520
1776
|
removeEventListener(id: string): Promise<boolean>;
|
|
1521
1777
|
sendPayment(request: SendPaymentRequest): Promise<SendPaymentResponse>;
|
|
1522
1778
|
signMessage(request: SignMessageRequest): Promise<SignMessageResponse>;
|
|
1523
|
-
startLeafOptimization(): Promise<void>;
|
|
1524
1779
|
syncWallet(request: SyncWalletRequest): Promise<SyncWalletResponse>;
|
|
1525
1780
|
unregisterWebhook(request: UnregisterWebhookRequest): Promise<void>;
|
|
1526
1781
|
updateContact(request: UpdateContactRequest): Promise<Contact>;
|
|
@@ -1528,33 +1783,71 @@ export class BreezSdk {
|
|
|
1528
1783
|
}
|
|
1529
1784
|
|
|
1530
1785
|
/**
|
|
1531
|
-
* A
|
|
1532
|
-
*
|
|
1786
|
+
* A Rust-backed [`ExternalBreezSigner`] surfaced to JS as a signer object that
|
|
1787
|
+
* can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
|
|
1788
|
+
* by `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey).
|
|
1789
|
+
*
|
|
1790
|
+
* [`ExternalBreezSigner`]: breez_sdk_spark::signer::ExternalBreezSigner
|
|
1533
1791
|
*/
|
|
1534
|
-
export class
|
|
1792
|
+
export class ExternalBreezSignerHandle {
|
|
1535
1793
|
private constructor();
|
|
1536
1794
|
free(): void;
|
|
1537
1795
|
[Symbol.dispose](): void;
|
|
1538
|
-
aggregateFrost(request: ExternalAggregateFrostRequest): Promise<ExternalFrostSignature>;
|
|
1539
1796
|
decryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
1540
1797
|
derivePublicKey(path: string): Promise<PublicKeyBytes>;
|
|
1541
1798
|
encryptEcies(message: Uint8Array, path: string): Promise<Uint8Array>;
|
|
1542
|
-
encryptPrivateKeyForReceiver(private_key: ExternalEncryptedSecret, receiver_public_key: PublicKeyBytes): Promise<Uint8Array>;
|
|
1543
|
-
generateRandomSecret(): Promise<ExternalEncryptedSecret>;
|
|
1544
|
-
generateRandomSigningCommitment(): Promise<ExternalFrostCommitments>;
|
|
1545
|
-
getPublicKeyForNode(id: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
1546
1799
|
hmacSha256(message: Uint8Array, path: string): Promise<HashedMessageBytes>;
|
|
1547
|
-
identityPublicKey(): PublicKeyBytes;
|
|
1548
|
-
publicKeyFromSecret(private_key: ExternalSecretSource): Promise<PublicKeyBytes>;
|
|
1549
1800
|
signEcdsa(message: MessageBytes, path: string): Promise<EcdsaSignatureBytes>;
|
|
1550
1801
|
signEcdsaRecoverable(message: MessageBytes, path: string): Promise<RecoverableEcdsaSignatureBytes>;
|
|
1551
|
-
signFrost(request: ExternalSignFrostRequest): Promise<ExternalFrostSignatureShare>;
|
|
1552
1802
|
signHashSchnorr(hash: Uint8Array, path: string): Promise<SchnorrSignatureBytes>;
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
/**
|
|
1806
|
+
* The two external signers for the SDK's signer-based connect. Returned by
|
|
1807
|
+
* `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey); pass
|
|
1808
|
+
* both halves to `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
1809
|
+
*/
|
|
1810
|
+
export class ExternalSigners {
|
|
1811
|
+
private constructor();
|
|
1812
|
+
free(): void;
|
|
1813
|
+
[Symbol.dispose](): void;
|
|
1814
|
+
/**
|
|
1815
|
+
* External signer for non-Spark SDK signing (LNURL-auth, sync, message
|
|
1816
|
+
* signing, ECIES).
|
|
1817
|
+
*/
|
|
1818
|
+
readonly breezSigner: ExternalBreezSignerHandle;
|
|
1819
|
+
/**
|
|
1820
|
+
* External high-level Spark signer for the Spark wallet flows.
|
|
1821
|
+
*/
|
|
1822
|
+
readonly sparkSigner: ExternalSparkSignerHandle;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* A Rust-backed [`ExternalSparkSigner`] surfaced to JS as a signer object that
|
|
1827
|
+
* can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
|
|
1828
|
+
* by `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey).
|
|
1829
|
+
*
|
|
1830
|
+
* [`ExternalSparkSigner`]: breez_sdk_spark::signer::ExternalSparkSigner
|
|
1831
|
+
*/
|
|
1832
|
+
export class ExternalSparkSignerHandle {
|
|
1833
|
+
private constructor();
|
|
1834
|
+
free(): void;
|
|
1835
|
+
[Symbol.dispose](): void;
|
|
1836
|
+
getIdentityPublicKey(): Promise<PublicKeyBytes>;
|
|
1837
|
+
getPublicKeyForLeaf(leaf_id: ExternalTreeNodeId): Promise<PublicKeyBytes>;
|
|
1838
|
+
getStaticDepositPublicKey(index: number): Promise<PublicKeyBytes>;
|
|
1839
|
+
prepareClaim(request: ExternalPrepareClaimRequest): Promise<ExternalPreparedClaim>;
|
|
1840
|
+
prepareLightningReceive(request: ExternalPrepareLightningReceiveRequest): Promise<ExternalPreparedLightningReceive>;
|
|
1841
|
+
prepareStaticDeposit(request: ExternalPrepareStaticDepositRequest): Promise<ExternalPreparedStaticDeposit>;
|
|
1842
|
+
prepareStaticDepositClaim(request: ExternalPrepareStaticDepositClaimRequest): Promise<ExternalPreparedStaticDepositClaim>;
|
|
1843
|
+
prepareTokenTransaction(request: ExternalPrepareTokenTransactionRequest): Promise<ExternalPreparedTokenTransaction>;
|
|
1844
|
+
prepareTransfer(request: ExternalPrepareTransferRequest): Promise<ExternalPreparedTransfer>;
|
|
1845
|
+
signAuthenticationChallenge(challenge: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
1846
|
+
signFrost(jobs: ExternalFrostJob[]): Promise<ExternalFrostShareResult[]>;
|
|
1847
|
+
signMessage(message: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
1848
|
+
signSparkInvoice(request: ExternalSignSparkInvoiceRequest): Promise<ExternalSignedSparkInvoice>;
|
|
1849
|
+
signStaticDepositRefund(request: ExternalSignStaticDepositRefundRequest): Promise<ExternalFrostSignature>;
|
|
1850
|
+
startStaticDepositRefund(request: ExternalStartStaticDepositRefundRequest): Promise<ExternalStartedStaticDepositRefund>;
|
|
1558
1851
|
}
|
|
1559
1852
|
|
|
1560
1853
|
export class IntoUnderlyingByteSource {
|
|
@@ -1586,73 +1879,59 @@ export class IntoUnderlyingSource {
|
|
|
1586
1879
|
}
|
|
1587
1880
|
|
|
1588
1881
|
/**
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
1592
|
-
*/
|
|
1593
|
-
export class MysqlConnectionPool {
|
|
1594
|
-
private constructor();
|
|
1595
|
-
free(): void;
|
|
1596
|
-
[Symbol.dispose](): void;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
/**
|
|
1600
|
-
* Passkey-based wallet operations using WebAuthn PRF extension.
|
|
1601
|
-
*
|
|
1602
|
-
* Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
|
|
1603
|
-
* wallet derivation and label management via Nostr relays.
|
|
1882
|
+
* High-level orchestrator that collapses register / sign-in flows
|
|
1883
|
+
* into single calls. See the matching Rust types for full semantics;
|
|
1884
|
+
* the JS surface is a thin wasm-bindgen wrapper.
|
|
1604
1885
|
*/
|
|
1605
|
-
export class
|
|
1886
|
+
export class PasskeyClient {
|
|
1606
1887
|
free(): void;
|
|
1607
1888
|
[Symbol.dispose](): void;
|
|
1608
1889
|
/**
|
|
1609
|
-
*
|
|
1610
|
-
*
|
|
1611
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1612
|
-
*
|
|
1613
|
-
* @param label - Optional label string (defaults to "Default")
|
|
1890
|
+
* One-shot capability probe (PRF support + domain association)
|
|
1891
|
+
* hosts can gate UX on.
|
|
1614
1892
|
*/
|
|
1615
|
-
|
|
1893
|
+
checkAvailability(): Promise<PasskeyAvailability>;
|
|
1616
1894
|
/**
|
|
1617
|
-
*
|
|
1895
|
+
* Label sub-object. List / publish labels for this passkey's identity.
|
|
1618
1896
|
*/
|
|
1619
|
-
|
|
1897
|
+
labels(): PasskeyLabels;
|
|
1620
1898
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1899
|
+
* Create a `PasskeyClient` backed by the supplied `PrfProvider` and
|
|
1900
|
+
* the default Nostr-backed label store. `breezApiKey` enables
|
|
1901
|
+
* authenticated (NIP-42) relay access for label storage; omit for
|
|
1902
|
+
* public relays only.
|
|
1624
1903
|
*/
|
|
1625
|
-
|
|
1904
|
+
constructor(prf_provider: PrfProvider, breez_api_key?: string | null, config?: PasskeyConfig | null);
|
|
1626
1905
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
*
|
|
1629
|
-
*
|
|
1630
|
-
* @param relayConfig - Optional configuration for Nostr relay connections
|
|
1906
|
+
* First-time setup. Drives the platform's create-passkey ceremony
|
|
1907
|
+
* then derives the wallet seed in the same PRF assertion ceremony
|
|
1908
|
+
* where the platform supports it.
|
|
1631
1909
|
*/
|
|
1632
|
-
|
|
1910
|
+
register(request: RegisterRequest): Promise<RegisterResponse>;
|
|
1633
1911
|
/**
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1912
|
+
* Returning-user sign-in. With `label` set, uses the fast path
|
|
1913
|
+
* (one ceremony, no Nostr round-trip). With `label` omitted,
|
|
1914
|
+
* derives the default-label wallet and discovers the user's
|
|
1915
|
+
* label set in the same ceremony.
|
|
1638
1916
|
*/
|
|
1639
|
-
|
|
1917
|
+
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
1640
1918
|
}
|
|
1641
1919
|
|
|
1642
1920
|
/**
|
|
1643
|
-
*
|
|
1644
|
-
*
|
|
1645
|
-
* Construct via [`create_postgres_connection_pool`] and pass the same handle to multiple
|
|
1646
|
-
* `SdkBuilder`s via `withPostgresConnectionPool` to share connections across SDKs.
|
|
1647
|
-
* Per-tenant scoping is derived from each SDK's seed.
|
|
1648
|
-
*
|
|
1649
|
-
* The pool's lifecycle is controlled by the integrator: it stays alive as
|
|
1650
|
-
* long as any reference is held. `disconnect()` does **not** close the pool.
|
|
1921
|
+
* Label sub-object surfaced from `PasskeyClient.labels()`.
|
|
1651
1922
|
*/
|
|
1652
|
-
export class
|
|
1923
|
+
export class PasskeyLabels {
|
|
1653
1924
|
private constructor();
|
|
1654
1925
|
free(): void;
|
|
1655
1926
|
[Symbol.dispose](): void;
|
|
1927
|
+
/**
|
|
1928
|
+
* List labels published for this passkey's identity.
|
|
1929
|
+
*/
|
|
1930
|
+
list(): Promise<string[]>;
|
|
1931
|
+
/**
|
|
1932
|
+
* Idempotently publish `label` for this passkey's identity.
|
|
1933
|
+
*/
|
|
1934
|
+
store(label: string): Promise<void>;
|
|
1656
1935
|
}
|
|
1657
1936
|
|
|
1658
1937
|
export class SdkBuilder {
|
|
@@ -1661,37 +1940,21 @@ export class SdkBuilder {
|
|
|
1661
1940
|
[Symbol.dispose](): void;
|
|
1662
1941
|
build(): Promise<BreezSdk>;
|
|
1663
1942
|
static new(config: Config, seed: Seed): SdkBuilder;
|
|
1664
|
-
static newWithSigner(config: Config,
|
|
1943
|
+
static newWithSigner(config: Config, breez_signer: ExternalBreezSigner, spark_signer: ExternalSparkSigner): SdkBuilder;
|
|
1944
|
+
withAccountNumber(account_number: number): SdkBuilder;
|
|
1665
1945
|
withChainService(chain_service: BitcoinChainService): SdkBuilder;
|
|
1666
1946
|
withDefaultStorage(storage_dir: string): Promise<SdkBuilder>;
|
|
1667
1947
|
withFiatService(fiat_service: FiatService): SdkBuilder;
|
|
1668
|
-
withKeySet(config: KeySetConfig): SdkBuilder;
|
|
1669
1948
|
withLnurlClient(lnurl_client: RestClient): SdkBuilder;
|
|
1670
1949
|
/**
|
|
1671
|
-
* **Deprecated.**
|
|
1672
|
-
* `withMysqlConnectionPool(pool)` instead.
|
|
1950
|
+
* **Deprecated.** Use `withStorageBackend(mysqlStorage(config))`.
|
|
1673
1951
|
*/
|
|
1674
1952
|
withMysqlBackend(config: MysqlStorageConfig): SdkBuilder;
|
|
1675
|
-
/**
|
|
1676
|
-
* Sets a shared `MySQL` connection pool as the backend for all stores.
|
|
1677
|
-
*
|
|
1678
|
-
* If the same builder also receives a `WasmSdkContext` carrying a MySQL
|
|
1679
|
-
* pool, `build()` returns an error — pick one source.
|
|
1680
|
-
*/
|
|
1681
|
-
withMysqlConnectionPool(pool: MysqlConnectionPool): SdkBuilder;
|
|
1682
1953
|
withPaymentObserver(payment_observer: PaymentObserver): SdkBuilder;
|
|
1683
1954
|
/**
|
|
1684
|
-
* **Deprecated.**
|
|
1685
|
-
* `withPostgresConnectionPool(pool)` instead.
|
|
1955
|
+
* **Deprecated.** Use `withStorageBackend(postgresStorage(config))`.
|
|
1686
1956
|
*/
|
|
1687
1957
|
withPostgresBackend(config: PostgresStorageConfig): SdkBuilder;
|
|
1688
|
-
/**
|
|
1689
|
-
* Sets a shared Postgres connection pool as the backend for all stores.
|
|
1690
|
-
*
|
|
1691
|
-
* If the same builder also receives a `WasmSdkContext` carrying a
|
|
1692
|
-
* Postgres pool, `build()` returns an error — pick one source.
|
|
1693
|
-
*/
|
|
1694
|
-
withPostgresConnectionPool(pool: PostgresConnectionPool): SdkBuilder;
|
|
1695
1958
|
withRestChainService(url: string, api_type: ChainApiType, credentials?: Credentials | null): SdkBuilder;
|
|
1696
1959
|
/**
|
|
1697
1960
|
* Threads a shared [`WasmSdkContext`] into the builder.
|
|
@@ -1702,6 +1965,13 @@ export class SdkBuilder {
|
|
|
1702
1965
|
*/
|
|
1703
1966
|
withSharedContext(context: WasmSdkContext): SdkBuilder;
|
|
1704
1967
|
withStorage(storage: Storage): SdkBuilder;
|
|
1968
|
+
/**
|
|
1969
|
+
* Sets one of the SDK's built-in storage backends.
|
|
1970
|
+
*
|
|
1971
|
+
* Construct the [`WasmStorageConfig`] via `defaultStorage`,
|
|
1972
|
+
* `postgresStorage` or `mysqlStorage`.
|
|
1973
|
+
*/
|
|
1974
|
+
withStorageBackend(config: WasmStorageConfig): SdkBuilder;
|
|
1705
1975
|
}
|
|
1706
1976
|
|
|
1707
1977
|
export class TokenIssuer {
|
|
@@ -1730,23 +2000,38 @@ export class WasmSdkContext {
|
|
|
1730
2000
|
[Symbol.dispose](): void;
|
|
1731
2001
|
}
|
|
1732
2002
|
|
|
1733
|
-
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
1734
|
-
|
|
1735
|
-
export function connectWithSigner(config: Config, signer: ExternalSigner, storage_dir: string): Promise<BreezSdk>;
|
|
1736
|
-
|
|
1737
2003
|
/**
|
|
1738
|
-
*
|
|
2004
|
+
* Selects one of the SDK's built-in storage backends.
|
|
2005
|
+
*
|
|
2006
|
+
* Construct it via `defaultStorage`, `postgresStorage` or `mysqlStorage` and
|
|
2007
|
+
* pass it to `SdkBuilder.withStorageBackend`.
|
|
1739
2008
|
*/
|
|
1740
|
-
export
|
|
2009
|
+
export class WasmStorageConfig {
|
|
2010
|
+
private constructor();
|
|
2011
|
+
free(): void;
|
|
2012
|
+
[Symbol.dispose](): void;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
2016
|
+
|
|
2017
|
+
export function connectWithSigner(config: Config, breez_signer: ExternalBreezSigner, spark_signer: ExternalSparkSigner, storage_dir: string): Promise<BreezSdk>;
|
|
1741
2018
|
|
|
1742
2019
|
/**
|
|
1743
|
-
*
|
|
2020
|
+
* Builds the Turnkey-backed signers from `config`, then pass
|
|
2021
|
+
* `signers.breezSigner` and `signers.sparkSigner` to `connectWithSigner`,
|
|
2022
|
+
* exactly as with any other external signer.
|
|
1744
2023
|
*/
|
|
1745
|
-
export function
|
|
2024
|
+
export function createTurnkeySigner(config: TurnkeyConfig): Promise<ExternalSigners>;
|
|
1746
2025
|
|
|
1747
2026
|
export function defaultConfig(network: Network): Config;
|
|
1748
2027
|
|
|
1749
|
-
|
|
2028
|
+
/**
|
|
2029
|
+
* Creates the default external signers from a mnemonic phrase.
|
|
2030
|
+
*
|
|
2031
|
+
* Key derivation matches the seed-based connect path: an SDK built either
|
|
2032
|
+
* way from the same mnemonic is the same wallet.
|
|
2033
|
+
*/
|
|
2034
|
+
export function defaultExternalSigners(mnemonic: string, passphrase: string | null | undefined, network: Network, account_number?: number | null): ExternalSigners;
|
|
1750
2035
|
|
|
1751
2036
|
/**
|
|
1752
2037
|
* Creates a default MySQL storage configuration with sensible defaults.
|
|
@@ -1772,14 +2057,20 @@ export function defaultPostgresStorageConfig(connection_string: string): Postgre
|
|
|
1772
2057
|
export function defaultServerConfig(network: Network): Config;
|
|
1773
2058
|
|
|
1774
2059
|
/**
|
|
1775
|
-
*
|
|
1776
|
-
*
|
|
1777
|
-
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
2060
|
+
* File-based storage rooted at `storageDir` — IndexedDB in the browser,
|
|
2061
|
+
* SQLite under Node.js.
|
|
1778
2062
|
*/
|
|
2063
|
+
export function defaultStorage(storage_dir: string): WasmStorageConfig;
|
|
2064
|
+
|
|
1779
2065
|
export function getSparkStatus(): Promise<SparkStatus>;
|
|
1780
2066
|
|
|
1781
2067
|
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
1782
2068
|
|
|
2069
|
+
/**
|
|
2070
|
+
* `MySQL`-backed storage built from `config`.
|
|
2071
|
+
*/
|
|
2072
|
+
export function mysqlStorage(config: MysqlStorageConfig): WasmStorageConfig;
|
|
2073
|
+
|
|
1783
2074
|
/**
|
|
1784
2075
|
* Constructs a shareable REST-based Bitcoin chain service.
|
|
1785
2076
|
*
|
|
@@ -1796,6 +2087,11 @@ export function newRestChainService(url: string, network: Network, api_type: Cha
|
|
|
1796
2087
|
*/
|
|
1797
2088
|
export function newSharedSdkContext(config: WasmSdkContextConfig): Promise<WasmSdkContext>;
|
|
1798
2089
|
|
|
2090
|
+
/**
|
|
2091
|
+
* `PostgreSQL`-backed storage built from `config`.
|
|
2092
|
+
*/
|
|
2093
|
+
export function postgresStorage(config: PostgresStorageConfig): WasmStorageConfig;
|
|
2094
|
+
|
|
1799
2095
|
/**
|
|
1800
2096
|
* Entry point invoked by JavaScript in a worker.
|
|
1801
2097
|
*/
|
|
@@ -1807,13 +2103,13 @@ export interface InitOutput {
|
|
|
1807
2103
|
readonly memory: WebAssembly.Memory;
|
|
1808
2104
|
readonly __wbg_bitcoinchainservicehandle_free: (a: number, b: number) => void;
|
|
1809
2105
|
readonly __wbg_breezsdk_free: (a: number, b: number) => void;
|
|
1810
|
-
readonly
|
|
1811
|
-
readonly
|
|
1812
|
-
readonly
|
|
1813
|
-
readonly __wbg_postgresconnectionpool_free: (a: number, b: number) => void;
|
|
2106
|
+
readonly __wbg_externalsigners_free: (a: number, b: number) => void;
|
|
2107
|
+
readonly __wbg_passkeyclient_free: (a: number, b: number) => void;
|
|
2108
|
+
readonly __wbg_passkeylabels_free: (a: number, b: number) => void;
|
|
1814
2109
|
readonly __wbg_sdkbuilder_free: (a: number, b: number) => void;
|
|
1815
2110
|
readonly __wbg_tokenissuer_free: (a: number, b: number) => void;
|
|
1816
2111
|
readonly __wbg_wasmsdkcontext_free: (a: number, b: number) => void;
|
|
2112
|
+
readonly __wbg_wasmstorageconfig_free: (a: number, b: number) => void;
|
|
1817
2113
|
readonly bitcoinchainservicehandle_broadcastTransaction: (a: number, b: number, c: number) => any;
|
|
1818
2114
|
readonly bitcoinchainservicehandle_getAddressUtxos: (a: number, b: number, c: number) => any;
|
|
1819
2115
|
readonly bitcoinchainservicehandle_getTransactionHex: (a: number, b: number, c: number) => any;
|
|
@@ -1821,18 +2117,18 @@ export interface InitOutput {
|
|
|
1821
2117
|
readonly bitcoinchainservicehandle_recommendedFees: (a: number) => any;
|
|
1822
2118
|
readonly breezsdk_addContact: (a: number, b: any) => any;
|
|
1823
2119
|
readonly breezsdk_addEventListener: (a: number, b: any) => any;
|
|
2120
|
+
readonly breezsdk_authorizeLightningAddressTransfer: (a: number, b: any) => any;
|
|
1824
2121
|
readonly breezsdk_buyBitcoin: (a: number, b: any) => any;
|
|
1825
|
-
readonly breezsdk_cancelLeafOptimization: (a: number) => any;
|
|
1826
2122
|
readonly breezsdk_checkLightningAddressAvailable: (a: number, b: any) => any;
|
|
1827
2123
|
readonly breezsdk_checkMessage: (a: number, b: any) => any;
|
|
1828
2124
|
readonly breezsdk_claimDeposit: (a: number, b: any) => any;
|
|
1829
2125
|
readonly breezsdk_claimHtlcPayment: (a: number, b: any) => any;
|
|
2126
|
+
readonly breezsdk_claimLightningAddressTransfer: (a: number, b: any) => any;
|
|
1830
2127
|
readonly breezsdk_deleteContact: (a: number, b: number, c: number) => any;
|
|
1831
2128
|
readonly breezsdk_deleteLightningAddress: (a: number) => any;
|
|
1832
2129
|
readonly breezsdk_disconnect: (a: number) => any;
|
|
1833
2130
|
readonly breezsdk_fetchConversionLimits: (a: number, b: any) => any;
|
|
1834
2131
|
readonly breezsdk_getInfo: (a: number, b: any) => any;
|
|
1835
|
-
readonly breezsdk_getLeafOptimizationProgress: (a: number) => any;
|
|
1836
2132
|
readonly breezsdk_getLightningAddress: (a: number) => any;
|
|
1837
2133
|
readonly breezsdk_getPayment: (a: number, b: any) => any;
|
|
1838
2134
|
readonly breezsdk_getTokenIssuer: (a: number) => number;
|
|
@@ -1847,6 +2143,7 @@ export interface InitOutput {
|
|
|
1847
2143
|
readonly breezsdk_lnurlAuth: (a: number, b: any) => any;
|
|
1848
2144
|
readonly breezsdk_lnurlPay: (a: number, b: any) => any;
|
|
1849
2145
|
readonly breezsdk_lnurlWithdraw: (a: number, b: any) => any;
|
|
2146
|
+
readonly breezsdk_optimizeLeaves: (a: number, b: any) => any;
|
|
1850
2147
|
readonly breezsdk_parse: (a: number, b: number, c: number) => any;
|
|
1851
2148
|
readonly breezsdk_prepareLnurlPay: (a: number, b: any) => any;
|
|
1852
2149
|
readonly breezsdk_prepareSendPayment: (a: number, b: any) => any;
|
|
@@ -1859,65 +2156,71 @@ export interface InitOutput {
|
|
|
1859
2156
|
readonly breezsdk_removeEventListener: (a: number, b: number, c: number) => any;
|
|
1860
2157
|
readonly breezsdk_sendPayment: (a: number, b: any) => any;
|
|
1861
2158
|
readonly breezsdk_signMessage: (a: number, b: any) => any;
|
|
1862
|
-
readonly breezsdk_startLeafOptimization: (a: number) => any;
|
|
1863
2159
|
readonly breezsdk_syncWallet: (a: number, b: any) => any;
|
|
1864
2160
|
readonly breezsdk_unregisterWebhook: (a: number, b: any) => any;
|
|
1865
2161
|
readonly breezsdk_updateContact: (a: number, b: any) => any;
|
|
1866
2162
|
readonly breezsdk_updateUserSettings: (a: number, b: any) => any;
|
|
1867
2163
|
readonly connect: (a: any) => any;
|
|
1868
|
-
readonly connectWithSigner: (a: any, b: any, c:
|
|
1869
|
-
readonly
|
|
1870
|
-
readonly createPostgresConnectionPool: (a: any) => [number, number, number];
|
|
2164
|
+
readonly connectWithSigner: (a: any, b: any, c: any, d: number, e: number) => any;
|
|
2165
|
+
readonly createTurnkeySigner: (a: any) => any;
|
|
1871
2166
|
readonly defaultConfig: (a: any) => any;
|
|
1872
|
-
readonly
|
|
2167
|
+
readonly defaultExternalSigners: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
|
|
1873
2168
|
readonly defaultMysqlStorageConfig: (a: number, b: number) => any;
|
|
1874
2169
|
readonly defaultPostgresStorageConfig: (a: number, b: number) => any;
|
|
1875
2170
|
readonly defaultServerConfig: (a: any) => any;
|
|
1876
|
-
readonly
|
|
1877
|
-
readonly
|
|
1878
|
-
readonly
|
|
1879
|
-
readonly
|
|
1880
|
-
readonly
|
|
1881
|
-
readonly
|
|
1882
|
-
readonly
|
|
1883
|
-
readonly
|
|
1884
|
-
readonly
|
|
1885
|
-
readonly
|
|
1886
|
-
readonly
|
|
1887
|
-
readonly
|
|
1888
|
-
readonly
|
|
1889
|
-
readonly
|
|
1890
|
-
readonly
|
|
1891
|
-
readonly
|
|
1892
|
-
readonly
|
|
1893
|
-
readonly
|
|
1894
|
-
readonly
|
|
1895
|
-
readonly
|
|
2171
|
+
readonly defaultStorage: (a: number, b: number) => number;
|
|
2172
|
+
readonly externalbreezsignerhandle_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
2173
|
+
readonly externalbreezsignerhandle_derivePublicKey: (a: number, b: number, c: number) => any;
|
|
2174
|
+
readonly externalbreezsignerhandle_encryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
2175
|
+
readonly externalbreezsignerhandle_hmacSha256: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
2176
|
+
readonly externalbreezsignerhandle_signEcdsa: (a: number, b: any, c: number, d: number) => any;
|
|
2177
|
+
readonly externalbreezsignerhandle_signEcdsaRecoverable: (a: number, b: any, c: number, d: number) => any;
|
|
2178
|
+
readonly externalbreezsignerhandle_signHashSchnorr: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
2179
|
+
readonly externalsigners_breezSigner: (a: number) => number;
|
|
2180
|
+
readonly externalsigners_sparkSigner: (a: number) => number;
|
|
2181
|
+
readonly externalsparksignerhandle_getIdentityPublicKey: (a: number) => any;
|
|
2182
|
+
readonly externalsparksignerhandle_getPublicKeyForLeaf: (a: number, b: any) => any;
|
|
2183
|
+
readonly externalsparksignerhandle_getStaticDepositPublicKey: (a: number, b: number) => any;
|
|
2184
|
+
readonly externalsparksignerhandle_prepareClaim: (a: number, b: any) => any;
|
|
2185
|
+
readonly externalsparksignerhandle_prepareLightningReceive: (a: number, b: any) => any;
|
|
2186
|
+
readonly externalsparksignerhandle_prepareStaticDeposit: (a: number, b: any) => any;
|
|
2187
|
+
readonly externalsparksignerhandle_prepareStaticDepositClaim: (a: number, b: any) => any;
|
|
2188
|
+
readonly externalsparksignerhandle_prepareTokenTransaction: (a: number, b: any) => any;
|
|
2189
|
+
readonly externalsparksignerhandle_prepareTransfer: (a: number, b: any) => any;
|
|
2190
|
+
readonly externalsparksignerhandle_signAuthenticationChallenge: (a: number, b: number, c: number) => any;
|
|
2191
|
+
readonly externalsparksignerhandle_signFrost: (a: number, b: number, c: number) => any;
|
|
2192
|
+
readonly externalsparksignerhandle_signMessage: (a: number, b: number, c: number) => any;
|
|
2193
|
+
readonly externalsparksignerhandle_signSparkInvoice: (a: number, b: any) => any;
|
|
2194
|
+
readonly externalsparksignerhandle_signStaticDepositRefund: (a: number, b: any) => any;
|
|
2195
|
+
readonly externalsparksignerhandle_startStaticDepositRefund: (a: number, b: any) => any;
|
|
1896
2196
|
readonly getSparkStatus: () => any;
|
|
1897
2197
|
readonly initLogging: (a: any, b: number, c: number) => any;
|
|
2198
|
+
readonly mysqlStorage: (a: any) => number;
|
|
1898
2199
|
readonly newRestChainService: (a: number, b: number, c: any, d: any, e: number) => any;
|
|
1899
2200
|
readonly newSharedSdkContext: (a: any) => any;
|
|
1900
|
-
readonly
|
|
1901
|
-
readonly
|
|
1902
|
-
readonly
|
|
1903
|
-
readonly
|
|
1904
|
-
readonly
|
|
2201
|
+
readonly passkeyclient_checkAvailability: (a: number) => any;
|
|
2202
|
+
readonly passkeyclient_labels: (a: number) => number;
|
|
2203
|
+
readonly passkeyclient_new: (a: any, b: number, c: number, d: number) => number;
|
|
2204
|
+
readonly passkeyclient_register: (a: number, b: any) => any;
|
|
2205
|
+
readonly passkeyclient_signIn: (a: number, b: any) => any;
|
|
2206
|
+
readonly passkeylabels_list: (a: number) => any;
|
|
2207
|
+
readonly passkeylabels_store: (a: number, b: number, c: number) => any;
|
|
2208
|
+
readonly postgresStorage: (a: any) => number;
|
|
1905
2209
|
readonly sdkbuilder_build: (a: number) => any;
|
|
1906
2210
|
readonly sdkbuilder_new: (a: any, b: any) => number;
|
|
1907
|
-
readonly sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
|
2211
|
+
readonly sdkbuilder_newWithSigner: (a: any, b: any, c: any) => number;
|
|
2212
|
+
readonly sdkbuilder_withAccountNumber: (a: number, b: number) => number;
|
|
1908
2213
|
readonly sdkbuilder_withChainService: (a: number, b: any) => number;
|
|
1909
2214
|
readonly sdkbuilder_withDefaultStorage: (a: number, b: number, c: number) => any;
|
|
1910
2215
|
readonly sdkbuilder_withFiatService: (a: number, b: any) => number;
|
|
1911
|
-
readonly sdkbuilder_withKeySet: (a: number, b: any) => number;
|
|
1912
2216
|
readonly sdkbuilder_withLnurlClient: (a: number, b: any) => number;
|
|
1913
2217
|
readonly sdkbuilder_withMysqlBackend: (a: number, b: any) => [number, number, number];
|
|
1914
|
-
readonly sdkbuilder_withMysqlConnectionPool: (a: number, b: number) => number;
|
|
1915
2218
|
readonly sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
|
|
1916
2219
|
readonly sdkbuilder_withPostgresBackend: (a: number, b: any) => [number, number, number];
|
|
1917
|
-
readonly sdkbuilder_withPostgresConnectionPool: (a: number, b: number) => number;
|
|
1918
2220
|
readonly sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
|
|
1919
2221
|
readonly sdkbuilder_withSharedContext: (a: number, b: number) => number;
|
|
1920
2222
|
readonly sdkbuilder_withStorage: (a: number, b: any) => number;
|
|
2223
|
+
readonly sdkbuilder_withStorageBackend: (a: number, b: number) => number;
|
|
1921
2224
|
readonly tokenissuer_burnIssuerToken: (a: number, b: any) => any;
|
|
1922
2225
|
readonly tokenissuer_createIssuerToken: (a: number, b: any) => any;
|
|
1923
2226
|
readonly tokenissuer_freezeIssuerToken: (a: number, b: any) => any;
|
|
@@ -1943,16 +2246,18 @@ export interface InitOutput {
|
|
|
1943
2246
|
readonly intounderlyingsink_write: (a: number, b: any) => any;
|
|
1944
2247
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
1945
2248
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
1946
|
-
readonly
|
|
1947
|
-
readonly
|
|
1948
|
-
readonly
|
|
1949
|
-
readonly
|
|
1950
|
-
readonly
|
|
2249
|
+
readonly __wbg_externalbreezsignerhandle_free: (a: number, b: number) => void;
|
|
2250
|
+
readonly __wbg_externalsparksignerhandle_free: (a: number, b: number) => void;
|
|
2251
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c: (a: number, b: number, c: any) => [number, number];
|
|
2252
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_4: (a: number, b: number, c: any) => [number, number];
|
|
2253
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_5: (a: number, b: number, c: any) => [number, number];
|
|
2254
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_6: (a: number, b: number, c: any) => [number, number];
|
|
2255
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_7: (a: number, b: number, c: any) => [number, number];
|
|
1951
2256
|
readonly wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
|
|
1952
2257
|
readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57: (a: number, b: number, c: any) => void;
|
|
1953
2258
|
readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2: (a: number, b: number, c: any) => void;
|
|
1954
2259
|
readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3: (a: number, b: number, c: any) => void;
|
|
1955
|
-
readonly
|
|
2260
|
+
readonly wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7: (a: number, b: number) => void;
|
|
1956
2261
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1957
2262
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1958
2263
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|