@breeztech/breez-sdk-spark 0.23.1 → 0.24.1
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 +75 -6
- package/bundler/breez_sdk_spark_wasm_bg.js +33 -19
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -3
- package/bundler/storage/index.js +34 -3
- package/deno/breez_sdk_spark_wasm.d.ts +75 -6
- package/deno/breez_sdk_spark_wasm.js +33 -19
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +75 -6
- package/nodejs/breez_sdk_spark_wasm.js +33 -19
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -3
- package/nodejs/mysql-storage/index.cjs +133 -5
- package/nodejs/mysql-storage/migrations.cjs +16 -0
- package/nodejs/mysql-token-store/index.cjs +108 -1
- package/nodejs/mysql-tree-store/index.cjs +108 -1
- package/nodejs/postgres-storage/index.cjs +135 -6
- package/nodejs/postgres-storage/migrations.cjs +16 -0
- package/nodejs/postgres-token-store/index.cjs +109 -1
- package/nodejs/postgres-tree-store/index.cjs +109 -1
- package/nodejs/storage/index.cjs +19 -4
- package/nodejs/storage/migrations.cjs +14 -0
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +80 -9
- package/web/breez_sdk_spark_wasm.js +33 -19
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -3
- package/web/storage/index.js +34 -3
package/breez-sdk-spark.tgz
CHANGED
|
Binary file
|
|
@@ -203,6 +203,12 @@ export interface Wallet {
|
|
|
203
203
|
export interface MysqlStorageConfig {
|
|
204
204
|
/**
|
|
205
205
|
* MySQL connection URL (e.g. `mysql://user:pass@host:3306/dbname`).
|
|
206
|
+
*
|
|
207
|
+
* TLS is controlled by the `ssl-mode` query parameter: `required` and
|
|
208
|
+
* `verify_identity` verify the server certificate chain and hostname,
|
|
209
|
+
* `verify_ca` verifies the chain only, `no-verify` encrypts without
|
|
210
|
+
* verification, and absent or `disabled` means no TLS. An unrecognized
|
|
211
|
+
* value fails instead of silently downgrading.
|
|
206
212
|
*/
|
|
207
213
|
connectionString: string;
|
|
208
214
|
/**
|
|
@@ -239,6 +245,13 @@ export interface MysqlStorageConfig {
|
|
|
239
245
|
export interface PostgresStorageConfig {
|
|
240
246
|
/**
|
|
241
247
|
* PostgreSQL connection string (URI format).
|
|
248
|
+
*
|
|
249
|
+
* TLS is controlled by the `sslmode` query parameter: `prefer`,
|
|
250
|
+
* `require`, and `verify-full` require TLS and verify the server
|
|
251
|
+
* certificate chain and hostname; `verify-ca` verifies the chain only;
|
|
252
|
+
* `no-verify` encrypts without verification; absent or `disable` means
|
|
253
|
+
* no TLS. An unrecognized value fails instead of silently changing the
|
|
254
|
+
* TLS level.
|
|
242
255
|
*/
|
|
243
256
|
connectionString: string;
|
|
244
257
|
/**
|
|
@@ -275,6 +288,10 @@ export interface PasskeyConfig {
|
|
|
275
288
|
* zero-config path.
|
|
276
289
|
*/
|
|
277
290
|
providerOptions?: PasskeyProviderOptions;
|
|
291
|
+
/**
|
|
292
|
+
* Always rejected here: a SOCKS5 proxy cannot be honoured on WASM.
|
|
293
|
+
*/
|
|
294
|
+
proxy?: ProxyConfig;
|
|
278
295
|
}
|
|
279
296
|
|
|
280
297
|
/**
|
|
@@ -492,6 +509,12 @@ export interface WasmSdkContextConfig {
|
|
|
492
509
|
* context store their data in MySQL via the shared pool.
|
|
493
510
|
*/
|
|
494
511
|
mysqlConfig?: MysqlStorageConfig;
|
|
512
|
+
/**
|
|
513
|
+
* Routes every connection opened by this context\'s shared clients
|
|
514
|
+
* through a SOCKS5 proxy. Not supported on WASM: setting this always
|
|
515
|
+
* fails validation.
|
|
516
|
+
*/
|
|
517
|
+
proxy?: ProxyConfig;
|
|
495
518
|
}
|
|
496
519
|
|
|
497
520
|
export interface AddContactRequest {
|
|
@@ -550,6 +573,7 @@ export interface BitcoinChainService {
|
|
|
550
573
|
getAddressUtxos(address: string): Promise<Utxo[]>;
|
|
551
574
|
getAddressTxos(address: string): Promise<Utxo[]>;
|
|
552
575
|
getTransactionStatus(txid: string): Promise<TxStatus>;
|
|
576
|
+
tipHeight(): Promise<number>;
|
|
553
577
|
getTransactionHex(txid: string): Promise<string>;
|
|
554
578
|
getOutspend(txid: string, vout: number): Promise<Outspend>;
|
|
555
579
|
broadcastTransaction(tx: string): Promise<void>;
|
|
@@ -657,11 +681,18 @@ export interface CheckMessageResponse {
|
|
|
657
681
|
isValid: boolean;
|
|
658
682
|
}
|
|
659
683
|
|
|
684
|
+
export interface ClaimDepositQuote {
|
|
685
|
+
confirmationsRequired: number;
|
|
686
|
+
creditAmountSats: number;
|
|
687
|
+
feeSats: number;
|
|
688
|
+
feeRateSatPerVbyte: number;
|
|
689
|
+
isEstimate: boolean;
|
|
690
|
+
}
|
|
691
|
+
|
|
660
692
|
export interface ClaimDepositRequest {
|
|
661
693
|
txid: string;
|
|
662
694
|
vout: number;
|
|
663
695
|
maxFee?: MaxFee;
|
|
664
|
-
maxInstantFeeBps?: number;
|
|
665
696
|
}
|
|
666
697
|
|
|
667
698
|
export interface ClaimDepositResponse {
|
|
@@ -686,7 +717,6 @@ export interface Config {
|
|
|
686
717
|
network: Network;
|
|
687
718
|
syncIntervalSecs: number;
|
|
688
719
|
maxDepositClaimFee?: MaxFee;
|
|
689
|
-
maxInstantDepositClaimFeeBps?: number;
|
|
690
720
|
lnurlDomain?: string;
|
|
691
721
|
preferSparkOverLightning: boolean;
|
|
692
722
|
exitChainAutoFetchEnabled: boolean;
|
|
@@ -707,6 +737,12 @@ export interface Config {
|
|
|
707
737
|
maxConcurrentClaims: number;
|
|
708
738
|
sparkConfig?: SparkConfig;
|
|
709
739
|
backgroundTasksEnabled: boolean;
|
|
740
|
+
/**
|
|
741
|
+
* Routes the connections the SDK opens through a SOCKS5 proxy. Not
|
|
742
|
+
* supported on WASM: setting this always fails validation, since the
|
|
743
|
+
* browser owns connection setup and exposes no proxy control.
|
|
744
|
+
*/
|
|
745
|
+
proxy?: ProxyConfig;
|
|
710
746
|
crossChainConfig?: CrossChainConfig;
|
|
711
747
|
}
|
|
712
748
|
|
|
@@ -825,6 +861,7 @@ export interface DepositInfo {
|
|
|
825
861
|
refundTxId?: string;
|
|
826
862
|
claimError?: DepositClaimError;
|
|
827
863
|
instantClaimStatus?: InstantClaimStatus;
|
|
864
|
+
refundState?: RefundState;
|
|
828
865
|
}
|
|
829
866
|
|
|
830
867
|
export interface EcdsaSignatureBytes {
|
|
@@ -1044,6 +1081,18 @@ export interface ExternalTreeNodeId {
|
|
|
1044
1081
|
id: string;
|
|
1045
1082
|
}
|
|
1046
1083
|
|
|
1084
|
+
export interface FetchClaimDepositQuoteRequest {
|
|
1085
|
+
txid: string;
|
|
1086
|
+
vout: number;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
export interface FetchClaimDepositQuoteResponse {
|
|
1090
|
+
amountSats: number;
|
|
1091
|
+
confirmations: number;
|
|
1092
|
+
instant?: ClaimDepositQuote;
|
|
1093
|
+
mature: ClaimDepositQuote;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1047
1096
|
export interface FetchConversionLimitsRequest {
|
|
1048
1097
|
conversionType: ConversionType;
|
|
1049
1098
|
tokenIdentifier?: string;
|
|
@@ -1262,6 +1311,13 @@ export interface LnurlWithdrawRequestDetails {
|
|
|
1262
1311
|
defaultDescription: string;
|
|
1263
1312
|
minWithdrawable: number;
|
|
1264
1313
|
maxWithdrawable: number;
|
|
1314
|
+
/**
|
|
1315
|
+
* The URL of the LNURL-withdraw endpoint these details were fetched from.
|
|
1316
|
+
* Set when the details come from parsing an input; determines how far the
|
|
1317
|
+
* withdraw flow trusts the endpoint-chosen `callback`. Absent or empty
|
|
1318
|
+
* means no exemption: the callback is held to the public-host rules.
|
|
1319
|
+
*/
|
|
1320
|
+
url?: string;
|
|
1265
1321
|
}
|
|
1266
1322
|
|
|
1267
1323
|
export interface LnurlWithdrawResponse {
|
|
@@ -1443,6 +1499,13 @@ export interface ProvisionalPayment {
|
|
|
1443
1499
|
details: ProvisionalPaymentDetails;
|
|
1444
1500
|
}
|
|
1445
1501
|
|
|
1502
|
+
export interface ProxyConfig {
|
|
1503
|
+
host: string;
|
|
1504
|
+
port: number;
|
|
1505
|
+
username?: string;
|
|
1506
|
+
password?: string;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1446
1509
|
export interface PublicKeyBytes {
|
|
1447
1510
|
bytes: number[];
|
|
1448
1511
|
}
|
|
@@ -1816,6 +1879,10 @@ export interface TurnkeyConfig {
|
|
|
1816
1879
|
identityPublicKey?: string;
|
|
1817
1880
|
retry?: TurnkeyRetryConfig;
|
|
1818
1881
|
maxRps?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* Always rejected here: a SOCKS5 proxy cannot be honoured on WASM.
|
|
1884
|
+
*/
|
|
1885
|
+
proxy?: ProxyConfig;
|
|
1819
1886
|
}
|
|
1820
1887
|
|
|
1821
1888
|
export interface TurnkeyRetryConfig {
|
|
@@ -1982,9 +2049,7 @@ export type FeePolicy = "feesExcluded" | "feesIncluded";
|
|
|
1982
2049
|
|
|
1983
2050
|
export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } & SilentPaymentAddressDetails) | ({ type: "lnurlAuth" } & LnurlAuthRequestDetails) | ({ type: "url" } & string) | ({ type: "bip21" } & Bip21Details) | ({ type: "bolt12InvoiceRequest" } & Bolt12InvoiceRequestDetails) | ({ type: "lnurlWithdraw" } & LnurlWithdrawRequestDetails) | ({ type: "sparkAddress" } & SparkAddressDetails) | ({ type: "sparkInvoice" } & SparkInvoiceDetails) | ({ type: "crossChainAddress" } & CrossChainAddressDetails);
|
|
1984
2051
|
|
|
1985
|
-
export type
|
|
1986
|
-
|
|
1987
|
-
export type InstantClaimStatus = { type: "declined"; reason: InstantClaimDeclineReason } | { type: "submitted"; claimId: string };
|
|
2052
|
+
export type InstantClaimStatus = { type: "declined"; maxFeeSats?: number; confirmations?: number } | { type: "submitted"; claimId: string };
|
|
1988
2053
|
|
|
1989
2054
|
export type LnurlCallbackStatus = { type: "ok" } | { type: "errorStatus"; errorDetails: LnurlErrorDetails };
|
|
1990
2055
|
|
|
@@ -2020,6 +2085,8 @@ export type PublishSignedTransferPackageResponse = { type: "swapCompleted" } | {
|
|
|
2020
2085
|
|
|
2021
2086
|
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; receiverIdentityPublicKey?: string };
|
|
2022
2087
|
|
|
2088
|
+
export type RefundState = { type: "broadcastPending"; lastError?: string } | { type: "broadcast" };
|
|
2089
|
+
|
|
2023
2090
|
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[] } | { type: "unilateralExitStateChanged" };
|
|
2024
2091
|
|
|
2025
2092
|
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
@@ -2060,7 +2127,7 @@ export type UnilateralExitTxKind = "fanOut" | "node" | "refund" | "sweep";
|
|
|
2060
2127
|
|
|
2061
2128
|
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 } | { type: "tokenBatch"; prepareTokenTransaction: ExternalPrepareTokenTransactionRequest; tokenContext: number[]; totals: BatchTotal[]; isSwap: boolean };
|
|
2062
2129
|
|
|
2063
|
-
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string } | { type: "instantClaim"; status: InstantClaimStatus };
|
|
2130
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string; state: RefundState } | { type: "instantClaim"; status: InstantClaimStatus } | { type: "refundBroadcastState"; refundTxid: string; state: RefundState };
|
|
2064
2131
|
|
|
2065
2132
|
export type WebhookEventType = { type: "lightningReceiveFinished" } | { type: "lightningSendFinished" } | { type: "coopExitFinished" } | { type: "staticDepositFinished" } | ({ type: "unknown" } & string);
|
|
2066
2133
|
|
|
@@ -2084,6 +2151,7 @@ export class BitcoinChainServiceHandle {
|
|
|
2084
2151
|
getTransactionHex(txid: string): Promise<any>;
|
|
2085
2152
|
getTransactionStatus(txid: string): Promise<any>;
|
|
2086
2153
|
recommendedFees(): Promise<any>;
|
|
2154
|
+
tipHeight(): Promise<any>;
|
|
2087
2155
|
}
|
|
2088
2156
|
|
|
2089
2157
|
export class BreezSdk {
|
|
@@ -2106,6 +2174,7 @@ export class BreezSdk {
|
|
|
2106
2174
|
deleteLightningAddress(): Promise<void>;
|
|
2107
2175
|
disconnect(): Promise<void>;
|
|
2108
2176
|
exportUnilateralExitState(): Promise<ExportUnilateralExitStateResponse>;
|
|
2177
|
+
fetchClaimDepositQuote(request: FetchClaimDepositQuoteRequest): Promise<FetchClaimDepositQuoteResponse>;
|
|
2109
2178
|
fetchConversionLimits(request: FetchConversionLimitsRequest): Promise<FetchConversionLimitsResponse>;
|
|
2110
2179
|
getCrossChainRoutes(filter: CrossChainRouteFilter): Promise<CrossChainRoutePair[]>;
|
|
2111
2180
|
getInfo(request: GetInfoRequest): Promise<GetInfoResponse>;
|
|
@@ -91,6 +91,13 @@ export class BitcoinChainServiceHandle {
|
|
|
91
91
|
const ret = wasm.bitcoinchainservicehandle_recommendedFees(this.__wbg_ptr);
|
|
92
92
|
return ret;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* @returns {Promise<any>}
|
|
96
|
+
*/
|
|
97
|
+
tipHeight() {
|
|
98
|
+
const ret = wasm.bitcoinchainservicehandle_tipHeight(this.__wbg_ptr);
|
|
99
|
+
return ret;
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
if (Symbol.dispose) BitcoinChainServiceHandle.prototype[Symbol.dispose] = BitcoinChainServiceHandle.prototype.free;
|
|
96
103
|
|
|
@@ -238,6 +245,14 @@ export class BreezSdk {
|
|
|
238
245
|
const ret = wasm.breezsdk_exportUnilateralExitState(this.__wbg_ptr);
|
|
239
246
|
return ret;
|
|
240
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* @param {FetchClaimDepositQuoteRequest} request
|
|
250
|
+
* @returns {Promise<FetchClaimDepositQuoteResponse>}
|
|
251
|
+
*/
|
|
252
|
+
fetchClaimDepositQuote(request) {
|
|
253
|
+
const ret = wasm.breezsdk_fetchClaimDepositQuote(this.__wbg_ptr, request);
|
|
254
|
+
return ret;
|
|
255
|
+
}
|
|
241
256
|
/**
|
|
242
257
|
* @param {FetchConversionLimitsRequest} request
|
|
243
258
|
* @returns {Promise<FetchConversionLimitsResponse>}
|
|
@@ -1218,7 +1233,10 @@ export class PasskeyClient {
|
|
|
1218
1233
|
var ptr0 = isLikeNone(breez_api_key) ? 0 : passStringToWasm0(breez_api_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1219
1234
|
var len0 = WASM_VECTOR_LEN;
|
|
1220
1235
|
const ret = wasm.passkeyclient_new(prf_provider, ptr0, len0, isLikeNone(config) ? 0 : addToExternrefTable0(config));
|
|
1221
|
-
|
|
1236
|
+
if (ret[2]) {
|
|
1237
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1238
|
+
}
|
|
1239
|
+
this.__wbg_ptr = ret[0];
|
|
1222
1240
|
PasskeyClientFinalization.register(this, this.__wbg_ptr, this);
|
|
1223
1241
|
return this;
|
|
1224
1242
|
}
|
|
@@ -2097,10 +2115,6 @@ export function __wbg_applyPaymentUpdate_8526d773e5ac8314() { return handleError
|
|
|
2097
2115
|
const ret = arg0.applyPaymentUpdate(arg1);
|
|
2098
2116
|
return ret;
|
|
2099
2117
|
}, arguments); }
|
|
2100
|
-
export function __wbg_arrayBuffer_87e3ac06d961f7a0() { return handleError(function (arg0) {
|
|
2101
|
-
const ret = arg0.arrayBuffer();
|
|
2102
|
-
return ret;
|
|
2103
|
-
}, arguments); }
|
|
2104
2118
|
export function __wbg_beforeSend_e8a50acd6afd73ed() { return handleError(function (arg0, arg1, arg2) {
|
|
2105
2119
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
2106
2120
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
@@ -3499,10 +3513,6 @@ export function __wbg_syncUpdateRecordFromIncoming_47caaa75be4d3a9a() { return h
|
|
|
3499
3513
|
const ret = arg0.syncUpdateRecordFromIncoming(arg1);
|
|
3500
3514
|
return ret;
|
|
3501
3515
|
}, arguments); }
|
|
3502
|
-
export function __wbg_text_de416916b5c06490() { return handleError(function (arg0) {
|
|
3503
|
-
const ret = arg0.text();
|
|
3504
|
-
return ret;
|
|
3505
|
-
}, arguments); }
|
|
3506
3516
|
export function __wbg_then_20a157d939b514f5(arg0, arg1) {
|
|
3507
3517
|
const ret = arg0.then(arg1);
|
|
3508
3518
|
return ret;
|
|
@@ -3511,6 +3521,10 @@ export function __wbg_then_5ef9b762bc91555c(arg0, arg1, arg2) {
|
|
|
3511
3521
|
const ret = arg0.then(arg1, arg2);
|
|
3512
3522
|
return ret;
|
|
3513
3523
|
}
|
|
3524
|
+
export function __wbg_tipHeight_e14ddf8ed9a68d5a() { return handleError(function (arg0) {
|
|
3525
|
+
const ret = arg0.tipHeight();
|
|
3526
|
+
return ret;
|
|
3527
|
+
}, arguments); }
|
|
3514
3528
|
export function __wbg_toString_15656af8d8e71f16(arg0, arg1, arg2) {
|
|
3515
3529
|
const ret = arg1.toString(arg2);
|
|
3516
3530
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -3618,27 +3632,27 @@ export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
|
3618
3632
|
return ret;
|
|
3619
3633
|
}
|
|
3620
3634
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
3621
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3635
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3622
3636
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2);
|
|
3623
3637
|
return ret;
|
|
3624
3638
|
}
|
|
3625
3639
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
3626
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
3640
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3627
3641
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2);
|
|
3628
3642
|
return ret;
|
|
3629
3643
|
}
|
|
3630
3644
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
3631
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
3645
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3632
3646
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3);
|
|
3633
3647
|
return ret;
|
|
3634
3648
|
}
|
|
3635
3649
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
3636
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
3650
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3637
3651
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4);
|
|
3638
3652
|
return ret;
|
|
3639
3653
|
}
|
|
3640
3654
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
3641
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
3655
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3642
3656
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5);
|
|
3643
3657
|
return ret;
|
|
3644
3658
|
}
|
|
@@ -3663,12 +3677,12 @@ export function __wbindgen_cast_000000000000000a(arg0, arg1) {
|
|
|
3663
3677
|
return ret;
|
|
3664
3678
|
}
|
|
3665
3679
|
export function __wbindgen_cast_000000000000000b(arg0, arg1) {
|
|
3666
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3667
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3680
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 405, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3681
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7);
|
|
3668
3682
|
return ret;
|
|
3669
3683
|
}
|
|
3670
3684
|
export function __wbindgen_cast_000000000000000c(arg0, arg1) {
|
|
3671
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3685
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 434, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
3672
3686
|
const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e);
|
|
3673
3687
|
return ret;
|
|
3674
3688
|
}
|
|
@@ -3753,8 +3767,8 @@ export function __wbindgen_init_externref_table() {
|
|
|
3753
3767
|
table.set(offset + 2, true);
|
|
3754
3768
|
table.set(offset + 3, false);
|
|
3755
3769
|
}
|
|
3756
|
-
function
|
|
3757
|
-
wasm.
|
|
3770
|
+
function wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1) {
|
|
3771
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1);
|
|
3758
3772
|
}
|
|
3759
3773
|
|
|
3760
3774
|
function wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e(arg0, arg1) {
|
|
Binary file
|
|
@@ -18,6 +18,7 @@ export const bitcoinchainservicehandle_getOutspend: (a: number, b: number, c: nu
|
|
|
18
18
|
export const bitcoinchainservicehandle_getTransactionHex: (a: number, b: number, c: number) => any;
|
|
19
19
|
export const bitcoinchainservicehandle_getTransactionStatus: (a: number, b: number, c: number) => any;
|
|
20
20
|
export const bitcoinchainservicehandle_recommendedFees: (a: number) => any;
|
|
21
|
+
export const bitcoinchainservicehandle_tipHeight: (a: number) => any;
|
|
21
22
|
export const breezsdk_addContact: (a: number, b: any) => any;
|
|
22
23
|
export const breezsdk_addEventListener: (a: number, b: any) => any;
|
|
23
24
|
export const breezsdk_authorizeLightningAddressTransfer: (a: number, b: any) => any;
|
|
@@ -34,6 +35,7 @@ export const breezsdk_deleteContact: (a: number, b: number, c: number) => any;
|
|
|
34
35
|
export const breezsdk_deleteLightningAddress: (a: number) => any;
|
|
35
36
|
export const breezsdk_disconnect: (a: number) => any;
|
|
36
37
|
export const breezsdk_exportUnilateralExitState: (a: number) => any;
|
|
38
|
+
export const breezsdk_fetchClaimDepositQuote: (a: number, b: any) => any;
|
|
37
39
|
export const breezsdk_fetchConversionLimits: (a: number, b: any) => any;
|
|
38
40
|
export const breezsdk_getCrossChainRoutes: (a: number, b: any) => any;
|
|
39
41
|
export const breezsdk_getInfo: (a: number, b: any) => any;
|
|
@@ -128,7 +130,7 @@ export const newSharedSdkContext: (a: any) => any;
|
|
|
128
130
|
export const passkeyclient_checkAvailability: (a: number) => any;
|
|
129
131
|
export const passkeyclient_connectWithPasskey: (a: number, b: any) => any;
|
|
130
132
|
export const passkeyclient_labels: (a: number) => number;
|
|
131
|
-
export const passkeyclient_new: (a: any, b: number, c: number, d: number) => number;
|
|
133
|
+
export const passkeyclient_new: (a: any, b: number, c: number, d: number) => [number, number, number];
|
|
132
134
|
export const passkeyclient_register: (a: number, b: any) => any;
|
|
133
135
|
export const passkeyclient_signIn: (a: number, b: any) => any;
|
|
134
136
|
export const passkeyclient_supportsImmediateMediation: (a: number) => any;
|
|
@@ -181,8 +183,8 @@ export const intounderlyingsource_cancel: (a: number) => void;
|
|
|
181
183
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
182
184
|
export const __wbg_externalbreezsignerhandle_free: (a: number, b: number) => void;
|
|
183
185
|
export const __wbg_defaultsessionstore_free: (a: number, b: number) => void;
|
|
184
|
-
export const __wbg_externalsparksignerhandle_free: (a: number, b: number) => void;
|
|
185
186
|
export const __wbg_externalsigningsignerhandle_free: (a: number, b: number) => void;
|
|
187
|
+
export const __wbg_externalsparksignerhandle_free: (a: number, b: number) => void;
|
|
186
188
|
export const __wbg_signingonlyexternalsigners_free: (a: number, b: number) => void;
|
|
187
189
|
export const signingonlyexternalsigners_breezSigner: (a: number) => number;
|
|
188
190
|
export const signingonlyexternalsigners_sparkSigner: (a: number) => number;
|
|
@@ -197,7 +199,7 @@ export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2: (a
|
|
|
197
199
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3: (a: number, b: number, c: any) => void;
|
|
198
200
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4: (a: number, b: number, c: any) => void;
|
|
199
201
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5: (a: number, b: number, c: any) => void;
|
|
200
|
-
export const
|
|
202
|
+
export const wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7: (a: number, b: number) => void;
|
|
201
203
|
export const wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e: (a: number, b: number) => void;
|
|
202
204
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
203
205
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
package/bundler/storage/index.js
CHANGED
|
@@ -586,6 +586,31 @@ class MigrationManager {
|
|
|
586
586
|
}
|
|
587
587
|
},
|
|
588
588
|
},
|
|
589
|
+
{
|
|
590
|
+
// Only the Declined shape changed, and clearing it costs at most one extra
|
|
591
|
+
// quote. Submitted entries are left alone: their shape is unchanged and
|
|
592
|
+
// they are the only guard against re-claiming a UTXO whose earlier claim
|
|
593
|
+
// is still settling.
|
|
594
|
+
name: "Clear declined instant claim status after its shape changed",
|
|
595
|
+
upgrade: (db, transaction) => {
|
|
596
|
+
if (!db.objectStoreNames.contains("unclaimed_deposits")) return;
|
|
597
|
+
const store = transaction.objectStore("unclaimed_deposits");
|
|
598
|
+
const cursorRequest = store.openCursor();
|
|
599
|
+
cursorRequest.onsuccess = (event) => {
|
|
600
|
+
const cursor = event.target.result;
|
|
601
|
+
if (!cursor) return;
|
|
602
|
+
const deposit = cursor.value;
|
|
603
|
+
if (
|
|
604
|
+
deposit.instantClaimStatus &&
|
|
605
|
+
String(deposit.instantClaimStatus).toLowerCase().includes("declined")
|
|
606
|
+
) {
|
|
607
|
+
deposit.instantClaimStatus = null;
|
|
608
|
+
cursor.update(deposit);
|
|
609
|
+
}
|
|
610
|
+
cursor.continue();
|
|
611
|
+
};
|
|
612
|
+
},
|
|
613
|
+
},
|
|
589
614
|
];
|
|
590
615
|
}
|
|
591
616
|
}
|
|
@@ -614,7 +639,7 @@ class IndexedDBStorage {
|
|
|
614
639
|
// so existing databases depend on indices never shifting. Never insert,
|
|
615
640
|
// reorder, or delete a migration — only append. dbVersion MUST equal the
|
|
616
641
|
// number of migrations (enforced by the guard in initialize()).
|
|
617
|
-
this.dbVersion =
|
|
642
|
+
this.dbVersion = 21; // Current schema version (= migration count)
|
|
618
643
|
}
|
|
619
644
|
|
|
620
645
|
/**
|
|
@@ -1419,6 +1444,7 @@ class IndexedDBStorage {
|
|
|
1419
1444
|
refundTx: existing?.refundTx ?? null,
|
|
1420
1445
|
refundTxId: existing?.refundTxId ?? null,
|
|
1421
1446
|
instantClaimStatus: existing?.instantClaimStatus ?? null,
|
|
1447
|
+
refundState: existing?.refundState ?? null,
|
|
1422
1448
|
};
|
|
1423
1449
|
|
|
1424
1450
|
const putRequest = store.put(depositToStore);
|
|
@@ -1494,6 +1520,7 @@ class IndexedDBStorage {
|
|
|
1494
1520
|
instantClaimStatus: row.instantClaimStatus
|
|
1495
1521
|
? JSON.parse(row.instantClaimStatus)
|
|
1496
1522
|
: null,
|
|
1523
|
+
refundState: row.refundState ? JSON.parse(row.refundState) : null,
|
|
1497
1524
|
}));
|
|
1498
1525
|
resolve(deposits);
|
|
1499
1526
|
};
|
|
@@ -1537,14 +1564,18 @@ class IndexedDBStorage {
|
|
|
1537
1564
|
|
|
1538
1565
|
if (payload.type === "claimError") {
|
|
1539
1566
|
updatedDeposit.claimError = JSON.stringify(payload.error);
|
|
1540
|
-
updatedDeposit.refundTx = null;
|
|
1541
|
-
updatedDeposit.refundTxId = null;
|
|
1542
1567
|
} else if (payload.type === "refund") {
|
|
1543
1568
|
updatedDeposit.refundTx = payload.refundTx;
|
|
1544
1569
|
updatedDeposit.refundTxId = payload.refundTxid;
|
|
1570
|
+
updatedDeposit.refundState = JSON.stringify(payload.state);
|
|
1545
1571
|
updatedDeposit.claimError = null;
|
|
1546
1572
|
} else if (payload.type === "instantClaim") {
|
|
1547
1573
|
updatedDeposit.instantClaimStatus = JSON.stringify(payload.status);
|
|
1574
|
+
} else if (payload.type === "refundBroadcastState") {
|
|
1575
|
+
// Only while this is still the stored refund.
|
|
1576
|
+
if (existingDeposit.refundTxId === payload.refundTxid) {
|
|
1577
|
+
updatedDeposit.refundState = JSON.stringify(payload.state);
|
|
1578
|
+
}
|
|
1548
1579
|
} else {
|
|
1549
1580
|
reject(new StorageError(`Unknown payload type: ${payload.type}`));
|
|
1550
1581
|
return;
|