@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/cpp/generated/breez_sdk_spark.cpp +53 -54
- package/cpp/generated/breez_sdk_spark.hpp +4 -6
- package/lib/commonjs/generated/breez_sdk_spark.js +22 -22
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +22 -22
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +5 -5
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +35 -35
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +5 -5
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +35 -35
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/generated/breez_sdk_spark-ffi.ts +6 -6
- package/src/generated/breez_sdk_spark.ts +51 -51
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breeztech/breez-sdk-spark-react-native",
|
|
3
|
-
"version": "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": "
|
|
201
|
-
"ios": "
|
|
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
|
-
|
|
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
|
-
|
|
347
|
+
ubrn_uniffi_breez_sdk_spark_fn_method_passkey_list_labels(
|
|
348
348
|
ptr: bigint
|
|
349
349
|
): bigint;
|
|
350
|
-
|
|
350
|
+
ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_label(
|
|
351
351
|
ptr: bigint,
|
|
352
|
-
|
|
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
|
-
|
|
851
|
-
|
|
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
|
|
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
|
|
11000
|
+
* The label used for derivation (either user-provided or the default).
|
|
11001
11001
|
*/
|
|
11002
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
|
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::
|
|
26618
|
-
* and [`Passkey::
|
|
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
|
|
26622
|
+
* Derive a wallet for a given label.
|
|
26623
26623
|
*
|
|
26624
|
-
* Uses the passkey PRF to derive a
|
|
26625
|
-
* and returns it as a [`Wallet`] containing the seed and resolved
|
|
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
|
-
* * `
|
|
26630
|
-
* If `None`, defaults to [`
|
|
26629
|
+
* * `label` - A user-chosen label (e.g., "personal", "business").
|
|
26630
|
+
* If `None`, defaults to [`DEFAULT_LABEL`].
|
|
26631
26631
|
*/
|
|
26632
26632
|
getWallet(
|
|
26633
|
-
|
|
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
|
|
26645
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
26646
26646
|
*
|
|
26647
|
-
* Queries Nostr relays for all
|
|
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
|
-
|
|
26650
|
+
listLabels(asyncOpts_?: {
|
|
26651
26651
|
signal: AbortSignal;
|
|
26652
26652
|
}): /*throws*/ Promise<Array<string>>;
|
|
26653
26653
|
/**
|
|
26654
|
-
* Publish a
|
|
26654
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
26655
26655
|
*
|
|
26656
|
-
* Idempotent: if the
|
|
26656
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
26657
26657
|
* Requires 1 PRF call.
|
|
26658
26658
|
*
|
|
26659
26659
|
* # Arguments
|
|
26660
|
-
* * `
|
|
26660
|
+
* * `label` - A user-chosen label (e.g., "personal", "business")
|
|
26661
26661
|
*/
|
|
26662
|
-
|
|
26663
|
-
|
|
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
|
|
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::
|
|
26676
|
-
* and [`Passkey::
|
|
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
|
|
26709
|
+
* Derive a wallet for a given label.
|
|
26710
26710
|
*
|
|
26711
|
-
* Uses the passkey PRF to derive a
|
|
26712
|
-
* and returns it as a [`Wallet`] containing the seed and resolved
|
|
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
|
-
* * `
|
|
26717
|
-
* If `None`, defaults to [`
|
|
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
|
-
|
|
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(
|
|
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
|
|
26797
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
26798
26798
|
*
|
|
26799
|
-
* Queries Nostr relays for all
|
|
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
|
|
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().
|
|
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
|
|
26840
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
26841
26841
|
*
|
|
26842
|
-
* Idempotent: if the
|
|
26842
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
26843
26843
|
* Requires 1 PRF call.
|
|
26844
26844
|
*
|
|
26845
26845
|
* # Arguments
|
|
26846
|
-
* * `
|
|
26846
|
+
* * `label` - A user-chosen label (e.g., "personal", "business")
|
|
26847
26847
|
*/
|
|
26848
|
-
public async
|
|
26849
|
-
|
|
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().
|
|
26857
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_label(
|
|
26858
26858
|
uniffiTypePasskeyObjectFactory.clonePointer(this),
|
|
26859
|
-
FfiConverterString.lower(
|
|
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
|
-
|
|
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().
|
|
32878
|
-
|
|
32877
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_list_labels() !==
|
|
32878
|
+
5351
|
|
32879
32879
|
) {
|
|
32880
32880
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
32881
|
-
'
|
|
32881
|
+
'uniffi_breez_sdk_spark_checksum_method_passkey_list_labels'
|
|
32882
32882
|
);
|
|
32883
32883
|
}
|
|
32884
32884
|
if (
|
|
32885
|
-
nativeModule().
|
|
32886
|
-
|
|
32885
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_store_label() !==
|
|
32886
|
+
42949
|
|
32887
32887
|
) {
|
|
32888
32888
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
32889
|
-
'
|
|
32889
|
+
'uniffi_breez_sdk_spark_checksum_method_passkey_store_label'
|
|
32890
32890
|
);
|
|
32891
32891
|
}
|
|
32892
32892
|
if (
|