@breeztech/breez-sdk-spark 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +96 -0
- package/bundler/breez_sdk_spark_wasm.js +1 -1
- package/bundler/breez_sdk_spark_wasm_bg.js +189 -22
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +15 -6
- package/deno/breez_sdk_spark_wasm.d.ts +96 -0
- package/deno/breez_sdk_spark_wasm.js +189 -22
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +15 -6
- package/nodejs/breez_sdk_spark_wasm.d.ts +96 -0
- package/nodejs/breez_sdk_spark_wasm.js +191 -22
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +15 -6
- package/nodejs/index.mjs +2 -0
- package/nodejs/mysql-token-store/index.cjs +212 -70
- package/nodejs/mysql-tree-store/index.cjs +158 -26
- package/nodejs/postgres-token-store/index.cjs +207 -69
- package/nodejs/postgres-tree-store/index.cjs +157 -31
- package/package.json +1 -1
- package/ssr/index.js +12 -0
- package/web/breez_sdk_spark_wasm.d.ts +111 -6
- package/web/breez_sdk_spark_wasm.js +189 -22
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +15 -6
package/breez-sdk-spark.tgz
CHANGED
|
Binary file
|
|
@@ -39,16 +39,24 @@ type ReserveResult =
|
|
|
39
39
|
| { type: 'insufficientFunds' }
|
|
40
40
|
| { type: 'waitForPending'; needed: number; available: number; pending: number };
|
|
41
41
|
|
|
42
|
+
type LeafSelection =
|
|
43
|
+
| { type: 'exact'; leaves: TreeNode[] }
|
|
44
|
+
| { type: 'swapNeeded'; leaves: TreeNode[] }
|
|
45
|
+
| { type: 'insufficientFunds' };
|
|
46
|
+
|
|
42
47
|
export interface TreeStore {
|
|
43
48
|
addLeaves: (leaves: TreeNode[]) => Promise<void>;
|
|
44
49
|
getLeaves: () => Promise<Leaves>;
|
|
45
50
|
getAvailableBalance: () => Promise<bigint>;
|
|
51
|
+
getVerifiedLeafKeys: () => Promise<[string, string, string][]>;
|
|
46
52
|
setLeaves: (leaves: TreeNode[], missingLeaves: TreeNode[], refreshStartedAtMs: number) => Promise<void>;
|
|
47
53
|
cancelReservation: (id: string, leavesToKeep: TreeNode[]) => Promise<void>;
|
|
48
54
|
finalizeReservation: (id: string, newLeaves: TreeNode[] | null) => Promise<void>;
|
|
49
55
|
tryReserveLeaves: (targetAmounts: TargetAmounts | null, exactOnly: boolean, purpose: string) => Promise<ReserveResult>;
|
|
50
56
|
now: () => Promise<number>;
|
|
51
57
|
updateReservation: (reservationId: string, reservedLeaves: TreeNode[], changeLeaves: TreeNode[]) => Promise<LeavesReservation>;
|
|
58
|
+
tryReserveLeavesByIds: (leafIds: string[], purpose: string) => Promise<LeavesReservation>;
|
|
59
|
+
trySelectLeaves: (targetAmounts: TargetAmounts | null) => Promise<LeafSelection>;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
|
|
@@ -123,6 +131,17 @@ export interface TokenStore {
|
|
|
123
131
|
preferredOutputs: WasmTokenOutputWithPrevOut[] | null,
|
|
124
132
|
selectionStrategy: string | null
|
|
125
133
|
) => Promise<WasmTokenOutputsReservation>;
|
|
134
|
+
selectTokenOutputs: (
|
|
135
|
+
tokenIdentifier: string,
|
|
136
|
+
target: WasmReservationTarget,
|
|
137
|
+
preferredOutputs: WasmTokenOutputWithPrevOut[] | null,
|
|
138
|
+
selectionStrategy: string | null
|
|
139
|
+
) => Promise<WasmTokenOutputs>;
|
|
140
|
+
reserveTokenOutputsByOutpoints: (
|
|
141
|
+
tokenIdentifier: string,
|
|
142
|
+
outpoints: { prevTxHash: string; prevTxVout: number }[],
|
|
143
|
+
purpose: string
|
|
144
|
+
) => Promise<WasmTokenOutputsReservation>;
|
|
126
145
|
cancelReservation: (id: string) => Promise<void>;
|
|
127
146
|
finalizeReservation: (id: string) => Promise<void>;
|
|
128
147
|
now: () => Promise<number>;
|
|
@@ -536,6 +555,15 @@ export interface Bolt12OfferDetails {
|
|
|
536
555
|
signingPubkey?: string;
|
|
537
556
|
}
|
|
538
557
|
|
|
558
|
+
export interface BuildUnsignedLnurlPayPackageRequest {
|
|
559
|
+
prepareResponse: PrepareLnurlPayResponse;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export interface BuildUnsignedTransferPackageRequest {
|
|
563
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
564
|
+
options?: BuildTransferPackageOptions;
|
|
565
|
+
}
|
|
566
|
+
|
|
539
567
|
export interface BurnIssuerTokenRequest {
|
|
540
568
|
amount: bigint;
|
|
541
569
|
}
|
|
@@ -1078,6 +1106,12 @@ export interface LnurlInfo {
|
|
|
1078
1106
|
bech32: string;
|
|
1079
1107
|
}
|
|
1080
1108
|
|
|
1109
|
+
export interface LnurlPayContext {
|
|
1110
|
+
payRequest: LnurlPayRequestDetails;
|
|
1111
|
+
comment?: string;
|
|
1112
|
+
successAction?: SuccessAction;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1081
1115
|
export interface LnurlPayInfo {
|
|
1082
1116
|
lnAddress?: string;
|
|
1083
1117
|
comment?: string;
|
|
@@ -1267,6 +1301,14 @@ export interface PublicKeyBytes {
|
|
|
1267
1301
|
bytes: number[];
|
|
1268
1302
|
}
|
|
1269
1303
|
|
|
1304
|
+
export interface PublishSignedLnurlPayPackageRequest {
|
|
1305
|
+
signedPackage: SignedTransferPackage;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
export interface PublishSignedTransferPackageRequest {
|
|
1309
|
+
signedPackage: SignedTransferPackage;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1270
1312
|
export interface Rate {
|
|
1271
1313
|
coin: string;
|
|
1272
1314
|
value: number;
|
|
@@ -1408,6 +1450,11 @@ export interface SignMessageResponse {
|
|
|
1408
1450
|
signature: string;
|
|
1409
1451
|
}
|
|
1410
1452
|
|
|
1453
|
+
export interface SignedTransferPackage {
|
|
1454
|
+
unsigned: UnsignedTransferPackage;
|
|
1455
|
+
signature: TransferSignature;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1411
1458
|
export interface SilentPaymentAddressDetails {
|
|
1412
1459
|
address: string;
|
|
1413
1460
|
network: BitcoinNetwork;
|
|
@@ -1428,6 +1475,7 @@ export interface SparkConfig {
|
|
|
1428
1475
|
sspConfig: SparkSspConfig;
|
|
1429
1476
|
expectedWithdrawBondSats: number;
|
|
1430
1477
|
expectedWithdrawRelativeBlockLocktime: number;
|
|
1478
|
+
maxTokenTransactionInputs?: number;
|
|
1431
1479
|
}
|
|
1432
1480
|
|
|
1433
1481
|
export interface SparkHtlcDetails {
|
|
@@ -1597,7 +1645,9 @@ export interface TurnkeyConfig {
|
|
|
1597
1645
|
walletId: string;
|
|
1598
1646
|
network: Network;
|
|
1599
1647
|
accountNumber?: number;
|
|
1648
|
+
identityPublicKey?: string;
|
|
1600
1649
|
retry?: TurnkeyRetryConfig;
|
|
1650
|
+
maxRps?: number;
|
|
1601
1651
|
}
|
|
1602
1652
|
|
|
1603
1653
|
export interface TurnkeyRetryConfig {
|
|
@@ -1680,6 +1730,8 @@ export type AutoOptimizationEvent = { type: "started"; totalRounds: number } | {
|
|
|
1680
1730
|
|
|
1681
1731
|
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
1682
1732
|
|
|
1733
|
+
export type BuildTransferPackageOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number };
|
|
1734
|
+
|
|
1683
1735
|
export type BuyBitcoinRequest = { type: "moonpay"; lockedAmountSat?: number; redirectUrl?: string } | { type: "cashApp"; amountSats: number };
|
|
1684
1736
|
|
|
1685
1737
|
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
@@ -1748,6 +1800,10 @@ export type PaymentType = "send" | "receive";
|
|
|
1748
1800
|
|
|
1749
1801
|
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
1750
1802
|
|
|
1803
|
+
export type PublishSignedLnurlPayResponse = { type: "swapCompleted" } | { type: "paymentSent"; response: LnurlPayResponse };
|
|
1804
|
+
|
|
1805
|
+
export type PublishSignedTransferPackageResponse = { type: "swapCompleted" } | { type: "paymentSent"; payment: Payment };
|
|
1806
|
+
|
|
1751
1807
|
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 };
|
|
1752
1808
|
|
|
1753
1809
|
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[] };
|
|
@@ -1776,6 +1832,12 @@ export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionData
|
|
|
1776
1832
|
|
|
1777
1833
|
export type TokenTransactionType = "transfer" | "mint" | "burn";
|
|
1778
1834
|
|
|
1835
|
+
export type TransferSignature = { type: "transfer"; signed: ExternalPreparedTransfer } | { type: "token"; signed: ExternalPreparedTokenTransaction };
|
|
1836
|
+
|
|
1837
|
+
export type TransferTarget = { type: "spark"; address: string; sparkInvoice?: string } | { type: "lightning"; bolt11: string; lnurlPay?: LnurlPayContext; feePolicy: FeePolicy; completionTimeoutSecs?: number } | { type: "coopExit"; address: string; feeQuote: SendOnchainFeeQuote; confirmationSpeed: OnchainConfirmationSpeed };
|
|
1838
|
+
|
|
1839
|
+
export type UnsignedTransferPackage = { type: "swap"; prepareTransfer: ExternalPrepareTransferRequest; targetAmounts: number[]; amountSat: number; feeSat: number } | { type: "transfer"; prepareTransfer: ExternalPrepareTransferRequest; amountSat: number; feeSat: number; target: TransferTarget } | { type: "token"; prepareTokenTransaction: ExternalPrepareTokenTransactionRequest; tokenContext: number[]; tokenIdentifier: string; amount: string; fee: string; isSwap: boolean };
|
|
1840
|
+
|
|
1779
1841
|
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
1780
1842
|
|
|
1781
1843
|
export type WebhookEventType = { type: "lightningReceiveFinished" } | { type: "lightningSendFinished" } | { type: "coopExitFinished" } | { type: "staticDepositFinished" } | ({ type: "unknown" } & string);
|
|
@@ -1807,6 +1869,8 @@ export class BreezSdk {
|
|
|
1807
1869
|
addContact(request: AddContactRequest): Promise<Contact>;
|
|
1808
1870
|
addEventListener(listener: EventListener): Promise<string>;
|
|
1809
1871
|
authorizeLightningAddressTransfer(request: AuthorizeTransferRequest): Promise<TransferAuthorization>;
|
|
1872
|
+
buildUnsignedLnurlPayPackage(request: BuildUnsignedLnurlPayPackageRequest): Promise<UnsignedTransferPackage>;
|
|
1873
|
+
buildUnsignedTransferPackage(request: BuildUnsignedTransferPackageRequest): Promise<UnsignedTransferPackage>;
|
|
1810
1874
|
buyBitcoin(request: BuyBitcoinRequest): Promise<BuyBitcoinResponse>;
|
|
1811
1875
|
checkLightningAddressAvailable(request: CheckLightningAddressRequest): Promise<boolean>;
|
|
1812
1876
|
checkMessage(request: CheckMessageRequest): Promise<CheckMessageResponse>;
|
|
@@ -1837,6 +1901,8 @@ export class BreezSdk {
|
|
|
1837
1901
|
parse(input: string): Promise<InputType>;
|
|
1838
1902
|
prepareLnurlPay(request: PrepareLnurlPayRequest): Promise<PrepareLnurlPayResponse>;
|
|
1839
1903
|
prepareSendPayment(request: PrepareSendPaymentRequest): Promise<PrepareSendPaymentResponse>;
|
|
1904
|
+
publishSignedLnurlPayPackage(request: PublishSignedLnurlPayPackageRequest): Promise<PublishSignedLnurlPayResponse>;
|
|
1905
|
+
publishSignedTransferPackage(request: PublishSignedTransferPackageRequest): Promise<PublishSignedTransferPackageResponse>;
|
|
1840
1906
|
receivePayment(request: ReceivePaymentRequest): Promise<ReceivePaymentResponse>;
|
|
1841
1907
|
recommendedFees(): Promise<RecommendedFees>;
|
|
1842
1908
|
refundDeposit(request: RefundDepositRequest): Promise<RefundDepositResponse>;
|
|
@@ -1852,6 +1918,21 @@ export class BreezSdk {
|
|
|
1852
1918
|
updateUserSettings(request: UpdateUserSettingsRequest): Promise<void>;
|
|
1853
1919
|
}
|
|
1854
1920
|
|
|
1921
|
+
/**
|
|
1922
|
+
* A JS handle to a backend's own session store (from `defaultSessionStore`),
|
|
1923
|
+
* exposing the same `getSession` / `setSession` interface. Wrap it in a JS
|
|
1924
|
+
* `SessionStore` decorator and pass that to `SdkBuilder.withSessionStore` to
|
|
1925
|
+
* transform tokens while keeping the backend's persistence: for example
|
|
1926
|
+
* at-rest encryption, which the SDK does not apply itself.
|
|
1927
|
+
*/
|
|
1928
|
+
export class DefaultSessionStore {
|
|
1929
|
+
private constructor();
|
|
1930
|
+
free(): void;
|
|
1931
|
+
[Symbol.dispose](): void;
|
|
1932
|
+
getSession(service_identity_key: string): Promise<Session>;
|
|
1933
|
+
setSession(service_identity_key: string, session: Session): Promise<void>;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1855
1936
|
/**
|
|
1856
1937
|
* A Rust-backed [`ExternalBreezSigner`] surfaced to JS as a signer object that
|
|
1857
1938
|
* can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
|
|
@@ -2051,6 +2132,13 @@ export class SdkBuilder {
|
|
|
2051
2132
|
*/
|
|
2052
2133
|
withPostgresBackend(config: PostgresStorageConfig): SdkBuilder;
|
|
2053
2134
|
withRestChainService(url: string, api_type: ChainApiType, credentials?: Credentials | null): SdkBuilder;
|
|
2135
|
+
/**
|
|
2136
|
+
* Overrides the session store used to cache auth tokens, replacing the one
|
|
2137
|
+
* the backend provides. Pass any `SessionStore`: for example one that wraps
|
|
2138
|
+
* the backend's own store from `defaultSessionStore` to add at-rest
|
|
2139
|
+
* encryption, which the SDK does not apply itself.
|
|
2140
|
+
*/
|
|
2141
|
+
withSessionStore(session_store: SessionStore): SdkBuilder;
|
|
2054
2142
|
/**
|
|
2055
2143
|
* Threads a shared [`WasmSdkContext`] into the builder.
|
|
2056
2144
|
*
|
|
@@ -2185,6 +2273,14 @@ export function defaultPostgresStorageConfig(connection_string: string): Postgre
|
|
|
2185
2273
|
|
|
2186
2274
|
export function defaultServerConfig(network: Network): Config;
|
|
2187
2275
|
|
|
2276
|
+
/**
|
|
2277
|
+
* The session store the `config`'s backend provides for `identity` (the wallet
|
|
2278
|
+
* identity public key, hex), as a handle to wrap in a `SessionStore` decorator
|
|
2279
|
+
* and pass to `SdkBuilder.withSessionStore`, keeping the backend's persistence.
|
|
2280
|
+
* A typical use is at-rest encryption, which the SDK does not apply itself.
|
|
2281
|
+
*/
|
|
2282
|
+
export function defaultSessionStore(config: WasmStorageConfig, network: Network, identity: string): Promise<DefaultSessionStore>;
|
|
2283
|
+
|
|
2188
2284
|
/**
|
|
2189
2285
|
* File-based storage rooted at `storageDir` — IndexedDB in the browser,
|
|
2190
2286
|
* SQLite under Node.js.
|
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./breez_sdk_spark_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
BitcoinChainServiceHandle, BreezSdk, ExternalBreezSignerHandle, ExternalSigners, ExternalSigningSignerHandle, ExternalSparkSignerHandle, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, PasskeyClient, PasskeyLabels, SdkBuilder, SigningOnlyExternalSigners, TokenIssuer, WasmSdkContext, WasmStorageConfig, connect, connectWithSigner, connectWithSigningOnlySigner, createTurnkeySigner, createTurnkeySigningOnlySigner, defaultConfig, defaultExternalSigners, defaultMysqlStorageConfig, defaultPostgresStorageConfig, defaultServerConfig, defaultStorage, getSparkStatus, initLogging, mysqlStorage, newRestChainService, newSharedSdkContext, postgresStorage, start, task_worker_entry_point
|
|
8
|
+
BitcoinChainServiceHandle, BreezSdk, DefaultSessionStore, ExternalBreezSignerHandle, ExternalSigners, ExternalSigningSignerHandle, ExternalSparkSignerHandle, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, PasskeyClient, PasskeyLabels, SdkBuilder, SigningOnlyExternalSigners, TokenIssuer, WasmSdkContext, WasmStorageConfig, connect, connectWithSigner, connectWithSigningOnlySigner, createTurnkeySigner, createTurnkeySigningOnlySigner, defaultConfig, defaultExternalSigners, defaultMysqlStorageConfig, defaultPostgresStorageConfig, defaultServerConfig, defaultSessionStore, defaultStorage, getSparkStatus, initLogging, mysqlStorage, newRestChainService, newSharedSdkContext, postgresStorage, start, task_worker_entry_point
|
|
9
9
|
} from "./breez_sdk_spark_wasm_bg.js";
|
|
@@ -114,6 +114,22 @@ export class BreezSdk {
|
|
|
114
114
|
const ret = wasm.breezsdk_authorizeLightningAddressTransfer(this.__wbg_ptr, request);
|
|
115
115
|
return ret;
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* @param {BuildUnsignedLnurlPayPackageRequest} request
|
|
119
|
+
* @returns {Promise<UnsignedTransferPackage>}
|
|
120
|
+
*/
|
|
121
|
+
buildUnsignedLnurlPayPackage(request) {
|
|
122
|
+
const ret = wasm.breezsdk_buildUnsignedLnurlPayPackage(this.__wbg_ptr, request);
|
|
123
|
+
return ret;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* @param {BuildUnsignedTransferPackageRequest} request
|
|
127
|
+
* @returns {Promise<UnsignedTransferPackage>}
|
|
128
|
+
*/
|
|
129
|
+
buildUnsignedTransferPackage(request) {
|
|
130
|
+
const ret = wasm.breezsdk_buildUnsignedTransferPackage(this.__wbg_ptr, request);
|
|
131
|
+
return ret;
|
|
132
|
+
}
|
|
117
133
|
/**
|
|
118
134
|
* @param {BuyBitcoinRequest} request
|
|
119
135
|
* @returns {Promise<BuyBitcoinResponse>}
|
|
@@ -350,6 +366,22 @@ export class BreezSdk {
|
|
|
350
366
|
const ret = wasm.breezsdk_prepareSendPayment(this.__wbg_ptr, request);
|
|
351
367
|
return ret;
|
|
352
368
|
}
|
|
369
|
+
/**
|
|
370
|
+
* @param {PublishSignedLnurlPayPackageRequest} request
|
|
371
|
+
* @returns {Promise<PublishSignedLnurlPayResponse>}
|
|
372
|
+
*/
|
|
373
|
+
publishSignedLnurlPayPackage(request) {
|
|
374
|
+
const ret = wasm.breezsdk_publishSignedLnurlPayPackage(this.__wbg_ptr, request);
|
|
375
|
+
return ret;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* @param {PublishSignedTransferPackageRequest} request
|
|
379
|
+
* @returns {Promise<PublishSignedTransferPackageResponse>}
|
|
380
|
+
*/
|
|
381
|
+
publishSignedTransferPackage(request) {
|
|
382
|
+
const ret = wasm.breezsdk_publishSignedTransferPackage(this.__wbg_ptr, request);
|
|
383
|
+
return ret;
|
|
384
|
+
}
|
|
353
385
|
/**
|
|
354
386
|
* @param {ReceivePaymentRequest} request
|
|
355
387
|
* @returns {Promise<ReceivePaymentResponse>}
|
|
@@ -457,6 +489,54 @@ export class BreezSdk {
|
|
|
457
489
|
}
|
|
458
490
|
if (Symbol.dispose) BreezSdk.prototype[Symbol.dispose] = BreezSdk.prototype.free;
|
|
459
491
|
|
|
492
|
+
/**
|
|
493
|
+
* A JS handle to a backend's own session store (from `defaultSessionStore`),
|
|
494
|
+
* exposing the same `getSession` / `setSession` interface. Wrap it in a JS
|
|
495
|
+
* `SessionStore` decorator and pass that to `SdkBuilder.withSessionStore` to
|
|
496
|
+
* transform tokens while keeping the backend's persistence: for example
|
|
497
|
+
* at-rest encryption, which the SDK does not apply itself.
|
|
498
|
+
*/
|
|
499
|
+
export class DefaultSessionStore {
|
|
500
|
+
static __wrap(ptr) {
|
|
501
|
+
const obj = Object.create(DefaultSessionStore.prototype);
|
|
502
|
+
obj.__wbg_ptr = ptr;
|
|
503
|
+
DefaultSessionStoreFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
504
|
+
return obj;
|
|
505
|
+
}
|
|
506
|
+
__destroy_into_raw() {
|
|
507
|
+
const ptr = this.__wbg_ptr;
|
|
508
|
+
this.__wbg_ptr = 0;
|
|
509
|
+
DefaultSessionStoreFinalization.unregister(this);
|
|
510
|
+
return ptr;
|
|
511
|
+
}
|
|
512
|
+
free() {
|
|
513
|
+
const ptr = this.__destroy_into_raw();
|
|
514
|
+
wasm.__wbg_defaultsessionstore_free(ptr, 0);
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* @param {string} service_identity_key
|
|
518
|
+
* @returns {Promise<Session>}
|
|
519
|
+
*/
|
|
520
|
+
getSession(service_identity_key) {
|
|
521
|
+
const ptr0 = passStringToWasm0(service_identity_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
522
|
+
const len0 = WASM_VECTOR_LEN;
|
|
523
|
+
const ret = wasm.defaultsessionstore_getSession(this.__wbg_ptr, ptr0, len0);
|
|
524
|
+
return ret;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* @param {string} service_identity_key
|
|
528
|
+
* @param {Session} session
|
|
529
|
+
* @returns {Promise<void>}
|
|
530
|
+
*/
|
|
531
|
+
setSession(service_identity_key, session) {
|
|
532
|
+
const ptr0 = passStringToWasm0(service_identity_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
533
|
+
const len0 = WASM_VECTOR_LEN;
|
|
534
|
+
const ret = wasm.defaultsessionstore_setSession(this.__wbg_ptr, ptr0, len0, session);
|
|
535
|
+
return ret;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (Symbol.dispose) DefaultSessionStore.prototype[Symbol.dispose] = DefaultSessionStore.prototype.free;
|
|
539
|
+
|
|
460
540
|
/**
|
|
461
541
|
* A Rust-backed [`ExternalBreezSigner`] surfaced to JS as a signer object that
|
|
462
542
|
* can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
|
|
@@ -1217,6 +1297,19 @@ export class SdkBuilder {
|
|
|
1217
1297
|
const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
|
|
1218
1298
|
return SdkBuilder.__wrap(ret);
|
|
1219
1299
|
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Overrides the session store used to cache auth tokens, replacing the one
|
|
1302
|
+
* the backend provides. Pass any `SessionStore`: for example one that wraps
|
|
1303
|
+
* the backend's own store from `defaultSessionStore` to add at-rest
|
|
1304
|
+
* encryption, which the SDK does not apply itself.
|
|
1305
|
+
* @param {SessionStore} session_store
|
|
1306
|
+
* @returns {SdkBuilder}
|
|
1307
|
+
*/
|
|
1308
|
+
withSessionStore(session_store) {
|
|
1309
|
+
const ptr = this.__destroy_into_raw();
|
|
1310
|
+
const ret = wasm.sdkbuilder_withSessionStore(ptr, session_store);
|
|
1311
|
+
return SdkBuilder.__wrap(ret);
|
|
1312
|
+
}
|
|
1220
1313
|
/**
|
|
1221
1314
|
* Threads a shared [`WasmSdkContext`] into the builder.
|
|
1222
1315
|
*
|
|
@@ -1568,6 +1661,24 @@ export function defaultServerConfig(network) {
|
|
|
1568
1661
|
return ret;
|
|
1569
1662
|
}
|
|
1570
1663
|
|
|
1664
|
+
/**
|
|
1665
|
+
* The session store the `config`'s backend provides for `identity` (the wallet
|
|
1666
|
+
* identity public key, hex), as a handle to wrap in a `SessionStore` decorator
|
|
1667
|
+
* and pass to `SdkBuilder.withSessionStore`, keeping the backend's persistence.
|
|
1668
|
+
* A typical use is at-rest encryption, which the SDK does not apply itself.
|
|
1669
|
+
* @param {WasmStorageConfig} config
|
|
1670
|
+
* @param {Network} network
|
|
1671
|
+
* @param {string} identity
|
|
1672
|
+
* @returns {Promise<DefaultSessionStore>}
|
|
1673
|
+
*/
|
|
1674
|
+
export function defaultSessionStore(config, network, identity) {
|
|
1675
|
+
_assertClass(config, WasmStorageConfig);
|
|
1676
|
+
const ptr0 = passStringToWasm0(identity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1677
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1678
|
+
const ret = wasm.defaultSessionStore(config.__wbg_ptr, network, ptr0, len0);
|
|
1679
|
+
return ret;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1571
1682
|
/**
|
|
1572
1683
|
* File-based storage rooted at `storageDir` — IndexedDB in the browser,
|
|
1573
1684
|
* SQLite under Node.js.
|
|
@@ -2004,6 +2115,10 @@ export function __wbg_decryptEcies_ebe426814020926b() { return handleError(funct
|
|
|
2004
2115
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2005
2116
|
}
|
|
2006
2117
|
}, arguments); }
|
|
2118
|
+
export function __wbg_defaultsessionstore_new(arg0) {
|
|
2119
|
+
const ret = DefaultSessionStore.__wrap(arg0);
|
|
2120
|
+
return ret;
|
|
2121
|
+
}
|
|
2007
2122
|
export function __wbg_deleteCachedItem_b8fbe3ebea21ed7e() { return handleError(function (arg0, arg1, arg2) {
|
|
2008
2123
|
let deferred0_0;
|
|
2009
2124
|
let deferred0_1;
|
|
@@ -2349,6 +2464,10 @@ export function __wbg_getTransactionStatus_32c49e1985e35d63() { return handleErr
|
|
|
2349
2464
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2350
2465
|
}
|
|
2351
2466
|
}, arguments); }
|
|
2467
|
+
export function __wbg_getVerifiedLeafKeys_12405bb5f39ffb61() { return handleError(function (arg0) {
|
|
2468
|
+
const ret = arg0.getVerifiedLeafKeys();
|
|
2469
|
+
return ret;
|
|
2470
|
+
}, arguments); }
|
|
2352
2471
|
export function __wbg_get_41476db20fef99a8() { return handleError(function (arg0, arg1) {
|
|
2353
2472
|
const ret = Reflect.get(arg0, arg1);
|
|
2354
2473
|
return ret;
|
|
@@ -2794,6 +2913,23 @@ export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function (
|
|
|
2794
2913
|
const ret = module.require;
|
|
2795
2914
|
return ret;
|
|
2796
2915
|
}, arguments); }
|
|
2916
|
+
export function __wbg_reserveTokenOutputsByOutpoints_a18be5f9fb4ab30a() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2917
|
+
let deferred0_0;
|
|
2918
|
+
let deferred0_1;
|
|
2919
|
+
let deferred1_0;
|
|
2920
|
+
let deferred1_1;
|
|
2921
|
+
try {
|
|
2922
|
+
deferred0_0 = arg1;
|
|
2923
|
+
deferred0_1 = arg2;
|
|
2924
|
+
deferred1_0 = arg4;
|
|
2925
|
+
deferred1_1 = arg5;
|
|
2926
|
+
const ret = arg0.reserveTokenOutputsByOutpoints(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5));
|
|
2927
|
+
return ret;
|
|
2928
|
+
} finally {
|
|
2929
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2930
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2931
|
+
}
|
|
2932
|
+
}, arguments); }
|
|
2797
2933
|
export function __wbg_reserveTokenOutputs_233990fbd0ce963a() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2798
2934
|
let deferred0_0;
|
|
2799
2935
|
let deferred0_1;
|
|
@@ -2822,6 +2958,18 @@ export function __wbg_sdkbuilder_new(arg0) {
|
|
|
2822
2958
|
const ret = SdkBuilder.__wrap(arg0);
|
|
2823
2959
|
return ret;
|
|
2824
2960
|
}
|
|
2961
|
+
export function __wbg_selectTokenOutputs_450f20621013b14d() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2962
|
+
let deferred0_0;
|
|
2963
|
+
let deferred0_1;
|
|
2964
|
+
try {
|
|
2965
|
+
deferred0_0 = arg1;
|
|
2966
|
+
deferred0_1 = arg2;
|
|
2967
|
+
const ret = arg0.selectTokenOutputs(getStringFromWasm0(arg1, arg2), arg3, arg4, arg5);
|
|
2968
|
+
return ret;
|
|
2969
|
+
} finally {
|
|
2970
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2971
|
+
}
|
|
2972
|
+
}, arguments); }
|
|
2825
2973
|
export function __wbg_send_0edb796d05cd3239() { return handleError(function (arg0, arg1, arg2) {
|
|
2826
2974
|
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
2827
2975
|
}, arguments); }
|
|
@@ -3163,6 +3311,18 @@ export function __wbg_toString_9ae74d2321992740(arg0) {
|
|
|
3163
3311
|
const ret = arg0.toString();
|
|
3164
3312
|
return ret;
|
|
3165
3313
|
}
|
|
3314
|
+
export function __wbg_tryReserveLeavesByIds_a6433e824993a82f() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3315
|
+
let deferred0_0;
|
|
3316
|
+
let deferred0_1;
|
|
3317
|
+
try {
|
|
3318
|
+
deferred0_0 = arg2;
|
|
3319
|
+
deferred0_1 = arg3;
|
|
3320
|
+
const ret = arg0.tryReserveLeavesByIds(arg1, getStringFromWasm0(arg2, arg3));
|
|
3321
|
+
return ret;
|
|
3322
|
+
} finally {
|
|
3323
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3324
|
+
}
|
|
3325
|
+
}, arguments); }
|
|
3166
3326
|
export function __wbg_tryReserveLeaves_d2cd87cbc2a886d2() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3167
3327
|
let deferred0_0;
|
|
3168
3328
|
let deferred0_1;
|
|
@@ -3175,6 +3335,10 @@ export function __wbg_tryReserveLeaves_d2cd87cbc2a886d2() { return handleError(f
|
|
|
3175
3335
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3176
3336
|
}
|
|
3177
3337
|
}, arguments); }
|
|
3338
|
+
export function __wbg_trySelectLeaves_ff1aeb7ffc5e4e57() { return handleError(function (arg0, arg1) {
|
|
3339
|
+
const ret = arg0.trySelectLeaves(arg1);
|
|
3340
|
+
return ret;
|
|
3341
|
+
}, arguments); }
|
|
3178
3342
|
export function __wbg_updateDeposit_efb96cf6e6fbe7b7() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3179
3343
|
let deferred0_0;
|
|
3180
3344
|
let deferred0_1;
|
|
@@ -3239,61 +3403,61 @@ export function __wbg_wasmsdkcontext_new(arg0) {
|
|
|
3239
3403
|
}
|
|
3240
3404
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
3241
3405
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3242
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3406
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575);
|
|
3243
3407
|
return ret;
|
|
3244
3408
|
}
|
|
3245
3409
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
3246
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3410
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3247
3411
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2);
|
|
3248
3412
|
return ret;
|
|
3249
3413
|
}
|
|
3250
3414
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
3251
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
3415
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3252
3416
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2);
|
|
3253
3417
|
return ret;
|
|
3254
3418
|
}
|
|
3255
3419
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
3256
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
3420
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3257
3421
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3);
|
|
3258
3422
|
return ret;
|
|
3259
3423
|
}
|
|
3260
3424
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
3261
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
3425
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3262
3426
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4);
|
|
3263
3427
|
return ret;
|
|
3264
3428
|
}
|
|
3265
3429
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
3266
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
3430
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3267
3431
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5);
|
|
3268
3432
|
return ret;
|
|
3269
3433
|
}
|
|
3270
3434
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
3271
3435
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3272
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3436
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_6);
|
|
3273
3437
|
return ret;
|
|
3274
3438
|
}
|
|
3275
3439
|
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
3276
3440
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3277
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3441
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_7);
|
|
3278
3442
|
return ret;
|
|
3279
3443
|
}
|
|
3280
3444
|
export function __wbindgen_cast_0000000000000009(arg0, arg1) {
|
|
3281
3445
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3282
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3446
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_8);
|
|
3283
3447
|
return ret;
|
|
3284
3448
|
}
|
|
3285
3449
|
export function __wbindgen_cast_000000000000000a(arg0, arg1) {
|
|
3286
3450
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3287
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3451
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_9);
|
|
3288
3452
|
return ret;
|
|
3289
3453
|
}
|
|
3290
3454
|
export function __wbindgen_cast_000000000000000b(arg0, arg1) {
|
|
3291
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3455
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 392, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3292
3456
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1d6669a7b693932a);
|
|
3293
3457
|
return ret;
|
|
3294
3458
|
}
|
|
3295
3459
|
export function __wbindgen_cast_000000000000000c(arg0, arg1) {
|
|
3296
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3460
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 421, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
3297
3461
|
const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e);
|
|
3298
3462
|
return ret;
|
|
3299
3463
|
}
|
|
@@ -3406,36 +3570,36 @@ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, a
|
|
|
3406
3570
|
wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, arg1, arg2);
|
|
3407
3571
|
}
|
|
3408
3572
|
|
|
3409
|
-
function
|
|
3410
|
-
const ret = wasm.
|
|
3573
|
+
function wasm_bindgen__convert__closures_____invoke__h21f6855640435575(arg0, arg1, arg2) {
|
|
3574
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h21f6855640435575(arg0, arg1, arg2);
|
|
3411
3575
|
if (ret[1]) {
|
|
3412
3576
|
throw takeFromExternrefTable0(ret[0]);
|
|
3413
3577
|
}
|
|
3414
3578
|
}
|
|
3415
3579
|
|
|
3416
|
-
function
|
|
3417
|
-
const ret = wasm.
|
|
3580
|
+
function wasm_bindgen__convert__closures_____invoke__h21f6855640435575_6(arg0, arg1, arg2) {
|
|
3581
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h21f6855640435575_6(arg0, arg1, arg2);
|
|
3418
3582
|
if (ret[1]) {
|
|
3419
3583
|
throw takeFromExternrefTable0(ret[0]);
|
|
3420
3584
|
}
|
|
3421
3585
|
}
|
|
3422
3586
|
|
|
3423
|
-
function
|
|
3424
|
-
const ret = wasm.
|
|
3587
|
+
function wasm_bindgen__convert__closures_____invoke__h21f6855640435575_7(arg0, arg1, arg2) {
|
|
3588
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h21f6855640435575_7(arg0, arg1, arg2);
|
|
3425
3589
|
if (ret[1]) {
|
|
3426
3590
|
throw takeFromExternrefTable0(ret[0]);
|
|
3427
3591
|
}
|
|
3428
3592
|
}
|
|
3429
3593
|
|
|
3430
|
-
function
|
|
3431
|
-
const ret = wasm.
|
|
3594
|
+
function wasm_bindgen__convert__closures_____invoke__h21f6855640435575_8(arg0, arg1, arg2) {
|
|
3595
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h21f6855640435575_8(arg0, arg1, arg2);
|
|
3432
3596
|
if (ret[1]) {
|
|
3433
3597
|
throw takeFromExternrefTable0(ret[0]);
|
|
3434
3598
|
}
|
|
3435
3599
|
}
|
|
3436
3600
|
|
|
3437
|
-
function
|
|
3438
|
-
const ret = wasm.
|
|
3601
|
+
function wasm_bindgen__convert__closures_____invoke__h21f6855640435575_9(arg0, arg1, arg2) {
|
|
3602
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h21f6855640435575_9(arg0, arg1, arg2);
|
|
3439
3603
|
if (ret[1]) {
|
|
3440
3604
|
throw takeFromExternrefTable0(ret[0]);
|
|
3441
3605
|
}
|
|
@@ -3471,6 +3635,9 @@ const BitcoinChainServiceHandleFinalization = (typeof FinalizationRegistry === '
|
|
|
3471
3635
|
const BreezSdkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3472
3636
|
? { register: () => {}, unregister: () => {} }
|
|
3473
3637
|
: new FinalizationRegistry(ptr => wasm.__wbg_breezsdk_free(ptr, 1));
|
|
3638
|
+
const DefaultSessionStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3639
|
+
? { register: () => {}, unregister: () => {} }
|
|
3640
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_defaultsessionstore_free(ptr, 1));
|
|
3474
3641
|
const ExternalBreezSignerHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3475
3642
|
? { register: () => {}, unregister: () => {} }
|
|
3476
3643
|
: new FinalizationRegistry(ptr => wasm.__wbg_externalbreezsignerhandle_free(ptr, 1));
|
|
Binary file
|
|
@@ -18,6 +18,8 @@ export const bitcoinchainservicehandle_recommendedFees: (a: number) => any;
|
|
|
18
18
|
export const breezsdk_addContact: (a: number, b: any) => any;
|
|
19
19
|
export const breezsdk_addEventListener: (a: number, b: any) => any;
|
|
20
20
|
export const breezsdk_authorizeLightningAddressTransfer: (a: number, b: any) => any;
|
|
21
|
+
export const breezsdk_buildUnsignedLnurlPayPackage: (a: number, b: any) => any;
|
|
22
|
+
export const breezsdk_buildUnsignedTransferPackage: (a: number, b: any) => any;
|
|
21
23
|
export const breezsdk_buyBitcoin: (a: number, b: any) => any;
|
|
22
24
|
export const breezsdk_checkLightningAddressAvailable: (a: number, b: any) => any;
|
|
23
25
|
export const breezsdk_checkMessage: (a: number, b: any) => any;
|
|
@@ -48,6 +50,8 @@ export const breezsdk_optimizeLeaves: (a: number, b: any) => any;
|
|
|
48
50
|
export const breezsdk_parse: (a: number, b: number, c: number) => any;
|
|
49
51
|
export const breezsdk_prepareLnurlPay: (a: number, b: any) => any;
|
|
50
52
|
export const breezsdk_prepareSendPayment: (a: number, b: any) => any;
|
|
53
|
+
export const breezsdk_publishSignedLnurlPayPackage: (a: number, b: any) => any;
|
|
54
|
+
export const breezsdk_publishSignedTransferPackage: (a: number, b: any) => any;
|
|
51
55
|
export const breezsdk_receivePayment: (a: number, b: any) => any;
|
|
52
56
|
export const breezsdk_recommendedFees: (a: number) => any;
|
|
53
57
|
export const breezsdk_refundDeposit: (a: number, b: any) => any;
|
|
@@ -71,7 +75,10 @@ export const defaultExternalSigners: (a: number, b: number, c: number, d: number
|
|
|
71
75
|
export const defaultMysqlStorageConfig: (a: number, b: number) => any;
|
|
72
76
|
export const defaultPostgresStorageConfig: (a: number, b: number) => any;
|
|
73
77
|
export const defaultServerConfig: (a: any) => any;
|
|
78
|
+
export const defaultSessionStore: (a: number, b: any, c: number, d: number) => any;
|
|
74
79
|
export const defaultStorage: (a: number, b: number) => number;
|
|
80
|
+
export const defaultsessionstore_getSession: (a: number, b: number, c: number) => any;
|
|
81
|
+
export const defaultsessionstore_setSession: (a: number, b: number, c: number, d: any) => any;
|
|
75
82
|
export const externalbreezsignerhandle_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
76
83
|
export const externalbreezsignerhandle_derivePublicKey: (a: number, b: number, c: number) => any;
|
|
77
84
|
export const externalbreezsignerhandle_encryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
@@ -126,6 +133,7 @@ export const sdkbuilder_withMysqlBackend: (a: number, b: any) => [number, number
|
|
|
126
133
|
export const sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
|
|
127
134
|
export const sdkbuilder_withPostgresBackend: (a: number, b: any) => [number, number, number];
|
|
128
135
|
export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
|
|
136
|
+
export const sdkbuilder_withSessionStore: (a: number, b: any) => number;
|
|
129
137
|
export const sdkbuilder_withSharedContext: (a: number, b: number) => number;
|
|
130
138
|
export const sdkbuilder_withStorage: (a: number, b: any) => number;
|
|
131
139
|
export const sdkbuilder_withStorageBackend: (a: number, b: number) => number;
|
|
@@ -156,16 +164,17 @@ export const intounderlyingsink_write: (a: number, b: any) => any;
|
|
|
156
164
|
export const intounderlyingsource_cancel: (a: number) => void;
|
|
157
165
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
158
166
|
export const __wbg_externalbreezsignerhandle_free: (a: number, b: number) => void;
|
|
159
|
-
export const
|
|
167
|
+
export const __wbg_defaultsessionstore_free: (a: number, b: number) => void;
|
|
160
168
|
export const __wbg_externalsigningsignerhandle_free: (a: number, b: number) => void;
|
|
169
|
+
export const __wbg_externalsparksignerhandle_free: (a: number, b: number) => void;
|
|
161
170
|
export const __wbg_signingonlyexternalsigners_free: (a: number, b: number) => void;
|
|
162
171
|
export const signingonlyexternalsigners_breezSigner: (a: number) => number;
|
|
163
172
|
export const signingonlyexternalsigners_sparkSigner: (a: number) => number;
|
|
164
|
-
export const
|
|
165
|
-
export const
|
|
166
|
-
export const
|
|
167
|
-
export const
|
|
168
|
-
export const
|
|
173
|
+
export const wasm_bindgen__convert__closures_____invoke__h21f6855640435575: (a: number, b: number, c: any) => [number, number];
|
|
174
|
+
export const wasm_bindgen__convert__closures_____invoke__h21f6855640435575_6: (a: number, b: number, c: any) => [number, number];
|
|
175
|
+
export const wasm_bindgen__convert__closures_____invoke__h21f6855640435575_7: (a: number, b: number, c: any) => [number, number];
|
|
176
|
+
export const wasm_bindgen__convert__closures_____invoke__h21f6855640435575_8: (a: number, b: number, c: any) => [number, number];
|
|
177
|
+
export const wasm_bindgen__convert__closures_____invoke__h21f6855640435575_9: (a: number, b: number, c: any) => [number, number];
|
|
169
178
|
export const wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
|
|
170
179
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2: (a: number, b: number, c: any) => void;
|
|
171
180
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2: (a: number, b: number, c: any) => void;
|