@breeztech/breez-sdk-spark-react-native 0.7.7 → 0.7.8
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 +114 -120
- package/cpp/generated/breez_sdk_spark.hpp +10 -10
- package/lib/commonjs/generated/breez_sdk_spark.js +66 -64
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +65 -63
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +17 -17
- 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 +138 -134
- 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 +17 -17
- 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 +138 -134
- 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 +19 -19
- package/src/generated/breez_sdk_spark.ts +249 -247
|
@@ -2854,9 +2854,9 @@ const FfiConverterTypeExternalAggregateFrostRequest = (() => {
|
|
|
2854
2854
|
})();
|
|
2855
2855
|
|
|
2856
2856
|
/**
|
|
2857
|
-
* FFI-safe representation of `spark_wallet::
|
|
2857
|
+
* FFI-safe representation of `spark_wallet::EncryptedSecret`
|
|
2858
2858
|
*/
|
|
2859
|
-
export type
|
|
2859
|
+
export type ExternalEncryptedSecret = {
|
|
2860
2860
|
/**
|
|
2861
2861
|
* The encrypted ciphertext
|
|
2862
2862
|
*/
|
|
@@ -2864,25 +2864,25 @@ export type ExternalEncryptedPrivateKey = {
|
|
|
2864
2864
|
};
|
|
2865
2865
|
|
|
2866
2866
|
/**
|
|
2867
|
-
* Generated factory for {@link
|
|
2867
|
+
* Generated factory for {@link ExternalEncryptedSecret} record objects.
|
|
2868
2868
|
*/
|
|
2869
|
-
export const
|
|
2869
|
+
export const ExternalEncryptedSecret = (() => {
|
|
2870
2870
|
const defaults = () => ({});
|
|
2871
2871
|
const create = (() => {
|
|
2872
2872
|
return uniffiCreateRecord<
|
|
2873
|
-
|
|
2873
|
+
ExternalEncryptedSecret,
|
|
2874
2874
|
ReturnType<typeof defaults>
|
|
2875
2875
|
>(defaults);
|
|
2876
2876
|
})();
|
|
2877
2877
|
return Object.freeze({
|
|
2878
2878
|
/**
|
|
2879
|
-
* Create a frozen instance of {@link
|
|
2879
|
+
* Create a frozen instance of {@link ExternalEncryptedSecret}, with defaults specified
|
|
2880
2880
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2881
2881
|
*/
|
|
2882
2882
|
create,
|
|
2883
2883
|
|
|
2884
2884
|
/**
|
|
2885
|
-
* Create a frozen instance of {@link
|
|
2885
|
+
* Create a frozen instance of {@link ExternalEncryptedSecret}, with defaults specified
|
|
2886
2886
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2887
2887
|
*/
|
|
2888
2888
|
new: create,
|
|
@@ -2891,12 +2891,12 @@ export const ExternalEncryptedPrivateKey = (() => {
|
|
|
2891
2891
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2892
2892
|
*/
|
|
2893
2893
|
defaults: () =>
|
|
2894
|
-
Object.freeze(defaults()) as Partial<
|
|
2894
|
+
Object.freeze(defaults()) as Partial<ExternalEncryptedSecret>,
|
|
2895
2895
|
});
|
|
2896
2896
|
})();
|
|
2897
2897
|
|
|
2898
|
-
const
|
|
2899
|
-
type TypeName =
|
|
2898
|
+
const FfiConverterTypeExternalEncryptedSecret = (() => {
|
|
2899
|
+
type TypeName = ExternalEncryptedSecret;
|
|
2900
2900
|
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2901
2901
|
read(from: RustBuffer): TypeName {
|
|
2902
2902
|
return {
|
|
@@ -3389,7 +3389,7 @@ export type ExternalSignFrostRequest = {
|
|
|
3389
3389
|
/**
|
|
3390
3390
|
* The private key source
|
|
3391
3391
|
*/
|
|
3392
|
-
|
|
3392
|
+
secret: ExternalSecretSource;
|
|
3393
3393
|
/**
|
|
3394
3394
|
* The verifying key (33 bytes compressed)
|
|
3395
3395
|
*/
|
|
@@ -3447,7 +3447,7 @@ const FfiConverterTypeExternalSignFrostRequest = (() => {
|
|
|
3447
3447
|
return {
|
|
3448
3448
|
message: FfiConverterArrayBuffer.read(from),
|
|
3449
3449
|
publicKey: FfiConverterArrayBuffer.read(from),
|
|
3450
|
-
|
|
3450
|
+
secret: FfiConverterTypeExternalSecretSource.read(from),
|
|
3451
3451
|
verifyingKey: FfiConverterArrayBuffer.read(from),
|
|
3452
3452
|
selfNonceCommitment:
|
|
3453
3453
|
FfiConverterTypeExternalFrostCommitments.read(from),
|
|
@@ -3459,7 +3459,7 @@ const FfiConverterTypeExternalSignFrostRequest = (() => {
|
|
|
3459
3459
|
write(value: TypeName, into: RustBuffer): void {
|
|
3460
3460
|
FfiConverterArrayBuffer.write(value.message, into);
|
|
3461
3461
|
FfiConverterArrayBuffer.write(value.publicKey, into);
|
|
3462
|
-
|
|
3462
|
+
FfiConverterTypeExternalSecretSource.write(value.secret, into);
|
|
3463
3463
|
FfiConverterArrayBuffer.write(value.verifyingKey, into);
|
|
3464
3464
|
FfiConverterTypeExternalFrostCommitments.write(
|
|
3465
3465
|
value.selfNonceCommitment,
|
|
@@ -3475,9 +3475,7 @@ const FfiConverterTypeExternalSignFrostRequest = (() => {
|
|
|
3475
3475
|
return (
|
|
3476
3476
|
FfiConverterArrayBuffer.allocationSize(value.message) +
|
|
3477
3477
|
FfiConverterArrayBuffer.allocationSize(value.publicKey) +
|
|
3478
|
-
|
|
3479
|
-
value.privateKey
|
|
3480
|
-
) +
|
|
3478
|
+
FfiConverterTypeExternalSecretSource.allocationSize(value.secret) +
|
|
3481
3479
|
FfiConverterArrayBuffer.allocationSize(value.verifyingKey) +
|
|
3482
3480
|
FfiConverterTypeExternalFrostCommitments.allocationSize(
|
|
3483
3481
|
value.selfNonceCommitment
|
|
@@ -7189,61 +7187,6 @@ const FfiConverterTypePrepareSendPaymentResponse = (() => {
|
|
|
7189
7187
|
return new FFIConverter();
|
|
7190
7188
|
})();
|
|
7191
7189
|
|
|
7192
|
-
/**
|
|
7193
|
-
* FFI-safe representation of a private key (32 bytes)
|
|
7194
|
-
*/
|
|
7195
|
-
export type PrivateKeyBytes = {
|
|
7196
|
-
bytes: ArrayBuffer;
|
|
7197
|
-
};
|
|
7198
|
-
|
|
7199
|
-
/**
|
|
7200
|
-
* Generated factory for {@link PrivateKeyBytes} record objects.
|
|
7201
|
-
*/
|
|
7202
|
-
export const PrivateKeyBytes = (() => {
|
|
7203
|
-
const defaults = () => ({});
|
|
7204
|
-
const create = (() => {
|
|
7205
|
-
return uniffiCreateRecord<PrivateKeyBytes, ReturnType<typeof defaults>>(
|
|
7206
|
-
defaults
|
|
7207
|
-
);
|
|
7208
|
-
})();
|
|
7209
|
-
return Object.freeze({
|
|
7210
|
-
/**
|
|
7211
|
-
* Create a frozen instance of {@link PrivateKeyBytes}, with defaults specified
|
|
7212
|
-
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
7213
|
-
*/
|
|
7214
|
-
create,
|
|
7215
|
-
|
|
7216
|
-
/**
|
|
7217
|
-
* Create a frozen instance of {@link PrivateKeyBytes}, with defaults specified
|
|
7218
|
-
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
7219
|
-
*/
|
|
7220
|
-
new: create,
|
|
7221
|
-
|
|
7222
|
-
/**
|
|
7223
|
-
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
7224
|
-
*/
|
|
7225
|
-
defaults: () => Object.freeze(defaults()) as Partial<PrivateKeyBytes>,
|
|
7226
|
-
});
|
|
7227
|
-
})();
|
|
7228
|
-
|
|
7229
|
-
const FfiConverterTypePrivateKeyBytes = (() => {
|
|
7230
|
-
type TypeName = PrivateKeyBytes;
|
|
7231
|
-
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
7232
|
-
read(from: RustBuffer): TypeName {
|
|
7233
|
-
return {
|
|
7234
|
-
bytes: FfiConverterArrayBuffer.read(from),
|
|
7235
|
-
};
|
|
7236
|
-
}
|
|
7237
|
-
write(value: TypeName, into: RustBuffer): void {
|
|
7238
|
-
FfiConverterArrayBuffer.write(value.bytes, into);
|
|
7239
|
-
}
|
|
7240
|
-
allocationSize(value: TypeName): number {
|
|
7241
|
-
return FfiConverterArrayBuffer.allocationSize(value.bytes);
|
|
7242
|
-
}
|
|
7243
|
-
}
|
|
7244
|
-
return new FFIConverter();
|
|
7245
|
-
})();
|
|
7246
|
-
|
|
7247
7190
|
export type ProvisionalPayment = {
|
|
7248
7191
|
/**
|
|
7249
7192
|
* Unique identifier for the payment
|
|
@@ -8161,6 +8104,61 @@ const FfiConverterTypeSchnorrSignatureBytes = (() => {
|
|
|
8161
8104
|
return new FFIConverter();
|
|
8162
8105
|
})();
|
|
8163
8106
|
|
|
8107
|
+
/**
|
|
8108
|
+
* FFI-safe representation of a private key (32 bytes)
|
|
8109
|
+
*/
|
|
8110
|
+
export type SecretBytes = {
|
|
8111
|
+
bytes: ArrayBuffer;
|
|
8112
|
+
};
|
|
8113
|
+
|
|
8114
|
+
/**
|
|
8115
|
+
* Generated factory for {@link SecretBytes} record objects.
|
|
8116
|
+
*/
|
|
8117
|
+
export const SecretBytes = (() => {
|
|
8118
|
+
const defaults = () => ({});
|
|
8119
|
+
const create = (() => {
|
|
8120
|
+
return uniffiCreateRecord<SecretBytes, ReturnType<typeof defaults>>(
|
|
8121
|
+
defaults
|
|
8122
|
+
);
|
|
8123
|
+
})();
|
|
8124
|
+
return Object.freeze({
|
|
8125
|
+
/**
|
|
8126
|
+
* Create a frozen instance of {@link SecretBytes}, with defaults specified
|
|
8127
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
8128
|
+
*/
|
|
8129
|
+
create,
|
|
8130
|
+
|
|
8131
|
+
/**
|
|
8132
|
+
* Create a frozen instance of {@link SecretBytes}, with defaults specified
|
|
8133
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
8134
|
+
*/
|
|
8135
|
+
new: create,
|
|
8136
|
+
|
|
8137
|
+
/**
|
|
8138
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
8139
|
+
*/
|
|
8140
|
+
defaults: () => Object.freeze(defaults()) as Partial<SecretBytes>,
|
|
8141
|
+
});
|
|
8142
|
+
})();
|
|
8143
|
+
|
|
8144
|
+
const FfiConverterTypeSecretBytes = (() => {
|
|
8145
|
+
type TypeName = SecretBytes;
|
|
8146
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
8147
|
+
read(from: RustBuffer): TypeName {
|
|
8148
|
+
return {
|
|
8149
|
+
bytes: FfiConverterArrayBuffer.read(from),
|
|
8150
|
+
};
|
|
8151
|
+
}
|
|
8152
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
8153
|
+
FfiConverterArrayBuffer.write(value.bytes, into);
|
|
8154
|
+
}
|
|
8155
|
+
allocationSize(value: TypeName): number {
|
|
8156
|
+
return FfiConverterArrayBuffer.allocationSize(value.bytes);
|
|
8157
|
+
}
|
|
8158
|
+
}
|
|
8159
|
+
return new FFIConverter();
|
|
8160
|
+
})();
|
|
8161
|
+
|
|
8164
8162
|
export type SendOnchainFeeQuote = {
|
|
8165
8163
|
id: string;
|
|
8166
8164
|
expiresAt: /*u64*/ bigint;
|
|
@@ -11213,17 +11211,17 @@ const FfiConverterTypeDepositClaimError = (() => {
|
|
|
11213
11211
|
return new FFIConverter();
|
|
11214
11212
|
})();
|
|
11215
11213
|
|
|
11216
|
-
// Enum:
|
|
11217
|
-
export enum
|
|
11214
|
+
// Enum: ExternalSecretSource
|
|
11215
|
+
export enum ExternalSecretSource_Tags {
|
|
11218
11216
|
Derived = 'Derived',
|
|
11219
11217
|
Encrypted = 'Encrypted',
|
|
11220
11218
|
}
|
|
11221
11219
|
/**
|
|
11222
|
-
* FFI-safe representation of `spark_wallet::
|
|
11220
|
+
* FFI-safe representation of `spark_wallet::SecretSource`
|
|
11223
11221
|
*/
|
|
11224
|
-
export const
|
|
11222
|
+
export const ExternalSecretSource = (() => {
|
|
11225
11223
|
type Derived__interface = {
|
|
11226
|
-
tag:
|
|
11224
|
+
tag: ExternalSecretSource_Tags.Derived;
|
|
11227
11225
|
inner: Readonly<{ nodeId: ExternalTreeNodeId }>;
|
|
11228
11226
|
};
|
|
11229
11227
|
|
|
@@ -11235,11 +11233,11 @@ export const ExternalSecretKeySource = (() => {
|
|
|
11235
11233
|
* @private
|
|
11236
11234
|
* This field is private and should not be used, use `tag` instead.
|
|
11237
11235
|
*/
|
|
11238
|
-
readonly [uniffiTypeNameSymbol] = '
|
|
11239
|
-
readonly tag =
|
|
11236
|
+
readonly [uniffiTypeNameSymbol] = 'ExternalSecretSource';
|
|
11237
|
+
readonly tag = ExternalSecretSource_Tags.Derived;
|
|
11240
11238
|
readonly inner: Readonly<{ nodeId: ExternalTreeNodeId }>;
|
|
11241
11239
|
constructor(inner: { nodeId: ExternalTreeNodeId }) {
|
|
11242
|
-
super('
|
|
11240
|
+
super('ExternalSecretSource', 'Derived');
|
|
11243
11241
|
this.inner = Object.freeze(inner);
|
|
11244
11242
|
}
|
|
11245
11243
|
|
|
@@ -11248,13 +11246,13 @@ export const ExternalSecretKeySource = (() => {
|
|
|
11248
11246
|
}
|
|
11249
11247
|
|
|
11250
11248
|
static instanceOf(obj: any): obj is Derived_ {
|
|
11251
|
-
return obj.tag ===
|
|
11249
|
+
return obj.tag === ExternalSecretSource_Tags.Derived;
|
|
11252
11250
|
}
|
|
11253
11251
|
}
|
|
11254
11252
|
|
|
11255
11253
|
type Encrypted__interface = {
|
|
11256
|
-
tag:
|
|
11257
|
-
inner: Readonly<{ key:
|
|
11254
|
+
tag: ExternalSecretSource_Tags.Encrypted;
|
|
11255
|
+
inner: Readonly<{ key: ExternalEncryptedSecret }>;
|
|
11258
11256
|
};
|
|
11259
11257
|
|
|
11260
11258
|
/**
|
|
@@ -11265,25 +11263,25 @@ export const ExternalSecretKeySource = (() => {
|
|
|
11265
11263
|
* @private
|
|
11266
11264
|
* This field is private and should not be used, use `tag` instead.
|
|
11267
11265
|
*/
|
|
11268
|
-
readonly [uniffiTypeNameSymbol] = '
|
|
11269
|
-
readonly tag =
|
|
11270
|
-
readonly inner: Readonly<{ key:
|
|
11271
|
-
constructor(inner: { key:
|
|
11272
|
-
super('
|
|
11266
|
+
readonly [uniffiTypeNameSymbol] = 'ExternalSecretSource';
|
|
11267
|
+
readonly tag = ExternalSecretSource_Tags.Encrypted;
|
|
11268
|
+
readonly inner: Readonly<{ key: ExternalEncryptedSecret }>;
|
|
11269
|
+
constructor(inner: { key: ExternalEncryptedSecret }) {
|
|
11270
|
+
super('ExternalSecretSource', 'Encrypted');
|
|
11273
11271
|
this.inner = Object.freeze(inner);
|
|
11274
11272
|
}
|
|
11275
11273
|
|
|
11276
|
-
static new(inner: { key:
|
|
11274
|
+
static new(inner: { key: ExternalEncryptedSecret }): Encrypted_ {
|
|
11277
11275
|
return new Encrypted_(inner);
|
|
11278
11276
|
}
|
|
11279
11277
|
|
|
11280
11278
|
static instanceOf(obj: any): obj is Encrypted_ {
|
|
11281
|
-
return obj.tag ===
|
|
11279
|
+
return obj.tag === ExternalSecretSource_Tags.Encrypted;
|
|
11282
11280
|
}
|
|
11283
11281
|
}
|
|
11284
11282
|
|
|
11285
|
-
function instanceOf(obj: any): obj is
|
|
11286
|
-
return obj[uniffiTypeNameSymbol] === '
|
|
11283
|
+
function instanceOf(obj: any): obj is ExternalSecretSource {
|
|
11284
|
+
return obj[uniffiTypeNameSymbol] === 'ExternalSecretSource';
|
|
11287
11285
|
}
|
|
11288
11286
|
|
|
11289
11287
|
return Object.freeze({
|
|
@@ -11294,30 +11292,30 @@ export const ExternalSecretKeySource = (() => {
|
|
|
11294
11292
|
})();
|
|
11295
11293
|
|
|
11296
11294
|
/**
|
|
11297
|
-
* FFI-safe representation of `spark_wallet::
|
|
11295
|
+
* FFI-safe representation of `spark_wallet::SecretSource`
|
|
11298
11296
|
*/
|
|
11299
11297
|
|
|
11300
|
-
export type
|
|
11301
|
-
(typeof
|
|
11302
|
-
typeof
|
|
11298
|
+
export type ExternalSecretSource = InstanceType<
|
|
11299
|
+
(typeof ExternalSecretSource)[keyof Omit<
|
|
11300
|
+
typeof ExternalSecretSource,
|
|
11303
11301
|
'instanceOf'
|
|
11304
11302
|
>]
|
|
11305
11303
|
>;
|
|
11306
11304
|
|
|
11307
|
-
// FfiConverter for enum
|
|
11308
|
-
const
|
|
11305
|
+
// FfiConverter for enum ExternalSecretSource
|
|
11306
|
+
const FfiConverterTypeExternalSecretSource = (() => {
|
|
11309
11307
|
const ordinalConverter = FfiConverterInt32;
|
|
11310
|
-
type TypeName =
|
|
11308
|
+
type TypeName = ExternalSecretSource;
|
|
11311
11309
|
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
11312
11310
|
read(from: RustBuffer): TypeName {
|
|
11313
11311
|
switch (ordinalConverter.read(from)) {
|
|
11314
11312
|
case 1:
|
|
11315
|
-
return new
|
|
11313
|
+
return new ExternalSecretSource.Derived({
|
|
11316
11314
|
nodeId: FfiConverterTypeExternalTreeNodeId.read(from),
|
|
11317
11315
|
});
|
|
11318
11316
|
case 2:
|
|
11319
|
-
return new
|
|
11320
|
-
key:
|
|
11317
|
+
return new ExternalSecretSource.Encrypted({
|
|
11318
|
+
key: FfiConverterTypeExternalEncryptedSecret.read(from),
|
|
11321
11319
|
});
|
|
11322
11320
|
default:
|
|
11323
11321
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -11325,26 +11323,26 @@ const FfiConverterTypeExternalSecretKeySource = (() => {
|
|
|
11325
11323
|
}
|
|
11326
11324
|
write(value: TypeName, into: RustBuffer): void {
|
|
11327
11325
|
switch (value.tag) {
|
|
11328
|
-
case
|
|
11326
|
+
case ExternalSecretSource_Tags.Derived: {
|
|
11329
11327
|
ordinalConverter.write(1, into);
|
|
11330
11328
|
const inner = value.inner;
|
|
11331
11329
|
FfiConverterTypeExternalTreeNodeId.write(inner.nodeId, into);
|
|
11332
11330
|
return;
|
|
11333
11331
|
}
|
|
11334
|
-
case
|
|
11332
|
+
case ExternalSecretSource_Tags.Encrypted: {
|
|
11335
11333
|
ordinalConverter.write(2, into);
|
|
11336
11334
|
const inner = value.inner;
|
|
11337
|
-
|
|
11335
|
+
FfiConverterTypeExternalEncryptedSecret.write(inner.key, into);
|
|
11338
11336
|
return;
|
|
11339
11337
|
}
|
|
11340
11338
|
default:
|
|
11341
|
-
// Throwing from here means that
|
|
11339
|
+
// Throwing from here means that ExternalSecretSource_Tags hasn't matched an ordinal.
|
|
11342
11340
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
11343
11341
|
}
|
|
11344
11342
|
}
|
|
11345
11343
|
allocationSize(value: TypeName): number {
|
|
11346
11344
|
switch (value.tag) {
|
|
11347
|
-
case
|
|
11345
|
+
case ExternalSecretSource_Tags.Derived: {
|
|
11348
11346
|
const inner = value.inner;
|
|
11349
11347
|
let size = ordinalConverter.allocationSize(1);
|
|
11350
11348
|
size += FfiConverterTypeExternalTreeNodeId.allocationSize(
|
|
@@ -11352,10 +11350,10 @@ const FfiConverterTypeExternalSecretKeySource = (() => {
|
|
|
11352
11350
|
);
|
|
11353
11351
|
return size;
|
|
11354
11352
|
}
|
|
11355
|
-
case
|
|
11353
|
+
case ExternalSecretSource_Tags.Encrypted: {
|
|
11356
11354
|
const inner = value.inner;
|
|
11357
11355
|
let size = ordinalConverter.allocationSize(2);
|
|
11358
|
-
size +=
|
|
11356
|
+
size += FfiConverterTypeExternalEncryptedSecret.allocationSize(
|
|
11359
11357
|
inner.key
|
|
11360
11358
|
);
|
|
11361
11359
|
return size;
|
|
@@ -11370,40 +11368,40 @@ const FfiConverterTypeExternalSecretKeySource = (() => {
|
|
|
11370
11368
|
|
|
11371
11369
|
// Enum: ExternalSecretToSplit
|
|
11372
11370
|
export enum ExternalSecretToSplit_Tags {
|
|
11373
|
-
|
|
11371
|
+
SecretSource = 'SecretSource',
|
|
11374
11372
|
Preimage = 'Preimage',
|
|
11375
11373
|
}
|
|
11376
11374
|
/**
|
|
11377
11375
|
* FFI-safe representation of `spark_wallet::SecretToSplit`
|
|
11378
11376
|
*/
|
|
11379
11377
|
export const ExternalSecretToSplit = (() => {
|
|
11380
|
-
type
|
|
11381
|
-
tag: ExternalSecretToSplit_Tags.
|
|
11382
|
-
inner: Readonly<{ source:
|
|
11378
|
+
type SecretSource__interface = {
|
|
11379
|
+
tag: ExternalSecretToSplit_Tags.SecretSource;
|
|
11380
|
+
inner: Readonly<{ source: ExternalSecretSource }>;
|
|
11383
11381
|
};
|
|
11384
11382
|
|
|
11385
11383
|
/**
|
|
11386
|
-
* A
|
|
11384
|
+
* A secret source to split
|
|
11387
11385
|
*/
|
|
11388
|
-
class
|
|
11386
|
+
class SecretSource_ extends UniffiEnum implements SecretSource__interface {
|
|
11389
11387
|
/**
|
|
11390
11388
|
* @private
|
|
11391
11389
|
* This field is private and should not be used, use `tag` instead.
|
|
11392
11390
|
*/
|
|
11393
11391
|
readonly [uniffiTypeNameSymbol] = 'ExternalSecretToSplit';
|
|
11394
|
-
readonly tag = ExternalSecretToSplit_Tags.
|
|
11395
|
-
readonly inner: Readonly<{ source:
|
|
11396
|
-
constructor(inner: { source:
|
|
11397
|
-
super('ExternalSecretToSplit', '
|
|
11392
|
+
readonly tag = ExternalSecretToSplit_Tags.SecretSource;
|
|
11393
|
+
readonly inner: Readonly<{ source: ExternalSecretSource }>;
|
|
11394
|
+
constructor(inner: { source: ExternalSecretSource }) {
|
|
11395
|
+
super('ExternalSecretToSplit', 'SecretSource');
|
|
11398
11396
|
this.inner = Object.freeze(inner);
|
|
11399
11397
|
}
|
|
11400
11398
|
|
|
11401
|
-
static new(inner: { source:
|
|
11402
|
-
return new
|
|
11399
|
+
static new(inner: { source: ExternalSecretSource }): SecretSource_ {
|
|
11400
|
+
return new SecretSource_(inner);
|
|
11403
11401
|
}
|
|
11404
11402
|
|
|
11405
|
-
static instanceOf(obj: any): obj is
|
|
11406
|
-
return obj.tag === ExternalSecretToSplit_Tags.
|
|
11403
|
+
static instanceOf(obj: any): obj is SecretSource_ {
|
|
11404
|
+
return obj.tag === ExternalSecretToSplit_Tags.SecretSource;
|
|
11407
11405
|
}
|
|
11408
11406
|
}
|
|
11409
11407
|
|
|
@@ -11443,7 +11441,7 @@ export const ExternalSecretToSplit = (() => {
|
|
|
11443
11441
|
|
|
11444
11442
|
return Object.freeze({
|
|
11445
11443
|
instanceOf,
|
|
11446
|
-
|
|
11444
|
+
SecretSource: SecretSource_,
|
|
11447
11445
|
Preimage: Preimage_,
|
|
11448
11446
|
});
|
|
11449
11447
|
})();
|
|
@@ -11467,8 +11465,8 @@ const FfiConverterTypeExternalSecretToSplit = (() => {
|
|
|
11467
11465
|
read(from: RustBuffer): TypeName {
|
|
11468
11466
|
switch (ordinalConverter.read(from)) {
|
|
11469
11467
|
case 1:
|
|
11470
|
-
return new ExternalSecretToSplit.
|
|
11471
|
-
source:
|
|
11468
|
+
return new ExternalSecretToSplit.SecretSource({
|
|
11469
|
+
source: FfiConverterTypeExternalSecretSource.read(from),
|
|
11472
11470
|
});
|
|
11473
11471
|
case 2:
|
|
11474
11472
|
return new ExternalSecretToSplit.Preimage({
|
|
@@ -11480,10 +11478,10 @@ const FfiConverterTypeExternalSecretToSplit = (() => {
|
|
|
11480
11478
|
}
|
|
11481
11479
|
write(value: TypeName, into: RustBuffer): void {
|
|
11482
11480
|
switch (value.tag) {
|
|
11483
|
-
case ExternalSecretToSplit_Tags.
|
|
11481
|
+
case ExternalSecretToSplit_Tags.SecretSource: {
|
|
11484
11482
|
ordinalConverter.write(1, into);
|
|
11485
11483
|
const inner = value.inner;
|
|
11486
|
-
|
|
11484
|
+
FfiConverterTypeExternalSecretSource.write(inner.source, into);
|
|
11487
11485
|
return;
|
|
11488
11486
|
}
|
|
11489
11487
|
case ExternalSecretToSplit_Tags.Preimage: {
|
|
@@ -11499,10 +11497,10 @@ const FfiConverterTypeExternalSecretToSplit = (() => {
|
|
|
11499
11497
|
}
|
|
11500
11498
|
allocationSize(value: TypeName): number {
|
|
11501
11499
|
switch (value.tag) {
|
|
11502
|
-
case ExternalSecretToSplit_Tags.
|
|
11500
|
+
case ExternalSecretToSplit_Tags.SecretSource: {
|
|
11503
11501
|
const inner = value.inner;
|
|
11504
11502
|
let size = ordinalConverter.allocationSize(1);
|
|
11505
|
-
size +=
|
|
11503
|
+
size += FfiConverterTypeExternalSecretSource.allocationSize(
|
|
11506
11504
|
inner.source
|
|
11507
11505
|
);
|
|
11508
11506
|
return size;
|
|
@@ -21210,42 +21208,44 @@ export interface ExternalSigner {
|
|
|
21210
21208
|
asyncOpts_?: { signal: AbortSignal }
|
|
21211
21209
|
): /*throws*/ Promise<PublicKeyBytes>;
|
|
21212
21210
|
/**
|
|
21213
|
-
* Generates a random secret
|
|
21211
|
+
* Generates a random secret.
|
|
21214
21212
|
*
|
|
21215
21213
|
* # Returns
|
|
21216
|
-
* A randomly generated secret
|
|
21214
|
+
* A randomly generated secret source, or an error string
|
|
21217
21215
|
*/
|
|
21218
21216
|
generateRandomKey(asyncOpts_?: {
|
|
21219
21217
|
signal: AbortSignal;
|
|
21220
|
-
}): /*throws*/ Promise<
|
|
21218
|
+
}): /*throws*/ Promise<ExternalSecretSource>;
|
|
21221
21219
|
/**
|
|
21222
|
-
* Gets an encrypted static deposit secret
|
|
21220
|
+
* Gets an encrypted static deposit secret by index.
|
|
21223
21221
|
*
|
|
21224
21222
|
* # Arguments
|
|
21225
21223
|
* * `index` - The index of the static deposit key
|
|
21226
21224
|
*
|
|
21227
21225
|
* # Returns
|
|
21228
|
-
* The encrypted secret
|
|
21226
|
+
* The encrypted secret source, or an error string
|
|
21227
|
+
*
|
|
21228
|
+
* This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
21229
21229
|
*/
|
|
21230
|
-
|
|
21230
|
+
staticDepositSecretEncrypted(
|
|
21231
21231
|
index: /*u32*/ number,
|
|
21232
21232
|
asyncOpts_?: { signal: AbortSignal }
|
|
21233
|
-
): /*throws*/ Promise<
|
|
21233
|
+
): /*throws*/ Promise<ExternalSecretSource>;
|
|
21234
21234
|
/**
|
|
21235
|
-
* Gets a static deposit secret
|
|
21235
|
+
* Gets a static deposit secret by index.
|
|
21236
21236
|
*
|
|
21237
21237
|
* # Arguments
|
|
21238
21238
|
* * `index` - The index of the static deposit key
|
|
21239
21239
|
*
|
|
21240
21240
|
* # Returns
|
|
21241
|
-
* The 32-byte secret
|
|
21241
|
+
* The 32-byte secret, or an error string
|
|
21242
21242
|
*
|
|
21243
21243
|
* See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
21244
21244
|
*/
|
|
21245
|
-
|
|
21245
|
+
staticDepositSecret(
|
|
21246
21246
|
index: /*u32*/ number,
|
|
21247
21247
|
asyncOpts_?: { signal: AbortSignal }
|
|
21248
|
-
): /*throws*/ Promise<
|
|
21248
|
+
): /*throws*/ Promise<SecretBytes>;
|
|
21249
21249
|
/**
|
|
21250
21250
|
* Gets a static deposit public key by index.
|
|
21251
21251
|
*
|
|
@@ -21262,23 +21262,23 @@ export interface ExternalSigner {
|
|
|
21262
21262
|
asyncOpts_?: { signal: AbortSignal }
|
|
21263
21263
|
): /*throws*/ Promise<PublicKeyBytes>;
|
|
21264
21264
|
/**
|
|
21265
|
-
* Subtracts one secret
|
|
21265
|
+
* Subtracts one secret from another.
|
|
21266
21266
|
*
|
|
21267
21267
|
* # Arguments
|
|
21268
|
-
* * `signing_key` - The first secret
|
|
21269
|
-
* * `new_signing_key` - The second secret
|
|
21268
|
+
* * `signing_key` - The first secret source
|
|
21269
|
+
* * `new_signing_key` - The second secret source to subtract
|
|
21270
21270
|
*
|
|
21271
21271
|
* # Returns
|
|
21272
|
-
* The resulting secret
|
|
21272
|
+
* The resulting secret source, or an error string
|
|
21273
21273
|
*
|
|
21274
21274
|
* See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
21275
21275
|
* (this method provides the subtraction step of that higher-level operation)
|
|
21276
21276
|
*/
|
|
21277
|
-
|
|
21278
|
-
signingKey:
|
|
21279
|
-
newSigningKey:
|
|
21277
|
+
subtractSecrets(
|
|
21278
|
+
signingKey: ExternalSecretSource,
|
|
21279
|
+
newSigningKey: ExternalSecretSource,
|
|
21280
21280
|
asyncOpts_?: { signal: AbortSignal }
|
|
21281
|
-
): /*throws*/ Promise<
|
|
21281
|
+
): /*throws*/ Promise<ExternalSecretSource>;
|
|
21282
21282
|
/**
|
|
21283
21283
|
* Splits a secret with proofs using Shamir's Secret Sharing.
|
|
21284
21284
|
*
|
|
@@ -21299,31 +21299,31 @@ export interface ExternalSigner {
|
|
|
21299
21299
|
asyncOpts_?: { signal: AbortSignal }
|
|
21300
21300
|
): /*throws*/ Promise<Array<ExternalVerifiableSecretShare>>;
|
|
21301
21301
|
/**
|
|
21302
|
-
* Encrypts a secret
|
|
21302
|
+
* Encrypts a secret for a specific receiver's public key.
|
|
21303
21303
|
*
|
|
21304
21304
|
* # Arguments
|
|
21305
|
-
* * `
|
|
21305
|
+
* * `encrypted_secret` - The encrypted secret to re-encrypt
|
|
21306
21306
|
* * `receiver_public_key` - The receiver's 33-byte public key
|
|
21307
21307
|
*
|
|
21308
21308
|
* # Returns
|
|
21309
21309
|
* Encrypted data for the receiver, or an error string
|
|
21310
21310
|
*/
|
|
21311
|
-
|
|
21312
|
-
|
|
21311
|
+
encryptSecretForReceiver(
|
|
21312
|
+
encryptedSecret: ExternalEncryptedSecret,
|
|
21313
21313
|
receiverPublicKey: PublicKeyBytes,
|
|
21314
21314
|
asyncOpts_?: { signal: AbortSignal }
|
|
21315
21315
|
): /*throws*/ Promise<ArrayBuffer>;
|
|
21316
21316
|
/**
|
|
21317
|
-
* Gets the public key from a secret
|
|
21317
|
+
* Gets the public key from a secret source.
|
|
21318
21318
|
*
|
|
21319
21319
|
* # Arguments
|
|
21320
|
-
* * `
|
|
21320
|
+
* * `secret` - The secret source
|
|
21321
21321
|
*
|
|
21322
21322
|
* # Returns
|
|
21323
21323
|
* The corresponding 33-byte public key, or an error string
|
|
21324
21324
|
*/
|
|
21325
|
-
|
|
21326
|
-
|
|
21325
|
+
publicKeyFromSecret(
|
|
21326
|
+
secret: ExternalSecretSource,
|
|
21327
21327
|
asyncOpts_?: { signal: AbortSignal }
|
|
21328
21328
|
): /*throws*/ Promise<PublicKeyBytes>;
|
|
21329
21329
|
/**
|
|
@@ -21866,14 +21866,14 @@ export class ExternalSignerImpl
|
|
|
21866
21866
|
}
|
|
21867
21867
|
|
|
21868
21868
|
/**
|
|
21869
|
-
* Generates a random secret
|
|
21869
|
+
* Generates a random secret.
|
|
21870
21870
|
*
|
|
21871
21871
|
* # Returns
|
|
21872
|
-
* A randomly generated secret
|
|
21872
|
+
* A randomly generated secret source, or an error string
|
|
21873
21873
|
*/
|
|
21874
21874
|
public async generateRandomKey(asyncOpts_?: {
|
|
21875
21875
|
signal: AbortSignal;
|
|
21876
|
-
}): Promise<
|
|
21876
|
+
}): Promise<ExternalSecretSource> /*throws*/ {
|
|
21877
21877
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
21878
21878
|
try {
|
|
21879
21879
|
return await uniffiRustCallAsync(
|
|
@@ -21891,8 +21891,8 @@ export class ExternalSignerImpl
|
|
|
21891
21891
|
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
21892
21892
|
/*freeFunc:*/ nativeModule()
|
|
21893
21893
|
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
21894
|
-
/*liftFunc:*/
|
|
21895
|
-
|
|
21894
|
+
/*liftFunc:*/ FfiConverterTypeExternalSecretSource.lift.bind(
|
|
21895
|
+
FfiConverterTypeExternalSecretSource
|
|
21896
21896
|
),
|
|
21897
21897
|
/*liftString:*/ FfiConverterString.lift,
|
|
21898
21898
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -21909,24 +21909,26 @@ export class ExternalSignerImpl
|
|
|
21909
21909
|
}
|
|
21910
21910
|
|
|
21911
21911
|
/**
|
|
21912
|
-
* Gets an encrypted static deposit secret
|
|
21912
|
+
* Gets an encrypted static deposit secret by index.
|
|
21913
21913
|
*
|
|
21914
21914
|
* # Arguments
|
|
21915
21915
|
* * `index` - The index of the static deposit key
|
|
21916
21916
|
*
|
|
21917
21917
|
* # Returns
|
|
21918
|
-
* The encrypted secret
|
|
21918
|
+
* The encrypted secret source, or an error string
|
|
21919
|
+
*
|
|
21920
|
+
* This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
21919
21921
|
*/
|
|
21920
|
-
public async
|
|
21922
|
+
public async staticDepositSecretEncrypted(
|
|
21921
21923
|
index: /*u32*/ number,
|
|
21922
21924
|
asyncOpts_?: { signal: AbortSignal }
|
|
21923
|
-
): Promise<
|
|
21925
|
+
): Promise<ExternalSecretSource> /*throws*/ {
|
|
21924
21926
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
21925
21927
|
try {
|
|
21926
21928
|
return await uniffiRustCallAsync(
|
|
21927
21929
|
/*rustCaller:*/ uniffiCaller,
|
|
21928
21930
|
/*rustFutureFunc:*/ () => {
|
|
21929
|
-
return nativeModule().
|
|
21931
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_encrypted(
|
|
21930
21932
|
uniffiTypeExternalSignerImplObjectFactory.clonePointer(this),
|
|
21931
21933
|
FfiConverterUInt32.lower(index)
|
|
21932
21934
|
);
|
|
@@ -21939,8 +21941,8 @@ export class ExternalSignerImpl
|
|
|
21939
21941
|
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
21940
21942
|
/*freeFunc:*/ nativeModule()
|
|
21941
21943
|
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
21942
|
-
/*liftFunc:*/
|
|
21943
|
-
|
|
21944
|
+
/*liftFunc:*/ FfiConverterTypeExternalSecretSource.lift.bind(
|
|
21945
|
+
FfiConverterTypeExternalSecretSource
|
|
21944
21946
|
),
|
|
21945
21947
|
/*liftString:*/ FfiConverterString.lift,
|
|
21946
21948
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -21957,26 +21959,26 @@ export class ExternalSignerImpl
|
|
|
21957
21959
|
}
|
|
21958
21960
|
|
|
21959
21961
|
/**
|
|
21960
|
-
* Gets a static deposit secret
|
|
21962
|
+
* Gets a static deposit secret by index.
|
|
21961
21963
|
*
|
|
21962
21964
|
* # Arguments
|
|
21963
21965
|
* * `index` - The index of the static deposit key
|
|
21964
21966
|
*
|
|
21965
21967
|
* # Returns
|
|
21966
|
-
* The 32-byte secret
|
|
21968
|
+
* The 32-byte secret, or an error string
|
|
21967
21969
|
*
|
|
21968
21970
|
* See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
21969
21971
|
*/
|
|
21970
|
-
public async
|
|
21972
|
+
public async staticDepositSecret(
|
|
21971
21973
|
index: /*u32*/ number,
|
|
21972
21974
|
asyncOpts_?: { signal: AbortSignal }
|
|
21973
|
-
): Promise<
|
|
21975
|
+
): Promise<SecretBytes> /*throws*/ {
|
|
21974
21976
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
21975
21977
|
try {
|
|
21976
21978
|
return await uniffiRustCallAsync(
|
|
21977
21979
|
/*rustCaller:*/ uniffiCaller,
|
|
21978
21980
|
/*rustFutureFunc:*/ () => {
|
|
21979
|
-
return nativeModule().
|
|
21981
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret(
|
|
21980
21982
|
uniffiTypeExternalSignerImplObjectFactory.clonePointer(this),
|
|
21981
21983
|
FfiConverterUInt32.lower(index)
|
|
21982
21984
|
);
|
|
@@ -21989,8 +21991,8 @@ export class ExternalSignerImpl
|
|
|
21989
21991
|
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
21990
21992
|
/*freeFunc:*/ nativeModule()
|
|
21991
21993
|
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
21992
|
-
/*liftFunc:*/
|
|
21993
|
-
|
|
21994
|
+
/*liftFunc:*/ FfiConverterTypeSecretBytes.lift.bind(
|
|
21995
|
+
FfiConverterTypeSecretBytes
|
|
21994
21996
|
),
|
|
21995
21997
|
/*liftString:*/ FfiConverterString.lift,
|
|
21996
21998
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -22057,32 +22059,32 @@ export class ExternalSignerImpl
|
|
|
22057
22059
|
}
|
|
22058
22060
|
|
|
22059
22061
|
/**
|
|
22060
|
-
* Subtracts one secret
|
|
22062
|
+
* Subtracts one secret from another.
|
|
22061
22063
|
*
|
|
22062
22064
|
* # Arguments
|
|
22063
|
-
* * `signing_key` - The first secret
|
|
22064
|
-
* * `new_signing_key` - The second secret
|
|
22065
|
+
* * `signing_key` - The first secret source
|
|
22066
|
+
* * `new_signing_key` - The second secret source to subtract
|
|
22065
22067
|
*
|
|
22066
22068
|
* # Returns
|
|
22067
|
-
* The resulting secret
|
|
22069
|
+
* The resulting secret source, or an error string
|
|
22068
22070
|
*
|
|
22069
22071
|
* See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
22070
22072
|
* (this method provides the subtraction step of that higher-level operation)
|
|
22071
22073
|
*/
|
|
22072
|
-
public async
|
|
22073
|
-
signingKey:
|
|
22074
|
-
newSigningKey:
|
|
22074
|
+
public async subtractSecrets(
|
|
22075
|
+
signingKey: ExternalSecretSource,
|
|
22076
|
+
newSigningKey: ExternalSecretSource,
|
|
22075
22077
|
asyncOpts_?: { signal: AbortSignal }
|
|
22076
|
-
): Promise<
|
|
22078
|
+
): Promise<ExternalSecretSource> /*throws*/ {
|
|
22077
22079
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
22078
22080
|
try {
|
|
22079
22081
|
return await uniffiRustCallAsync(
|
|
22080
22082
|
/*rustCaller:*/ uniffiCaller,
|
|
22081
22083
|
/*rustFutureFunc:*/ () => {
|
|
22082
|
-
return nativeModule().
|
|
22084
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets(
|
|
22083
22085
|
uniffiTypeExternalSignerImplObjectFactory.clonePointer(this),
|
|
22084
|
-
|
|
22085
|
-
|
|
22086
|
+
FfiConverterTypeExternalSecretSource.lower(signingKey),
|
|
22087
|
+
FfiConverterTypeExternalSecretSource.lower(newSigningKey)
|
|
22086
22088
|
);
|
|
22087
22089
|
},
|
|
22088
22090
|
/*pollFunc:*/ nativeModule()
|
|
@@ -22093,8 +22095,8 @@ export class ExternalSignerImpl
|
|
|
22093
22095
|
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
22094
22096
|
/*freeFunc:*/ nativeModule()
|
|
22095
22097
|
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
22096
|
-
/*liftFunc:*/
|
|
22097
|
-
|
|
22098
|
+
/*liftFunc:*/ FfiConverterTypeExternalSecretSource.lift.bind(
|
|
22099
|
+
FfiConverterTypeExternalSecretSource
|
|
22098
22100
|
),
|
|
22099
22101
|
/*liftString:*/ FfiConverterString.lift,
|
|
22100
22102
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -22167,17 +22169,17 @@ export class ExternalSignerImpl
|
|
|
22167
22169
|
}
|
|
22168
22170
|
|
|
22169
22171
|
/**
|
|
22170
|
-
* Encrypts a secret
|
|
22172
|
+
* Encrypts a secret for a specific receiver's public key.
|
|
22171
22173
|
*
|
|
22172
22174
|
* # Arguments
|
|
22173
|
-
* * `
|
|
22175
|
+
* * `encrypted_secret` - The encrypted secret to re-encrypt
|
|
22174
22176
|
* * `receiver_public_key` - The receiver's 33-byte public key
|
|
22175
22177
|
*
|
|
22176
22178
|
* # Returns
|
|
22177
22179
|
* Encrypted data for the receiver, or an error string
|
|
22178
22180
|
*/
|
|
22179
|
-
public async
|
|
22180
|
-
|
|
22181
|
+
public async encryptSecretForReceiver(
|
|
22182
|
+
encryptedSecret: ExternalEncryptedSecret,
|
|
22181
22183
|
receiverPublicKey: PublicKeyBytes,
|
|
22182
22184
|
asyncOpts_?: { signal: AbortSignal }
|
|
22183
22185
|
): Promise<ArrayBuffer> /*throws*/ {
|
|
@@ -22186,9 +22188,9 @@ export class ExternalSignerImpl
|
|
|
22186
22188
|
return await uniffiRustCallAsync(
|
|
22187
22189
|
/*rustCaller:*/ uniffiCaller,
|
|
22188
22190
|
/*rustFutureFunc:*/ () => {
|
|
22189
|
-
return nativeModule().
|
|
22191
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver(
|
|
22190
22192
|
uniffiTypeExternalSignerImplObjectFactory.clonePointer(this),
|
|
22191
|
-
|
|
22193
|
+
FfiConverterTypeExternalEncryptedSecret.lower(encryptedSecret),
|
|
22192
22194
|
FfiConverterTypePublicKeyBytes.lower(receiverPublicKey)
|
|
22193
22195
|
);
|
|
22194
22196
|
},
|
|
@@ -22218,16 +22220,16 @@ export class ExternalSignerImpl
|
|
|
22218
22220
|
}
|
|
22219
22221
|
|
|
22220
22222
|
/**
|
|
22221
|
-
* Gets the public key from a secret
|
|
22223
|
+
* Gets the public key from a secret source.
|
|
22222
22224
|
*
|
|
22223
22225
|
* # Arguments
|
|
22224
|
-
* * `
|
|
22226
|
+
* * `secret` - The secret source
|
|
22225
22227
|
*
|
|
22226
22228
|
* # Returns
|
|
22227
22229
|
* The corresponding 33-byte public key, or an error string
|
|
22228
22230
|
*/
|
|
22229
|
-
public async
|
|
22230
|
-
|
|
22231
|
+
public async publicKeyFromSecret(
|
|
22232
|
+
secret: ExternalSecretSource,
|
|
22231
22233
|
asyncOpts_?: { signal: AbortSignal }
|
|
22232
22234
|
): Promise<PublicKeyBytes> /*throws*/ {
|
|
22233
22235
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
@@ -22235,9 +22237,9 @@ export class ExternalSignerImpl
|
|
|
22235
22237
|
return await uniffiRustCallAsync(
|
|
22236
22238
|
/*rustCaller:*/ uniffiCaller,
|
|
22237
22239
|
/*rustFutureFunc:*/ () => {
|
|
22238
|
-
return nativeModule().
|
|
22240
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret(
|
|
22239
22241
|
uniffiTypeExternalSignerImplObjectFactory.clonePointer(this),
|
|
22240
|
-
|
|
22242
|
+
FfiConverterTypeExternalSecretSource.lower(secret)
|
|
22241
22243
|
);
|
|
22242
22244
|
},
|
|
22243
22245
|
/*pollFunc:*/ nativeModule()
|
|
@@ -22920,16 +22922,16 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
22920
22922
|
) => {
|
|
22921
22923
|
const uniffiMakeCall = async (
|
|
22922
22924
|
signal: AbortSignal
|
|
22923
|
-
): Promise<
|
|
22925
|
+
): Promise<ExternalSecretSource> => {
|
|
22924
22926
|
const jsCallback = FfiConverterTypeExternalSigner.lift(uniffiHandle);
|
|
22925
22927
|
return await jsCallback.generateRandomKey({ signal });
|
|
22926
22928
|
};
|
|
22927
|
-
const uniffiHandleSuccess = (returnValue:
|
|
22929
|
+
const uniffiHandleSuccess = (returnValue: ExternalSecretSource) => {
|
|
22928
22930
|
uniffiFutureCallback(
|
|
22929
22931
|
uniffiCallbackData,
|
|
22930
22932
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
22931
22933
|
returnValue:
|
|
22932
|
-
|
|
22934
|
+
FfiConverterTypeExternalSecretSource.lower(returnValue),
|
|
22933
22935
|
callStatus: uniffiCaller.createCallStatus(),
|
|
22934
22936
|
}
|
|
22935
22937
|
);
|
|
@@ -22956,7 +22958,7 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
22956
22958
|
);
|
|
22957
22959
|
return UniffiResult.success(uniffiForeignFuture);
|
|
22958
22960
|
},
|
|
22959
|
-
|
|
22961
|
+
staticDepositSecretEncrypted: (
|
|
22960
22962
|
uniffiHandle: bigint,
|
|
22961
22963
|
index: number,
|
|
22962
22964
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
@@ -22964,19 +22966,19 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
22964
22966
|
) => {
|
|
22965
22967
|
const uniffiMakeCall = async (
|
|
22966
22968
|
signal: AbortSignal
|
|
22967
|
-
): Promise<
|
|
22969
|
+
): Promise<ExternalSecretSource> => {
|
|
22968
22970
|
const jsCallback = FfiConverterTypeExternalSigner.lift(uniffiHandle);
|
|
22969
|
-
return await jsCallback.
|
|
22971
|
+
return await jsCallback.staticDepositSecretEncrypted(
|
|
22970
22972
|
FfiConverterUInt32.lift(index),
|
|
22971
22973
|
{ signal }
|
|
22972
22974
|
);
|
|
22973
22975
|
};
|
|
22974
|
-
const uniffiHandleSuccess = (returnValue:
|
|
22976
|
+
const uniffiHandleSuccess = (returnValue: ExternalSecretSource) => {
|
|
22975
22977
|
uniffiFutureCallback(
|
|
22976
22978
|
uniffiCallbackData,
|
|
22977
22979
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
22978
22980
|
returnValue:
|
|
22979
|
-
|
|
22981
|
+
FfiConverterTypeExternalSecretSource.lower(returnValue),
|
|
22980
22982
|
callStatus: uniffiCaller.createCallStatus(),
|
|
22981
22983
|
}
|
|
22982
22984
|
);
|
|
@@ -23003,7 +23005,7 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23003
23005
|
);
|
|
23004
23006
|
return UniffiResult.success(uniffiForeignFuture);
|
|
23005
23007
|
},
|
|
23006
|
-
|
|
23008
|
+
staticDepositSecret: (
|
|
23007
23009
|
uniffiHandle: bigint,
|
|
23008
23010
|
index: number,
|
|
23009
23011
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
@@ -23011,18 +23013,18 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23011
23013
|
) => {
|
|
23012
23014
|
const uniffiMakeCall = async (
|
|
23013
23015
|
signal: AbortSignal
|
|
23014
|
-
): Promise<
|
|
23016
|
+
): Promise<SecretBytes> => {
|
|
23015
23017
|
const jsCallback = FfiConverterTypeExternalSigner.lift(uniffiHandle);
|
|
23016
|
-
return await jsCallback.
|
|
23018
|
+
return await jsCallback.staticDepositSecret(
|
|
23017
23019
|
FfiConverterUInt32.lift(index),
|
|
23018
23020
|
{ signal }
|
|
23019
23021
|
);
|
|
23020
23022
|
};
|
|
23021
|
-
const uniffiHandleSuccess = (returnValue:
|
|
23023
|
+
const uniffiHandleSuccess = (returnValue: SecretBytes) => {
|
|
23022
23024
|
uniffiFutureCallback(
|
|
23023
23025
|
uniffiCallbackData,
|
|
23024
23026
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
23025
|
-
returnValue:
|
|
23027
|
+
returnValue: FfiConverterTypeSecretBytes.lower(returnValue),
|
|
23026
23028
|
callStatus: uniffiCaller.createCallStatus(),
|
|
23027
23029
|
}
|
|
23028
23030
|
);
|
|
@@ -23095,7 +23097,7 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23095
23097
|
);
|
|
23096
23098
|
return UniffiResult.success(uniffiForeignFuture);
|
|
23097
23099
|
},
|
|
23098
|
-
|
|
23100
|
+
subtractSecrets: (
|
|
23099
23101
|
uniffiHandle: bigint,
|
|
23100
23102
|
signingKey: Uint8Array,
|
|
23101
23103
|
newSigningKey: Uint8Array,
|
|
@@ -23104,20 +23106,20 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23104
23106
|
) => {
|
|
23105
23107
|
const uniffiMakeCall = async (
|
|
23106
23108
|
signal: AbortSignal
|
|
23107
|
-
): Promise<
|
|
23109
|
+
): Promise<ExternalSecretSource> => {
|
|
23108
23110
|
const jsCallback = FfiConverterTypeExternalSigner.lift(uniffiHandle);
|
|
23109
|
-
return await jsCallback.
|
|
23110
|
-
|
|
23111
|
-
|
|
23111
|
+
return await jsCallback.subtractSecrets(
|
|
23112
|
+
FfiConverterTypeExternalSecretSource.lift(signingKey),
|
|
23113
|
+
FfiConverterTypeExternalSecretSource.lift(newSigningKey),
|
|
23112
23114
|
{ signal }
|
|
23113
23115
|
);
|
|
23114
23116
|
};
|
|
23115
|
-
const uniffiHandleSuccess = (returnValue:
|
|
23117
|
+
const uniffiHandleSuccess = (returnValue: ExternalSecretSource) => {
|
|
23116
23118
|
uniffiFutureCallback(
|
|
23117
23119
|
uniffiCallbackData,
|
|
23118
23120
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
23119
23121
|
returnValue:
|
|
23120
|
-
|
|
23122
|
+
FfiConverterTypeExternalSecretSource.lower(returnValue),
|
|
23121
23123
|
callStatus: uniffiCaller.createCallStatus(),
|
|
23122
23124
|
}
|
|
23123
23125
|
);
|
|
@@ -23199,9 +23201,9 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23199
23201
|
);
|
|
23200
23202
|
return UniffiResult.success(uniffiForeignFuture);
|
|
23201
23203
|
},
|
|
23202
|
-
|
|
23204
|
+
encryptSecretForReceiver: (
|
|
23203
23205
|
uniffiHandle: bigint,
|
|
23204
|
-
|
|
23206
|
+
encryptedSecret: Uint8Array,
|
|
23205
23207
|
receiverPublicKey: Uint8Array,
|
|
23206
23208
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
23207
23209
|
uniffiCallbackData: bigint
|
|
@@ -23210,8 +23212,8 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23210
23212
|
signal: AbortSignal
|
|
23211
23213
|
): Promise<ArrayBuffer> => {
|
|
23212
23214
|
const jsCallback = FfiConverterTypeExternalSigner.lift(uniffiHandle);
|
|
23213
|
-
return await jsCallback.
|
|
23214
|
-
|
|
23215
|
+
return await jsCallback.encryptSecretForReceiver(
|
|
23216
|
+
FfiConverterTypeExternalEncryptedSecret.lift(encryptedSecret),
|
|
23215
23217
|
FfiConverterTypePublicKeyBytes.lift(receiverPublicKey),
|
|
23216
23218
|
{ signal }
|
|
23217
23219
|
);
|
|
@@ -23247,9 +23249,9 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23247
23249
|
);
|
|
23248
23250
|
return UniffiResult.success(uniffiForeignFuture);
|
|
23249
23251
|
},
|
|
23250
|
-
|
|
23252
|
+
publicKeyFromSecret: (
|
|
23251
23253
|
uniffiHandle: bigint,
|
|
23252
|
-
|
|
23254
|
+
secret: Uint8Array,
|
|
23253
23255
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
23254
23256
|
uniffiCallbackData: bigint
|
|
23255
23257
|
) => {
|
|
@@ -23257,8 +23259,8 @@ const uniffiCallbackInterfaceExternalSigner: {
|
|
|
23257
23259
|
signal: AbortSignal
|
|
23258
23260
|
): Promise<PublicKeyBytes> => {
|
|
23259
23261
|
const jsCallback = FfiConverterTypeExternalSigner.lift(uniffiHandle);
|
|
23260
|
-
return await jsCallback.
|
|
23261
|
-
|
|
23262
|
+
return await jsCallback.publicKeyFromSecret(
|
|
23263
|
+
FfiConverterTypeExternalSecretSource.lift(secret),
|
|
23262
23264
|
{ signal }
|
|
23263
23265
|
);
|
|
23264
23266
|
};
|
|
@@ -28801,26 +28803,26 @@ function uniffiEnsureInitialized() {
|
|
|
28801
28803
|
}
|
|
28802
28804
|
if (
|
|
28803
28805
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_key() !==
|
|
28804
|
-
|
|
28806
|
+
63908
|
|
28805
28807
|
) {
|
|
28806
28808
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
28807
28809
|
'uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_key'
|
|
28808
28810
|
);
|
|
28809
28811
|
}
|
|
28810
28812
|
if (
|
|
28811
|
-
nativeModule().
|
|
28812
|
-
|
|
28813
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted() !==
|
|
28814
|
+
64635
|
|
28813
28815
|
) {
|
|
28814
28816
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
28815
|
-
'
|
|
28817
|
+
'uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted'
|
|
28816
28818
|
);
|
|
28817
28819
|
}
|
|
28818
28820
|
if (
|
|
28819
|
-
nativeModule().
|
|
28820
|
-
|
|
28821
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret() !==
|
|
28822
|
+
35967
|
|
28821
28823
|
) {
|
|
28822
28824
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
28823
|
-
'
|
|
28825
|
+
'uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret'
|
|
28824
28826
|
);
|
|
28825
28827
|
}
|
|
28826
28828
|
if (
|
|
@@ -28832,11 +28834,11 @@ function uniffiEnsureInitialized() {
|
|
|
28832
28834
|
);
|
|
28833
28835
|
}
|
|
28834
28836
|
if (
|
|
28835
|
-
nativeModule().
|
|
28836
|
-
|
|
28837
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets() !==
|
|
28838
|
+
43864
|
|
28837
28839
|
) {
|
|
28838
28840
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
28839
|
-
'
|
|
28841
|
+
'uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets'
|
|
28840
28842
|
);
|
|
28841
28843
|
}
|
|
28842
28844
|
if (
|
|
@@ -28848,19 +28850,19 @@ function uniffiEnsureInitialized() {
|
|
|
28848
28850
|
);
|
|
28849
28851
|
}
|
|
28850
28852
|
if (
|
|
28851
|
-
nativeModule().
|
|
28852
|
-
|
|
28853
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver() !==
|
|
28854
|
+
61924
|
|
28853
28855
|
) {
|
|
28854
28856
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
28855
|
-
'
|
|
28857
|
+
'uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver'
|
|
28856
28858
|
);
|
|
28857
28859
|
}
|
|
28858
28860
|
if (
|
|
28859
|
-
nativeModule().
|
|
28860
|
-
|
|
28861
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret() !==
|
|
28862
|
+
27909
|
|
28861
28863
|
) {
|
|
28862
28864
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
28863
|
-
'
|
|
28865
|
+
'uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret'
|
|
28864
28866
|
);
|
|
28865
28867
|
}
|
|
28866
28868
|
if (
|
|
@@ -29332,15 +29334,15 @@ export default Object.freeze({
|
|
|
29332
29334
|
FfiConverterTypeDepositInfo,
|
|
29333
29335
|
FfiConverterTypeEcdsaSignatureBytes,
|
|
29334
29336
|
FfiConverterTypeExternalAggregateFrostRequest,
|
|
29335
|
-
|
|
29337
|
+
FfiConverterTypeExternalEncryptedSecret,
|
|
29336
29338
|
FfiConverterTypeExternalFrostCommitments,
|
|
29337
29339
|
FfiConverterTypeExternalFrostSignature,
|
|
29338
29340
|
FfiConverterTypeExternalFrostSignatureShare,
|
|
29339
29341
|
FfiConverterTypeExternalIdentifier,
|
|
29340
29342
|
FfiConverterTypeExternalInputParser,
|
|
29341
29343
|
FfiConverterTypeExternalScalar,
|
|
29342
|
-
FfiConverterTypeExternalSecretKeySource,
|
|
29343
29344
|
FfiConverterTypeExternalSecretShare,
|
|
29345
|
+
FfiConverterTypeExternalSecretSource,
|
|
29344
29346
|
FfiConverterTypeExternalSecretToSplit,
|
|
29345
29347
|
FfiConverterTypeExternalSignFrostRequest,
|
|
29346
29348
|
FfiConverterTypeExternalSigner,
|
|
@@ -29414,7 +29416,6 @@ export default Object.freeze({
|
|
|
29414
29416
|
FfiConverterTypePrepareLnurlPayResponse,
|
|
29415
29417
|
FfiConverterTypePrepareSendPaymentRequest,
|
|
29416
29418
|
FfiConverterTypePrepareSendPaymentResponse,
|
|
29417
|
-
FfiConverterTypePrivateKeyBytes,
|
|
29418
29419
|
FfiConverterTypeProvisionalPayment,
|
|
29419
29420
|
FfiConverterTypeProvisionalPaymentDetails,
|
|
29420
29421
|
FfiConverterTypePublicKeyBytes,
|
|
@@ -29435,6 +29436,7 @@ export default Object.freeze({
|
|
|
29435
29436
|
FfiConverterTypeSchnorrSignatureBytes,
|
|
29436
29437
|
FfiConverterTypeSdkBuilder,
|
|
29437
29438
|
FfiConverterTypeSdkEvent,
|
|
29439
|
+
FfiConverterTypeSecretBytes,
|
|
29438
29440
|
FfiConverterTypeSeed,
|
|
29439
29441
|
FfiConverterTypeSendOnchainFeeQuote,
|
|
29440
29442
|
FfiConverterTypeSendOnchainSpeedFeeQuote,
|