@breeztech/breez-sdk-spark 0.19.2 → 0.20.0-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 +101 -1
- package/bundler/breez_sdk_spark_wasm.js +1 -1
- package/bundler/breez_sdk_spark_wasm_bg.js +149 -13
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +8 -0
- package/deno/breez_sdk_spark_wasm.d.ts +101 -1
- package/deno/breez_sdk_spark_wasm.js +149 -13
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +8 -0
- package/itest/.gitignore +2 -0
- package/itest/helpers/assert.test.js +70 -0
- package/itest/helpers/faucet.js +68 -0
- package/itest/helpers/lnurl-fixture.js +229 -0
- package/itest/helpers/scenario.js +444 -0
- package/itest/package-lock.json +519 -0
- package/itest/package.json +18 -0
- package/itest/scenarios.test.js +47 -0
- package/itest/smoke.test.js +184 -0
- package/nodejs/breez_sdk_spark_wasm.d.ts +101 -1
- package/nodejs/breez_sdk_spark_wasm.js +151 -13
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +8 -0
- package/nodejs/index.mjs +2 -0
- package/package.json +1 -1
- package/ssr/index.js +12 -0
- package/web/breez_sdk_spark_wasm.d.ts +109 -1
- package/web/breez_sdk_spark_wasm.js +149 -13
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +8 -0
package/breez-sdk-spark.tgz
CHANGED
|
Binary file
|
|
@@ -511,8 +511,10 @@ export interface BitcoinAddressDetails {
|
|
|
511
511
|
|
|
512
512
|
export interface BitcoinChainService {
|
|
513
513
|
getAddressUtxos(address: string): Promise<Utxo[]>;
|
|
514
|
+
getAddressTxos(address: string): Promise<Utxo[]>;
|
|
514
515
|
getTransactionStatus(txid: string): Promise<TxStatus>;
|
|
515
516
|
getTransactionHex(txid: string): Promise<string>;
|
|
517
|
+
getOutspend(txid: string, vout: number): Promise<Outspend>;
|
|
516
518
|
broadcastTransaction(tx: string): Promise<void>;
|
|
517
519
|
recommendedFees(): Promise<RecommendedFees>;
|
|
518
520
|
}
|
|
@@ -718,6 +720,10 @@ export interface ConversionSide {
|
|
|
718
720
|
fee: string;
|
|
719
721
|
}
|
|
720
722
|
|
|
723
|
+
export interface CpfpSigner {
|
|
724
|
+
signPsbt(psbtBytes: Uint8Array): Promise<Uint8Array>;
|
|
725
|
+
}
|
|
726
|
+
|
|
721
727
|
export interface CreateIssuerTokenRequest {
|
|
722
728
|
name: string;
|
|
723
729
|
ticker: string;
|
|
@@ -955,6 +961,7 @@ export interface ExternalSparkSigner {
|
|
|
955
961
|
getStaticDepositPublicKey(index: number): Promise<PublicKeyBytes>;
|
|
956
962
|
signAuthenticationChallenge(challenge: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
957
963
|
signMessage(message: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
964
|
+
signLeafRefundSpend(leafId: ExternalTreeNodeId, sighash: Uint8Array): Promise<SchnorrSignatureBytes>;
|
|
958
965
|
signFrost(jobs: ExternalFrostJob[]): Promise<ExternalFrostShareResult[]>;
|
|
959
966
|
prepareTransfer(request: ExternalPrepareTransferRequest): Promise<ExternalPreparedTransfer>;
|
|
960
967
|
prepareClaim(request: ExternalPrepareClaimRequest): Promise<ExternalPreparedClaim>;
|
|
@@ -1282,6 +1289,11 @@ export interface PaymentRequestSource {
|
|
|
1282
1289
|
bip353Address?: string;
|
|
1283
1290
|
}
|
|
1284
1291
|
|
|
1292
|
+
export interface PerBranchFunding {
|
|
1293
|
+
leafId: string;
|
|
1294
|
+
fundingSat: number;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1285
1297
|
export interface PrepareLnurlPayRequest {
|
|
1286
1298
|
amount: bigint;
|
|
1287
1299
|
comment?: string;
|
|
@@ -1319,6 +1331,24 @@ export interface PrepareSendPaymentResponse {
|
|
|
1319
1331
|
feePolicy: FeePolicy;
|
|
1320
1332
|
}
|
|
1321
1333
|
|
|
1334
|
+
export interface PrepareUnilateralExitRequest {
|
|
1335
|
+
feeRateSatPerVbyte: number;
|
|
1336
|
+
fundingKind: CpfpFundingKind;
|
|
1337
|
+
destination: string;
|
|
1338
|
+
selection: ExitLeafSelection;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
export interface PrepareUnilateralExitResponse {
|
|
1342
|
+
leaves: UnilateralExitLeaf[];
|
|
1343
|
+
recoverableValueSat: number;
|
|
1344
|
+
totalFeeSat: number;
|
|
1345
|
+
fanoutFeeSat: number;
|
|
1346
|
+
singleUtxoFundingSat: number;
|
|
1347
|
+
perBranchFunding: PerBranchFunding[];
|
|
1348
|
+
feeRateSatPerVbyte: number;
|
|
1349
|
+
destination: string;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1322
1352
|
export interface ProvisionalPayment {
|
|
1323
1353
|
paymentId: string;
|
|
1324
1354
|
amount: bigint;
|
|
@@ -1394,6 +1424,12 @@ export interface RefundDepositResponse {
|
|
|
1394
1424
|
txHex: string;
|
|
1395
1425
|
}
|
|
1396
1426
|
|
|
1427
|
+
export interface RefundPendingConversionsResponse {
|
|
1428
|
+
refunded: number;
|
|
1429
|
+
skipped: number;
|
|
1430
|
+
failed: number;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1397
1433
|
export interface RegisterLightningAddressRequest {
|
|
1398
1434
|
username: string;
|
|
1399
1435
|
description?: string;
|
|
@@ -1701,6 +1737,34 @@ export interface UnfreezeIssuerTokenResponse {
|
|
|
1701
1737
|
impactedTokenAmount: bigint;
|
|
1702
1738
|
}
|
|
1703
1739
|
|
|
1740
|
+
export interface UnilateralExitLeaf {
|
|
1741
|
+
leafId: string;
|
|
1742
|
+
value: number;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
export interface UnilateralExitRequest {
|
|
1746
|
+
prepared: PrepareUnilateralExitResponse;
|
|
1747
|
+
fundingInputs: CpfpInput[];
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
export interface UnilateralExitResponse {
|
|
1751
|
+
recoverableValueSat: number;
|
|
1752
|
+
totalFeeSat: number;
|
|
1753
|
+
leaves: UnilateralExitLeaf[];
|
|
1754
|
+
transactions: UnilateralExitTransaction[];
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
export interface UnilateralExitTransaction {
|
|
1758
|
+
kind: UnilateralExitTxKind;
|
|
1759
|
+
nodeId?: string;
|
|
1760
|
+
txid: string;
|
|
1761
|
+
txHex: string;
|
|
1762
|
+
cpfpTxHex?: string;
|
|
1763
|
+
csvTimelockBlocks?: number;
|
|
1764
|
+
dependsOn: string[];
|
|
1765
|
+
status: ConfirmationStatus;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1704
1768
|
export interface UnregisterWebhookRequest {
|
|
1705
1769
|
webhookId: string;
|
|
1706
1770
|
}
|
|
@@ -1720,6 +1784,7 @@ export interface UpdateContactRequest {
|
|
|
1720
1784
|
export interface UpdateUserSettingsRequest {
|
|
1721
1785
|
sparkPrivateModeEnabled?: boolean;
|
|
1722
1786
|
stableBalanceActiveLabel?: StableBalanceActiveLabel;
|
|
1787
|
+
sparkMasterIdentityPublicKey?: SparkMasterIdentityPublicKey;
|
|
1723
1788
|
}
|
|
1724
1789
|
|
|
1725
1790
|
export interface UrlSuccessActionData {
|
|
@@ -1731,6 +1796,7 @@ export interface UrlSuccessActionData {
|
|
|
1731
1796
|
export interface UserSettings {
|
|
1732
1797
|
sparkPrivateModeEnabled: boolean;
|
|
1733
1798
|
stableBalanceActiveLabel?: string;
|
|
1799
|
+
sparkMasterIdentityPublicKey?: string;
|
|
1734
1800
|
}
|
|
1735
1801
|
|
|
1736
1802
|
export interface Utxo {
|
|
@@ -1764,6 +1830,8 @@ export type BuyBitcoinRequest = { type: "moonpay"; lockedAmountSat?: number; red
|
|
|
1764
1830
|
|
|
1765
1831
|
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
1766
1832
|
|
|
1833
|
+
export type ConfirmationStatus = "confirmed" | "unconfirmed" | "unverified";
|
|
1834
|
+
|
|
1767
1835
|
export type ConversionChain = { type: "spark" } | { type: "lightning" } | { type: "external"; name: string; chainId?: string };
|
|
1768
1836
|
|
|
1769
1837
|
export type ConversionFilter = "ammRefundNeeded" | "orchestraPending" | "boltzPending";
|
|
@@ -1778,6 +1846,10 @@ export type ConversionStatus = "pending" | "completed" | "failed" | "refundNeede
|
|
|
1778
1846
|
|
|
1779
1847
|
export type ConversionType = { type: "fromBitcoin" } | { type: "toBitcoin"; fromTokenIdentifier: string };
|
|
1780
1848
|
|
|
1849
|
+
export type CpfpFundingKind = { type: "p2wpkh" } | { type: "p2tr" } | { type: "custom"; scriptPubkeyHex: string; signedInputWeight: number };
|
|
1850
|
+
|
|
1851
|
+
export type CpfpInput = { type: "p2wpkh"; txid: string; vout: number; value: number; pubkey: string } | { type: "p2tr"; txid: string; vout: number; value: number; pubkey: string } | { type: "custom"; txid: string; vout: number; value: number; scriptPubkeyHex: string; signedInputWeight: number };
|
|
1852
|
+
|
|
1781
1853
|
export type CrossChainAddressFamily = "evm" | "solana" | "tron";
|
|
1782
1854
|
|
|
1783
1855
|
export type CrossChainFeeMode = "feesExcluded" | "feesIncluded";
|
|
@@ -1790,6 +1862,8 @@ export type CrossChainRouteFilter = { type: "send"; addressDetails: CrossChainAd
|
|
|
1790
1862
|
|
|
1791
1863
|
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 };
|
|
1792
1864
|
|
|
1865
|
+
export type ExitLeafSelection = { type: "auto" } | { type: "specific"; leafIds: string[] };
|
|
1866
|
+
|
|
1793
1867
|
export type ExternalFrostDerivation = { type: "signingLeaf"; leafId: ExternalTreeNodeId } | { type: "staticDeposit"; index: number } | { type: "htlcPreimage" } | { type: "identity" };
|
|
1794
1868
|
|
|
1795
1869
|
export type ExternalSparkInvoiceKind = "sats" | "tokens";
|
|
@@ -1814,6 +1888,8 @@ export type OptimizationMode = "full" | "singleRound";
|
|
|
1814
1888
|
|
|
1815
1889
|
export type OptimizationOutcome = { type: "completed"; roundsExecuted: number } | { type: "inProgress" };
|
|
1816
1890
|
|
|
1891
|
+
export type Outspend = { type: "unspent" } | { type: "spent"; txid: string; vin: number; status: TxStatus };
|
|
1892
|
+
|
|
1817
1893
|
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; conversionInfo?: ConversionInfo } | { type: "withdraw"; txId: string } | { type: "deposit"; txId: string; vout: number };
|
|
1818
1894
|
|
|
1819
1895
|
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
@@ -1850,6 +1926,8 @@ export type SourceAsset = { type: "bitcoin" } | { type: "token"; tokenIdentifier
|
|
|
1850
1926
|
|
|
1851
1927
|
export type SparkHtlcStatus = "waitingForPreimage" | "preimageShared" | "returned";
|
|
1852
1928
|
|
|
1929
|
+
export type SparkMasterIdentityPublicKey = { type: "set"; publicKey: string } | { type: "unset" };
|
|
1930
|
+
|
|
1853
1931
|
export type StableBalanceActiveLabel = { type: "set"; label: string } | { type: "unset" };
|
|
1854
1932
|
|
|
1855
1933
|
export type StoragePaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionFilter?: ConversionFilter } | { type: "token"; conversionFilter?: ConversionFilter; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[]; conversionFilter?: ConversionFilter };
|
|
@@ -1864,6 +1942,8 @@ export type TransferSignature = { type: "transfer"; signed: ExternalPreparedTran
|
|
|
1864
1942
|
|
|
1865
1943
|
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 };
|
|
1866
1944
|
|
|
1945
|
+
export type UnilateralExitTxKind = "fanOut" | "node" | "refund" | "sweep";
|
|
1946
|
+
|
|
1867
1947
|
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 };
|
|
1868
1948
|
|
|
1869
1949
|
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
@@ -1884,7 +1964,9 @@ export class BitcoinChainServiceHandle {
|
|
|
1884
1964
|
free(): void;
|
|
1885
1965
|
[Symbol.dispose](): void;
|
|
1886
1966
|
broadcastTransaction(tx: string): Promise<void>;
|
|
1967
|
+
getAddressTxos(address: string): Promise<any>;
|
|
1887
1968
|
getAddressUtxos(address: string): Promise<any>;
|
|
1969
|
+
getOutspend(txid: string, vout: number): Promise<any>;
|
|
1888
1970
|
getTransactionHex(txid: string): Promise<any>;
|
|
1889
1971
|
getTransactionStatus(txid: string): Promise<any>;
|
|
1890
1972
|
recommendedFees(): Promise<any>;
|
|
@@ -1929,23 +2011,35 @@ export class BreezSdk {
|
|
|
1929
2011
|
parse(input: string): Promise<InputType>;
|
|
1930
2012
|
prepareLnurlPay(request: PrepareLnurlPayRequest): Promise<PrepareLnurlPayResponse>;
|
|
1931
2013
|
prepareSendPayment(request: PrepareSendPaymentRequest): Promise<PrepareSendPaymentResponse>;
|
|
2014
|
+
prepareUnilateralExit(request: PrepareUnilateralExitRequest): Promise<PrepareUnilateralExitResponse>;
|
|
1932
2015
|
publishSignedLnurlPayPackage(request: PublishSignedLnurlPayPackageRequest): Promise<PublishSignedLnurlPayResponse>;
|
|
1933
2016
|
publishSignedTransferPackage(request: PublishSignedTransferPackageRequest): Promise<PublishSignedTransferPackageResponse>;
|
|
1934
2017
|
receivePayment(request: ReceivePaymentRequest): Promise<ReceivePaymentResponse>;
|
|
1935
2018
|
recommendedFees(): Promise<RecommendedFees>;
|
|
1936
2019
|
refundDeposit(request: RefundDepositRequest): Promise<RefundDepositResponse>;
|
|
1937
|
-
refundPendingConversions(): Promise<
|
|
2020
|
+
refundPendingConversions(): Promise<RefundPendingConversionsResponse>;
|
|
1938
2021
|
registerLightningAddress(request: RegisterLightningAddressRequest): Promise<LightningAddressInfo>;
|
|
1939
2022
|
registerWebhook(request: RegisterWebhookRequest): Promise<RegisterWebhookResponse>;
|
|
1940
2023
|
removeEventListener(id: string): Promise<boolean>;
|
|
1941
2024
|
sendPayment(request: SendPaymentRequest): Promise<SendPaymentResponse>;
|
|
1942
2025
|
signMessage(request: SignMessageRequest): Promise<SignMessageResponse>;
|
|
1943
2026
|
syncWallet(request: SyncWalletRequest): Promise<SyncWalletResponse>;
|
|
2027
|
+
unilateralExit(request: UnilateralExitRequest, signer: CpfpSigner): Promise<UnilateralExitResponse>;
|
|
1944
2028
|
unregisterWebhook(request: UnregisterWebhookRequest): Promise<void>;
|
|
1945
2029
|
updateContact(request: UpdateContactRequest): Promise<Contact>;
|
|
1946
2030
|
updateUserSettings(request: UpdateUserSettingsRequest): Promise<void>;
|
|
1947
2031
|
}
|
|
1948
2032
|
|
|
2033
|
+
/**
|
|
2034
|
+
* A CPFP signer matching the `CpfpSigner` TypeScript interface.
|
|
2035
|
+
*/
|
|
2036
|
+
export class DefaultCpfpSigner {
|
|
2037
|
+
private constructor();
|
|
2038
|
+
free(): void;
|
|
2039
|
+
[Symbol.dispose](): void;
|
|
2040
|
+
signPsbt(psbt_bytes: Uint8Array): Promise<Uint8Array>;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
1949
2043
|
/**
|
|
1950
2044
|
* A JS handle to a backend's own session store (from `defaultSessionStore`),
|
|
1951
2045
|
* exposing the same `getSession` / `setSession` interface. Wrap it in a JS
|
|
@@ -2041,6 +2135,7 @@ export class ExternalSparkSignerHandle {
|
|
|
2041
2135
|
prepareTransfer(request: ExternalPrepareTransferRequest): Promise<ExternalPreparedTransfer>;
|
|
2042
2136
|
signAuthenticationChallenge(challenge: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
2043
2137
|
signFrost(jobs: ExternalFrostJob[]): Promise<ExternalFrostShareResult[]>;
|
|
2138
|
+
signLeafRefundSpend(leaf_id: ExternalTreeNodeId, sighash: Uint8Array): Promise<SchnorrSignatureBytes>;
|
|
2044
2139
|
signMessage(message: Uint8Array): Promise<EcdsaSignatureBytes>;
|
|
2045
2140
|
signSparkInvoice(request: ExternalSignSparkInvoiceRequest): Promise<ExternalSignedSparkInvoice>;
|
|
2046
2141
|
signStaticDepositRefund(request: ExternalSignStaticDepositRefundRequest): Promise<ExternalFrostSignature>;
|
|
@@ -2365,6 +2460,11 @@ export function newSharedSdkContext(config: WasmSdkContextConfig): Promise<WasmS
|
|
|
2365
2460
|
*/
|
|
2366
2461
|
export function postgresStorage(config: PostgresStorageConfig): WasmStorageConfig;
|
|
2367
2462
|
|
|
2463
|
+
/**
|
|
2464
|
+
* Creates a default CPFP signer backed by a single private key.
|
|
2465
|
+
*/
|
|
2466
|
+
export function singleKeyCpfpSigner(secret_key_bytes: Uint8Array): DefaultCpfpSigner;
|
|
2467
|
+
|
|
2368
2468
|
/**
|
|
2369
2469
|
* Runs automatically when the wasm module is instantiated. Installs the
|
|
2370
2470
|
* panic hook so Rust panics surface as readable `console.error` output
|
|
@@ -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, 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
|
|
8
|
+
BitcoinChainServiceHandle, BreezSdk, DefaultCpfpSigner, 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, singleKeyCpfpSigner, start, task_worker_entry_point
|
|
9
9
|
} from "./breez_sdk_spark_wasm_bg.js";
|
|
@@ -33,6 +33,16 @@ export class BitcoinChainServiceHandle {
|
|
|
33
33
|
const ret = wasm.bitcoinchainservicehandle_broadcastTransaction(this.__wbg_ptr, ptr0, len0);
|
|
34
34
|
return ret;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} address
|
|
38
|
+
* @returns {Promise<any>}
|
|
39
|
+
*/
|
|
40
|
+
getAddressTxos(address) {
|
|
41
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
42
|
+
const len0 = WASM_VECTOR_LEN;
|
|
43
|
+
const ret = wasm.bitcoinchainservicehandle_getAddressTxos(this.__wbg_ptr, ptr0, len0);
|
|
44
|
+
return ret;
|
|
45
|
+
}
|
|
36
46
|
/**
|
|
37
47
|
* @param {string} address
|
|
38
48
|
* @returns {Promise<any>}
|
|
@@ -43,6 +53,17 @@ export class BitcoinChainServiceHandle {
|
|
|
43
53
|
const ret = wasm.bitcoinchainservicehandle_getAddressUtxos(this.__wbg_ptr, ptr0, len0);
|
|
44
54
|
return ret;
|
|
45
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @param {string} txid
|
|
58
|
+
* @param {number} vout
|
|
59
|
+
* @returns {Promise<any>}
|
|
60
|
+
*/
|
|
61
|
+
getOutspend(txid, vout) {
|
|
62
|
+
const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
const ret = wasm.bitcoinchainservicehandle_getOutspend(this.__wbg_ptr, ptr0, len0, vout);
|
|
65
|
+
return ret;
|
|
66
|
+
}
|
|
46
67
|
/**
|
|
47
68
|
* @param {string} txid
|
|
48
69
|
* @returns {Promise<any>}
|
|
@@ -366,6 +387,14 @@ export class BreezSdk {
|
|
|
366
387
|
const ret = wasm.breezsdk_prepareSendPayment(this.__wbg_ptr, request);
|
|
367
388
|
return ret;
|
|
368
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* @param {PrepareUnilateralExitRequest} request
|
|
392
|
+
* @returns {Promise<PrepareUnilateralExitResponse>}
|
|
393
|
+
*/
|
|
394
|
+
prepareUnilateralExit(request) {
|
|
395
|
+
const ret = wasm.breezsdk_prepareUnilateralExit(this.__wbg_ptr, request);
|
|
396
|
+
return ret;
|
|
397
|
+
}
|
|
369
398
|
/**
|
|
370
399
|
* @param {PublishSignedLnurlPayPackageRequest} request
|
|
371
400
|
* @returns {Promise<PublishSignedLnurlPayResponse>}
|
|
@@ -406,7 +435,7 @@ export class BreezSdk {
|
|
|
406
435
|
return ret;
|
|
407
436
|
}
|
|
408
437
|
/**
|
|
409
|
-
* @returns {Promise<
|
|
438
|
+
* @returns {Promise<RefundPendingConversionsResponse>}
|
|
410
439
|
*/
|
|
411
440
|
refundPendingConversions() {
|
|
412
441
|
const ret = wasm.breezsdk_refundPendingConversions(this.__wbg_ptr);
|
|
@@ -462,6 +491,15 @@ export class BreezSdk {
|
|
|
462
491
|
const ret = wasm.breezsdk_syncWallet(this.__wbg_ptr, request);
|
|
463
492
|
return ret;
|
|
464
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* @param {UnilateralExitRequest} request
|
|
496
|
+
* @param {CpfpSigner} signer
|
|
497
|
+
* @returns {Promise<UnilateralExitResponse>}
|
|
498
|
+
*/
|
|
499
|
+
unilateralExit(request, signer) {
|
|
500
|
+
const ret = wasm.breezsdk_unilateralExit(this.__wbg_ptr, request, signer);
|
|
501
|
+
return ret;
|
|
502
|
+
}
|
|
465
503
|
/**
|
|
466
504
|
* @param {UnregisterWebhookRequest} request
|
|
467
505
|
* @returns {Promise<void>}
|
|
@@ -489,6 +527,39 @@ export class BreezSdk {
|
|
|
489
527
|
}
|
|
490
528
|
if (Symbol.dispose) BreezSdk.prototype[Symbol.dispose] = BreezSdk.prototype.free;
|
|
491
529
|
|
|
530
|
+
/**
|
|
531
|
+
* A CPFP signer matching the `CpfpSigner` TypeScript interface.
|
|
532
|
+
*/
|
|
533
|
+
export class DefaultCpfpSigner {
|
|
534
|
+
static __wrap(ptr) {
|
|
535
|
+
const obj = Object.create(DefaultCpfpSigner.prototype);
|
|
536
|
+
obj.__wbg_ptr = ptr;
|
|
537
|
+
DefaultCpfpSignerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
538
|
+
return obj;
|
|
539
|
+
}
|
|
540
|
+
__destroy_into_raw() {
|
|
541
|
+
const ptr = this.__wbg_ptr;
|
|
542
|
+
this.__wbg_ptr = 0;
|
|
543
|
+
DefaultCpfpSignerFinalization.unregister(this);
|
|
544
|
+
return ptr;
|
|
545
|
+
}
|
|
546
|
+
free() {
|
|
547
|
+
const ptr = this.__destroy_into_raw();
|
|
548
|
+
wasm.__wbg_defaultcpfpsigner_free(ptr, 0);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @param {Uint8Array} psbt_bytes
|
|
552
|
+
* @returns {Promise<Uint8Array>}
|
|
553
|
+
*/
|
|
554
|
+
signPsbt(psbt_bytes) {
|
|
555
|
+
const ptr0 = passArray8ToWasm0(psbt_bytes, wasm.__wbindgen_malloc);
|
|
556
|
+
const len0 = WASM_VECTOR_LEN;
|
|
557
|
+
const ret = wasm.defaultcpfpsigner_signPsbt(this.__wbg_ptr, ptr0, len0);
|
|
558
|
+
return ret;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (Symbol.dispose) DefaultCpfpSigner.prototype[Symbol.dispose] = DefaultCpfpSigner.prototype.free;
|
|
562
|
+
|
|
492
563
|
/**
|
|
493
564
|
* A JS handle to a backend's own session store (from `defaultSessionStore`),
|
|
494
565
|
* exposing the same `getSession` / `setSession` interface. Wrap it in a JS
|
|
@@ -878,6 +949,17 @@ export class ExternalSparkSignerHandle {
|
|
|
878
949
|
const ret = wasm.externalsparksignerhandle_signFrost(this.__wbg_ptr, ptr0, len0);
|
|
879
950
|
return ret;
|
|
880
951
|
}
|
|
952
|
+
/**
|
|
953
|
+
* @param {ExternalTreeNodeId} leaf_id
|
|
954
|
+
* @param {Uint8Array} sighash
|
|
955
|
+
* @returns {Promise<SchnorrSignatureBytes>}
|
|
956
|
+
*/
|
|
957
|
+
signLeafRefundSpend(leaf_id, sighash) {
|
|
958
|
+
const ptr0 = passArray8ToWasm0(sighash, wasm.__wbindgen_malloc);
|
|
959
|
+
const len0 = WASM_VECTOR_LEN;
|
|
960
|
+
const ret = wasm.externalsparksignerhandle_signLeafRefundSpend(this.__wbg_ptr, leaf_id, ptr0, len0);
|
|
961
|
+
return ret;
|
|
962
|
+
}
|
|
881
963
|
/**
|
|
882
964
|
* @param {Uint8Array} message
|
|
883
965
|
* @returns {Promise<EcdsaSignatureBytes>}
|
|
@@ -1792,6 +1874,21 @@ export function postgresStorage(config) {
|
|
|
1792
1874
|
return WasmStorageConfig.__wrap(ret);
|
|
1793
1875
|
}
|
|
1794
1876
|
|
|
1877
|
+
/**
|
|
1878
|
+
* Creates a default CPFP signer backed by a single private key.
|
|
1879
|
+
* @param {Uint8Array} secret_key_bytes
|
|
1880
|
+
* @returns {DefaultCpfpSigner}
|
|
1881
|
+
*/
|
|
1882
|
+
export function singleKeyCpfpSigner(secret_key_bytes) {
|
|
1883
|
+
const ptr0 = passArray8ToWasm0(secret_key_bytes, wasm.__wbindgen_malloc);
|
|
1884
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1885
|
+
const ret = wasm.singleKeyCpfpSigner(ptr0, len0);
|
|
1886
|
+
if (ret[2]) {
|
|
1887
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1888
|
+
}
|
|
1889
|
+
return DefaultCpfpSigner.__wrap(ret[0]);
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1795
1892
|
/**
|
|
1796
1893
|
* Runs automatically when the wasm module is instantiated. Installs the
|
|
1797
1894
|
* panic hook so Rust panics surface as readable `console.error` output
|
|
@@ -2324,6 +2421,18 @@ export function __wbg_from_ff141b1e4c69b979(arg0) {
|
|
|
2324
2421
|
const ret = Array.from(arg0);
|
|
2325
2422
|
return ret;
|
|
2326
2423
|
}
|
|
2424
|
+
export function __wbg_getAddressTxos_3ca1c4b39dd84911() { return handleError(function (arg0, arg1, arg2) {
|
|
2425
|
+
let deferred0_0;
|
|
2426
|
+
let deferred0_1;
|
|
2427
|
+
try {
|
|
2428
|
+
deferred0_0 = arg1;
|
|
2429
|
+
deferred0_1 = arg2;
|
|
2430
|
+
const ret = arg0.getAddressTxos(getStringFromWasm0(arg1, arg2));
|
|
2431
|
+
return ret;
|
|
2432
|
+
} finally {
|
|
2433
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2434
|
+
}
|
|
2435
|
+
}, arguments); }
|
|
2327
2436
|
export function __wbg_getAddressUtxos_9526b6d8078b867e() { return handleError(function (arg0, arg1, arg2) {
|
|
2328
2437
|
let deferred0_0;
|
|
2329
2438
|
let deferred0_1;
|
|
@@ -2389,6 +2498,18 @@ export function __wbg_getLeaves_5259dc2b9de80ff0() { return handleError(function
|
|
|
2389
2498
|
const ret = arg0.getLeaves();
|
|
2390
2499
|
return ret;
|
|
2391
2500
|
}, arguments); }
|
|
2501
|
+
export function __wbg_getOutspend_4b3c117972515790() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2502
|
+
let deferred0_0;
|
|
2503
|
+
let deferred0_1;
|
|
2504
|
+
try {
|
|
2505
|
+
deferred0_0 = arg1;
|
|
2506
|
+
deferred0_1 = arg2;
|
|
2507
|
+
const ret = arg0.getOutspend(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
2508
|
+
return ret;
|
|
2509
|
+
} finally {
|
|
2510
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2511
|
+
}
|
|
2512
|
+
}, arguments); }
|
|
2392
2513
|
export function __wbg_getPaymentById_6d677ada5879df99() { return handleError(function (arg0, arg1, arg2) {
|
|
2393
2514
|
let deferred0_0;
|
|
2394
2515
|
let deferred0_1;
|
|
@@ -3218,12 +3339,24 @@ export function __wbg_signHashSchnorr_fc8afda9a7ee021a() { return handleError(fu
|
|
|
3218
3339
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3219
3340
|
}
|
|
3220
3341
|
}, arguments); }
|
|
3342
|
+
export function __wbg_signLeafRefundSpend_dc0eea305a0dde9c() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3343
|
+
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
3344
|
+
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
3345
|
+
const ret = arg0.signLeafRefundSpend(arg1, v0);
|
|
3346
|
+
return ret;
|
|
3347
|
+
}, arguments); }
|
|
3221
3348
|
export function __wbg_signMessage_80ec0b0dfc7f00ee() { return handleError(function (arg0, arg1, arg2) {
|
|
3222
3349
|
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
3223
3350
|
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
3224
3351
|
const ret = arg0.signMessage(v0);
|
|
3225
3352
|
return ret;
|
|
3226
3353
|
}, arguments); }
|
|
3354
|
+
export function __wbg_signPsbt_625c8cbdec488cc6() { return handleError(function (arg0, arg1, arg2) {
|
|
3355
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
3356
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
3357
|
+
const ret = arg0.signPsbt(v0);
|
|
3358
|
+
return ret;
|
|
3359
|
+
}, arguments); }
|
|
3227
3360
|
export function __wbg_signSparkInvoice_cca6c7f35b5e85d2() { return handleError(function (arg0, arg1) {
|
|
3228
3361
|
const ret = arg0.signSparkInvoice(arg1);
|
|
3229
3362
|
return ret;
|
|
@@ -3435,62 +3568,62 @@ export function __wbg_wasmsdkcontext_new(arg0) {
|
|
|
3435
3568
|
return ret;
|
|
3436
3569
|
}
|
|
3437
3570
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
3438
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3571
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3439
3572
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575);
|
|
3440
3573
|
return ret;
|
|
3441
3574
|
}
|
|
3442
3575
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
3443
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3576
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3444
3577
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2);
|
|
3445
3578
|
return ret;
|
|
3446
3579
|
}
|
|
3447
3580
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
3448
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
3581
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3449
3582
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2);
|
|
3450
3583
|
return ret;
|
|
3451
3584
|
}
|
|
3452
3585
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
3453
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
3586
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3454
3587
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3);
|
|
3455
3588
|
return ret;
|
|
3456
3589
|
}
|
|
3457
3590
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
3458
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
3591
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3459
3592
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4);
|
|
3460
3593
|
return ret;
|
|
3461
3594
|
}
|
|
3462
3595
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
3463
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
3596
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3464
3597
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5);
|
|
3465
3598
|
return ret;
|
|
3466
3599
|
}
|
|
3467
3600
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
3468
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx:
|
|
3601
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3469
3602
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_6);
|
|
3470
3603
|
return ret;
|
|
3471
3604
|
}
|
|
3472
3605
|
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
3473
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx:
|
|
3606
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3474
3607
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_7);
|
|
3475
3608
|
return ret;
|
|
3476
3609
|
}
|
|
3477
3610
|
export function __wbindgen_cast_0000000000000009(arg0, arg1) {
|
|
3478
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx:
|
|
3611
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3479
3612
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_8);
|
|
3480
3613
|
return ret;
|
|
3481
3614
|
}
|
|
3482
3615
|
export function __wbindgen_cast_000000000000000a(arg0, arg1) {
|
|
3483
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx:
|
|
3616
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3484
3617
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h21f6855640435575_9);
|
|
3485
3618
|
return ret;
|
|
3486
3619
|
}
|
|
3487
3620
|
export function __wbindgen_cast_000000000000000b(arg0, arg1) {
|
|
3488
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3621
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 394, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3489
3622
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1d6669a7b693932a);
|
|
3490
3623
|
return ret;
|
|
3491
3624
|
}
|
|
3492
3625
|
export function __wbindgen_cast_000000000000000c(arg0, arg1) {
|
|
3493
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3626
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 425, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
3494
3627
|
const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e);
|
|
3495
3628
|
return ret;
|
|
3496
3629
|
}
|
|
@@ -3668,6 +3801,9 @@ const BitcoinChainServiceHandleFinalization = (typeof FinalizationRegistry === '
|
|
|
3668
3801
|
const BreezSdkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3669
3802
|
? { register: () => {}, unregister: () => {} }
|
|
3670
3803
|
: new FinalizationRegistry(ptr => wasm.__wbg_breezsdk_free(ptr, 1));
|
|
3804
|
+
const DefaultCpfpSignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3805
|
+
? { register: () => {}, unregister: () => {} }
|
|
3806
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_defaultcpfpsigner_free(ptr, 1));
|
|
3671
3807
|
const DefaultSessionStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3672
3808
|
? { register: () => {}, unregister: () => {} }
|
|
3673
3809
|
: new FinalizationRegistry(ptr => wasm.__wbg_defaultsessionstore_free(ptr, 1));
|
|
Binary file
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_bitcoinchainservicehandle_free: (a: number, b: number) => void;
|
|
5
5
|
export const __wbg_breezsdk_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_defaultcpfpsigner_free: (a: number, b: number) => void;
|
|
6
7
|
export const __wbg_externalsigners_free: (a: number, b: number) => void;
|
|
7
8
|
export const __wbg_passkeyclient_free: (a: number, b: number) => void;
|
|
8
9
|
export const __wbg_passkeylabels_free: (a: number, b: number) => void;
|
|
@@ -11,7 +12,9 @@ export const __wbg_tokenissuer_free: (a: number, b: number) => void;
|
|
|
11
12
|
export const __wbg_wasmsdkcontext_free: (a: number, b: number) => void;
|
|
12
13
|
export const __wbg_wasmstorageconfig_free: (a: number, b: number) => void;
|
|
13
14
|
export const bitcoinchainservicehandle_broadcastTransaction: (a: number, b: number, c: number) => any;
|
|
15
|
+
export const bitcoinchainservicehandle_getAddressTxos: (a: number, b: number, c: number) => any;
|
|
14
16
|
export const bitcoinchainservicehandle_getAddressUtxos: (a: number, b: number, c: number) => any;
|
|
17
|
+
export const bitcoinchainservicehandle_getOutspend: (a: number, b: number, c: number, d: number) => any;
|
|
15
18
|
export const bitcoinchainservicehandle_getTransactionHex: (a: number, b: number, c: number) => any;
|
|
16
19
|
export const bitcoinchainservicehandle_getTransactionStatus: (a: number, b: number, c: number) => any;
|
|
17
20
|
export const bitcoinchainservicehandle_recommendedFees: (a: number) => any;
|
|
@@ -50,6 +53,7 @@ export const breezsdk_optimizeLeaves: (a: number, b: any) => any;
|
|
|
50
53
|
export const breezsdk_parse: (a: number, b: number, c: number) => any;
|
|
51
54
|
export const breezsdk_prepareLnurlPay: (a: number, b: any) => any;
|
|
52
55
|
export const breezsdk_prepareSendPayment: (a: number, b: any) => any;
|
|
56
|
+
export const breezsdk_prepareUnilateralExit: (a: number, b: any) => any;
|
|
53
57
|
export const breezsdk_publishSignedLnurlPayPackage: (a: number, b: any) => any;
|
|
54
58
|
export const breezsdk_publishSignedTransferPackage: (a: number, b: any) => any;
|
|
55
59
|
export const breezsdk_receivePayment: (a: number, b: any) => any;
|
|
@@ -62,6 +66,7 @@ export const breezsdk_removeEventListener: (a: number, b: number, c: number) =>
|
|
|
62
66
|
export const breezsdk_sendPayment: (a: number, b: any) => any;
|
|
63
67
|
export const breezsdk_signMessage: (a: number, b: any) => any;
|
|
64
68
|
export const breezsdk_syncWallet: (a: number, b: any) => any;
|
|
69
|
+
export const breezsdk_unilateralExit: (a: number, b: any, c: any) => any;
|
|
65
70
|
export const breezsdk_unregisterWebhook: (a: number, b: any) => any;
|
|
66
71
|
export const breezsdk_updateContact: (a: number, b: any) => any;
|
|
67
72
|
export const breezsdk_updateUserSettings: (a: number, b: any) => any;
|
|
@@ -77,6 +82,7 @@ export const defaultPostgresStorageConfig: (a: number, b: number) => any;
|
|
|
77
82
|
export const defaultServerConfig: (a: any) => any;
|
|
78
83
|
export const defaultSessionStore: (a: number, b: any, c: number, d: number) => any;
|
|
79
84
|
export const defaultStorage: (a: number, b: number) => number;
|
|
85
|
+
export const defaultcpfpsigner_signPsbt: (a: number, b: number, c: number) => any;
|
|
80
86
|
export const defaultsessionstore_getSession: (a: number, b: number, c: number) => any;
|
|
81
87
|
export const defaultsessionstore_setSession: (a: number, b: number, c: number, d: any) => any;
|
|
82
88
|
export const externalbreezsignerhandle_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
@@ -103,6 +109,7 @@ export const externalsparksignerhandle_prepareTokenTransaction: (a: number, b: a
|
|
|
103
109
|
export const externalsparksignerhandle_prepareTransfer: (a: number, b: any) => any;
|
|
104
110
|
export const externalsparksignerhandle_signAuthenticationChallenge: (a: number, b: number, c: number) => any;
|
|
105
111
|
export const externalsparksignerhandle_signFrost: (a: number, b: number, c: number) => any;
|
|
112
|
+
export const externalsparksignerhandle_signLeafRefundSpend: (a: number, b: any, c: number, d: number) => any;
|
|
106
113
|
export const externalsparksignerhandle_signMessage: (a: number, b: number, c: number) => any;
|
|
107
114
|
export const externalsparksignerhandle_signSparkInvoice: (a: number, b: any) => any;
|
|
108
115
|
export const externalsparksignerhandle_signStaticDepositRefund: (a: number, b: any) => any;
|
|
@@ -139,6 +146,7 @@ export const sdkbuilder_withSessionStore: (a: number, b: any) => number;
|
|
|
139
146
|
export const sdkbuilder_withSharedContext: (a: number, b: number) => number;
|
|
140
147
|
export const sdkbuilder_withStorage: (a: number, b: any) => number;
|
|
141
148
|
export const sdkbuilder_withStorageBackend: (a: number, b: number) => number;
|
|
149
|
+
export const singleKeyCpfpSigner: (a: number, b: number) => [number, number, number];
|
|
142
150
|
export const start: () => void;
|
|
143
151
|
export const tokenissuer_burnIssuerToken: (a: number, b: any) => any;
|
|
144
152
|
export const tokenissuer_createIssuerToken: (a: number, b: any) => any;
|