@breeztech/breez-sdk-spark-react-native 0.7.7 → 0.7.9

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.
@@ -1098,32 +1098,32 @@ export declare const ExternalAggregateFrostRequest: Readonly<{
1098
1098
  defaults: () => Partial<ExternalAggregateFrostRequest>;
1099
1099
  }>;
1100
1100
  /**
1101
- * FFI-safe representation of `spark_wallet::EncryptedPrivateKey`
1101
+ * FFI-safe representation of `spark_wallet::EncryptedSecret`
1102
1102
  */
1103
- export type ExternalEncryptedPrivateKey = {
1103
+ export type ExternalEncryptedSecret = {
1104
1104
  /**
1105
1105
  * The encrypted ciphertext
1106
1106
  */
1107
1107
  ciphertext: ArrayBuffer;
1108
1108
  };
1109
1109
  /**
1110
- * Generated factory for {@link ExternalEncryptedPrivateKey} record objects.
1110
+ * Generated factory for {@link ExternalEncryptedSecret} record objects.
1111
1111
  */
1112
- export declare const ExternalEncryptedPrivateKey: Readonly<{
1112
+ export declare const ExternalEncryptedSecret: Readonly<{
1113
1113
  /**
1114
- * Create a frozen instance of {@link ExternalEncryptedPrivateKey}, with defaults specified
1114
+ * Create a frozen instance of {@link ExternalEncryptedSecret}, with defaults specified
1115
1115
  * in Rust, in the {@link breez_sdk_spark} crate.
1116
1116
  */
1117
- create: (partial: Partial<ExternalEncryptedPrivateKey> & Required<Omit<ExternalEncryptedPrivateKey, never>>) => ExternalEncryptedPrivateKey;
1117
+ create: (partial: Partial<ExternalEncryptedSecret> & Required<Omit<ExternalEncryptedSecret, never>>) => ExternalEncryptedSecret;
1118
1118
  /**
1119
- * Create a frozen instance of {@link ExternalEncryptedPrivateKey}, with defaults specified
1119
+ * Create a frozen instance of {@link ExternalEncryptedSecret}, with defaults specified
1120
1120
  * in Rust, in the {@link breez_sdk_spark} crate.
1121
1121
  */
1122
- new: (partial: Partial<ExternalEncryptedPrivateKey> & Required<Omit<ExternalEncryptedPrivateKey, never>>) => ExternalEncryptedPrivateKey;
1122
+ new: (partial: Partial<ExternalEncryptedSecret> & Required<Omit<ExternalEncryptedSecret, never>>) => ExternalEncryptedSecret;
1123
1123
  /**
1124
1124
  * Defaults specified in the {@link breez_sdk_spark} crate.
1125
1125
  */
1126
- defaults: () => Partial<ExternalEncryptedPrivateKey>;
1126
+ defaults: () => Partial<ExternalEncryptedSecret>;
1127
1127
  }>;
1128
1128
  /**
1129
1129
  * FFI-safe representation of `spark_wallet::FrostSigningCommitmentsWithNonces`
@@ -1361,7 +1361,7 @@ export type ExternalSignFrostRequest = {
1361
1361
  /**
1362
1362
  * The private key source
1363
1363
  */
1364
- privateKey: ExternalSecretKeySource;
1364
+ secret: ExternalSecretSource;
1365
1365
  /**
1366
1366
  * The verifying key (33 bytes compressed)
1367
1367
  */
@@ -2973,31 +2973,6 @@ export declare const PrepareSendPaymentResponse: Readonly<{
2973
2973
  */
2974
2974
  defaults: () => Partial<PrepareSendPaymentResponse>;
2975
2975
  }>;
2976
- /**
2977
- * FFI-safe representation of a private key (32 bytes)
2978
- */
2979
- export type PrivateKeyBytes = {
2980
- bytes: ArrayBuffer;
2981
- };
2982
- /**
2983
- * Generated factory for {@link PrivateKeyBytes} record objects.
2984
- */
2985
- export declare const PrivateKeyBytes: Readonly<{
2986
- /**
2987
- * Create a frozen instance of {@link PrivateKeyBytes}, with defaults specified
2988
- * in Rust, in the {@link breez_sdk_spark} crate.
2989
- */
2990
- create: (partial: Partial<PrivateKeyBytes> & Required<Omit<PrivateKeyBytes, never>>) => PrivateKeyBytes;
2991
- /**
2992
- * Create a frozen instance of {@link PrivateKeyBytes}, with defaults specified
2993
- * in Rust, in the {@link breez_sdk_spark} crate.
2994
- */
2995
- new: (partial: Partial<PrivateKeyBytes> & Required<Omit<PrivateKeyBytes, never>>) => PrivateKeyBytes;
2996
- /**
2997
- * Defaults specified in the {@link breez_sdk_spark} crate.
2998
- */
2999
- defaults: () => Partial<PrivateKeyBytes>;
3000
- }>;
3001
2976
  export type ProvisionalPayment = {
3002
2977
  /**
3003
2978
  * Unique identifier for the payment
@@ -3374,6 +3349,31 @@ export declare const SchnorrSignatureBytes: Readonly<{
3374
3349
  */
3375
3350
  defaults: () => Partial<SchnorrSignatureBytes>;
3376
3351
  }>;
3352
+ /**
3353
+ * FFI-safe representation of a private key (32 bytes)
3354
+ */
3355
+ export type SecretBytes = {
3356
+ bytes: ArrayBuffer;
3357
+ };
3358
+ /**
3359
+ * Generated factory for {@link SecretBytes} record objects.
3360
+ */
3361
+ export declare const SecretBytes: Readonly<{
3362
+ /**
3363
+ * Create a frozen instance of {@link SecretBytes}, with defaults specified
3364
+ * in Rust, in the {@link breez_sdk_spark} crate.
3365
+ */
3366
+ create: (partial: Partial<SecretBytes> & Required<Omit<SecretBytes, never>>) => SecretBytes;
3367
+ /**
3368
+ * Create a frozen instance of {@link SecretBytes}, with defaults specified
3369
+ * in Rust, in the {@link breez_sdk_spark} crate.
3370
+ */
3371
+ new: (partial: Partial<SecretBytes> & Required<Omit<SecretBytes, never>>) => SecretBytes;
3372
+ /**
3373
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3374
+ */
3375
+ defaults: () => Partial<SecretBytes>;
3376
+ }>;
3377
3377
  export type SendOnchainFeeQuote = {
3378
3378
  id: string;
3379
3379
  expiresAt: bigint;
@@ -4923,20 +4923,20 @@ export declare const DepositClaimError: Readonly<{
4923
4923
  };
4924
4924
  }>;
4925
4925
  export type DepositClaimError = InstanceType<(typeof DepositClaimError)[keyof Omit<typeof DepositClaimError, 'instanceOf'>]>;
4926
- export declare enum ExternalSecretKeySource_Tags {
4926
+ export declare enum ExternalSecretSource_Tags {
4927
4927
  Derived = "Derived",
4928
4928
  Encrypted = "Encrypted"
4929
4929
  }
4930
4930
  /**
4931
- * FFI-safe representation of `spark_wallet::SecretKeySource`
4931
+ * FFI-safe representation of `spark_wallet::SecretSource`
4932
4932
  */
4933
- export declare const ExternalSecretKeySource: Readonly<{
4934
- instanceOf: (obj: any) => obj is ExternalSecretKeySource;
4933
+ export declare const ExternalSecretSource: Readonly<{
4934
+ instanceOf: (obj: any) => obj is ExternalSecretSource;
4935
4935
  Derived: {
4936
4936
  new (inner: {
4937
4937
  nodeId: ExternalTreeNodeId;
4938
4938
  }): {
4939
- readonly tag: ExternalSecretKeySource_Tags.Derived;
4939
+ readonly tag: ExternalSecretSource_Tags.Derived;
4940
4940
  readonly inner: Readonly<{
4941
4941
  nodeId: ExternalTreeNodeId;
4942
4942
  }>;
@@ -4944,12 +4944,12 @@ export declare const ExternalSecretKeySource: Readonly<{
4944
4944
  * @private
4945
4945
  * This field is private and should not be used, use `tag` instead.
4946
4946
  */
4947
- readonly [uniffiTypeNameSymbol]: "ExternalSecretKeySource";
4947
+ readonly [uniffiTypeNameSymbol]: "ExternalSecretSource";
4948
4948
  };
4949
4949
  "new"(inner: {
4950
4950
  nodeId: ExternalTreeNodeId;
4951
4951
  }): {
4952
- readonly tag: ExternalSecretKeySource_Tags.Derived;
4952
+ readonly tag: ExternalSecretSource_Tags.Derived;
4953
4953
  readonly inner: Readonly<{
4954
4954
  nodeId: ExternalTreeNodeId;
4955
4955
  }>;
@@ -4957,10 +4957,10 @@ export declare const ExternalSecretKeySource: Readonly<{
4957
4957
  * @private
4958
4958
  * This field is private and should not be used, use `tag` instead.
4959
4959
  */
4960
- readonly [uniffiTypeNameSymbol]: "ExternalSecretKeySource";
4960
+ readonly [uniffiTypeNameSymbol]: "ExternalSecretSource";
4961
4961
  };
4962
4962
  instanceOf(obj: any): obj is {
4963
- readonly tag: ExternalSecretKeySource_Tags.Derived;
4963
+ readonly tag: ExternalSecretSource_Tags.Derived;
4964
4964
  readonly inner: Readonly<{
4965
4965
  nodeId: ExternalTreeNodeId;
4966
4966
  }>;
@@ -4968,55 +4968,55 @@ export declare const ExternalSecretKeySource: Readonly<{
4968
4968
  * @private
4969
4969
  * This field is private and should not be used, use `tag` instead.
4970
4970
  */
4971
- readonly [uniffiTypeNameSymbol]: "ExternalSecretKeySource";
4971
+ readonly [uniffiTypeNameSymbol]: "ExternalSecretSource";
4972
4972
  };
4973
4973
  };
4974
4974
  Encrypted: {
4975
4975
  new (inner: {
4976
- key: ExternalEncryptedPrivateKey;
4976
+ key: ExternalEncryptedSecret;
4977
4977
  }): {
4978
- readonly tag: ExternalSecretKeySource_Tags.Encrypted;
4978
+ readonly tag: ExternalSecretSource_Tags.Encrypted;
4979
4979
  readonly inner: Readonly<{
4980
- key: ExternalEncryptedPrivateKey;
4980
+ key: ExternalEncryptedSecret;
4981
4981
  }>;
4982
4982
  /**
4983
4983
  * @private
4984
4984
  * This field is private and should not be used, use `tag` instead.
4985
4985
  */
4986
- readonly [uniffiTypeNameSymbol]: "ExternalSecretKeySource";
4986
+ readonly [uniffiTypeNameSymbol]: "ExternalSecretSource";
4987
4987
  };
4988
4988
  "new"(inner: {
4989
- key: ExternalEncryptedPrivateKey;
4989
+ key: ExternalEncryptedSecret;
4990
4990
  }): {
4991
- readonly tag: ExternalSecretKeySource_Tags.Encrypted;
4991
+ readonly tag: ExternalSecretSource_Tags.Encrypted;
4992
4992
  readonly inner: Readonly<{
4993
- key: ExternalEncryptedPrivateKey;
4993
+ key: ExternalEncryptedSecret;
4994
4994
  }>;
4995
4995
  /**
4996
4996
  * @private
4997
4997
  * This field is private and should not be used, use `tag` instead.
4998
4998
  */
4999
- readonly [uniffiTypeNameSymbol]: "ExternalSecretKeySource";
4999
+ readonly [uniffiTypeNameSymbol]: "ExternalSecretSource";
5000
5000
  };
5001
5001
  instanceOf(obj: any): obj is {
5002
- readonly tag: ExternalSecretKeySource_Tags.Encrypted;
5002
+ readonly tag: ExternalSecretSource_Tags.Encrypted;
5003
5003
  readonly inner: Readonly<{
5004
- key: ExternalEncryptedPrivateKey;
5004
+ key: ExternalEncryptedSecret;
5005
5005
  }>;
5006
5006
  /**
5007
5007
  * @private
5008
5008
  * This field is private and should not be used, use `tag` instead.
5009
5009
  */
5010
- readonly [uniffiTypeNameSymbol]: "ExternalSecretKeySource";
5010
+ readonly [uniffiTypeNameSymbol]: "ExternalSecretSource";
5011
5011
  };
5012
5012
  };
5013
5013
  }>;
5014
5014
  /**
5015
- * FFI-safe representation of `spark_wallet::SecretKeySource`
5015
+ * FFI-safe representation of `spark_wallet::SecretSource`
5016
5016
  */
5017
- export type ExternalSecretKeySource = InstanceType<(typeof ExternalSecretKeySource)[keyof Omit<typeof ExternalSecretKeySource, 'instanceOf'>]>;
5017
+ export type ExternalSecretSource = InstanceType<(typeof ExternalSecretSource)[keyof Omit<typeof ExternalSecretSource, 'instanceOf'>]>;
5018
5018
  export declare enum ExternalSecretToSplit_Tags {
5019
- PrivateKey = "PrivateKey",
5019
+ SecretSource = "SecretSource",
5020
5020
  Preimage = "Preimage"
5021
5021
  }
5022
5022
  /**
@@ -5024,13 +5024,13 @@ export declare enum ExternalSecretToSplit_Tags {
5024
5024
  */
5025
5025
  export declare const ExternalSecretToSplit: Readonly<{
5026
5026
  instanceOf: (obj: any) => obj is ExternalSecretToSplit;
5027
- PrivateKey: {
5027
+ SecretSource: {
5028
5028
  new (inner: {
5029
- source: ExternalSecretKeySource;
5029
+ source: ExternalSecretSource;
5030
5030
  }): {
5031
- readonly tag: ExternalSecretToSplit_Tags.PrivateKey;
5031
+ readonly tag: ExternalSecretToSplit_Tags.SecretSource;
5032
5032
  readonly inner: Readonly<{
5033
- source: ExternalSecretKeySource;
5033
+ source: ExternalSecretSource;
5034
5034
  }>;
5035
5035
  /**
5036
5036
  * @private
@@ -5039,11 +5039,11 @@ export declare const ExternalSecretToSplit: Readonly<{
5039
5039
  readonly [uniffiTypeNameSymbol]: "ExternalSecretToSplit";
5040
5040
  };
5041
5041
  "new"(inner: {
5042
- source: ExternalSecretKeySource;
5042
+ source: ExternalSecretSource;
5043
5043
  }): {
5044
- readonly tag: ExternalSecretToSplit_Tags.PrivateKey;
5044
+ readonly tag: ExternalSecretToSplit_Tags.SecretSource;
5045
5045
  readonly inner: Readonly<{
5046
- source: ExternalSecretKeySource;
5046
+ source: ExternalSecretSource;
5047
5047
  }>;
5048
5048
  /**
5049
5049
  * @private
@@ -5052,9 +5052,9 @@ export declare const ExternalSecretToSplit: Readonly<{
5052
5052
  readonly [uniffiTypeNameSymbol]: "ExternalSecretToSplit";
5053
5053
  };
5054
5054
  instanceOf(obj: any): obj is {
5055
- readonly tag: ExternalSecretToSplit_Tags.PrivateKey;
5055
+ readonly tag: ExternalSecretToSplit_Tags.SecretSource;
5056
5056
  readonly inner: Readonly<{
5057
- source: ExternalSecretKeySource;
5057
+ source: ExternalSecretSource;
5058
5058
  }>;
5059
5059
  /**
5060
5060
  * @private
@@ -11625,54 +11625,69 @@ export interface ExternalSigner {
11625
11625
  * * `id` - The tree node identifier
11626
11626
  *
11627
11627
  * # Returns
11628
- * The public key for the node, or an error string
11628
+ * The public key for the node, or a `SignerError`
11629
11629
  */
11630
11630
  getPublicKeyForNode(id: ExternalTreeNodeId, asyncOpts_?: {
11631
11631
  signal: AbortSignal;
11632
11632
  }): Promise<PublicKeyBytes>;
11633
11633
  /**
11634
- * Generates a random secret key.
11634
+ * Generates a random secret that is encrypted and known only to the signer.
11635
+ *
11636
+ * This method creates a new random secret and returns it in encrypted form.
11637
+ * The plaintext secret never leaves the signer boundary, providing a secure way
11638
+ * to create secrets that can be referenced in subsequent operations without
11639
+ * exposing them.
11640
+ *
11641
+ * This is conceptually similar to Spark's key derivation system where secrets
11642
+ * are represented by opaque references (like tree node IDs or Random) rather than raw values.
11643
+ * The encrypted secret can be passed to other signer methods that need to operate
11644
+ * on it, while keeping the actual secret material protected within the signer.
11635
11645
  *
11636
11646
  * # Returns
11637
- * A randomly generated secret key source, or an error string
11647
+ * An encrypted secret that can be used in subsequent signer operations,
11648
+ * or a `SignerError` if generation fails.
11649
+ *
11650
+ * See also: [Key Derivation System](https://docs.spark.money/wallets/spark-signer#the-keyderivation-system)
11638
11651
  */
11639
- generateRandomKey(asyncOpts_?: {
11652
+ generateRandomSecret(asyncOpts_?: {
11640
11653
  signal: AbortSignal;
11641
- }): Promise<ExternalSecretKeySource>;
11654
+ }): Promise<ExternalEncryptedSecret>;
11642
11655
  /**
11643
- * Gets an encrypted static deposit secret key by index.
11656
+ * Gets an encrypted static deposit secret by index.
11644
11657
  *
11645
11658
  * # Arguments
11646
- * * `index` - The index of the static deposit key
11659
+ * * `index` - The index of the static deposit secret
11647
11660
  *
11648
11661
  * # Returns
11649
- * The encrypted secret key, or an error string
11662
+ * The encrypted secret, or a `SignerError`
11663
+ *
11664
+ * This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
11650
11665
  */
11651
- staticDepositSecretKeyEncrypted(index: number, asyncOpts_?: {
11666
+ staticDepositSecretEncrypted(index: number, asyncOpts_?: {
11652
11667
  signal: AbortSignal;
11653
- }): Promise<ExternalSecretKeySource>;
11668
+ }): Promise<ExternalSecretSource>;
11654
11669
  /**
11655
- * Gets a static deposit secret key by index.
11670
+ * Gets a static deposit secret by index.
11656
11671
  *
11657
11672
  * # Arguments
11658
- * * `index` - The index of the static deposit key
11673
+ * * `index` - The index of the static deposit secret
11659
11674
  *
11660
11675
  * # Returns
11661
- * The 32-byte secret key, or an error string
11676
+ * The 32-byte secret, or a `SignerError`
11662
11677
  *
11663
11678
  * See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
11664
11679
  */
11665
- staticDepositSecretKey(index: number, asyncOpts_?: {
11680
+ staticDepositSecret(index: number, asyncOpts_?: {
11666
11681
  signal: AbortSignal;
11667
- }): Promise<PrivateKeyBytes>;
11682
+ }): Promise<SecretBytes>;
11668
11683
  /**
11669
- * Gets a static deposit public key by index.
11684
+ * Gets a static deposit signing public key by index.
11670
11685
  *
11671
11686
  * # Arguments
11672
- * * `index` - The index of the static deposit key
11687
+ * * `index` - The index of the static deposit public signing key
11673
11688
  *
11674
11689
  * # Returns
11675
- * The 33-byte public key, or an error string
11690
+ * The 33-byte public key, or a `SignerError`
11676
11691
  *
11677
11692
  * See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
11678
11693
  */
@@ -11680,21 +11695,21 @@ export interface ExternalSigner {
11680
11695
  signal: AbortSignal;
11681
11696
  }): Promise<PublicKeyBytes>;
11682
11697
  /**
11683
- * Subtracts one secret key from another.
11698
+ * Subtracts one secret from another.
11684
11699
  *
11685
11700
  * # Arguments
11686
- * * `signing_key` - The first secret key source
11687
- * * `new_signing_key` - The second secret key source to subtract
11701
+ * * `signing_key` - The first secret
11702
+ * * `new_signing_key` - The second secret to subtract
11688
11703
  *
11689
11704
  * # Returns
11690
- * The resulting secret key source, or an error string
11705
+ * The resulting secret, or a `SignerError`
11691
11706
  *
11692
11707
  * See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
11693
11708
  * (this method provides the subtraction step of that higher-level operation)
11694
11709
  */
11695
- subtractSecretKeys(signingKey: ExternalSecretKeySource, newSigningKey: ExternalSecretKeySource, asyncOpts_?: {
11710
+ subtractSecrets(signingKey: ExternalSecretSource, newSigningKey: ExternalSecretSource, asyncOpts_?: {
11696
11711
  signal: AbortSignal;
11697
- }): Promise<ExternalSecretKeySource>;
11712
+ }): Promise<ExternalSecretSource>;
11698
11713
  /**
11699
11714
  * Splits a secret with proofs using Shamir's Secret Sharing.
11700
11715
  *
@@ -11704,7 +11719,7 @@ export interface ExternalSigner {
11704
11719
  * * `num_shares` - Total number of shares to create
11705
11720
  *
11706
11721
  * # Returns
11707
- * Vector of verifiable secret shares, or an error string
11722
+ * Vector of verifiable secret shares, or a `SignerError`
11708
11723
  *
11709
11724
  * See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
11710
11725
  */
@@ -11712,28 +11727,30 @@ export interface ExternalSigner {
11712
11727
  signal: AbortSignal;
11713
11728
  }): Promise<Array<ExternalVerifiableSecretShare>>;
11714
11729
  /**
11715
- * Encrypts a secret key for a specific receiver's public key.
11730
+ * Encrypts a secret for a specific receiver's public key.
11716
11731
  *
11717
11732
  * # Arguments
11718
- * * `secret_key` - The encrypted secret key to re-encrypt
11733
+ * * `encrypted_secret` - The encrypted secret to re-encrypt
11719
11734
  * * `receiver_public_key` - The receiver's 33-byte public key
11720
11735
  *
11721
11736
  * # Returns
11722
- * Encrypted data for the receiver, or an error string
11737
+ * Encrypted data for the receiver, or a `SignerError`
11723
11738
  */
11724
- encryptSecretKeyForReceiver(secretKey: ExternalEncryptedPrivateKey, receiverPublicKey: PublicKeyBytes, asyncOpts_?: {
11739
+ encryptSecretForReceiver(encryptedSecret: ExternalEncryptedSecret, receiverPublicKey: PublicKeyBytes, asyncOpts_?: {
11725
11740
  signal: AbortSignal;
11726
11741
  }): Promise<ArrayBuffer>;
11727
11742
  /**
11728
- * Gets the public key from a secret key source.
11743
+ * Gets the public key from a secret.
11729
11744
  *
11730
11745
  * # Arguments
11731
- * * `secret_key` - The secret key source
11746
+ * * `secret` - The secret
11732
11747
  *
11733
11748
  * # Returns
11734
- * The corresponding 33-byte public key, or an error string
11749
+ * The corresponding 33-byte public key, or a `SignerError`
11750
+ *
11751
+ * See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
11735
11752
  */
11736
- publicKeyFromSecretKeySource(secretKey: ExternalSecretKeySource, asyncOpts_?: {
11753
+ publicKeyFromSecret(secret: ExternalSecretSource, asyncOpts_?: {
11737
11754
  signal: AbortSignal;
11738
11755
  }): Promise<PublicKeyBytes>;
11739
11756
  /**
@@ -11743,7 +11760,7 @@ export interface ExternalSigner {
11743
11760
  * * `request` - The Frost signing request
11744
11761
  *
11745
11762
  * # Returns
11746
- * A signature share, or an error string
11763
+ * A signature share, or a `SignerError`
11747
11764
  *
11748
11765
  * See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
11749
11766
  */
@@ -11757,7 +11774,7 @@ export interface ExternalSigner {
11757
11774
  * * `request` - The Frost aggregation request
11758
11775
  *
11759
11776
  * # Returns
11760
- * The aggregated Frost signature, or an error string
11777
+ * The aggregated Frost signature, or a `SignerError`
11761
11778
  *
11762
11779
  * See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
11763
11780
  */
@@ -11907,54 +11924,69 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11907
11924
  * * `id` - The tree node identifier
11908
11925
  *
11909
11926
  * # Returns
11910
- * The public key for the node, or an error string
11927
+ * The public key for the node, or a `SignerError`
11911
11928
  */
11912
11929
  getPublicKeyForNode(id: ExternalTreeNodeId, asyncOpts_?: {
11913
11930
  signal: AbortSignal;
11914
11931
  }): Promise<PublicKeyBytes>;
11915
11932
  /**
11916
- * Generates a random secret key.
11933
+ * Generates a random secret that is encrypted and known only to the signer.
11934
+ *
11935
+ * This method creates a new random secret and returns it in encrypted form.
11936
+ * The plaintext secret never leaves the signer boundary, providing a secure way
11937
+ * to create secrets that can be referenced in subsequent operations without
11938
+ * exposing them.
11939
+ *
11940
+ * This is conceptually similar to Spark's key derivation system where secrets
11941
+ * are represented by opaque references (like tree node IDs or Random) rather than raw values.
11942
+ * The encrypted secret can be passed to other signer methods that need to operate
11943
+ * on it, while keeping the actual secret material protected within the signer.
11917
11944
  *
11918
11945
  * # Returns
11919
- * A randomly generated secret key source, or an error string
11946
+ * An encrypted secret that can be used in subsequent signer operations,
11947
+ * or a `SignerError` if generation fails.
11948
+ *
11949
+ * See also: [Key Derivation System](https://docs.spark.money/wallets/spark-signer#the-keyderivation-system)
11920
11950
  */
11921
- generateRandomKey(asyncOpts_?: {
11951
+ generateRandomSecret(asyncOpts_?: {
11922
11952
  signal: AbortSignal;
11923
- }): Promise<ExternalSecretKeySource>;
11953
+ }): Promise<ExternalEncryptedSecret>;
11924
11954
  /**
11925
- * Gets an encrypted static deposit secret key by index.
11955
+ * Gets an encrypted static deposit secret by index.
11926
11956
  *
11927
11957
  * # Arguments
11928
- * * `index` - The index of the static deposit key
11958
+ * * `index` - The index of the static deposit secret
11929
11959
  *
11930
11960
  * # Returns
11931
- * The encrypted secret key, or an error string
11961
+ * The encrypted secret, or a `SignerError`
11962
+ *
11963
+ * This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
11932
11964
  */
11933
- staticDepositSecretKeyEncrypted(index: number, asyncOpts_?: {
11965
+ staticDepositSecretEncrypted(index: number, asyncOpts_?: {
11934
11966
  signal: AbortSignal;
11935
- }): Promise<ExternalSecretKeySource>;
11967
+ }): Promise<ExternalSecretSource>;
11936
11968
  /**
11937
- * Gets a static deposit secret key by index.
11969
+ * Gets a static deposit secret by index.
11938
11970
  *
11939
11971
  * # Arguments
11940
- * * `index` - The index of the static deposit key
11972
+ * * `index` - The index of the static deposit secret
11941
11973
  *
11942
11974
  * # Returns
11943
- * The 32-byte secret key, or an error string
11975
+ * The 32-byte secret, or a `SignerError`
11944
11976
  *
11945
11977
  * See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
11946
11978
  */
11947
- staticDepositSecretKey(index: number, asyncOpts_?: {
11979
+ staticDepositSecret(index: number, asyncOpts_?: {
11948
11980
  signal: AbortSignal;
11949
- }): Promise<PrivateKeyBytes>;
11981
+ }): Promise<SecretBytes>;
11950
11982
  /**
11951
- * Gets a static deposit public key by index.
11983
+ * Gets a static deposit signing public key by index.
11952
11984
  *
11953
11985
  * # Arguments
11954
- * * `index` - The index of the static deposit key
11986
+ * * `index` - The index of the static deposit public signing key
11955
11987
  *
11956
11988
  * # Returns
11957
- * The 33-byte public key, or an error string
11989
+ * The 33-byte public key, or a `SignerError`
11958
11990
  *
11959
11991
  * See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
11960
11992
  */
@@ -11962,21 +11994,21 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11962
11994
  signal: AbortSignal;
11963
11995
  }): Promise<PublicKeyBytes>;
11964
11996
  /**
11965
- * Subtracts one secret key from another.
11997
+ * Subtracts one secret from another.
11966
11998
  *
11967
11999
  * # Arguments
11968
- * * `signing_key` - The first secret key source
11969
- * * `new_signing_key` - The second secret key source to subtract
12000
+ * * `signing_key` - The first secret
12001
+ * * `new_signing_key` - The second secret to subtract
11970
12002
  *
11971
12003
  * # Returns
11972
- * The resulting secret key source, or an error string
12004
+ * The resulting secret, or a `SignerError`
11973
12005
  *
11974
12006
  * See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
11975
12007
  * (this method provides the subtraction step of that higher-level operation)
11976
12008
  */
11977
- subtractSecretKeys(signingKey: ExternalSecretKeySource, newSigningKey: ExternalSecretKeySource, asyncOpts_?: {
12009
+ subtractSecrets(signingKey: ExternalSecretSource, newSigningKey: ExternalSecretSource, asyncOpts_?: {
11978
12010
  signal: AbortSignal;
11979
- }): Promise<ExternalSecretKeySource>;
12011
+ }): Promise<ExternalSecretSource>;
11980
12012
  /**
11981
12013
  * Splits a secret with proofs using Shamir's Secret Sharing.
11982
12014
  *
@@ -11986,7 +12018,7 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11986
12018
  * * `num_shares` - Total number of shares to create
11987
12019
  *
11988
12020
  * # Returns
11989
- * Vector of verifiable secret shares, or an error string
12021
+ * Vector of verifiable secret shares, or a `SignerError`
11990
12022
  *
11991
12023
  * See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
11992
12024
  */
@@ -11994,28 +12026,30 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11994
12026
  signal: AbortSignal;
11995
12027
  }): Promise<Array<ExternalVerifiableSecretShare>>;
11996
12028
  /**
11997
- * Encrypts a secret key for a specific receiver's public key.
12029
+ * Encrypts a secret for a specific receiver's public key.
11998
12030
  *
11999
12031
  * # Arguments
12000
- * * `secret_key` - The encrypted secret key to re-encrypt
12032
+ * * `encrypted_secret` - The encrypted secret to re-encrypt
12001
12033
  * * `receiver_public_key` - The receiver's 33-byte public key
12002
12034
  *
12003
12035
  * # Returns
12004
- * Encrypted data for the receiver, or an error string
12036
+ * Encrypted data for the receiver, or a `SignerError`
12005
12037
  */
12006
- encryptSecretKeyForReceiver(secretKey: ExternalEncryptedPrivateKey, receiverPublicKey: PublicKeyBytes, asyncOpts_?: {
12038
+ encryptSecretForReceiver(encryptedSecret: ExternalEncryptedSecret, receiverPublicKey: PublicKeyBytes, asyncOpts_?: {
12007
12039
  signal: AbortSignal;
12008
12040
  }): Promise<ArrayBuffer>;
12009
12041
  /**
12010
- * Gets the public key from a secret key source.
12042
+ * Gets the public key from a secret.
12011
12043
  *
12012
12044
  * # Arguments
12013
- * * `secret_key` - The secret key source
12045
+ * * `secret` - The secret
12014
12046
  *
12015
12047
  * # Returns
12016
- * The corresponding 33-byte public key, or an error string
12048
+ * The corresponding 33-byte public key, or a `SignerError`
12049
+ *
12050
+ * See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
12017
12051
  */
12018
- publicKeyFromSecretKeySource(secretKey: ExternalSecretKeySource, asyncOpts_?: {
12052
+ publicKeyFromSecret(secret: ExternalSecretSource, asyncOpts_?: {
12019
12053
  signal: AbortSignal;
12020
12054
  }): Promise<PublicKeyBytes>;
12021
12055
  /**
@@ -12025,7 +12059,7 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
12025
12059
  * * `request` - The Frost signing request
12026
12060
  *
12027
12061
  * # Returns
12028
- * A signature share, or an error string
12062
+ * A signature share, or a `SignerError`
12029
12063
  *
12030
12064
  * See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
12031
12065
  */
@@ -12039,7 +12073,7 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
12039
12073
  * * `request` - The Frost aggregation request
12040
12074
  *
12041
12075
  * # Returns
12042
- * The aggregated Frost signature, or an error string
12076
+ * The aggregated Frost signature, or a `SignerError`
12043
12077
  *
12044
12078
  * See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
12045
12079
  */
@@ -13323,12 +13357,12 @@ declare const _default: Readonly<{
13323
13357
  lift(value: UniffiByteArray): ExternalAggregateFrostRequest;
13324
13358
  lower(value: ExternalAggregateFrostRequest): UniffiByteArray;
13325
13359
  };
13326
- FfiConverterTypeExternalEncryptedPrivateKey: {
13327
- read(from: RustBuffer): ExternalEncryptedPrivateKey;
13328
- write(value: ExternalEncryptedPrivateKey, into: RustBuffer): void;
13329
- allocationSize(value: ExternalEncryptedPrivateKey): number;
13330
- lift(value: UniffiByteArray): ExternalEncryptedPrivateKey;
13331
- lower(value: ExternalEncryptedPrivateKey): UniffiByteArray;
13360
+ FfiConverterTypeExternalEncryptedSecret: {
13361
+ read(from: RustBuffer): ExternalEncryptedSecret;
13362
+ write(value: ExternalEncryptedSecret, into: RustBuffer): void;
13363
+ allocationSize(value: ExternalEncryptedSecret): number;
13364
+ lift(value: UniffiByteArray): ExternalEncryptedSecret;
13365
+ lower(value: ExternalEncryptedSecret): UniffiByteArray;
13332
13366
  };
13333
13367
  FfiConverterTypeExternalFrostCommitments: {
13334
13368
  read(from: RustBuffer): ExternalFrostCommitments;
@@ -13372,13 +13406,6 @@ declare const _default: Readonly<{
13372
13406
  lift(value: UniffiByteArray): ExternalScalar;
13373
13407
  lower(value: ExternalScalar): UniffiByteArray;
13374
13408
  };
13375
- FfiConverterTypeExternalSecretKeySource: {
13376
- read(from: RustBuffer): ExternalSecretKeySource;
13377
- write(value: ExternalSecretKeySource, into: RustBuffer): void;
13378
- allocationSize(value: ExternalSecretKeySource): number;
13379
- lift(value: UniffiByteArray): ExternalSecretKeySource;
13380
- lower(value: ExternalSecretKeySource): UniffiByteArray;
13381
- };
13382
13409
  FfiConverterTypeExternalSecretShare: {
13383
13410
  read(from: RustBuffer): ExternalSecretShare;
13384
13411
  write(value: ExternalSecretShare, into: RustBuffer): void;
@@ -13386,6 +13413,13 @@ declare const _default: Readonly<{
13386
13413
  lift(value: UniffiByteArray): ExternalSecretShare;
13387
13414
  lower(value: ExternalSecretShare): UniffiByteArray;
13388
13415
  };
13416
+ FfiConverterTypeExternalSecretSource: {
13417
+ read(from: RustBuffer): ExternalSecretSource;
13418
+ write(value: ExternalSecretSource, into: RustBuffer): void;
13419
+ allocationSize(value: ExternalSecretSource): number;
13420
+ lift(value: UniffiByteArray): ExternalSecretSource;
13421
+ lower(value: ExternalSecretSource): UniffiByteArray;
13422
+ };
13389
13423
  FfiConverterTypeExternalSecretToSplit: {
13390
13424
  read(from: RustBuffer): ExternalSecretToSplit;
13391
13425
  write(value: ExternalSecretToSplit, into: RustBuffer): void;
@@ -13879,13 +13913,6 @@ declare const _default: Readonly<{
13879
13913
  lift(value: UniffiByteArray): PrepareSendPaymentResponse;
13880
13914
  lower(value: PrepareSendPaymentResponse): UniffiByteArray;
13881
13915
  };
13882
- FfiConverterTypePrivateKeyBytes: {
13883
- read(from: RustBuffer): PrivateKeyBytes;
13884
- write(value: PrivateKeyBytes, into: RustBuffer): void;
13885
- allocationSize(value: PrivateKeyBytes): number;
13886
- lift(value: UniffiByteArray): PrivateKeyBytes;
13887
- lower(value: PrivateKeyBytes): UniffiByteArray;
13888
- };
13889
13916
  FfiConverterTypeProvisionalPayment: {
13890
13917
  read(from: RustBuffer): ProvisionalPayment;
13891
13918
  write(value: ProvisionalPayment, into: RustBuffer): void;
@@ -14014,6 +14041,13 @@ declare const _default: Readonly<{
14014
14041
  lift(value: UniffiByteArray): SdkEvent;
14015
14042
  lower(value: SdkEvent): UniffiByteArray;
14016
14043
  };
14044
+ FfiConverterTypeSecretBytes: {
14045
+ read(from: RustBuffer): SecretBytes;
14046
+ write(value: SecretBytes, into: RustBuffer): void;
14047
+ allocationSize(value: SecretBytes): number;
14048
+ lift(value: UniffiByteArray): SecretBytes;
14049
+ lower(value: SecretBytes): UniffiByteArray;
14050
+ };
14017
14051
  FfiConverterTypeSeed: {
14018
14052
  read(from: RustBuffer): Seed;
14019
14053
  write(value: Seed, into: RustBuffer): void;