@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.
@@ -221,6 +221,39 @@ export function defaultPostgresStorageConfig(connection_string) {
221
221
  return ret;
222
222
  }
223
223
 
224
+ /**
225
+ * Creates a default external signer from a mnemonic phrase.
226
+ *
227
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
228
+ * @returns {Promise<SparkStatus>}
229
+ */
230
+ export function getSparkStatus() {
231
+ const ret = wasm.getSparkStatus();
232
+ return ret;
233
+ }
234
+
235
+ /**
236
+ * @param {Config} config
237
+ * @param {ExternalSigner} signer
238
+ * @param {string} storage_dir
239
+ * @returns {Promise<BreezSdk>}
240
+ */
241
+ export function connectWithSigner(config, signer, storage_dir) {
242
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
245
+ return ret;
246
+ }
247
+
248
+ /**
249
+ * @param {Network} network
250
+ * @returns {Config}
251
+ */
252
+ export function defaultConfig(network) {
253
+ const ret = wasm.defaultConfig(network);
254
+ return ret;
255
+ }
256
+
224
257
  function takeFromExternrefTable0(idx) {
225
258
  const value = wasm.__wbindgen_export_5.get(idx);
226
259
  wasm.__externref_table_dealloc(idx);
@@ -246,11 +279,11 @@ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_con
246
279
  }
247
280
 
248
281
  /**
249
- * @param {Network} network
250
- * @returns {Config}
282
+ * @param {ConnectRequest} request
283
+ * @returns {Promise<BreezSdk>}
251
284
  */
