@breeztech/breez-sdk-spark-react-native 0.11.0 → 0.12.2-dev1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark-react-native",
3
- "version": "0.11.0",
3
+ "version": "0.12.2-dev1",
4
4
  "description": "React Native bindings for the Breez SDK - Nodeless (Spark Implementation)",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -197,7 +197,7 @@
197
197
  "version": "0.49.0"
198
198
  },
199
199
  "checksums": {
200
- "android": "12e8c7330845372cab3e92467e2dd119c0a671f1c9210b3cc64a0a96817f852a",
201
- "ios": "5dae2860ef281cb77e08dc221a4dcb33add48034ec136c87d8bf3d7407bb459a"
200
+ "android": "3c8b1c333da71f607412460a064c6ebd7bd38ca2ed6eef15498015e9db62d310",
201
+ "ios": "fa67ee8b82c121a2e95fce283dbbddca4e83aa20a2272057f58596b07d633a4d"
202
202
  }
203
203
  }
@@ -339,17 +339,17 @@ interface NativeModuleInterface {
339
339
  ): bigint;
340
340
  ubrn_uniffi_breez_sdk_spark_fn_method_passkey_get_wallet(
341
341
  ptr: bigint,
342
- walletName: Uint8Array
342
+ label: Uint8Array
343
343
  ): bigint;
344
344
  ubrn_uniffi_breez_sdk_spark_fn_method_passkey_is_available(
345
345
  ptr: bigint
346
346
  ): bigint;
