@breeztech/breez-sdk-spark 0.27.2 → 0.27.3-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/bundler/breez_sdk_spark_wasm.d.ts +141 -16
- package/bundler/breez_sdk_spark_wasm.js +1 -1
- package/bundler/breez_sdk_spark_wasm_bg.js +190 -40
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +23 -11
- package/bundler/index.js +6 -13
- package/bundler/storage/index.js +89 -17
- package/deno/breez_sdk_spark_wasm.d.ts +141 -16
- package/deno/breez_sdk_spark_wasm.js +190 -40
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +23 -11
- package/nodejs/breez_sdk_spark_wasm.d.ts +141 -16
- package/nodejs/breez_sdk_spark_wasm.js +194 -40
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +23 -11
- package/nodejs/index.d.mts +3 -0
- package/nodejs/index.js +30 -120
- package/nodejs/index.mjs +4 -0
- package/nodejs/mysql-session-store/index.cjs +24 -7
- package/nodejs/mysql-session-store/migrations.cjs +6 -0
- package/nodejs/mysql-storage/index.cjs +36 -19
- package/nodejs/mysql-storage/migrations.cjs +24 -9
- package/nodejs/mysql-token-store/index.cjs +28 -18
- package/nodejs/postgres-session-store/index.cjs +25 -7
- package/nodejs/postgres-session-store/migrations.cjs +12 -9
- package/nodejs/postgres-storage/index.cjs +36 -19
- package/nodejs/postgres-storage/migrations.cjs +24 -9
- package/nodejs/postgres-token-store/index.cjs +32 -18
- package/nodejs/postgres-token-store/migrations.cjs +5 -9
- package/nodejs/postgres-tree-store/migrations.cjs +5 -9
- package/nodejs/storage/index.cjs +35 -14
- package/nodejs/storage/migrations.cjs +25 -15
- package/nodejs/tree-store/index.cjs +1 -1
- package/nodejs/tree-store/migrations.cjs +6 -13
- package/package.json +27 -6
- package/ssr/index.js +24 -0
- package/web/breez_sdk_spark_wasm.d.ts +164 -27
- package/web/breez_sdk_spark_wasm.js +190 -40
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +23 -11
- package/web/index.js +6 -13
- package/web/passkey-prf-provider/index.js +1 -0
- package/web/storage/index.js +89 -17
- package/breez-sdk-spark.tgz +0 -0
- package/itest/.gitignore +0 -2
- package/itest/database-drivers.test.js +0 -45
- package/itest/helpers/assert.test.js +0 -70
- package/itest/helpers/faucet.js +0 -68
- package/itest/helpers/lnurl-fixture.js +0 -229
- package/itest/helpers/scenario.js +0 -444
- package/itest/package-lock.json +0 -519
- package/itest/package.json +0 -18
- package/itest/scenarios.test.js +0 -47
- package/itest/smoke.test.js +0 -184
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface SymbolConstructor {
|
|
3
|
+
readonly dispose: unique symbol;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
1
6
|
/* tslint:disable */
|
|
2
7
|
/* eslint-disable */
|
|
3
8
|
/**
|
|
@@ -674,6 +679,21 @@ export interface BridgeFromCashAppResponse {
|
|
|
674
679
|
expiresAt: number;
|
|
675
680
|
}
|
|
676
681
|
|
|
682
|
+
export interface BridgeRoutePair {
|
|
683
|
+
provider: CrossChainProvider;
|
|
684
|
+
source: BridgeRoutePairSide;
|
|
685
|
+
destination: BridgeRoutePairSide;
|
|
686
|
+
limits?: CrossChainRouteLimits;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export interface BridgeRoutePairSide {
|
|
690
|
+
chain: string;
|
|
691
|
+
chainId?: string;
|
|
692
|
+
asset: string;
|
|
693
|
+
contractAddress?: string;
|
|
694
|
+
decimals: number;
|
|
695
|
+
}
|
|
696
|
+
|
|
677
697
|
export interface BridgeToCashAppRequest {
|
|
678
698
|
recipient: string;
|
|
679
699
|
route: CrossChainRoutePair;
|
|
@@ -688,6 +708,15 @@ export interface BridgeToCashAppResponse {
|
|
|
688
708
|
info: CrossChainReceiveInfo;
|
|
689
709
|
}
|
|
690
710
|
|
|
711
|
+
export interface BridgingConfig {
|
|
712
|
+
apiKey: string;
|
|
713
|
+
/**
|
|
714
|
+
* Not supported on WASM: setting this always fails validation.
|
|
715
|
+
*/
|
|
716
|
+
proxy?: ProxyConfig;
|
|
717
|
+
crossChainConfig?: CrossChainConfig;
|
|
718
|
+
}
|
|
719
|
+
|
|
691
720
|
export interface BuildUnsignedBatchPackageRequest {
|
|
692
721
|
prepareResponse: PrepareSendBatchResponse;
|
|
693
722
|
}
|
|
@@ -879,6 +908,22 @@ export interface CpfpSigner {
|
|
|
879
908
|
signPsbt(psbtBytes: Uint8Array): Promise<Uint8Array>;
|
|
880
909
|
}
|
|
881
910
|
|
|
911
|
+
export interface CreateBridgeRequest {
|
|
912
|
+
recipient: string;
|
|
913
|
+
route: BridgeRoutePair;
|
|
914
|
+
amount: bigint;
|
|
915
|
+
refundAddress?: string;
|
|
916
|
+
feePolicy?: FeePolicy;
|
|
917
|
+
maxSlippageBps?: number;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export interface CreateBridgeResponse {
|
|
921
|
+
bridgeId: string;
|
|
922
|
+
statusToken?: string;
|
|
923
|
+
paymentRequest: string;
|
|
924
|
+
info: CrossChainReceiveInfo;
|
|
925
|
+
}
|
|
926
|
+
|
|
882
927
|
export interface CreateIssuerTokenRequest {
|
|
883
928
|
name: string;
|
|
884
929
|
ticker: string;
|
|
@@ -924,6 +969,7 @@ export interface CrossChainConfig {
|
|
|
924
969
|
}
|
|
925
970
|
|
|
926
971
|
export interface CrossChainReceiveInfo {
|
|
972
|
+
quoteId: string;
|
|
927
973
|
depositAddress: string;
|
|
928
974
|
depositAmount: bigint;
|
|
929
975
|
expectedReceivedAmount: bigint;
|
|
@@ -1276,6 +1322,31 @@ export interface FreezeIssuerTokenResponse {
|
|
|
1276
1322
|
impactedTokenAmount: bigint;
|
|
1277
1323
|
}
|
|
1278
1324
|
|
|
1325
|
+
export interface GetBridgeRoutesRequest {
|
|
1326
|
+
recipient: string;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
export interface GetBridgeRoutesResponse {
|
|
1330
|
+
routes: BridgeRoutePair[];
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
export interface GetBridgeStatusRequest {
|
|
1334
|
+
bridgeId: string;
|
|
1335
|
+
statusToken?: string;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export interface GetBridgeStatusResponse {
|
|
1339
|
+
status: BridgeStatus;
|
|
1340
|
+
providerStatus?: string;
|
|
1341
|
+
orderId?: string;
|
|
1342
|
+
amountIn?: bigint;
|
|
1343
|
+
amountOut?: bigint;
|
|
1344
|
+
depositTxHash?: string;
|
|
1345
|
+
deliveryTxHash?: string;
|
|
1346
|
+
refundTxHash?: string;
|
|
1347
|
+
errorCode?: string;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1279
1350
|
export interface GetInfoRequest {
|
|
1280
1351
|
ensureSynced?: boolean;
|
|
1281
1352
|
}
|
|
@@ -1285,6 +1356,8 @@ export interface GetInfoResponse {
|
|
|
1285
1356
|
balanceSats: number;
|
|
1286
1357
|
tokenBalances: Map<string, TokenBalance>;
|
|
1287
1358
|
recoverableFundsSats: number;
|
|
1359
|
+
lastSyncError?: SyncError;
|
|
1360
|
+
lastSyncedAt?: number;
|
|
1288
1361
|
}
|
|
1289
1362
|
|
|
1290
1363
|
export interface GetPaymentRequest {
|
|
@@ -1470,6 +1543,7 @@ export interface LnurlReceiveMetadata {
|
|
|
1470
1543
|
nostrZapRequest?: string;
|
|
1471
1544
|
nostrZapReceipt?: string;
|
|
1472
1545
|
senderComment?: string;
|
|
1546
|
+
lightningAddress?: string;
|
|
1473
1547
|
}
|
|
1474
1548
|
|
|
1475
1549
|
export interface LnurlWithdrawInfo {
|
|
@@ -1653,6 +1727,7 @@ export interface PreparePullPaymentResponse {
|
|
|
1653
1727
|
export interface PrepareRecoverFundsRequest {
|
|
1654
1728
|
feeRateSatPerVbyte: number;
|
|
1655
1729
|
fundingKind?: CpfpFundingKind;
|
|
1730
|
+
fundingStrategy?: CpfpFundingStrategy;
|
|
1656
1731
|
destination: string;
|
|
1657
1732
|
selection: ExitLeafSelection;
|
|
1658
1733
|
}
|
|
@@ -1818,6 +1893,7 @@ export interface RecoverableEcdsaSignatureBytes {
|
|
|
1818
1893
|
export interface RecoveryFunding {
|
|
1819
1894
|
singleUtxoSats: number;
|
|
1820
1895
|
perBranch: PerBranchFunding[];
|
|
1896
|
+
strategy?: CpfpFundingStrategy;
|
|
1821
1897
|
}
|
|
1822
1898
|
|
|
1823
1899
|
export interface RecoveryTransaction {
|
|
@@ -1871,9 +1947,9 @@ export interface ResolvedBatchRecipient {
|
|
|
1871
1947
|
}
|
|
1872
1948
|
|
|
1873
1949
|
export interface RestClient {
|
|
1874
|
-
getRequest(url: string, headers?:
|
|
1875
|
-
postRequest(url: string, headers?:
|
|
1876
|
-
deleteRequest(url: string, headers?:
|
|
1950
|
+
getRequest(url: string, headers?: { [key: string]: string }): Promise<RestResponse>;
|
|
1951
|
+
postRequest(url: string, headers?: { [key: string]: string }, body?: string): Promise<RestResponse>;
|
|
1952
|
+
deleteRequest(url: string, headers?: { [key: string]: string }, body?: string): Promise<RestResponse>;
|
|
1877
1953
|
}
|
|
1878
1954
|
|
|
1879
1955
|
export interface RestResponse {
|
|
@@ -1928,6 +2004,8 @@ export interface SendPaymentResponse {
|
|
|
1928
2004
|
export interface Session {
|
|
1929
2005
|
token: string;
|
|
1930
2006
|
expiration: number;
|
|
2007
|
+
refreshToken?: string;
|
|
2008
|
+
refreshTokenExpiration?: number;
|
|
1931
2009
|
}
|
|
1932
2010
|
|
|
1933
2011
|
export interface SessionStore {
|
|
@@ -1940,6 +2018,7 @@ export interface SetLnurlMetadataItem {
|
|
|
1940
2018
|
senderComment?: string;
|
|
1941
2019
|
nostrZapRequest?: string;
|
|
1942
2020
|
nostrZapReceipt?: string;
|
|
2021
|
+
lightningAddress?: string;
|
|
1943
2022
|
}
|
|
1944
2023
|
|
|
1945
2024
|
export interface SignMessageRequest {
|
|
@@ -1957,12 +2036,6 @@ export interface SignedTransferPackage {
|
|
|
1957
2036
|
signature: TransferSignature;
|
|
1958
2037
|
}
|
|
1959
2038
|
|
|
1960
|
-
export interface SilentPaymentAddressDetails {
|
|
1961
|
-
address: string;
|
|
1962
|
-
network: BitcoinNetwork;
|
|
1963
|
-
source: PaymentRequestSource;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
2039
|
export interface SkippedLeaf {
|
|
1967
2040
|
leafId: string;
|
|
1968
2041
|
valueSats: number;
|
|
@@ -2071,7 +2144,7 @@ export interface Storage {
|
|
|
2071
2144
|
listLeafRecoveries: () => Promise<LeafRecovery[]>;
|
|
2072
2145
|
updateLeafRecovery: (update: UpdateLeafRecovery) => Promise<void>;
|
|
2073
2146
|
setLnurlMetadata: (metadata: SetLnurlMetadataItem[]) => Promise<void>;
|
|
2074
|
-
getPaymentsByParentIds: (parentPaymentIds: string[]) => Promise<{ [parentId: string]:
|
|
2147
|
+
getPaymentsByParentIds: (parentPaymentIds: string[]) => Promise<{ [parentId: string]: Payment[] }>;
|
|
2075
2148
|
listContacts: (request: ListContactsRequest) => Promise<Contact[]>;
|
|
2076
2149
|
getContact: (id: string) => Promise<Contact>;
|
|
2077
2150
|
insertContact: (contact: Contact) => Promise<void>;
|
|
@@ -2128,7 +2201,10 @@ export interface Symbol {
|
|
|
2128
2201
|
|
|
2129
2202
|
export interface SyncWalletRequest {}
|
|
2130
2203
|
|
|
2131
|
-
export interface SyncWalletResponse {
|
|
2204
|
+
export interface SyncWalletResponse {
|
|
2205
|
+
lastSyncError?: SyncError;
|
|
2206
|
+
lastSyncedAt?: number;
|
|
2207
|
+
}
|
|
2132
2208
|
|
|
2133
2209
|
export interface TokenAllowance {
|
|
2134
2210
|
id: string;
|
|
@@ -2296,6 +2372,8 @@ export type BatchDestination = { type: "sparkAddress"; address: string } | { typ
|
|
|
2296
2372
|
|
|
2297
2373
|
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
2298
2374
|
|
|
2375
|
+
export type BridgeStatus = "created" | "pending" | "refunding" | "completed" | "refunded" | "failed" | "expired";
|
|
2376
|
+
|
|
2299
2377
|
export type BuildTransferPackageOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number };
|
|
2300
2378
|
|
|
2301
2379
|
export type BuyBitcoinRequest = { type: "moonpay"; delivery?: MoonpayDelivery; redirectUrl?: string } | { type: "cashApp"; amountSats: number };
|
|
@@ -2324,6 +2402,8 @@ export type CooperativeRecoveryError = { type: "replacementFeeTooLow"; requiredF
|
|
|
2324
2402
|
|
|
2325
2403
|
export type CpfpFundingKind = { type: "p2wpkh" } | { type: "p2tr" } | { type: "custom"; scriptPubkeyHex: string; signedInputWeight: number };
|
|
2326
2404
|
|
|
2405
|
+
export type CpfpFundingStrategy = "perBranch" | "perNode";
|
|
2406
|
+
|
|
2327
2407
|
export type CpfpInput = { type: "p2wpkh"; txid: string; vout: number; valueSats: number; pubkey: string } | { type: "p2tr"; txid: string; vout: number; valueSats: number; pubkey: string } | { type: "custom"; txid: string; vout: number; valueSats: number; scriptPubkeyHex: string; signedInputWeight: number };
|
|
2328
2408
|
|
|
2329
2409
|
export type CrossChainAddressFamily = "evm" | "solana" | "tron";
|
|
@@ -2358,7 +2438,7 @@ export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyt
|
|
|
2358
2438
|
|
|
2359
2439
|
export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
2360
2440
|
|
|
2361
|
-
export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } &
|
|
2441
|
+
export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } & BitcoinAddressDetails) | ({ type: "lnurlAuth" } & LnurlAuthRequestDetails) | ({ type: "url" } & string) | ({ type: "bip21" } & Bip21Details) | ({ type: "bolt12InvoiceRequest" } & Bolt12InvoiceRequestDetails) | ({ type: "lnurlWithdraw" } & LnurlWithdrawRequestDetails) | ({ type: "sparkAddress" } & SparkAddressDetails) | ({ type: "sparkInvoice" } & SparkInvoiceDetails) | ({ type: "crossChainAddress" } & CrossChainAddressDetails);
|
|
2362
2442
|
|
|
2363
2443
|
export type InstantClaimStatus = { type: "declined"; maxFeeSats?: number; confirmations?: number } | { type: "submitted"; claimId: string } | { type: "claimed" };
|
|
2364
2444
|
|
|
@@ -2378,7 +2458,7 @@ export type OptimizationOutcome = { type: "completed"; roundsExecuted: number }
|
|
|
2378
2458
|
|
|
2379
2459
|
export type Outspend = { type: "unspent" } | { type: "spent"; txid: string; vin: number; status: TxStatus };
|
|
2380
2460
|
|
|
2381
|
-
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 };
|
|
2461
|
+
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; vout: number; destinationAddress: string } | { type: "deposit"; txId: string; vout: number };
|
|
2382
2462
|
|
|
2383
2463
|
export type PaymentDetailsFilter = { type: "spark"; htlcStatus?: SparkHtlcStatus[]; conversionRefundNeeded?: boolean } | { type: "token"; conversionRefundNeeded?: boolean; txHash?: string; txType?: TokenTransactionType } | { type: "lightning"; htlcStatus?: SparkHtlcStatus[] };
|
|
2384
2464
|
|
|
@@ -2396,7 +2476,7 @@ export type PublishSignedLnurlPayResponse = { type: "swapCompleted" } | { type:
|
|
|
2396
2476
|
|
|
2397
2477
|
export type PublishSignedTransferPackageResponse = { type: "swapCompleted" } | { type: "paymentSent"; payment: Payment } | { type: "paymentsSent"; payments: Payment[] };
|
|
2398
2478
|
|
|
2399
|
-
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: bigint; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress"; newAddress?: boolean } | { type: "bolt11Invoice"; description: string; amountSats?: number; expirySecs?: number; paymentHash?: string; receiverIdentityPublicKey?: string } | { type: "crossChain"; route: CrossChainRoutePair; amount: bigint; destination?: SparkAsset; feeMode?: CrossChainFeeMode; maxSlippageBps?: number; targetOverpayBps?: number };
|
|
2479
|
+
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: bigint; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress"; newAddress?: boolean } | { type: "bolt11Invoice"; description: string; amountSats?: number; expirySecs?: number; paymentHash?: string; receiverIdentityPublicKey?: string; preimage?: string } | { type: "crossChain"; route: CrossChainRoutePair; amount: bigint; destination?: SparkAsset; feeMode?: CrossChainFeeMode; maxSlippageBps?: number; targetOverpayBps?: number };
|
|
2400
2480
|
|
|
2401
2481
|
export type RecoveryMethod = "cooperative" | "unilateral";
|
|
2402
2482
|
|
|
@@ -2420,7 +2500,7 @@ export type ServiceStatus = "operational" | "degraded" | "partial" | "unknown" |
|
|
|
2420
2500
|
|
|
2421
2501
|
export type SessionStoreError = { type: "notFound" } | ({ type: "generic" } & string);
|
|
2422
2502
|
|
|
2423
|
-
export type SkippedLeafReason = { type: "feeExceedsValue" } | { type: "fundsNotFound" } | { type: "unverified" } | { type: "notRecoverable"; message: string };
|
|
2503
|
+
export type SkippedLeafReason = { type: "feeExceedsValue" } | { type: "fundsNotFound" } | { type: "unverified" } | { type: "operatorsUnavailable" } | { type: "notRecoverable"; message: string };
|
|
2424
2504
|
|
|
2425
2505
|
export type SparkAsset = { type: "bitcoin" } | { type: "token"; tokenIdentifier: string };
|
|
2426
2506
|
|
|
@@ -2440,6 +2520,8 @@ export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionData
|
|
|
2440
2520
|
|
|
2441
2521
|
export type SwapDegradation = "belowMinimum" | "unexpectedAsset" | "missingInfo";
|
|
2442
2522
|
|
|
2523
|
+
export type SyncError = { type: "network"; message: string } | { type: "generic"; message: string };
|
|
2524
|
+
|
|
2443
2525
|
export type TokenAllowanceLimit = { type: "unlimited" } | { type: "amount"; amount: bigint };
|
|
2444
2526
|
|
|
2445
2527
|
export type TokenAllowanceRole = "owner" | "spender";
|
|
@@ -2490,7 +2572,13 @@ export class BreezSdk {
|
|
|
2490
2572
|
addContact(request: AddContactRequest): Promise<Contact>;
|
|
2491
2573
|
addEventListener(listener: EventListener): Promise<string>;
|
|
2492
2574
|
authorizeLightningAddressTransfer(request: AuthorizeTransferRequest): Promise<TransferAuthorization>;
|
|
2575
|
+
/**
|
|
2576
|
+
* @deprecated Use `bridgeFromCashApp` on the client from `getBridgingClient`.
|
|
2577
|
+
*/
|
|
2493
2578
|
bridgeFromCashApp(request: BridgeFromCashAppRequest): Promise<BridgeFromCashAppResponse>;
|
|
2579
|
+
/**
|
|
2580
|
+
* @deprecated Use `bridgeToCashApp` on the client from `getBridgingClient`.
|
|
2581
|
+
*/
|
|
2494
2582
|
bridgeToCashApp(request: BridgeToCashAppRequest): Promise<BridgeToCashAppResponse>;
|
|
2495
2583
|
buildUnsignedBatchPackage(request: BuildUnsignedBatchPackageRequest): Promise<UnsignedTransferPackage>;
|
|
2496
2584
|
buildUnsignedLnurlPayPackage(request: BuildUnsignedLnurlPayPackageRequest): Promise<UnsignedTransferPackage>;
|
|
@@ -2510,6 +2598,7 @@ export class BreezSdk {
|
|
|
2510
2598
|
exportUnilateralExitState(): Promise<ExportUnilateralExitStateResponse>;
|
|
2511
2599
|
fetchClaimDepositQuote(request: FetchClaimDepositQuoteRequest): Promise<FetchClaimDepositQuoteResponse>;
|
|
2512
2600
|
fetchConversionLimits(request: FetchConversionLimitsRequest): Promise<FetchConversionLimitsResponse>;
|
|
2601
|
+
getBridgingClient(): BridgingClient;
|
|
2513
2602
|
getCrossChainRoutes(filter: CrossChainRouteFilter): Promise<CrossChainRoutePair[]>;
|
|
2514
2603
|
getInfo(request: GetInfoRequest): Promise<GetInfoResponse>;
|
|
2515
2604
|
getLightningAddress(): Promise<LightningAddressInfo | undefined>;
|
|
@@ -2532,7 +2621,7 @@ export class BreezSdk {
|
|
|
2532
2621
|
parse(input: string): Promise<InputType>;
|
|
2533
2622
|
prepareLnurlPay(request: PrepareLnurlPayRequest): Promise<PrepareLnurlPayResponse>;
|
|
2534
2623
|
/**
|
|
2535
|
-
* @deprecated Use `bridgeFromCashApp`.
|
|
2624
|
+
* @deprecated Use `bridgeFromCashApp` on the client from `getBridgingClient`.
|
|
2536
2625
|
*/
|
|
2537
2626
|
preparePaymentLink(request: PreparePaymentLinkRequest): Promise<PreparePaymentLinkResponse>;
|
|
2538
2627
|
preparePullPayment(request: PreparePullPaymentRequest): Promise<PreparePullPaymentResponse>;
|
|
@@ -2561,6 +2650,32 @@ export class BreezSdk {
|
|
|
2561
2650
|
updateUserSettings(request: UpdateUserSettingsRequest): Promise<void>;
|
|
2562
2651
|
}
|
|
2563
2652
|
|
|
2653
|
+
/**
|
|
2654
|
+
* Creates bridges: orders that pay a recipient from another chain or over
|
|
2655
|
+
* Lightning, with no funds moving through the SDK. Only available on mainnet.
|
|
2656
|
+
*/
|
|
2657
|
+
export class BridgingClient {
|
|
2658
|
+
private constructor();
|
|
2659
|
+
free(): void;
|
|
2660
|
+
[Symbol.dispose](): void;
|
|
2661
|
+
bridgeFromCashApp(request: CreateBridgeRequest): Promise<CreateBridgeResponse>;
|
|
2662
|
+
bridgeToCashApp(request: CreateBridgeRequest): Promise<CreateBridgeResponse>;
|
|
2663
|
+
createBridge(request: CreateBridgeRequest): Promise<CreateBridgeResponse>;
|
|
2664
|
+
getBridgeStatus(request: GetBridgeStatusRequest): Promise<GetBridgeStatusResponse>;
|
|
2665
|
+
getRoutes(request: GetBridgeRoutesRequest): Promise<GetBridgeRoutesResponse>;
|
|
2666
|
+
}
|
|
2667
|
+
|
|
2668
|
+
/**
|
|
2669
|
+
* A logger that prints each log entry to the JavaScript console, with the console method that
|
|
2670
|
+
* matches the entry's level.
|
|
2671
|
+
*/
|
|
2672
|
+
export class ConsoleLogger {
|
|
2673
|
+
free(): void;
|
|
2674
|
+
[Symbol.dispose](): void;
|
|
2675
|
+
log(entry: LogEntry): void;
|
|
2676
|
+
constructor();
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2564
2679
|
/**
|
|
2565
2680
|
* A CPFP signer matching the `CpfpSigner` TypeScript interface.
|
|
2566
2681
|
*/
|
|
@@ -2917,6 +3032,11 @@ export function createTurnkeySigner(config: TurnkeyConfig): Promise<ExternalSign
|
|
|
2917
3032
|
*/
|
|
2918
3033
|
export function createTurnkeySigningOnlySigner(config: TurnkeyConfig): Promise<SigningOnlyExternalSigners>;
|
|
2919
3034
|
|
|
3035
|
+
/**
|
|
3036
|
+
* Settings for `newBridgingClient` with every optional field unset.
|
|
3037
|
+
*/
|
|
3038
|
+
export function defaultBridgingConfig(api_key: string): BridgingConfig;
|
|
3039
|
+
|
|
2920
3040
|
export function defaultConfig(network: Network): Config;
|
|
2921
3041
|
|
|
2922
3042
|
/**
|
|
@@ -2973,6 +3093,11 @@ export function initLogging(logger: Logger, filter?: string | null): Promise<voi
|
|
|
2973
3093
|
*/
|
|
2974
3094
|
export function mysqlStorage(config: MysqlStorageConfig): WasmStorageConfig;
|
|
2975
3095
|
|
|
3096
|
+
/**
|
|
3097
|
+
* Builds a `BridgingClient` from an API key, with no seed or storage.
|
|
3098
|
+
*/
|
|
3099
|
+
export function newBridgingClient(config: BridgingConfig): Promise<BridgingClient>;
|
|
3100
|
+
|
|
2976
3101
|
/**
|
|
2977
3102
|
* Constructs a shareable REST-based Bitcoin chain service.
|
|
2978
3103
|
*
|
|
@@ -3025,6 +3150,8 @@ export interface InitOutput {
|
|
|
3025
3150
|
readonly memory: WebAssembly.Memory;
|
|
3026
3151
|
readonly __wbg_bitcoinchainservicehandle_free: (a: number, b: number) => void;
|
|
3027
3152
|
readonly __wbg_breezsdk_free: (a: number, b: number) => void;
|
|
3153
|
+
readonly __wbg_bridgingclient_free: (a: number, b: number) => void;
|
|
3154
|
+
readonly __wbg_consolelogger_free: (a: number, b: number) => void;
|
|
3028
3155
|
readonly __wbg_defaultcpfpsigner_free: (a: number, b: number) => void;
|
|
3029
3156
|
readonly __wbg_externalsigners_free: (a: number, b: number) => void;
|
|
3030
3157
|
readonly __wbg_passkeyclient_free: (a: number, b: number) => void;
|
|
@@ -3064,6 +3191,7 @@ export interface InitOutput {
|
|
|
3064
3191
|
readonly breezsdk_exportUnilateralExitState: (a: number) => any;
|
|
3065
3192
|
readonly breezsdk_fetchClaimDepositQuote: (a: number, b: any) => any;
|
|
3066
3193
|
readonly breezsdk_fetchConversionLimits: (a: number, b: any) => any;
|
|
3194
|
+
readonly breezsdk_getBridgingClient: (a: number) => [number, number, number];
|
|
3067
3195
|
readonly breezsdk_getCrossChainRoutes: (a: number, b: any) => any;
|
|
3068
3196
|
readonly breezsdk_getInfo: (a: number, b: any) => any;
|
|
3069
3197
|
readonly breezsdk_getLightningAddress: (a: number) => any;
|
|
@@ -3110,11 +3238,19 @@ export interface InitOutput {
|
|
|
3110
3238
|
readonly breezsdk_unregisterWebhook: (a: number, b: any) => any;
|
|
3111
3239
|
readonly breezsdk_updateContact: (a: number, b: any) => any;
|
|
3112
3240
|
readonly breezsdk_updateUserSettings: (a: number, b: any) => any;
|
|
3241
|
+
readonly bridgingclient_bridgeFromCashApp: (a: number, b: any) => any;
|
|
3242
|
+
readonly bridgingclient_bridgeToCashApp: (a: number, b: any) => any;
|
|
3243
|
+
readonly bridgingclient_createBridge: (a: number, b: any) => any;
|
|
3244
|
+
readonly bridgingclient_getBridgeStatus: (a: number, b: any) => any;
|
|
3245
|
+
readonly bridgingclient_getRoutes: (a: number, b: any) => any;
|
|
3113
3246
|
readonly connect: (a: any) => any;
|
|
3114
3247
|
readonly connectWithSigner: (a: any, b: any, c: any, d: number, e: number) => any;
|
|
3115
3248
|
readonly connectWithSigningOnlySigner: (a: any, b: any, c: any, d: number, e: number) => any;
|
|
3249
|
+
readonly consolelogger_log: (a: number, b: any) => void;
|
|
3250
|
+
readonly consolelogger_new: () => number;
|
|
3116
3251
|
readonly createTurnkeySigner: (a: any) => any;
|
|
3117
3252
|
readonly createTurnkeySigningOnlySigner: (a: any) => any;
|
|
3253
|
+
readonly defaultBridgingConfig: (a: number, b: number) => any;
|
|
3118
3254
|
readonly defaultConfig: (a: any) => any;
|
|
3119
3255
|
readonly defaultExternalSigners: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
|
|
3120
3256
|
readonly defaultMysqlStorageConfig: (a: number, b: number) => any;
|
|
@@ -3160,6 +3296,7 @@ export interface InitOutput {
|
|
|
3160
3296
|
readonly getSparkStatus: () => any;
|
|
3161
3297
|
readonly initLogging: (a: any, b: number, c: number) => any;
|
|
3162
3298
|
readonly mysqlStorage: (a: any) => number;
|
|
3299
|
+
readonly newBridgingClient: (a: any) => any;
|
|
3163
3300
|
readonly newRestChainService: (a: number, b: number, c: any, d: any, e: number) => any;
|
|
3164
3301
|
readonly newSharedSdkContext: (a: any) => any;
|
|
3165
3302
|
readonly parseSparkConfig: (a: number, b: number) => [number, number, number];
|
|
@@ -3224,18 +3361,18 @@ export interface InitOutput {
|
|
|
3224
3361
|
readonly __wbg_signingonlyexternalsigners_free: (a: number, b: number) => void;
|
|
3225
3362
|
readonly signingonlyexternalsigners_breezSigner: (a: number) => number;
|
|
3226
3363
|
readonly signingonlyexternalsigners_sparkSigner: (a: number) => number;
|
|
3227
|
-
readonly
|
|
3228
|
-
readonly
|
|
3229
|
-
readonly
|
|
3230
|
-
readonly
|
|
3231
|
-
readonly
|
|
3364
|
+
readonly wasm_bindgen__convert__closures_____invoke__h43ca79db2f165a92: (a: number, b: number, c: any) => [number, number];
|
|
3365
|
+
readonly wasm_bindgen__convert__closures_____invoke__h43ca79db2f165a92_6: (a: number, b: number, c: any) => [number, number];
|
|
3366
|
+
readonly wasm_bindgen__convert__closures_____invoke__h43ca79db2f165a92_7: (a: number, b: number, c: any) => [number, number];
|
|
3367
|
+
readonly wasm_bindgen__convert__closures_____invoke__h43ca79db2f165a92_8: (a: number, b: number, c: any) => [number, number];
|
|
3368
|
+
readonly wasm_bindgen__convert__closures_____invoke__h43ca79db2f165a92_9: (a: number, b: number, c: any) => [number, number];
|
|
3232
3369
|
readonly wasm_bindgen__convert__closures_____invoke__h118cfc65b353d9fd: (a: number, b: number, c: any, d: any) => void;
|
|
3233
|
-
readonly
|
|
3234
|
-
readonly
|
|
3235
|
-
readonly
|
|
3236
|
-
readonly
|
|
3237
|
-
readonly
|
|
3238
|
-
readonly
|
|
3370
|
+
readonly wasm_bindgen__convert__closures_____invoke__h168b325370d2795a: (a: number, b: number, c: any) => void;
|
|
3371
|
+
readonly wasm_bindgen__convert__closures_____invoke__h168b325370d2795a_2: (a: number, b: number, c: any) => void;
|
|
3372
|
+
readonly wasm_bindgen__convert__closures_____invoke__h168b325370d2795a_3: (a: number, b: number, c: any) => void;
|
|
3373
|
+
readonly wasm_bindgen__convert__closures_____invoke__h168b325370d2795a_4: (a: number, b: number, c: any) => void;
|
|
3374
|
+
readonly wasm_bindgen__convert__closures_____invoke__h168b325370d2795a_5: (a: number, b: number, c: any) => void;
|
|
3375
|
+
readonly wasm_bindgen__convert__closures_____invoke__h8a05c61e16e49565: (a: number, b: number) => void;
|
|
3239
3376
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
3240
3377
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
3241
3378
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|