@breeztech/breez-sdk-spark 0.11.0-dev3 → 0.11.0-dev5

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.
@@ -238,6 +238,39 @@ export function defaultPostgresStorageConfig(connection_string) {
238
238
  return ret;
239
239
  }
240
240
 
241
+ /**
242
+ * Creates a default external signer from a mnemonic phrase.
243
+ *
244
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
245
+ * @returns {Promise<SparkStatus>}
246
+ */
247
+ export function getSparkStatus() {
248
+ const ret = wasm.getSparkStatus();
249
+ return ret;
250
+ }
251
+
252
+ /**
253
+ * @param {Config} config
254
+ * @param {ExternalSigner} signer
255
+ * @param {string} storage_dir
256
+ * @returns {Promise<BreezSdk>}
257
+ */
258
+ export function connectWithSigner(config, signer, storage_dir) {
259
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
260
+ const len0 = WASM_VECTOR_LEN;
261
+ const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
262
+ return ret;
263
+ }
264
+
265
+ /**
266
+ * @param {Network} network
267
+ * @returns {Config}
268
+ */
269
+ export function defaultConfig(network) {
270
+ const ret = wasm.defaultConfig(network);
271
+ return ret;
272
+ }
273
+
241
274
  function takeFromExternrefTable0(idx) {
242
275
  const value = wasm.__wbindgen_export_5.get(idx);
243
276
  wasm.__externref_table_dealloc(idx);
@@ -263,11 +296,11 @@ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_con
263
296
  }
264
297
 
265
298
  /**
266
- * @param {Network} network
267
- * @returns {Config}
299
+ * @param {ConnectRequest} request
300
+ * @returns {Promise<BreezSdk>}
268
301
  */