347
- ubrn_uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names(
347
+ ubrn_uniffi_breez_sdk_spark_fn_method_passkey_list_labels(
348
348
  ptr: bigint
349
349
  ): bigint;
350
- ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name(
350
+ ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_label(
351
351
  ptr: bigint,
352
- walletName: Uint8Array
352
+ label: Uint8Array
353
353
  ): bigint;
354
354
  ubrn_uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider(
355
355
  ptr: bigint,
@@ -847,8 +847,8 @@ interface NativeModuleInterface {
847
847
  ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates(): number;
848
848
  ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet(): number;
849
849
  ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_is_available(): number;
850
- ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names(): number;
851
- ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name(): number;
850
+ ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_list_labels(): number;
851
+ ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_store_label(): number;
852
852
  ubrn_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_derive_prf_seed(): number;
853
853
  ubrn_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_is_prf_available(): number;
854
854
  ubrn_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send(): number;
@@ -10989,7 +10989,7 @@ const FfiConverterTypeUtxo = (() => {
10989
10989
  /**
10990
10990
  * A wallet derived from a passkey.
10991
10991
  *
10992
- * Contains the derived seed and the wallet name used during derivation.
10992
+ * Contains the derived seed and the label used during derivation.
10993
10993
  */
10994
10994
  export type Wallet = {
10995
10995
  /**
@@ -10997,9 +10997,9 @@ export type Wallet = {
10997
10997
  */
10998
10998
  seed: Seed;
10999
10999
  /**
11000
- * The wallet name used for derivation (either user-provided or the default).
11000
+ * The label used for derivation (either user-provided or the default).
11001
11001
  */
11002
- name: string;
11002
+ label: string;
11003
11003
  };
11004
11004
 
11005
11005
  /**
@@ -11036,17 +11036,17 @@ const FfiConverterTypeWallet = (() => {
11036
11036
  read(from: RustBuffer): TypeName {
11037
11037
  return {
11038
11038
  seed: FfiConverterTypeSeed.read(from),
11039
- name: FfiConverterString.read(from),
11039
+ label: FfiConverterString.read(from),
11040
11040
  };
11041
11041
  }
11042
11042
  write(value: TypeName, into: RustBuffer): void {
11043
11043
  FfiConverterTypeSeed.write(value.seed, into);
11044
- FfiConverterString.write(value.name, into);
11044
+ FfiConverterString.write(value.label, into);
11045
11045
  }
11046
11046
  allocationSize(value: TypeName): number {
11047
11047
  return (
11048
11048
  FfiConverterTypeSeed.allocationSize(value.seed) +
11049
- FfiConverterString.allocationSize(value.name)
11049
+ FfiConverterString.allocationSize(value.label)
11050
11050
  );
11051
11051
  }
11052
11052
  }
@@ -26611,26 +26611,26 @@ const uniffiCallbackInterfaceFiatService: {
26611
26611
  * Orchestrates passkey-based wallet creation and restore operations.
26612
26612
  *
26613
26613
  * This struct coordinates between the platform's passkey PRF provider and
26614
- * Nostr relays to derive wallet mnemonics and manage wallet names.
26614
+ * Nostr relays to derive wallet mnemonics and manage labels.
26615
26615
  *
26616
26616
  * The Nostr identity (derived from the passkey's magic salt) is cached after
26617
- * the first derivation so that subsequent calls to [`Passkey::list_wallet_names`]
26618
- * and [`Passkey::store_wallet_name`] do not require additional PRF interactions.
26617
+ * the first derivation so that subsequent calls to [`Passkey::list_labels`]
26618
+ * and [`Passkey::store_label`] do not require additional PRF interactions.
26619
26619
  */
26620
26620
  export interface PasskeyInterface {
26621
26621
  /**
26622
- * Derive a wallet for a given wallet name.
26622
+ * Derive a wallet for a given label.
26623
26623
  *
26624
- * Uses the passkey PRF to derive a 24-word BIP39 mnemonic from the wallet name
26625
- * and returns it as a [`Wallet`] containing the seed and resolved name.
26624
+ * Uses the passkey PRF to derive a 12-word BIP39 mnemonic from the label
26625
+ * and returns it as a [`Wallet`] containing the seed and resolved label.
26626
26626
  * This works for both creating a new wallet and restoring an existing one.
26627
26627
  *
26628
26628
  * # Arguments
26629
- * * `wallet_name` - A user-chosen wallet name (e.g., "personal", "business").
26630
- * If `None`, defaults to [`DEFAULT_WALLET_NAME`].
26629
+ * * `label` - A user-chosen label (e.g., "personal", "business").
26630
+ * If `None`, defaults to [`DEFAULT_LABEL`].
26631
26631
  */
26632
26632
  getWallet(
26633
- walletName: string | undefined,
26633
+ label: string | undefined,
26634
26634
  asyncOpts_?: { signal: AbortSignal }
26635
26635
  ): /*throws*/ Promise<Wallet>;
26636
26636
  /**
@@ -26642,25 +26642,25 @@ export interface PasskeyInterface {
26642
26642
  signal: AbortSignal;
26643
26643
  }): /*throws*/ Promise<boolean>;
26644
26644
  /**
26645
- * List all wallet names published to Nostr for this passkey's identity.
26645
+ * List all labels published to Nostr for this passkey's identity.
26646
26646
  *
26647
- * Queries Nostr relays for all wallet names associated with the Nostr identity
26647
+ * Queries Nostr relays for all labels associated with the Nostr identity
26648
26648
  * derived from this passkey. Requires 1 PRF call.
26649
26649
  */
26650
- listWalletNames(asyncOpts_?: {
26650
+ listLabels(asyncOpts_?: {
26651
26651
  signal: AbortSignal;
26652
26652
  }): /*throws*/ Promise<Array<string>>;
26653
26653
  /**
26654
- * Publish a wallet name to Nostr relays for this passkey's identity.
26654
+ * Publish a label to Nostr relays for this passkey's identity.
26655
26655
  *
26656
- * Idempotent: if the wallet name already exists, it is not published again.
26656
+ * Idempotent: if the label already exists, it is not published again.
26657
26657
  * Requires 1 PRF call.
26658
26658
  *
26659
26659
  * # Arguments
26660
- * * `wallet_name` - A user-chosen wallet name (e.g., "personal", "business")
26660
+ * * `label` - A user-chosen label (e.g., "personal", "business")
26661
26661
  */
26662
- storeWalletName(
26663
- walletName: string,
26662
+ storeLabel(
26663
+ label: string,
26664
26664
  asyncOpts_?: { signal: AbortSignal }
26665
26665
  ): /*throws*/ Promise<void>;
26666
26666
  }
@@ -26669,11 +26669,11 @@ export interface PasskeyInterface {
26669
26669
  * Orchestrates passkey-based wallet creation and restore operations.
26670
26670
  *
26671
26671
  * This struct coordinates between the platform's passkey PRF provider and
26672
- * Nostr relays to derive wallet mnemonics and manage wallet names.
26672
+ * Nostr relays to derive wallet mnemonics and manage labels.
26673
26673
  *
26674
26674
  * The Nostr identity (derived from the passkey's magic salt) is cached after
26675
- * the first derivation so that subsequent calls to [`Passkey::list_wallet_names`]
26676
- * and [`Passkey::store_wallet_name`] do not require additional PRF interactions.
26675
+ * the first derivation so that subsequent calls to [`Passkey::list_labels`]
26676
+ * and [`Passkey::store_label`] do not require additional PRF interactions.
26677
26677
  */
26678
26678
  export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26679
26679
  readonly [uniffiTypeNameSymbol] = 'Passkey';
@@ -26706,18 +26706,18 @@ export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26706
26706
  }
26707
26707
 
26708
26708
  /**
26709
- * Derive a wallet for a given wallet name.
26709
+ * Derive a wallet for a given label.
26710
26710
  *
26711
- * Uses the passkey PRF to derive a 24-word BIP39 mnemonic from the wallet name
26712
- * and returns it as a [`Wallet`] containing the seed and resolved name.
26711
+ * Uses the passkey PRF to derive a 12-word BIP39 mnemonic from the label
26712
+ * and returns it as a [`Wallet`] containing the seed and resolved label.
26713
26713
  * This works for both creating a new wallet and restoring an existing one.
26714
26714
  *
26715
26715
  * # Arguments
26716
- * * `wallet_name` - A user-chosen wallet name (e.g., "personal", "business").
26717
- * If `None`, defaults to [`DEFAULT_WALLET_NAME`].
26716
+ * * `label` - A user-chosen label (e.g., "personal", "business").
26717
+ * If `None`, defaults to [`DEFAULT_LABEL`].
26718
26718
  */
26719
26719
  public async getWallet(
26720
- walletName: string | undefined,
26720
+ label: string | undefined,
26721
26721
  asyncOpts_?: { signal: AbortSignal }
26722
26722
  ): Promise<Wallet> /*throws*/ {
26723
26723
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -26727,7 +26727,7 @@ export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26727
26727
  /*rustFutureFunc:*/ () => {
26728
26728
  return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_passkey_get_wallet(
26729
26729
  uniffiTypePasskeyObjectFactory.clonePointer(this),
26730
- FfiConverterOptionalString.lower(walletName)
26730
+ FfiConverterOptionalString.lower(label)
26731
26731
  );
26732
26732
  },
26733
26733
  /*pollFunc:*/ nativeModule()
@@ -26794,12 +26794,12 @@ export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26794
26794
  }
26795
26795
 
26796
26796
  /**
26797
- * List all wallet names published to Nostr for this passkey's identity.
26797
+ * List all labels published to Nostr for this passkey's identity.
26798
26798
  *
26799
- * Queries Nostr relays for all wallet names associated with the Nostr identity
26799
+ * Queries Nostr relays for all labels associated with the Nostr identity
26800
26800
  * derived from this passkey. Requires 1 PRF call.
26801
26801
  */
26802
- public async listWalletNames(asyncOpts_?: {
26802
+ public async listLabels(asyncOpts_?: {
26803
26803
  signal: AbortSignal;
26804
26804
  }): Promise<Array<string>> /*throws*/ {
26805
26805
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -26807,7 +26807,7 @@ export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26807
26807
  return await uniffiRustCallAsync(
26808
26808
  /*rustCaller:*/ uniffiCaller,
26809
26809
  /*rustFutureFunc:*/ () => {
26810
- return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names(
26810
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_passkey_list_labels(
26811
26811
  uniffiTypePasskeyObjectFactory.clonePointer(this)
26812
26812
  );
26813
26813
  },
@@ -26837,16 +26837,16 @@ export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26837
26837
  }
26838
26838
 
26839
26839
  /**
26840
- * Publish a wallet name to Nostr relays for this passkey's identity.
26840
+ * Publish a label to Nostr relays for this passkey's identity.
26841
26841
  *
26842
- * Idempotent: if the wallet name already exists, it is not published again.
26842
+ * Idempotent: if the label already exists, it is not published again.
26843
26843
  * Requires 1 PRF call.
26844
26844
  *
26845
26845
  * # Arguments
26846
- * * `wallet_name` - A user-chosen wallet name (e.g., "personal", "business")
26846
+ * * `label` - A user-chosen label (e.g., "personal", "business")
26847
26847
  */
26848
- public async storeWalletName(
26849
- walletName: string,
26848
+ public async storeLabel(
26849
+ label: string,
26850
26850
  asyncOpts_?: { signal: AbortSignal }
26851
26851
  ): Promise<void> /*throws*/ {
26852
26852
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -26854,9 +26854,9 @@ export class Passkey extends UniffiAbstractObject implements PasskeyInterface {
26854
26854
  return await uniffiRustCallAsync(
26855
26855
  /*rustCaller:*/ uniffiCaller,
26856
26856
  /*rustFutureFunc:*/ () => {
26857
- return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name(
26857
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_label(
26858
26858
  uniffiTypePasskeyObjectFactory.clonePointer(this),
26859
- FfiConverterString.lower(walletName)
26859
+ FfiConverterString.lower(label)
26860
26860
  );
26861
26861
  },
26862
26862
  /*pollFunc:*/ nativeModule()
@@ -32859,7 +32859,7 @@ function uniffiEnsureInitialized() {
32859
32859
  }
32860
32860
  if (
32861
32861
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet() !==
32862
- 499
32862
+ 28830
32863
32863
  ) {
32864
32864
  throw new UniffiInternalError.ApiChecksumMismatch(
32865
32865
  'uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet'
@@ -32874,19 +32874,19 @@ function uniffiEnsureInitialized() {
32874
32874
  );
32875
32875
  }
32876
32876
  if (
32877
- nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names() !==
32878
- 37080
32877
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_list_labels() !==
32878
+ 5351
32879
32879
  ) {
32880
32880
  throw new UniffiInternalError.ApiChecksumMismatch(
32881
- 'uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names'
32881
+ 'uniffi_breez_sdk_spark_checksum_method_passkey_list_labels'
32882
32882
  );
32883
32883
  }
32884
32884
  if (
32885
- nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name() !==
32886
- 2664
32885
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_store_label() !==
32886
+ 42949
32887
32887
  ) {
32888
32888
  throw new UniffiInternalError.ApiChecksumMismatch(
32889
- 'uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name'
32889
+ 'uniffi_breez_sdk_spark_checksum_method_passkey_store_label'
32890
32890
  );
32891
32891
  }
32892
32892
  if (