252
- export function defaultConfig(network) {
253
- const ret = wasm.defaultConfig(network);
285
+ export function connect(request) {
286
+ const ret = wasm.connect(request);
254
287
  return ret;
255
288
  }
256
289
 
@@ -266,39 +299,6 @@ export function initLogging(logger, filter) {
266
299
  return ret;
267
300
  }
268
301
 
269
- /**
270
- * @param {ConnectRequest} request
271
- * @returns {Promise<BreezSdk>}
272
- */
273
- export function connect(request) {
274
- const ret = wasm.connect(request);
275
- return ret;
276
- }
277
-
278
- /**
279
- * Creates a default external signer from a mnemonic phrase.
280
- *
281
- * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
282
- * @returns {Promise<SparkStatus>}
283
- */
284
- export function getSparkStatus() {
285
- const ret = wasm.getSparkStatus();
286
- return ret;
287
- }
288
-
289
- /**
290
- * @param {Config} config
291
- * @param {ExternalSigner} signer
292
- * @param {string} storage_dir
293
- * @returns {Promise<BreezSdk>}
294
- */
295
- export function connectWithSigner(config, signer, storage_dir) {
296
- const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
297
- const len0 = WASM_VECTOR_LEN;
298
- const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
299
- return ret;
300
- }
301
-
302
302
  function passArray8ToWasm0(arg, malloc) {
303
303
  const ptr = malloc(arg.length * 1, 1) >>> 0;
304
304
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -317,15 +317,15 @@ export function task_worker_entry_point(ptr) {
317
317
  }
318
318
 
319
319
  function __wbg_adapter_64(arg0, arg1, arg2) {
320
- wasm.closure440_externref_shim(arg0, arg1, arg2);
320
+ wasm.closure444_externref_shim(arg0, arg1, arg2);
321
321
  }
322
322
 
323
323
  function __wbg_adapter_69(arg0, arg1) {
324
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h29e986a86553656d(arg0, arg1);
324
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1bbbe552b190da27(arg0, arg1);
325
325
  }
326
326
 
327
- function __wbg_adapter_339(arg0, arg1, arg2, arg3) {
328
- wasm.closure720_externref_shim(arg0, arg1, arg2, arg3);
327
+ function __wbg_adapter_373(arg0, arg1, arg2, arg3) {
328
+ wasm.closure716_externref_shim(arg0, arg1, arg2, arg3);
329
329
  }
330
330
 
331
331
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1043,7 +1043,7 @@ const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
1043
1043
  * Passkey-based wallet operations using WebAuthn PRF extension.
1044
1044
  *
1045
1045
  * Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
1046
- * wallet derivation and name management via Nostr relays.
1046
+ * wallet derivation and label management via Nostr relays.
1047
1047
  */
1048
1048
  export class Passkey {
1049
1049
 
@@ -1059,50 +1059,50 @@ export class Passkey {
1059
1059
  wasm.__wbg_passkey_free(ptr, 0);
1060
1060
  }
1061
1061
  /**
1062
- * Derive a wallet for a given wallet name.
1062
+ * Derive a wallet for a given label.
1063
1063
  *
1064
- * Uses the passkey PRF to derive a `Wallet` containing the seed and resolved name.
1064
+ * Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
1065
1065
  *
1066
- * @param walletName - Optional wallet name string (defaults to "Default")
1067
- * @param {string | null} [wallet_name]
1066
+ * @param label - Optional label string (defaults to "Default")
1067
+ * @param {string | null} [label]
1068
1068
  * @returns {Promise<Wallet>}
1069
1069
  */
1070
- getWallet(wallet_name) {
1071
- var ptr0 = isLikeNone(wallet_name) ? 0 : passStringToWasm0(wallet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1070
+ getWallet(label) {
1071
+ var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1072
1072
  var len0 = WASM_VECTOR_LEN;
1073
1073
  const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
1074
1074
  return ret;
1075
1075
  }
1076
1076
  /**
1077
- * Check if passkey PRF is available on this device.
1078
- * @returns {Promise<boolean>}
1079
- */
1080
- isAvailable() {
1081
- const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
1082
- return ret;
1083
- }
1084
- /**
1085
- * List all wallet names published to Nostr for this passkey's identity.
1077
+ * List all labels published to Nostr for this passkey's identity.
1086
1078
  *
1087
1079
  * Requires 1 PRF call (for Nostr identity derivation).
1088
1080
  * @returns {Promise<string[]>}
1089
1081
  */
1090
- listWalletNames() {
1091
- const ret = wasm.passkey_listWalletNames(this.__wbg_ptr);
1082
+ listLabels() {
1083
+ const ret = wasm.passkey_listLabels(this.__wbg_ptr);
1092
1084
  return ret;
1093
1085
  }
1094
1086
  /**
1095
- * Publish a wallet name to Nostr relays for this passkey's identity.
1087
+ * Publish a label to Nostr relays for this passkey's identity.
1096
1088
  *
1097
- * Idempotent: if the wallet name already exists, it is not published again.
1089
+ * Idempotent: if the label already exists, it is not published again.
1098
1090
  * Requires 1 PRF call.
1099
- * @param {string} wallet_name
1091
+ * @param {string} label
1100
1092
  * @returns {Promise<void>}
1101
1093
  */
1102
- storeWalletName(wallet_name) {
1103
- const ptr0 = passStringToWasm0(wallet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1094
+ storeLabel(label) {
1095
+ const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1104
1096
  const len0 = WASM_VECTOR_LEN;
1105
- const ret = wasm.passkey_storeWalletName(this.__wbg_ptr, ptr0, len0);
1097
+ const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
1098
+ return ret;
1099
+ }
1100
+ /**
1101
+ * Check if passkey PRF is available on this device.
1102
+ * @returns {Promise<boolean>}
1103
+ */
1104
+ isAvailable() {
1105
+ const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
1106
1106
  return ret;
1107
1107
  }
1108
1108
  /**
@@ -2037,7 +2037,7 @@ const imports = {
2037
2037
  const a = state0.a;
2038
2038
  state0.a = 0;
2039
2039
  try {
2040
- return __wbg_adapter_339(a, state0.b, arg0, arg1);
2040
+ return __wbg_adapter_373(a, state0.b, arg0, arg1);
2041
2041
  } finally {
2042
2042
  state0.a = a;
2043
2043
  }
@@ -2552,24 +2552,24 @@ const imports = {
2552
2552
  const ret = false;
2553
2553
  return ret;
2554
2554
  },
2555
- __wbindgen_closure_wrapper10357: function(arg0, arg1, arg2) {
2556
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_69);
2555
+ __wbindgen_closure_wrapper10359: function(arg0, arg1, arg2) {
2556
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_69);
2557
2557
  return ret;
2558
2558
  },
2559
- __wbindgen_closure_wrapper15769: function(arg0, arg1, arg2) {
2560
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
2559
+ __wbindgen_closure_wrapper15747: function(arg0, arg1, arg2) {
2560
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_64);
2561
2561
  return ret;
2562
2562
  },
2563
- __wbindgen_closure_wrapper5872: function(arg0, arg1, arg2) {
2564
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
2563
+ __wbindgen_closure_wrapper5892: function(arg0, arg1, arg2) {
2564
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_64);
2565
2565
  return ret;
2566
2566
  },
2567
- __wbindgen_closure_wrapper5878: function(arg0, arg1, arg2) {
2568
- const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_64);
2567
+ __wbindgen_closure_wrapper5900: function(arg0, arg1, arg2) {
2568
+ const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_64);
2569
2569
  return ret;
2570
2570
  },
2571
- __wbindgen_closure_wrapper7556: function(arg0, arg1, arg2) {
2572
- const ret = makeMutClosure(arg0, arg1, 964, __wbg_adapter_69);
2571
+ __wbindgen_closure_wrapper7579: function(arg0, arg1, arg2) {
2572
+ const ret = makeMutClosure(arg0, arg1, 959, __wbg_adapter_69);
2573
2573
  return ret;
2574
2574
  },
2575
2575
  __wbindgen_debug_string: function(arg0, arg1) {
Binary file
@@ -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;