269
- export function defaultConfig(network) {
270
- const ret = wasm.defaultConfig(network);
302
+ export function connect(request) {
303
+ const ret = wasm.connect(request);
271
304
  return ret;
272
305
  }
273
306
 
@@ -283,39 +316,6 @@ export function initLogging(logger, filter) {
283
316
  return ret;
284
317
  }
285
318
 
286
- /**
287
- * @param {ConnectRequest} request
288
- * @returns {Promise<BreezSdk>}
289
- */
290
- export function connect(request) {
291
- const ret = wasm.connect(request);
292
- return ret;
293
- }
294
-
295
- /**
296
- * Creates a default external signer from a mnemonic phrase.
297
- *
298
- * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
299
- * @returns {Promise<SparkStatus>}
300
- */
301
- export function getSparkStatus() {
302
- const ret = wasm.getSparkStatus();
303
- return ret;
304
- }
305
-
306
- /**
307
- * @param {Config} config
308
- * @param {ExternalSigner} signer
309
- * @param {string} storage_dir
310
- * @returns {Promise<BreezSdk>}
311
- */
312
- export function connectWithSigner(config, signer, storage_dir) {
313
- const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
314
- const len0 = WASM_VECTOR_LEN;
315
- const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
316
- return ret;
317
- }
318
-
319
319
  function passArray8ToWasm0(arg, malloc) {
320
320
  const ptr = malloc(arg.length * 1, 1) >>> 0;
321
321
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -334,15 +334,15 @@ export function task_worker_entry_point(ptr) {
334
334
  }
335
335
 
336
336
  function __wbg_adapter_64(arg0, arg1, arg2) {
337
- wasm.closure440_externref_shim(arg0, arg1, arg2);
337
+ wasm.closure444_externref_shim(arg0, arg1, arg2);
338
338
  }
339
339
 
340
340
  function __wbg_adapter_69(arg0, arg1) {
341
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h29e986a86553656d(arg0, arg1);
341
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1bbbe552b190da27(arg0, arg1);
342
342
  }
343
343
 
344
- function __wbg_adapter_339(arg0, arg1, arg2, arg3) {
345
- wasm.closure720_externref_shim(arg0, arg1, arg2, arg3);
344
+ function __wbg_adapter_373(arg0, arg1, arg2, arg3) {
345
+ wasm.closure716_externref_shim(arg0, arg1, arg2, arg3);
346
346
  }
347
347
 
348
348
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1060,7 +1060,7 @@ const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
1060
1060
  * Passkey-based wallet operations using WebAuthn PRF extension.
1061
1061
  *
1062
1062
  * Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
1063
- * wallet derivation and name management via Nostr relays.
1063
+ * wallet derivation and label management via Nostr relays.
1064
1064
  */
1065
1065
  export class Passkey {
1066
1066
 
@@ -1076,50 +1076,50 @@ export class Passkey {
1076
1076
  wasm.__wbg_passkey_free(ptr, 0);
1077
1077
  }
1078
1078
  /**
1079
- * Derive a wallet for a given wallet name.
1079
+ * Derive a wallet for a given label.
1080
1080
  *
1081
- * Uses the passkey PRF to derive a `Wallet` containing the seed and resolved name.
1081
+ * Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
1082
1082
  *
1083
- * @param walletName - Optional wallet name string (defaults to "Default")
1084
- * @param {string | null} [wallet_name]
1083
+ * @param label - Optional label string (defaults to "Default")
1084
+ * @param {string | null} [label]
1085
1085
  * @returns {Promise<Wallet>}
1086
1086
  */
1087
- getWallet(wallet_name) {
1088
- var ptr0 = isLikeNone(wallet_name) ? 0 : passStringToWasm0(wallet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1087
+ getWallet(label) {
1088
+ var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1089
1089
  var len0 = WASM_VECTOR_LEN;
1090
1090
  const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
1091
1091
  return ret;
1092
1092
  }
1093
1093
  /**
1094
- * Check if passkey PRF is available on this device.
1095
- * @returns {Promise<boolean>}
1096
- */
1097
- isAvailable() {
1098
- const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
1099
- return ret;
1100
- }
1101
- /**
1102
- * List all wallet names published to Nostr for this passkey's identity.
1094
+ * List all labels published to Nostr for this passkey's identity.
1103
1095
  *
1104
1096
  * Requires 1 PRF call (for Nostr identity derivation).
1105
1097
  * @returns {Promise<string[]>}
1106
1098
  */
1107
- listWalletNames() {
1108
- const ret = wasm.passkey_listWalletNames(this.__wbg_ptr);
1099
+ listLabels() {
1100
+ const ret = wasm.passkey_listLabels(this.__wbg_ptr);
1109
1101
  return ret;
1110
1102
  }
1111
1103
  /**
1112
- * Publish a wallet name to Nostr relays for this passkey's identity.
1104
+ * Publish a label to Nostr relays for this passkey's identity.
1113
1105
  *
1114
- * Idempotent: if the wallet name already exists, it is not published again.
1106
+ * Idempotent: if the label already exists, it is not published again.
1115
1107
  * Requires 1 PRF call.
1116
- * @param {string} wallet_name
1108
+ * @param {string} label
1117
1109
  * @returns {Promise<void>}
1118
1110
  */
1119
- storeWalletName(wallet_name) {
1120
- const ptr0 = passStringToWasm0(wallet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1111
+ storeLabel(label) {
1112
+ const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1121
1113
  const len0 = WASM_VECTOR_LEN;
1122
- const ret = wasm.passkey_storeWalletName(this.__wbg_ptr, ptr0, len0);
1114
+ const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
1115
+ return ret;
1116
+ }
1117
+ /**
1118
+ * Check if passkey PRF is available on this device.
1119
+ * @returns {Promise<boolean>}
1120
+ */
1121
+ isAvailable() {
1122
+ const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
1123
1123
  return ret;
1124
1124
  }
1125
1125
  /**
@@ -2162,7 +2162,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
2162
2162
  const a = state0.a;
2163
2163
  state0.a = 0;
2164
2164
  try {
2165
- return __wbg_adapter_339(a, state0.b, arg0, arg1);
2165
+ return __wbg_adapter_373(a, state0.b, arg0, arg1);
2166
2166
  } finally {
2167
2167
  state0.a = a;
2168
2168
  }
@@ -2787,28 +2787,28 @@ export function __wbindgen_cb_drop(arg0) {
2787
2787
  return ret;
2788
2788
  };
2789
2789
 
2790
- export function __wbindgen_closure_wrapper10357(arg0, arg1, arg2) {
2791
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_69);
2790
+ export function __wbindgen_closure_wrapper10359(arg0, arg1, arg2) {
2791
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_69);
2792
2792
  return ret;
2793
2793
  };
2794
2794
 
2795
- export function __wbindgen_closure_wrapper15769(arg0, arg1, arg2) {
2796
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
2795
+ export function __wbindgen_closure_wrapper15747(arg0, arg1, arg2) {
2796
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_64);
2797
2797
  return ret;
2798
2798
  };
2799
2799
 
2800
- export function __wbindgen_closure_wrapper5872(arg0, arg1, arg2) {
2801
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
2800
+ export function __wbindgen_closure_wrapper5892(arg0, arg1, arg2) {
2801
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_64);
2802
2802
  return ret;
2803
2803
  };
2804
2804
 
2805
- export function __wbindgen_closure_wrapper5878(arg0, arg1, arg2) {
2806
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
2805
+ export function __wbindgen_closure_wrapper5900(arg0, arg1, arg2) {
2806
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_64);
2807
2807
  return ret;
2808
2808
  };
2809
2809
 
2810
- export function __wbindgen_closure_wrapper7556(arg0, arg1, arg2) {
2811
- const ret = makeMutClosure(arg0, arg1, 964, __wbg_adapter_69);
2810
+ export function __wbindgen_closure_wrapper7579(arg0, arg1, arg2) {
2811
+ const ret = makeMutClosure(arg0, arg1, 959, __wbg_adapter_69);
2812
2812
  return ret;
2813
2813
  };
2814
2814
 
@@ -76,9 +76,9 @@ export const getSparkStatus: () => any;
76
76
  export const initLogging: (a: any, b: number, c: number) => any;
77
77
  export const passkey_getWallet: (a: number, b: number, c: number) => any;
78
78
  export const passkey_isAvailable: (a: number) => any;
79
- export const passkey_listWalletNames: (a: number) => any;
79
+ export const passkey_listLabels: (a: number) => any;
80
80
  export const passkey_new: (a: any, b: number) => number;
81
- export const passkey_storeWalletName: (a: number, b: number, c: number) => any;
81
+ export const passkey_storeLabel: (a: number, b: number, c: number) => any;
82
82
  export const sdkbuilder_build: (a: number) => any;
83
83
  export const sdkbuilder_new: (a: any, b: any) => number;
84
84
  export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
@@ -126,7 +126,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
126
126
  export const __externref_drop_slice: (a: number, b: number) => void;
127
127
  export const __wbindgen_export_7: WebAssembly.Table;
128
128
  export const __externref_table_dealloc: (a: number) => void;
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;
129
+ export const closure444_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__h1bbbe552b190da27: (a: number, b: number) => void;
131
+ export const closure716_externref_shim: (a: number, b: number, c: any, d: any) => void;
132
132
  export const __wbindgen_start: () => void;