@breeztech/breez-sdk-spark 0.11.0-dev2 → 0.11.0-dev4
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 +760 -592
- package/bundler/breez_sdk_spark_wasm_bg.js +342 -42
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +10 -3
- package/deno/breez_sdk_spark_wasm.d.ts +760 -592
- package/deno/breez_sdk_spark_wasm.js +310 -42
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +10 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +760 -592
- package/nodejs/breez_sdk_spark_wasm.js +343 -42
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +10 -3
- package/nodejs/index.js +10 -0
- package/nodejs/package.json +1 -0
- package/nodejs/postgres-tree-store/errors.cjs +13 -0
- package/nodejs/postgres-tree-store/index.cjs +798 -0
- package/nodejs/postgres-tree-store/migrations.cjs +150 -0
- package/nodejs/postgres-tree-store/package.json +9 -0
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +770 -595
- package/web/breez_sdk_spark_wasm.js +310 -42
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +10 -3
|
@@ -234,15 +234,28 @@ module.exports.defaultPostgresStorageConfig = function(connection_string) {
|
|
|
234
234
|
return ret;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
+
function takeFromExternrefTable0(idx) {
|
|
238
|
+
const value = wasm.__wbindgen_export_5.get(idx);
|
|
239
|
+
wasm.__externref_table_dealloc(idx);
|
|
240
|
+
return value;
|
|
241
|
+
}
|
|
237
242
|
/**
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* @
|
|
243
|
+
* @param {string} mnemonic
|
|
244
|
+
* @param {string | null | undefined} passphrase
|
|
245
|
+
* @param {Network} network
|
|
246
|
+
* @param {KeySetConfig | null} [key_set_config]
|
|
247
|
+
* @returns {DefaultSigner}
|
|
242
248
|
*/
|
|
243
|
-
module.exports.
|
|
244
|
-
const
|
|
245
|
-
|
|
249
|
+
module.exports.defaultExternalSigner = function(mnemonic, passphrase, network, key_set_config) {
|
|
250
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
+
const len0 = WASM_VECTOR_LEN;
|
|
252
|
+
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
+
var len1 = WASM_VECTOR_LEN;
|
|
254
|
+
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
255
|
+
if (ret[2]) {
|
|
256
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
257
|
+
}
|
|
258
|
+
return DefaultSigner.__wrap(ret[0]);
|
|
246
259
|
};
|
|
247
260
|
|
|
248
261
|
/**
|
|
@@ -266,30 +279,6 @@ module.exports.initLogging = function(logger, filter) {
|
|
|
266
279
|
return ret;
|
|
267
280
|
};
|
|
268
281
|
|
|
269
|
-
function takeFromExternrefTable0(idx) {
|
|
270
|
-
const value = wasm.__wbindgen_export_5.get(idx);
|
|
271
|
-
wasm.__externref_table_dealloc(idx);
|
|
272
|
-
return value;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* @param {string} mnemonic
|
|
276
|
-
* @param {string | null | undefined} passphrase
|
|
277
|
-
* @param {Network} network
|
|
278
|
-
* @param {KeySetConfig | null} [key_set_config]
|
|
279
|
-
* @returns {DefaultSigner}
|
|
280
|
-
*/
|
|
281
|
-
module.exports.defaultExternalSigner = function(mnemonic, passphrase, network, key_set_config) {
|
|
282
|
-
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
|
-
const len0 = WASM_VECTOR_LEN;
|
|
284
|
-
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
285
|
-
var len1 = WASM_VECTOR_LEN;
|
|
286
|
-
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
287
|
-
if (ret[2]) {
|
|
288
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
289
|
-
}
|
|
290
|
-
return DefaultSigner.__wrap(ret[0]);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
282
|
/**
|
|
294
283
|
* @param {ConnectRequest} request
|
|
295
284
|
* @returns {Promise<BreezSdk>}
|
|
@@ -299,6 +288,17 @@ module.exports.connect = function(request) {
|
|
|
299
288
|
return ret;
|
|
300
289
|
};
|
|
301
290
|
|
|
291
|
+
/**
|
|
292
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
293
|
+
*
|
|
294
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
295
|
+
* @returns {Promise<SparkStatus>}
|
|
296
|
+
*/
|
|
297
|
+
module.exports.getSparkStatus = function() {
|
|
298
|
+
const ret = wasm.getSparkStatus();
|
|
299
|
+
return ret;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
302
|
/**
|
|
303
303
|
* @param {Config} config
|
|
304
304
|
* @param {ExternalSigner} signer
|
|
@@ -329,18 +329,20 @@ module.exports.task_worker_entry_point = function(ptr) {
|
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
function __wbg_adapter_64(arg0, arg1) {
|
|
333
|
-
wasm.
|
|
332
|
+
function __wbg_adapter_64(arg0, arg1, arg2) {
|
|
333
|
+
wasm.closure440_externref_shim(arg0, arg1, arg2);
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
function
|
|
337
|
-
wasm.
|
|
336
|
+
function __wbg_adapter_69(arg0, arg1) {
|
|
337
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h29e986a86553656d(arg0, arg1);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
function
|
|
341
|
-
wasm.
|
|
340
|
+
function __wbg_adapter_339(arg0, arg1, arg2, arg3) {
|
|
341
|
+
wasm.closure720_externref_shim(arg0, arg1, arg2, arg3);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
+
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
345
|
+
|
|
344
346
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
345
347
|
|
|
346
348
|
const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
|
|
@@ -1052,6 +1054,92 @@ class IntoUnderlyingSource {
|
|
|
1052
1054
|
}
|
|
1053
1055
|
module.exports.IntoUnderlyingSource = IntoUnderlyingSource;
|
|
1054
1056
|
|
|
1057
|
+
const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1058
|
+
? { register: () => {}, unregister: () => {} }
|
|
1059
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_passkey_free(ptr >>> 0, 1));
|
|
1060
|
+
/**
|
|
1061
|
+
* Passkey-based wallet operations using WebAuthn PRF extension.
|
|
1062
|
+
*
|
|
1063
|
+
* Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
|
|
1064
|
+
* wallet derivation and name management via Nostr relays.
|
|
1065
|
+
*/
|
|
1066
|
+
class Passkey {
|
|
1067
|
+
|
|
1068
|
+
__destroy_into_raw() {
|
|
1069
|
+
const ptr = this.__wbg_ptr;
|
|
1070
|
+
this.__wbg_ptr = 0;
|
|
1071
|
+
PasskeyFinalization.unregister(this);
|
|
1072
|
+
return ptr;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
free() {
|
|
1076
|
+
const ptr = this.__destroy_into_raw();
|
|
1077
|
+
wasm.__wbg_passkey_free(ptr, 0);
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Derive a wallet for a given label.
|
|
1081
|
+
*
|
|
1082
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1083
|
+
*
|
|
1084
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1085
|
+
* @param {string | null} [label]
|
|
1086
|
+
* @returns {Promise<Wallet>}
|
|
1087
|
+
*/
|
|
1088
|
+
getWallet(label) {
|
|
1089
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1090
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1091
|
+
const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
|
|
1092
|
+
return ret;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1096
|
+
*
|
|
1097
|
+
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1098
|
+
* @returns {Promise<string[]>}
|
|
1099
|
+
*/
|
|
1100
|
+
listLabels() {
|
|
1101
|
+
const ret = wasm.passkey_listLabels(this.__wbg_ptr);
|
|
1102
|
+
return ret;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1106
|
+
*
|
|
1107
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1108
|
+
* Requires 1 PRF call.
|
|
1109
|
+
* @param {string} label
|
|
1110
|
+
* @returns {Promise<void>}
|
|
1111
|
+
*/
|
|
1112
|
+
storeLabel(label) {
|
|
1113
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1114
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1115
|
+
const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
|
|
1116
|
+
return ret;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Check if passkey PRF is available on this device.
|
|
1120
|
+
* @returns {Promise<boolean>}
|
|
1121
|
+
*/
|
|
1122
|
+
isAvailable() {
|
|
1123
|
+
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1124
|
+
return ret;
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* Create a new `Passkey` instance.
|
|
1128
|
+
*
|
|
1129
|
+
* @param prfProvider - Platform implementation of passkey PRF operations
|
|
1130
|
+
* @param relayConfig - Optional configuration for Nostr relay connections
|
|
1131
|
+
* @param {PasskeyPrfProvider} prf_provider
|
|
1132
|
+
* @param {NostrRelayConfig | null} [relay_config]
|
|
1133
|
+
*/
|
|
1134
|
+
constructor(prf_provider, relay_config) {
|
|
1135
|
+
const ret = wasm.passkey_new(prf_provider, isLikeNone(relay_config) ? 0 : addToExternrefTable0(relay_config));
|
|
1136
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1137
|
+
PasskeyFinalization.register(this, this.__wbg_ptr, this);
|
|
1138
|
+
return this;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
module.exports.Passkey = Passkey;
|
|
1142
|
+
|
|
1055
1143
|
const SdkBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1056
1144
|
? { register: () => {}, unregister: () => {} }
|
|
1057
1145
|
: new FinalizationRegistry(ptr => wasm.__wbg_sdkbuilder_free(ptr >>> 0, 1));
|
|
@@ -1173,6 +1261,15 @@ class SdkBuilder {
|
|
|
1173
1261
|
const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
|
|
1174
1262
|
return SdkBuilder.__wrap(ret);
|
|
1175
1263
|
}
|
|
1264
|
+
/**
|
|
1265
|
+
* @param {PostgresStorageConfig} config
|
|
1266
|
+
* @returns {SdkBuilder}
|
|
1267
|
+
*/
|
|
1268
|
+
withPostgresTreeStore(config) {
|
|
1269
|
+
const ptr = this.__destroy_into_raw();
|
|
1270
|
+
const ret = wasm.sdkbuilder_withPostgresTreeStore(ptr, config);
|
|
1271
|
+
return SdkBuilder.__wrap(ret);
|
|
1272
|
+
}
|
|
1176
1273
|
/**
|
|
1177
1274
|
* @param {Config} config
|
|
1178
1275
|
* @param {Seed} seed
|
|
@@ -1304,6 +1401,11 @@ module.exports.__wbg_addDeposit_5b1f93e7014f1e18 = function() { return handleErr
|
|
|
1304
1401
|
}
|
|
1305
1402
|
}, arguments) };
|
|
1306
1403
|
|
|
1404
|
+
module.exports.__wbg_addLeaves_226f98499cdaa66d = function() { return handleError(function (arg0, arg1) {
|
|
1405
|
+
const ret = arg0.addLeaves(arg1);
|
|
1406
|
+
return ret;
|
|
1407
|
+
}, arguments) };
|
|
1408
|
+
|
|
1307
1409
|
module.exports.__wbg_aggregateFrost_053f2d54394422d5 = function() { return handleError(function (arg0, arg1) {
|
|
1308
1410
|
const ret = arg0.aggregateFrost(arg1);
|
|
1309
1411
|
return ret;
|
|
@@ -1383,6 +1485,19 @@ module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(fun
|
|
|
1383
1485
|
return ret;
|
|
1384
1486
|
}, arguments) };
|
|
1385
1487
|
|
|
1488
|
+
module.exports.__wbg_cancelReservation_d85a13db3e8e3c7b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1489
|
+
let deferred0_0;
|
|
1490
|
+
let deferred0_1;
|
|
1491
|
+
try {
|
|
1492
|
+
deferred0_0 = arg1;
|
|
1493
|
+
deferred0_1 = arg2;
|
|
1494
|
+
const ret = arg0.cancelReservation(getStringFromWasm0(arg1, arg2));
|
|
1495
|
+
return ret;
|
|
1496
|
+
} finally {
|
|
1497
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1498
|
+
}
|
|
1499
|
+
}, arguments) };
|
|
1500
|
+
|
|
1386
1501
|
module.exports.__wbg_cancel_8a308660caa6cadf = function(arg0) {
|
|
1387
1502
|
const ret = arg0.cancel();
|
|
1388
1503
|
return ret;
|
|
@@ -1393,11 +1508,20 @@ module.exports.__wbg_catch_a6e601879b2610e9 = function(arg0, arg1) {
|
|
|
1393
1508
|
return ret;
|
|
1394
1509
|
};
|
|
1395
1510
|
|
|
1511
|
+
module.exports.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
1512
|
+
const ret = clearTimeout(arg0);
|
|
1513
|
+
return ret;
|
|
1514
|
+
};
|
|
1515
|
+
|
|
1396
1516
|
module.exports.__wbg_clearTimeout_6222fede17abcb1a = function(arg0) {
|
|
1397
1517
|
const ret = clearTimeout(arg0);
|
|
1398
1518
|
return ret;
|
|
1399
1519
|
};
|
|
1400
1520
|
|
|
1521
|
+
module.exports.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
|
|
1522
|
+
arg0.close();
|
|
1523
|
+
}, arguments) };
|
|
1524
|
+
|
|
1401
1525
|
module.exports.__wbg_close_304cc1fef3466669 = function() { return handleError(function (arg0) {
|
|
1402
1526
|
arg0.close();
|
|
1403
1527
|
}, arguments) };
|
|
@@ -1411,6 +1535,11 @@ module.exports.__wbg_code_cfd8f6868bdaed9b = function(arg0) {
|
|
|
1411
1535
|
return ret;
|
|
1412
1536
|
};
|
|
1413
1537
|
|
|
1538
|
+
module.exports.__wbg_code_f4ec1e6e2e1b0417 = function(arg0) {
|
|
1539
|
+
const ret = arg0.code;
|
|
1540
|
+
return ret;
|
|
1541
|
+
};
|
|
1542
|
+
|
|
1414
1543
|
module.exports.__wbg_createDefaultStorage_458aa01b5eaead27 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1415
1544
|
const ret = createDefaultStorage(getStringFromWasm0(arg0, arg1), arg2);
|
|
1416
1545
|
return ret;
|
|
@@ -1421,11 +1550,21 @@ module.exports.__wbg_createPostgresStorage_46770cbf8e947f9e = function() { retur
|
|
|
1421
1550
|
return ret;
|
|
1422
1551
|
}, arguments) };
|
|
1423
1552
|
|
|
1553
|
+
module.exports.__wbg_createPostgresTreeStore_7887b0b703c72f83 = function() { return handleError(function (arg0, arg1) {
|
|
1554
|
+
const ret = createPostgresTreeStore(arg0, arg1);
|
|
1555
|
+
return ret;
|
|
1556
|
+
}, arguments) };
|
|
1557
|
+
|
|
1424
1558
|
module.exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
1425
1559
|
const ret = arg0.crypto;
|
|
1426
1560
|
return ret;
|
|
1427
1561
|
};
|
|
1428
1562
|
|
|
1563
|
+
module.exports.__wbg_data_432d9c3df2630942 = function(arg0) {
|
|
1564
|
+
const ret = arg0.data;
|
|
1565
|
+
return ret;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1429
1568
|
module.exports.__wbg_deleteCachedItem_ff3c84380e94360b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1430
1569
|
let deferred0_0;
|
|
1431
1570
|
let deferred0_1;
|
|
@@ -1483,6 +1622,19 @@ module.exports.__wbg_deleteRequest_7be0a74a10deac70 = function() { return handle
|
|
|
1483
1622
|
}
|
|
1484
1623
|
}, arguments) };
|
|
1485
1624
|
|
|
1625
|
+
module.exports.__wbg_derivePrfSeed_8584c0fcf554b593 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1626
|
+
let deferred0_0;
|
|
1627
|
+
let deferred0_1;
|
|
1628
|
+
try {
|
|
1629
|
+
deferred0_0 = arg1;
|
|
1630
|
+
deferred0_1 = arg2;
|
|
1631
|
+
const ret = arg0.derivePrfSeed(getStringFromWasm0(arg1, arg2));
|
|
1632
|
+
return ret;
|
|
1633
|
+
} finally {
|
|
1634
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1635
|
+
}
|
|
1636
|
+
}, arguments) };
|
|
1637
|
+
|
|
1486
1638
|
module.exports.__wbg_derivePublicKey_736fb57b6852f201 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1487
1639
|
let deferred0_0;
|
|
1488
1640
|
let deferred0_1;
|
|
@@ -1579,6 +1731,19 @@ module.exports.__wbg_fetch_f156d10be9a5c88a = function(arg0) {
|
|
|
1579
1731
|
return ret;
|
|
1580
1732
|
};
|
|
1581
1733
|
|
|
1734
|
+
module.exports.__wbg_finalizeReservation_a8fad570b7fe5185 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1735
|
+
let deferred0_0;
|
|
1736
|
+
let deferred0_1;
|
|
1737
|
+
try {
|
|
1738
|
+
deferred0_0 = arg1;
|
|
1739
|
+
deferred0_1 = arg2;
|
|
1740
|
+
const ret = arg0.finalizeReservation(getStringFromWasm0(arg1, arg2), arg3);
|
|
1741
|
+
return ret;
|
|
1742
|
+
} finally {
|
|
1743
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1744
|
+
}
|
|
1745
|
+
}, arguments) };
|
|
1746
|
+
|
|
1582
1747
|
module.exports.__wbg_generateFrostSigningCommitments_0630bbabc5b72b42 = function() { return handleError(function (arg0) {
|
|
1583
1748
|
const ret = arg0.generateFrostSigningCommitments();
|
|
1584
1749
|
return ret;
|
|
@@ -1628,6 +1793,11 @@ module.exports.__wbg_getContact_b7300737e5dee01b = function() { return handleErr
|
|
|
1628
1793
|
}
|
|
1629
1794
|
}, arguments) };
|
|
1630
1795
|
|
|
1796
|
+
module.exports.__wbg_getLeaves_c94a1c927d239738 = function() { return handleError(function (arg0) {
|
|
1797
|
+
const ret = arg0.getLeaves();
|
|
1798
|
+
return ret;
|
|
1799
|
+
}, arguments) };
|
|
1800
|
+
|
|
1631
1801
|
module.exports.__wbg_getPaymentById_c23144bfc404b2fc = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1632
1802
|
let deferred0_0;
|
|
1633
1803
|
let deferred0_1;
|
|
@@ -1827,6 +1997,17 @@ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
|
1827
1997
|
return ret;
|
|
1828
1998
|
};
|
|
1829
1999
|
|
|
2000
|
+
module.exports.__wbg_instanceof_Blob_ca721ef3bdab15d1 = function(arg0) {
|
|
2001
|
+
let result;
|
|
2002
|
+
try {
|
|
2003
|
+
result = arg0 instanceof Blob;
|
|
2004
|
+
} catch (_) {
|
|
2005
|
+
result = false;
|
|
2006
|
+
}
|
|
2007
|
+
const ret = result;
|
|
2008
|
+
return ret;
|
|
2009
|
+
};
|
|
2010
|
+
|
|
1830
2011
|
module.exports.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function(arg0) {
|
|
1831
2012
|
let result;
|
|
1832
2013
|
try {
|
|
@@ -1898,6 +2079,11 @@ module.exports.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
|
1898
2079
|
return ret;
|
|
1899
2080
|
};
|
|
1900
2081
|
|
|
2082
|
+
module.exports.__wbg_isPrfAvailable_c13e727932109c6e = function() { return handleError(function (arg0) {
|
|
2083
|
+
const ret = arg0.isPrfAvailable();
|
|
2084
|
+
return ret;
|
|
2085
|
+
}, arguments) };
|
|
2086
|
+
|
|
1901
2087
|
module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
1902
2088
|
const ret = Number.isSafeInteger(arg0);
|
|
1903
2089
|
return ret;
|
|
@@ -1980,7 +2166,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
|
1980
2166
|
const a = state0.a;
|
|
1981
2167
|
state0.a = 0;
|
|
1982
2168
|
try {
|
|
1983
|
-
return
|
|
2169
|
+
return __wbg_adapter_339(a, state0.b, arg0, arg1);
|
|
1984
2170
|
} finally {
|
|
1985
2171
|
state0.a = a;
|
|
1986
2172
|
}
|
|
@@ -2007,6 +2193,11 @@ module.exports.__wbg_new_78feb108b6472713 = function() {
|
|
|
2007
2193
|
return ret;
|
|
2008
2194
|
};
|
|
2009
2195
|
|
|
2196
|
+
module.exports.__wbg_new_92c54fc74574ef55 = function() { return handleError(function (arg0, arg1) {
|
|
2197
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
2198
|
+
return ret;
|
|
2199
|
+
}, arguments) };
|
|
2200
|
+
|
|
2010
2201
|
module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
2011
2202
|
const ret = new Uint8Array(arg0);
|
|
2012
2203
|
return ret;
|
|
@@ -2057,6 +2248,11 @@ module.exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
|
2057
2248
|
return ret;
|
|
2058
2249
|
};
|
|
2059
2250
|
|
|
2251
|
+
module.exports.__wbg_now_063c1184182e178a = function() { return handleError(function (arg0) {
|
|
2252
|
+
const ret = arg0.now();
|
|
2253
|
+
return ret;
|
|
2254
|
+
}, arguments) };
|
|
2255
|
+
|
|
2060
2256
|
module.exports.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
2061
2257
|
const ret = arg0.now();
|
|
2062
2258
|
return ret;
|
|
@@ -2126,6 +2322,19 @@ module.exports.__wbg_read_a2434af1186cb56c = function(arg0) {
|
|
|
2126
2322
|
return ret;
|
|
2127
2323
|
};
|
|
2128
2324
|
|
|
2325
|
+
module.exports.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
|
|
2326
|
+
const ret = arg0.readyState;
|
|
2327
|
+
return ret;
|
|
2328
|
+
};
|
|
2329
|
+
|
|
2330
|
+
module.exports.__wbg_reason_49f1cede8bcf23dd = function(arg0, arg1) {
|
|
2331
|
+
const ret = arg1.reason;
|
|
2332
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2333
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2334
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2335
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2336
|
+
};
|
|
2337
|
+
|
|
2129
2338
|
module.exports.__wbg_recommendedFees_a61f331fce46523e = function() { return handleError(function (arg0) {
|
|
2130
2339
|
const ret = arg0.recommendedFees();
|
|
2131
2340
|
return ret;
|
|
@@ -2154,6 +2363,14 @@ module.exports.__wbg_sdkbuilder_new = function(arg0) {
|
|
|
2154
2363
|
return ret;
|
|
2155
2364
|
};
|
|
2156
2365
|
|
|
2366
|
+
module.exports.__wbg_send_0293179ba074ffb4 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2367
|
+
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
2368
|
+
}, arguments) };
|
|
2369
|
+
|
|
2370
|
+
module.exports.__wbg_send_fc0c204e8a1757f4 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2371
|
+
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
2372
|
+
}, arguments) };
|
|
2373
|
+
|
|
2157
2374
|
module.exports.__wbg_setCachedItem_91b03741dfb0b4c2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2158
2375
|
let deferred0_0;
|
|
2159
2376
|
let deferred0_1;
|
|
@@ -2172,6 +2389,11 @@ module.exports.__wbg_setCachedItem_91b03741dfb0b4c2 = function() { return handle
|
|
|
2172
2389
|
}
|
|
2173
2390
|
}, arguments) };
|
|
2174
2391
|
|
|
2392
|
+
module.exports.__wbg_setLeaves_d1c338c6d7d2ef28 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2393
|
+
const ret = arg0.setLeaves(arg1, arg2, arg3);
|
|
2394
|
+
return ret;
|
|
2395
|
+
}, arguments) };
|
|
2396
|
+
|
|
2175
2397
|
module.exports.__wbg_setLnurlMetadata_0bf15cc7efb6cc11 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2176
2398
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
2177
2399
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
@@ -2188,6 +2410,11 @@ module.exports.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
|
|
|
2188
2410
|
globalThis.setTimeout(arg0, arg1);
|
|
2189
2411
|
};
|
|
2190
2412
|
|
|
2413
|
+
module.exports.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
2414
|
+
const ret = setTimeout(arg0, arg1);
|
|
2415
|
+
return ret;
|
|
2416
|
+
}, arguments) };
|
|
2417
|
+
|
|
2191
2418
|
module.exports.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
2192
2419
|
arg0[arg1 >>> 0] = arg2;
|
|
2193
2420
|
};
|
|
@@ -2210,6 +2437,10 @@ module.exports.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(func
|
|
|
2210
2437
|
return ret;
|
|
2211
2438
|
}, arguments) };
|
|
2212
2439
|
|
|
2440
|
+
module.exports.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
|
|
2441
|
+
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
2442
|
+
};
|
|
2443
|
+
|
|
2213
2444
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
2214
2445
|
arg0.body = arg1;
|
|
2215
2446
|
};
|
|
@@ -2238,6 +2469,22 @@ module.exports.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
|
|
|
2238
2469
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
2239
2470
|
};
|
|
2240
2471
|
|
|
2472
|
+
module.exports.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
|
|
2473
|
+
arg0.onclose = arg1;
|
|
2474
|
+
};
|
|
2475
|
+
|
|
2476
|
+
module.exports.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
|
|
2477
|
+
arg0.onerror = arg1;
|
|
2478
|
+
};
|
|
2479
|
+
|
|
2480
|
+
module.exports.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
|
|
2481
|
+
arg0.onmessage = arg1;
|
|
2482
|
+
};
|
|
2483
|
+
|
|
2484
|
+
module.exports.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
|
|
2485
|
+
arg0.onopen = arg1;
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2241
2488
|
module.exports.__wbg_setredirect_40e6a7f717a2f86a = function(arg0, arg1) {
|
|
2242
2489
|
arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
2243
2490
|
};
|
|
@@ -2417,6 +2664,19 @@ module.exports.__wbg_toString_5285597960676b7b = function(arg0) {
|
|
|
2417
2664
|
return ret;
|
|
2418
2665
|
};
|
|
2419
2666
|
|
|
2667
|
+
module.exports.__wbg_tryReserveLeaves_9aacd30c9750a9df = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2668
|
+
let deferred0_0;
|
|
2669
|
+
let deferred0_1;
|
|
2670
|
+
try {
|
|
2671
|
+
deferred0_0 = arg3;
|
|
2672
|
+
deferred0_1 = arg4;
|
|
2673
|
+
const ret = arg0.tryReserveLeaves(arg1, arg2 !== 0, getStringFromWasm0(arg3, arg4));
|
|
2674
|
+
return ret;
|
|
2675
|
+
} finally {
|
|
2676
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2677
|
+
}
|
|
2678
|
+
}, arguments) };
|
|
2679
|
+
|
|
2420
2680
|
module.exports.__wbg_updateDeposit_87746090235ed235 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2421
2681
|
let deferred0_0;
|
|
2422
2682
|
let deferred0_1;
|
|
@@ -2430,6 +2690,19 @@ module.exports.__wbg_updateDeposit_87746090235ed235 = function() { return handle
|
|
|
2430
2690
|
}
|
|
2431
2691
|
}, arguments) };
|
|
2432
2692
|
|
|
2693
|
+
module.exports.__wbg_updateReservation_7641cd63d1a894b8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2694
|
+
let deferred0_0;
|
|
2695
|
+
let deferred0_1;
|
|
2696
|
+
try {
|
|
2697
|
+
deferred0_0 = arg1;
|
|
2698
|
+
deferred0_1 = arg2;
|
|
2699
|
+
const ret = arg0.updateReservation(getStringFromWasm0(arg1, arg2), arg3, arg4);
|
|
2700
|
+
return ret;
|
|
2701
|
+
} finally {
|
|
2702
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2703
|
+
}
|
|
2704
|
+
}, arguments) };
|
|
2705
|
+
|
|
2433
2706
|
module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
2434
2707
|
const ret = arg1.url;
|
|
2435
2708
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -2438,6 +2711,14 @@ module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
|
2438
2711
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2439
2712
|
};
|
|
2440
2713
|
|
|
2714
|
+
module.exports.__wbg_url_ce9ab75bf9627ae4 = function(arg0, arg1) {
|
|
2715
|
+
const ret = arg1.url;
|
|
2716
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2717
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2718
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2719
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2441
2722
|
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
2442
2723
|
const ret = arg0.value;
|
|
2443
2724
|
return ret;
|
|
@@ -2453,6 +2734,11 @@ module.exports.__wbg_view_fd8a56e8983f448d = function(arg0) {
|
|
|
2453
2734
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2454
2735
|
};
|
|
2455
2736
|
|
|
2737
|
+
module.exports.__wbg_wasClean_605b4fd66d44354a = function(arg0) {
|
|
2738
|
+
const ret = arg0.wasClean;
|
|
2739
|
+
return ret;
|
|
2740
|
+
};
|
|
2741
|
+
|
|
2456
2742
|
module.exports.__wbindgen_array_new = function() {
|
|
2457
2743
|
const ret = [];
|
|
2458
2744
|
return ret;
|
|
@@ -2505,13 +2791,28 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
2505
2791
|
return ret;
|
|
2506
2792
|
};
|
|
2507
2793
|
|
|
2508
|
-
module.exports.
|
|
2509
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2794
|
+
module.exports.__wbindgen_closure_wrapper10357 = function(arg0, arg1, arg2) {
|
|
2795
|
+
const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_69);
|
|
2796
|
+
return ret;
|
|
2797
|
+
};
|
|
2798
|
+
|
|
2799
|
+
module.exports.__wbindgen_closure_wrapper15769 = function(arg0, arg1, arg2) {
|
|
2800
|
+
const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
|
|
2801
|
+
return ret;
|
|
2802
|
+
};
|
|
2803
|
+
|
|
2804
|
+
module.exports.__wbindgen_closure_wrapper5872 = function(arg0, arg1, arg2) {
|
|
2805
|
+
const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
|
|
2806
|
+
return ret;
|
|
2807
|
+
};
|
|
2808
|
+
|
|
2809
|
+
module.exports.__wbindgen_closure_wrapper5878 = function(arg0, arg1, arg2) {
|
|
2810
|
+
const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
|
|
2510
2811
|
return ret;
|
|
2511
2812
|
};
|
|
2512
2813
|
|
|
2513
|
-
module.exports.
|
|
2514
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2814
|
+
module.exports.__wbindgen_closure_wrapper7556 = function(arg0, arg1, arg2) {
|
|
2815
|
+
const ret = makeMutClosure(arg0, arg1, 964, __wbg_adapter_69);
|
|
2515
2816
|
return ret;
|
|
2516
2817
|
};
|
|
2517
2818
|
|
|
Binary file
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_breezsdk_free: (a: number, b: number) => void;
|
|
5
5
|
export const __wbg_defaultsigner_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_passkey_free: (a: number, b: number) => void;
|
|
6
7
|
export const __wbg_sdkbuilder_free: (a: number, b: number) => void;
|
|
7
8
|
export const __wbg_tokenissuer_free: (a: number, b: number) => void;
|
|
8
9
|
export const breezsdk_addContact: (a: number, b: any) => any;
|
|
@@ -73,6 +74,11 @@ export const defaultsigner_staticDepositSigningKey: (a: number, b: number) => an
|
|
|
73
74
|
export const defaultsigner_subtractSecrets: (a: number, b: any, c: any) => any;
|
|
74
75
|
export const getSparkStatus: () => any;
|
|
75
76
|
export const initLogging: (a: any, b: number, c: number) => any;
|
|
77
|
+
export const passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
78
|
+
export const passkey_isAvailable: (a: number) => any;
|
|
79
|
+
export const passkey_listLabels: (a: number) => any;
|
|
80
|
+
export const passkey_new: (a: any, b: number) => number;
|
|
81
|
+
export const passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
76
82
|
export const sdkbuilder_build: (a: number) => any;
|
|
77
83
|
export const sdkbuilder_new: (a: any, b: any) => number;
|
|
78
84
|
export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
|
@@ -83,6 +89,7 @@ export const sdkbuilder_withKeySet: (a: number, b: any) => number;
|
|
|
83
89
|
export const sdkbuilder_withLnurlClient: (a: number, b: any) => number;
|
|
84
90
|
export const sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
|
|
85
91
|
export const sdkbuilder_withPostgresStorage: (a: number, b: any) => number;
|
|
92
|
+
export const sdkbuilder_withPostgresTreeStore: (a: number, b: any) => number;
|
|
86
93
|
export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
|
|
87
94
|
export const sdkbuilder_withStorage: (a: number, b: any) => number;
|
|
88
95
|
export const tokenissuer_burnIssuerToken: (a: number, b: any) => any;
|
|
@@ -119,7 +126,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
|
|
|
119
126
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
120
127
|
export const __wbindgen_export_7: WebAssembly.Table;
|
|
121
128
|
export const __externref_table_dealloc: (a: number) => void;
|
|
122
|
-
export const
|
|
123
|
-
export const
|
|
124
|
-
export const
|
|
129
|
+
export const closure440_externref_shim: (a: number, b: number, c: any) => void;
|
|
130
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h29e986a86553656d: (a: number, b: number) => void;
|
|
131
|
+
export const closure720_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
125
132
|
export const __wbindgen_start: () => void;
|
package/nodejs/index.js
CHANGED
|
@@ -24,5 +24,15 @@ try {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
// Automatically import and set up the PostgreSQL tree store for Node.js
|
|
28
|
+
try {
|
|
29
|
+
const { createPostgresTreeStore } = require('./postgres-tree-store/index.cjs');
|
|
30
|
+
global.createPostgresTreeStore = createPostgresTreeStore;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error.code !== 'MODULE_NOT_FOUND') {
|
|
33
|
+
console.warn('Breez SDK: Failed to load PostgreSQL tree store:', error.message);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
// Export all WASM functions
|
|
28
38
|
module.exports = wasmModule;
|
package/nodejs/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// errors.cjs - Tree store error wrapper with cause chain support
|
|
2
|
+
class TreeStoreError extends Error {
|
|
3
|
+
constructor(message, cause = null) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = 'TreeStoreError';
|
|
6
|
+
this.cause = cause;
|
|
7
|
+
if (Error.captureStackTrace) {
|
|
8
|
+
Error.captureStackTrace(this, TreeStoreError);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = { TreeStoreError };
|