@breeztech/breez-sdk-spark-react-native 0.18.0 → 0.19.0

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.
@@ -460,6 +460,59 @@ export function defaultServerConfig(network: Network): Config {
460
460
  )
461
461
  );
462
462
  }
463
+ /**
464
+ * The session store `backend` provides for `identity` on `network` (its own
465
+ * persistence: `PostgreSQL`/`MySQL` when the backend is DB-backed, else an
466
+ * in-memory store).
467
+ *
468
+ * Returned so it can be wrapped in a decorating [`SessionStore`] and passed to
469
+ * [`SdkBuilder::with_session_store`](crate::SdkBuilder::with_session_store),
470
+ * keeping the backend's persistence. A typical use is at-rest encryption (the
471
+ * SDK does not encrypt tokens itself): wrap it in a store that encrypts on
472
+ * write and decrypts on read. `identity` is the wallet identity public key
473
+ * bytes (the same value the SDK derives from the signer).
474
+ */
475
+ export async function defaultSessionStore(
476
+ backend: StorageBackend,
477
+ network: Network,
478
+ identity: ArrayBuffer,
479
+ asyncOpts_?: { signal: AbortSignal }
480
+ ): Promise<SessionStore> /*throws*/ {
481
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
482
+ try {
483
+ return await uniffiRustCallAsync(
484
+ /*rustCaller:*/ uniffiCaller,
485
+ /*rustFutureFunc:*/ () => {
486
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_func_default_session_store(
487
+ FfiConverterTypeStorageBackend.lower(backend),
488
+ FfiConverterTypeNetwork.lower(network),
489
+ FfiConverterArrayBuffer.lower(identity)
490
+ );
491
+ },
492
+ /*pollFunc:*/ nativeModule()
493
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_pointer,
494
+ /*cancelFunc:*/ nativeModule()
495
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_pointer,
496
+ /*completeFunc:*/ nativeModule()
497
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_pointer,
498
+ /*freeFunc:*/ nativeModule()
499
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_pointer,
500
+ /*liftFunc:*/ FfiConverterTypeSessionStore.lift.bind(
501
+ FfiConverterTypeSessionStore
502
+ ),
503
+ /*liftString:*/ FfiConverterString.lift,
504
+ /*asyncOpts:*/ asyncOpts_,
505
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
506
+ FfiConverterTypeSdkError
507
+ )
508
+ );
509
+ } catch (__error: any) {
510
+ if (uniffiIsDebug && __error instanceof Error) {
511
+ __error.stack = __stack;
512
+ }
513
+ throw __error;
514
+ }
515
+ }
463
516
  /**
464
517
  * File-based `SQLite` storage rooted at `storage_dir` — the default for
465
518
  * mobile and desktop apps. Each tenant gets its own database file under the
@@ -1887,6 +1940,135 @@ const FfiConverterTypeBolt12OfferDetails = (() => {
1887
1940
  return new FFIConverter();
1888
1941
  })();
1889
1942
 
1943
+ export type BuildUnsignedLnurlPayPackageRequest = {
1944
+ prepareResponse: PrepareLnurlPayResponse;
1945
+ };
1946
+
1947
+ /**
1948
+ * Generated factory for {@link BuildUnsignedLnurlPayPackageRequest} record objects.
1949
+ */
1950
+ export const BuildUnsignedLnurlPayPackageRequest = (() => {
1951
+ const defaults = () => ({});
1952
+ const create = (() => {
1953
+ return uniffiCreateRecord<
1954
+ BuildUnsignedLnurlPayPackageRequest,
1955
+ ReturnType<typeof defaults>
1956
+ >(defaults);
1957
+ })();
1958
+ return Object.freeze({
1959
+ /**
1960
+ * Create a frozen instance of {@link BuildUnsignedLnurlPayPackageRequest}, with defaults specified
1961
+ * in Rust, in the {@link breez_sdk_spark} crate.
1962
+ */
1963
+ create,
1964
+
1965
+ /**
1966
+ * Create a frozen instance of {@link BuildUnsignedLnurlPayPackageRequest}, with defaults specified
1967
+ * in Rust, in the {@link breez_sdk_spark} crate.
1968
+ */
1969
+ new: create,
1970
+
1971
+ /**
1972
+ * Defaults specified in the {@link breez_sdk_spark} crate.
1973
+ */
1974
+ defaults: () =>
1975
+ Object.freeze(defaults()) as Partial<BuildUnsignedLnurlPayPackageRequest>,
1976
+ });
1977
+ })();
1978
+
1979
+ const FfiConverterTypeBuildUnsignedLnurlPayPackageRequest = (() => {
1980
+ type TypeName = BuildUnsignedLnurlPayPackageRequest;
1981
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1982
+ read(from: RustBuffer): TypeName {
1983
+ return {
1984
+ prepareResponse: FfiConverterTypePrepareLnurlPayResponse.read(from),
1985
+ };
1986
+ }
1987
+ write(value: TypeName, into: RustBuffer): void {
1988
+ FfiConverterTypePrepareLnurlPayResponse.write(
1989
+ value.prepareResponse,
1990
+ into
1991
+ );
1992
+ }
1993
+ allocationSize(value: TypeName): number {
1994
+ return FfiConverterTypePrepareLnurlPayResponse.allocationSize(
1995
+ value.prepareResponse
1996
+ );
1997
+ }
1998
+ }
1999
+ return new FFIConverter();
2000
+ })();
2001
+
2002
+ export type BuildUnsignedTransferPackageRequest = {
2003
+ prepareResponse: PrepareSendPaymentResponse;
2004
+ options: BuildTransferPackageOptions | undefined;
2005
+ };
2006
+
2007
+ /**
2008
+ * Generated factory for {@link BuildUnsignedTransferPackageRequest} record objects.
2009
+ */
2010
+ export const BuildUnsignedTransferPackageRequest = (() => {
2011
+ const defaults = () => ({ options: undefined });
2012
+ const create = (() => {
2013
+ return uniffiCreateRecord<
2014
+ BuildUnsignedTransferPackageRequest,
2015
+ ReturnType<typeof defaults>
2016
+ >(defaults);
2017
+ })();
2018
+ return Object.freeze({
2019
+ /**
2020
+ * Create a frozen instance of {@link BuildUnsignedTransferPackageRequest}, with defaults specified
2021
+ * in Rust, in the {@link breez_sdk_spark} crate.
2022
+ */
2023
+ create,
2024
+
2025
+ /**
2026
+ * Create a frozen instance of {@link BuildUnsignedTransferPackageRequest}, with defaults specified
2027
+ * in Rust, in the {@link breez_sdk_spark} crate.
2028
+ */
2029
+ new: create,
2030
+
2031
+ /**
2032
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2033
+ */
2034
+ defaults: () =>
2035
+ Object.freeze(defaults()) as Partial<BuildUnsignedTransferPackageRequest>,
2036
+ });
2037
+ })();
2038
+
2039
+ const FfiConverterTypeBuildUnsignedTransferPackageRequest = (() => {
2040
+ type TypeName = BuildUnsignedTransferPackageRequest;
2041
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2042
+ read(from: RustBuffer): TypeName {
2043
+ return {
2044
+ prepareResponse: FfiConverterTypePrepareSendPaymentResponse.read(from),
2045
+ options: FfiConverterOptionalTypeBuildTransferPackageOptions.read(from),
2046
+ };
2047
+ }
2048
+ write(value: TypeName, into: RustBuffer): void {
2049
+ FfiConverterTypePrepareSendPaymentResponse.write(
2050
+ value.prepareResponse,
2051
+ into
2052
+ );
2053
+ FfiConverterOptionalTypeBuildTransferPackageOptions.write(
2054
+ value.options,
2055
+ into
2056
+ );
2057
+ }
2058
+ allocationSize(value: TypeName): number {
2059
+ return (
2060
+ FfiConverterTypePrepareSendPaymentResponse.allocationSize(
2061
+ value.prepareResponse
2062
+ ) +
2063
+ FfiConverterOptionalTypeBuildTransferPackageOptions.allocationSize(
2064
+ value.options
2065
+ )
2066
+ );
2067
+ }
2068
+ }
2069
+ return new FFIConverter();
2070
+ })();
2071
+
1890
2072
  export type BurnIssuerTokenRequest = {
1891
2073
  amount: U128;
1892
2074
  };
@@ -8580,6 +8762,72 @@ const FfiConverterTypeLnurlInfo = (() => {
8580
8762
  return new FFIConverter();
8581
8763
  })();
8582
8764
 
8765
+ export type LnurlPayContext = {
8766
+ payRequest: LnurlPayRequestDetails;
8767
+ comment: string | undefined;
8768
+ successAction: SuccessAction | undefined;
8769
+ };
8770
+
8771
+ /**
8772
+ * Generated factory for {@link LnurlPayContext} record objects.
8773
+ */
8774
+ export const LnurlPayContext = (() => {
8775
+ const defaults = () => ({});
8776
+ const create = (() => {
8777
+ return uniffiCreateRecord<LnurlPayContext, ReturnType<typeof defaults>>(
8778
+ defaults
8779
+ );
8780
+ })();
8781
+ return Object.freeze({
8782
+ /**
8783
+ * Create a frozen instance of {@link LnurlPayContext}, with defaults specified
8784
+ * in Rust, in the {@link breez_sdk_spark} crate.
8785
+ */
8786
+ create,
8787
+
8788
+ /**
8789
+ * Create a frozen instance of {@link LnurlPayContext}, with defaults specified
8790
+ * in Rust, in the {@link breez_sdk_spark} crate.
8791
+ */
8792
+ new: create,
8793
+
8794
+ /**
8795
+ * Defaults specified in the {@link breez_sdk_spark} crate.
8796
+ */
8797
+ defaults: () => Object.freeze(defaults()) as Partial<LnurlPayContext>,
8798
+ });
8799
+ })();
8800
+
8801
+ const FfiConverterTypeLnurlPayContext = (() => {
8802
+ type TypeName = LnurlPayContext;
8803
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
8804
+ read(from: RustBuffer): TypeName {
8805
+ return {
8806
+ payRequest: FfiConverterTypeLnurlPayRequestDetails.read(from),
8807
+ comment: FfiConverterOptionalString.read(from),
8808
+ successAction: FfiConverterOptionalTypeSuccessAction.read(from),
8809
+ };
8810
+ }
8811
+ write(value: TypeName, into: RustBuffer): void {
8812
+ FfiConverterTypeLnurlPayRequestDetails.write(value.payRequest, into);
8813
+ FfiConverterOptionalString.write(value.comment, into);
8814
+ FfiConverterOptionalTypeSuccessAction.write(value.successAction, into);
8815
+ }
8816
+ allocationSize(value: TypeName): number {
8817
+ return (
8818
+ FfiConverterTypeLnurlPayRequestDetails.allocationSize(
8819
+ value.payRequest
8820
+ ) +
8821
+ FfiConverterOptionalString.allocationSize(value.comment) +
8822
+ FfiConverterOptionalTypeSuccessAction.allocationSize(
8823
+ value.successAction
8824
+ )
8825
+ );
8826
+ }
8827
+ }
8828
+ return new FFIConverter();
8829
+ })();
8830
+
8583
8831
  /**
8584
8832
  * Represents the payment LNURL info
8585
8833
  */
@@ -10932,6 +11180,118 @@ const FfiConverterTypePublicKeyBytes = (() => {
10932
11180
  return new FFIConverter();
10933
11181
  })();
10934
11182
 
11183
+ export type PublishSignedLnurlPayPackageRequest = {
11184
+ signedPackage: SignedTransferPackage;
11185
+ };
11186
+
11187
+ /**
11188
+ * Generated factory for {@link PublishSignedLnurlPayPackageRequest} record objects.
11189
+ */
11190
+ export const PublishSignedLnurlPayPackageRequest = (() => {
11191
+ const defaults = () => ({});
11192
+ const create = (() => {
11193
+ return uniffiCreateRecord<
11194
+ PublishSignedLnurlPayPackageRequest,
11195
+ ReturnType<typeof defaults>
11196
+ >(defaults);
11197
+ })();
11198
+ return Object.freeze({
11199
+ /**
11200
+ * Create a frozen instance of {@link PublishSignedLnurlPayPackageRequest}, with defaults specified
11201
+ * in Rust, in the {@link breez_sdk_spark} crate.
11202
+ */
11203
+ create,
11204
+
11205
+ /**
11206
+ * Create a frozen instance of {@link PublishSignedLnurlPayPackageRequest}, with defaults specified
11207
+ * in Rust, in the {@link breez_sdk_spark} crate.
11208
+ */
11209
+ new: create,
11210
+
11211
+ /**
11212
+ * Defaults specified in the {@link breez_sdk_spark} crate.
11213
+ */
11214
+ defaults: () =>
11215
+ Object.freeze(defaults()) as Partial<PublishSignedLnurlPayPackageRequest>,
11216
+ });
11217
+ })();
11218
+
11219
+ const FfiConverterTypePublishSignedLnurlPayPackageRequest = (() => {
11220
+ type TypeName = PublishSignedLnurlPayPackageRequest;
11221
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
11222
+ read(from: RustBuffer): TypeName {
11223
+ return {
11224
+ signedPackage: FfiConverterTypeSignedTransferPackage.read(from),
11225
+ };
11226
+ }
11227
+ write(value: TypeName, into: RustBuffer): void {
11228
+ FfiConverterTypeSignedTransferPackage.write(value.signedPackage, into);
11229
+ }
11230
+ allocationSize(value: TypeName): number {
11231
+ return FfiConverterTypeSignedTransferPackage.allocationSize(
11232
+ value.signedPackage
11233
+ );
11234
+ }
11235
+ }
11236
+ return new FFIConverter();
11237
+ })();
11238
+
11239
+ export type PublishSignedTransferPackageRequest = {
11240
+ signedPackage: SignedTransferPackage;
11241
+ };
11242
+
11243
+ /**
11244
+ * Generated factory for {@link PublishSignedTransferPackageRequest} record objects.
11245
+ */
11246
+ export const PublishSignedTransferPackageRequest = (() => {
11247
+ const defaults = () => ({});
11248
+ const create = (() => {
11249
+ return uniffiCreateRecord<
11250
+ PublishSignedTransferPackageRequest,
11251
+ ReturnType<typeof defaults>
11252
+ >(defaults);
11253
+ })();
11254
+ return Object.freeze({
11255
+ /**
11256
+ * Create a frozen instance of {@link PublishSignedTransferPackageRequest}, with defaults specified
11257
+ * in Rust, in the {@link breez_sdk_spark} crate.
11258
+ */
11259
+ create,
11260
+
11261
+ /**
11262
+ * Create a frozen instance of {@link PublishSignedTransferPackageRequest}, with defaults specified
11263
+ * in Rust, in the {@link breez_sdk_spark} crate.
11264
+ */
11265
+ new: create,
11266
+
11267
+ /**
11268
+ * Defaults specified in the {@link breez_sdk_spark} crate.
11269
+ */
11270
+ defaults: () =>
11271
+ Object.freeze(defaults()) as Partial<PublishSignedTransferPackageRequest>,
11272
+ });
11273
+ })();
11274
+
11275
+ const FfiConverterTypePublishSignedTransferPackageRequest = (() => {
11276
+ type TypeName = PublishSignedTransferPackageRequest;
11277
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
11278
+ read(from: RustBuffer): TypeName {
11279
+ return {
11280
+ signedPackage: FfiConverterTypeSignedTransferPackage.read(from),
11281
+ };
11282
+ }
11283
+ write(value: TypeName, into: RustBuffer): void {
11284
+ FfiConverterTypeSignedTransferPackage.write(value.signedPackage, into);
11285
+ }
11286
+ allocationSize(value: TypeName): number {
11287
+ return FfiConverterTypeSignedTransferPackage.allocationSize(
11288
+ value.signedPackage
11289
+ );
11290
+ }
11291
+ }
11292
+ return new FFIConverter();
11293
+ })();
11294
+
10935
11295
  /**
10936
11296
  * Denominator in an exchange rate
10937
11297
  */
@@ -12942,6 +13302,65 @@ const FfiConverterTypeSignMessageResponse = (() => {
12942
13302
  return new FFIConverter();
12943
13303
  })();
12944
13304
 
13305
+ export type SignedTransferPackage = {
13306
+ unsigned: UnsignedTransferPackage;
13307
+ signature: TransferSignature;
13308
+ };
13309
+
13310
+ /**
13311
+ * Generated factory for {@link SignedTransferPackage} record objects.
13312
+ */
13313
+ export const SignedTransferPackage = (() => {
13314
+ const defaults = () => ({});
13315
+ const create = (() => {
13316
+ return uniffiCreateRecord<
13317
+ SignedTransferPackage,
13318
+ ReturnType<typeof defaults>
13319
+ >(defaults);
13320
+ })();
13321
+ return Object.freeze({
13322
+ /**
13323
+ * Create a frozen instance of {@link SignedTransferPackage}, with defaults specified
13324
+ * in Rust, in the {@link breez_sdk_spark} crate.
13325
+ */
13326
+ create,
13327
+
13328
+ /**
13329
+ * Create a frozen instance of {@link SignedTransferPackage}, with defaults specified
13330
+ * in Rust, in the {@link breez_sdk_spark} crate.
13331
+ */
13332
+ new: create,
13333
+
13334
+ /**
13335
+ * Defaults specified in the {@link breez_sdk_spark} crate.
13336
+ */
13337
+ defaults: () => Object.freeze(defaults()) as Partial<SignedTransferPackage>,
13338
+ });
13339
+ })();
13340
+
13341
+ const FfiConverterTypeSignedTransferPackage = (() => {
13342
+ type TypeName = SignedTransferPackage;
13343
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
13344
+ read(from: RustBuffer): TypeName {
13345
+ return {
13346
+ unsigned: FfiConverterTypeUnsignedTransferPackage.read(from),
13347
+ signature: FfiConverterTypeTransferSignature.read(from),
13348
+ };
13349
+ }
13350
+ write(value: TypeName, into: RustBuffer): void {
13351
+ FfiConverterTypeUnsignedTransferPackage.write(value.unsigned, into);
13352
+ FfiConverterTypeTransferSignature.write(value.signature, into);
13353
+ }
13354
+ allocationSize(value: TypeName): number {
13355
+ return (
13356
+ FfiConverterTypeUnsignedTransferPackage.allocationSize(value.unsigned) +
13357
+ FfiConverterTypeTransferSignature.allocationSize(value.signature)
13358
+ );
13359
+ }
13360
+ }
13361
+ return new FFIConverter();
13362
+ })();
13363
+
12945
13364
  /**
12946
13365
  * A signing-only external signer paired with the Spark signer, for wallets that
12947
13366
  * connect via [`connect_with_signing_only_signer`]. The Breez half performs
@@ -13183,6 +13602,12 @@ export type SparkConfig = {
13183
13602
  * Expected relative block locktime for token withdrawals.
13184
13603
  */
13185
13604
  expectedWithdrawRelativeBlockLocktime: /*u64*/ bigint;
13605
+ /**
13606
+ * Cap on the inputs a single token transaction may spend. A send needing
13607
+ * more first consolidates the wallet's token outputs. Unset uses the SDK
13608
+ * default (500).
13609
+ */
13610
+ maxTokenTransactionInputs: /*u32*/ number | undefined;
13186
13611
  };
13187
13612
 
13188
13613
  /**
@@ -13226,6 +13651,7 @@ const FfiConverterTypeSparkConfig = (() => {
13226
13651
  sspConfig: FfiConverterTypeSparkSspConfig.read(from),
13227
13652
  expectedWithdrawBondSats: FfiConverterUInt64.read(from),
13228
13653
  expectedWithdrawRelativeBlockLocktime: FfiConverterUInt64.read(from),
13654
+ maxTokenTransactionInputs: FfiConverterOptionalUInt32.read(from),
13229
13655
  };
13230
13656
  }
13231
13657
  write(value: TypeName, into: RustBuffer): void {
@@ -13241,6 +13667,7 @@ const FfiConverterTypeSparkConfig = (() => {
13241
13667
  value.expectedWithdrawRelativeBlockLocktime,
13242
13668
  into
13243
13669
  );
13670
+ FfiConverterOptionalUInt32.write(value.maxTokenTransactionInputs, into);
13244
13671
  }
13245
13672
  allocationSize(value: TypeName): number {
13246
13673
  return (
@@ -13253,6 +13680,9 @@ const FfiConverterTypeSparkConfig = (() => {
13253
13680
  FfiConverterUInt64.allocationSize(value.expectedWithdrawBondSats) +
13254
13681
  FfiConverterUInt64.allocationSize(
13255
13682
  value.expectedWithdrawRelativeBlockLocktime
13683
+ ) +
13684
+ FfiConverterOptionalUInt32.allocationSize(
13685
+ value.maxTokenTransactionInputs
13256
13686
  )
13257
13687
  );
13258
13688
  }
@@ -14723,17 +15153,41 @@ export type TurnkeyConfig = {
14723
15153
  * either backend.
14724
15154
  */
14725
15155
  accountNumber: /*u32*/ number | undefined;
15156
+ /**
15157
+ * The wallet's identity public key (compressed, hex), to skip fetching it
15158
+ * from Turnkey on init. Obtain it once from a freshly-built signer via
15159
+ * [`ExternalSparkSigner::get_identity_public_key`] — the simplest source,
15160
+ * available right after `create_turnkey_signer` with no separate connect —
15161
+ * or, if you only have a connected SDK, from `identity_pubkey` on the
15162
+ * get-info response. Pass it back on later inits: the signer then serves the
15163
+ * identity key and its Spark address from this value instead of the per-init
15164
+ * Turnkey round-trips, making signer setup network-free. Unset fetches
15165
+ * lazily, as before. It is a stable, non-secret, per-wallet value; a value
15166
+ * that does not match the wallet yields a signer that signs with the wrong
15167
+ * identity, so only pass one read from this same wallet.
15168
+ *
15169
+ * [`ExternalSparkSigner::get_identity_public_key`]: crate::signer::ExternalSparkSigner::get_identity_public_key
15170
+ */
15171
+ identityPublicKey: string | undefined;
14726
15172
  /**
14727
15173
  * Retry policy for Turnkey requests. Unset uses the default policy.
14728
15174
  */
14729
15175
  retry: TurnkeyRetryConfig | undefined;
15176
+ /**
15177
+ * Maximum requests per second the client issues to this suborganization,
15178
+ * across all concurrent operations. The client paces itself to this rate.
15179
+ * Unset uses Turnkey's documented per-suborganization cap of 10 RPS; set it
15180
+ * to the account's actual limit if a different one is provisioned. Must be
15181
+ * greater than 0 when set: 0 is rejected at connect.
15182
+ */
15183
+ maxRps: /*u32*/ number | undefined;
14730
15184
  };
14731
15185
 
14732
15186
  /**
14733
15187
  * Generated factory for {@link TurnkeyConfig} record objects.
14734
15188
  */
14735
15189
  export const TurnkeyConfig = (() => {
14736
- const defaults = () => ({});
15190
+ const defaults = () => ({ maxRps: undefined });
14737
15191
  const create = (() => {
14738
15192
  return uniffiCreateRecord<TurnkeyConfig, ReturnType<typeof defaults>>(
14739
15193
  defaults
@@ -14771,7 +15225,9 @@ const FfiConverterTypeTurnkeyConfig = (() => {
14771
15225
  walletId: FfiConverterString.read(from),
14772
15226
  network: FfiConverterTypeNetwork.read(from),
14773
15227
  accountNumber: FfiConverterOptionalUInt32.read(from),
15228
+ identityPublicKey: FfiConverterOptionalString.read(from),
14774
15229
  retry: FfiConverterOptionalTypeTurnkeyRetryConfig.read(from),
15230
+ maxRps: FfiConverterOptionalUInt32.read(from),
14775
15231
  };
14776
15232
  }
14777
15233
  write(value: TypeName, into: RustBuffer): void {
@@ -14782,7 +15238,9 @@ const FfiConverterTypeTurnkeyConfig = (() => {
14782
15238
  FfiConverterString.write(value.walletId, into);
14783
15239
  FfiConverterTypeNetwork.write(value.network, into);
14784
15240
  FfiConverterOptionalUInt32.write(value.accountNumber, into);
15241
+ FfiConverterOptionalString.write(value.identityPublicKey, into);
14785
15242
  FfiConverterOptionalTypeTurnkeyRetryConfig.write(value.retry, into);
15243
+ FfiConverterOptionalUInt32.write(value.maxRps, into);
14786
15244
  }
14787
15245
  allocationSize(value: TypeName): number {
14788
15246
  return (
@@ -14793,7 +15251,9 @@ const FfiConverterTypeTurnkeyConfig = (() => {
14793
15251
  FfiConverterString.allocationSize(value.walletId) +
14794
15252
  FfiConverterTypeNetwork.allocationSize(value.network) +
14795
15253
  FfiConverterOptionalUInt32.allocationSize(value.accountNumber) +
14796
- FfiConverterOptionalTypeTurnkeyRetryConfig.allocationSize(value.retry)
15254
+ FfiConverterOptionalString.allocationSize(value.identityPublicKey) +
15255
+ FfiConverterOptionalTypeTurnkeyRetryConfig.allocationSize(value.retry) +
15256
+ FfiConverterOptionalUInt32.allocationSize(value.maxRps)
14797
15257
  );
14798
15258
  }
14799
15259
  }
@@ -16666,6 +17126,180 @@ const FfiConverterTypeBitcoinNetwork = (() => {
16666
17126
  return new FFIConverter();
16667
17127
  })();
16668
17128
 
17129
+ // Enum: BuildTransferPackageOptions
17130
+ export enum BuildTransferPackageOptions_Tags {
17131
+ BitcoinAddress = 'BitcoinAddress',
17132
+ Bolt11Invoice = 'Bolt11Invoice',
17133
+ }
17134
+ export const BuildTransferPackageOptions = (() => {
17135
+ type BitcoinAddress__interface = {
17136
+ tag: BuildTransferPackageOptions_Tags.BitcoinAddress;
17137
+ inner: Readonly<{ confirmationSpeed: OnchainConfirmationSpeed }>;
17138
+ };
17139
+
17140
+ class BitcoinAddress_
17141
+ extends UniffiEnum
17142
+ implements BitcoinAddress__interface
17143
+ {
17144
+ /**
17145
+ * @private
17146
+ * This field is private and should not be used, use `tag` instead.
17147
+ */
17148
+ readonly [uniffiTypeNameSymbol] = 'BuildTransferPackageOptions';
17149
+ readonly tag = BuildTransferPackageOptions_Tags.BitcoinAddress;
17150
+ readonly inner: Readonly<{ confirmationSpeed: OnchainConfirmationSpeed }>;
17151
+ constructor(inner: { confirmationSpeed: OnchainConfirmationSpeed }) {
17152
+ super('BuildTransferPackageOptions', 'BitcoinAddress');
17153
+ this.inner = Object.freeze(inner);
17154
+ }
17155
+
17156
+ static new(inner: {
17157
+ confirmationSpeed: OnchainConfirmationSpeed;
17158
+ }): BitcoinAddress_ {
17159
+ return new BitcoinAddress_(inner);
17160
+ }
17161
+
17162
+ static instanceOf(obj: any): obj is BitcoinAddress_ {
17163
+ return obj.tag === BuildTransferPackageOptions_Tags.BitcoinAddress;
17164
+ }
17165
+ }
17166
+
17167
+ type Bolt11Invoice__interface = {
17168
+ tag: BuildTransferPackageOptions_Tags.Bolt11Invoice;
17169
+ inner: Readonly<{
17170
+ preferSpark: boolean;
17171
+ completionTimeoutSecs: /*u32*/ number | undefined;
17172
+ }>;
17173
+ };
17174
+
17175
+ class Bolt11Invoice_ extends UniffiEnum implements Bolt11Invoice__interface {
17176
+ /**
17177
+ * @private
17178
+ * This field is private and should not be used, use `tag` instead.
17179
+ */
17180
+ readonly [uniffiTypeNameSymbol] = 'BuildTransferPackageOptions';
17181
+ readonly tag = BuildTransferPackageOptions_Tags.Bolt11Invoice;
17182
+ readonly inner: Readonly<{
17183
+ preferSpark: boolean;
17184
+ completionTimeoutSecs: /*u32*/ number | undefined;
17185
+ }>;
17186
+ constructor(inner: {
17187
+ preferSpark: boolean;
17188
+ /**
17189
+ * If set, publishing the package waits up to this many seconds for the
17190
+ * payment to complete before returning it while still pending. If unset,
17191
+ * publishing returns immediately after initiating the payment.
17192
+ */ completionTimeoutSecs: /*u32*/ number | undefined;
17193
+ }) {
17194
+ super('BuildTransferPackageOptions', 'Bolt11Invoice');
17195
+ this.inner = Object.freeze(inner);
17196
+ }
17197
+
17198
+ static new(inner: {
17199
+ preferSpark: boolean;
17200
+ /**
17201
+ * If set, publishing the package waits up to this many seconds for the
17202
+ * payment to complete before returning it while still pending. If unset,
17203
+ * publishing returns immediately after initiating the payment.
17204
+ */ completionTimeoutSecs: /*u32*/ number | undefined;
17205
+ }): Bolt11Invoice_ {
17206
+ return new Bolt11Invoice_(inner);
17207
+ }
17208
+
17209
+ static instanceOf(obj: any): obj is Bolt11Invoice_ {
17210
+ return obj.tag === BuildTransferPackageOptions_Tags.Bolt11Invoice;
17211
+ }
17212
+ }
17213
+
17214
+ function instanceOf(obj: any): obj is BuildTransferPackageOptions {
17215
+ return obj[uniffiTypeNameSymbol] === 'BuildTransferPackageOptions';
17216
+ }
17217
+
17218
+ return Object.freeze({
17219
+ instanceOf,
17220
+ BitcoinAddress: BitcoinAddress_,
17221
+ Bolt11Invoice: Bolt11Invoice_,
17222
+ });
17223
+ })();
17224
+
17225
+ export type BuildTransferPackageOptions = InstanceType<
17226
+ (typeof BuildTransferPackageOptions)[keyof Omit<
17227
+ typeof BuildTransferPackageOptions,
17228
+ 'instanceOf'
17229
+ >]
17230
+ >;
17231
+
17232
+ // FfiConverter for enum BuildTransferPackageOptions
17233
+ const FfiConverterTypeBuildTransferPackageOptions = (() => {
17234
+ const ordinalConverter = FfiConverterInt32;
17235
+ type TypeName = BuildTransferPackageOptions;
17236
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
17237
+ read(from: RustBuffer): TypeName {
17238
+ switch (ordinalConverter.read(from)) {
17239
+ case 1:
17240
+ return new BuildTransferPackageOptions.BitcoinAddress({
17241
+ confirmationSpeed:
17242
+ FfiConverterTypeOnchainConfirmationSpeed.read(from),
17243
+ });
17244
+ case 2:
17245
+ return new BuildTransferPackageOptions.Bolt11Invoice({
17246
+ preferSpark: FfiConverterBool.read(from),
17247
+ completionTimeoutSecs: FfiConverterOptionalUInt32.read(from),
17248
+ });
17249
+ default:
17250
+ throw new UniffiInternalError.UnexpectedEnumCase();
17251
+ }
17252
+ }
17253
+ write(value: TypeName, into: RustBuffer): void {
17254
+ switch (value.tag) {
17255
+ case BuildTransferPackageOptions_Tags.BitcoinAddress: {
17256
+ ordinalConverter.write(1, into);
17257
+ const inner = value.inner;
17258
+ FfiConverterTypeOnchainConfirmationSpeed.write(
17259
+ inner.confirmationSpeed,
17260
+ into
17261
+ );
17262
+ return;
17263
+ }
17264
+ case BuildTransferPackageOptions_Tags.Bolt11Invoice: {
17265
+ ordinalConverter.write(2, into);
17266
+ const inner = value.inner;
17267
+ FfiConverterBool.write(inner.preferSpark, into);
17268
+ FfiConverterOptionalUInt32.write(inner.completionTimeoutSecs, into);
17269
+ return;
17270
+ }
17271
+ default:
17272
+ // Throwing from here means that BuildTransferPackageOptions_Tags hasn't matched an ordinal.
17273
+ throw new UniffiInternalError.UnexpectedEnumCase();
17274
+ }
17275
+ }
17276
+ allocationSize(value: TypeName): number {
17277
+ switch (value.tag) {
17278
+ case BuildTransferPackageOptions_Tags.BitcoinAddress: {
17279
+ const inner = value.inner;
17280
+ let size = ordinalConverter.allocationSize(1);
17281
+ size += FfiConverterTypeOnchainConfirmationSpeed.allocationSize(
17282
+ inner.confirmationSpeed
17283
+ );
17284
+ return size;
17285
+ }
17286
+ case BuildTransferPackageOptions_Tags.Bolt11Invoice: {
17287
+ const inner = value.inner;
17288
+ let size = ordinalConverter.allocationSize(2);
17289
+ size += FfiConverterBool.allocationSize(inner.preferSpark);
17290
+ size += FfiConverterOptionalUInt32.allocationSize(
17291
+ inner.completionTimeoutSecs
17292
+ );
17293
+ return size;
17294
+ }
17295
+ default:
17296
+ throw new UniffiInternalError.UnexpectedEnumCase();
17297
+ }
17298
+ }
17299
+ }
17300
+ return new FFIConverter();
17301
+ })();
17302
+
16669
17303
  // Enum: BuyBitcoinRequest
16670
17304
  export enum BuyBitcoinRequest_Tags {
16671
17305
  Moonpay = 'Moonpay',
@@ -24281,6 +24915,266 @@ const FfiConverterTypeProvisionalPaymentDetails = (() => {
24281
24915
  return new FFIConverter();
24282
24916
  })();
24283
24917
 
24918
+ // Enum: PublishSignedLnurlPayResponse
24919
+ export enum PublishSignedLnurlPayResponse_Tags {
24920
+ SwapCompleted = 'SwapCompleted',
24921
+ PaymentSent = 'PaymentSent',
24922
+ }
24923
+ export const PublishSignedLnurlPayResponse = (() => {
24924
+ type SwapCompleted__interface = {
24925
+ tag: PublishSignedLnurlPayResponse_Tags.SwapCompleted;
24926
+ };
24927
+
24928
+ class SwapCompleted_ extends UniffiEnum implements SwapCompleted__interface {
24929
+ /**
24930
+ * @private
24931
+ * This field is private and should not be used, use `tag` instead.
24932
+ */
24933
+ readonly [uniffiTypeNameSymbol] = 'PublishSignedLnurlPayResponse';
24934
+ readonly tag = PublishSignedLnurlPayResponse_Tags.SwapCompleted;
24935
+ constructor() {
24936
+ super('PublishSignedLnurlPayResponse', 'SwapCompleted');
24937
+ }
24938
+
24939
+ static new(): SwapCompleted_ {
24940
+ return new SwapCompleted_();
24941
+ }
24942
+
24943
+ static instanceOf(obj: any): obj is SwapCompleted_ {
24944
+ return obj.tag === PublishSignedLnurlPayResponse_Tags.SwapCompleted;
24945
+ }
24946
+ }
24947
+
24948
+ type PaymentSent__interface = {
24949
+ tag: PublishSignedLnurlPayResponse_Tags.PaymentSent;
24950
+ inner: Readonly<{ response: LnurlPayResponse }>;
24951
+ };
24952
+
24953
+ class PaymentSent_ extends UniffiEnum implements PaymentSent__interface {
24954
+ /**
24955
+ * @private
24956
+ * This field is private and should not be used, use `tag` instead.
24957
+ */
24958
+ readonly [uniffiTypeNameSymbol] = 'PublishSignedLnurlPayResponse';
24959
+ readonly tag = PublishSignedLnurlPayResponse_Tags.PaymentSent;
24960
+ readonly inner: Readonly<{ response: LnurlPayResponse }>;
24961
+ constructor(inner: { response: LnurlPayResponse }) {
24962
+ super('PublishSignedLnurlPayResponse', 'PaymentSent');
24963
+ this.inner = Object.freeze(inner);
24964
+ }
24965
+
24966
+ static new(inner: { response: LnurlPayResponse }): PaymentSent_ {
24967
+ return new PaymentSent_(inner);
24968
+ }
24969
+
24970
+ static instanceOf(obj: any): obj is PaymentSent_ {
24971
+ return obj.tag === PublishSignedLnurlPayResponse_Tags.PaymentSent;
24972
+ }
24973
+ }
24974
+
24975
+ function instanceOf(obj: any): obj is PublishSignedLnurlPayResponse {
24976
+ return obj[uniffiTypeNameSymbol] === 'PublishSignedLnurlPayResponse';
24977
+ }
24978
+
24979
+ return Object.freeze({
24980
+ instanceOf,
24981
+ SwapCompleted: SwapCompleted_,
24982
+ PaymentSent: PaymentSent_,
24983
+ });
24984
+ })();
24985
+
24986
+ export type PublishSignedLnurlPayResponse = InstanceType<
24987
+ (typeof PublishSignedLnurlPayResponse)[keyof Omit<
24988
+ typeof PublishSignedLnurlPayResponse,
24989
+ 'instanceOf'
24990
+ >]
24991
+ >;
24992
+
24993
+ // FfiConverter for enum PublishSignedLnurlPayResponse
24994
+ const FfiConverterTypePublishSignedLnurlPayResponse = (() => {
24995
+ const ordinalConverter = FfiConverterInt32;
24996
+ type TypeName = PublishSignedLnurlPayResponse;
24997
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
24998
+ read(from: RustBuffer): TypeName {
24999
+ switch (ordinalConverter.read(from)) {
25000
+ case 1:
25001
+ return new PublishSignedLnurlPayResponse.SwapCompleted();
25002
+ case 2:
25003
+ return new PublishSignedLnurlPayResponse.PaymentSent({
25004
+ response: FfiConverterTypeLnurlPayResponse.read(from),
25005
+ });
25006
+ default:
25007
+ throw new UniffiInternalError.UnexpectedEnumCase();
25008
+ }
25009
+ }
25010
+ write(value: TypeName, into: RustBuffer): void {
25011
+ switch (value.tag) {
25012
+ case PublishSignedLnurlPayResponse_Tags.SwapCompleted: {
25013
+ ordinalConverter.write(1, into);
25014
+ return;
25015
+ }
25016
+ case PublishSignedLnurlPayResponse_Tags.PaymentSent: {
25017
+ ordinalConverter.write(2, into);
25018
+ const inner = value.inner;
25019
+ FfiConverterTypeLnurlPayResponse.write(inner.response, into);
25020
+ return;
25021
+ }
25022
+ default:
25023
+ // Throwing from here means that PublishSignedLnurlPayResponse_Tags hasn't matched an ordinal.
25024
+ throw new UniffiInternalError.UnexpectedEnumCase();
25025
+ }
25026
+ }
25027
+ allocationSize(value: TypeName): number {
25028
+ switch (value.tag) {
25029
+ case PublishSignedLnurlPayResponse_Tags.SwapCompleted: {
25030
+ return ordinalConverter.allocationSize(1);
25031
+ }
25032
+ case PublishSignedLnurlPayResponse_Tags.PaymentSent: {
25033
+ const inner = value.inner;
25034
+ let size = ordinalConverter.allocationSize(2);
25035
+ size += FfiConverterTypeLnurlPayResponse.allocationSize(
25036
+ inner.response
25037
+ );
25038
+ return size;
25039
+ }
25040
+ default:
25041
+ throw new UniffiInternalError.UnexpectedEnumCase();
25042
+ }
25043
+ }
25044
+ }
25045
+ return new FFIConverter();
25046
+ })();
25047
+
25048
+ // Enum: PublishSignedTransferPackageResponse
25049
+ export enum PublishSignedTransferPackageResponse_Tags {
25050
+ SwapCompleted = 'SwapCompleted',
25051
+ PaymentSent = 'PaymentSent',
25052
+ }
25053
+ export const PublishSignedTransferPackageResponse = (() => {
25054
+ type SwapCompleted__interface = {
25055
+ tag: PublishSignedTransferPackageResponse_Tags.SwapCompleted;
25056
+ };
25057
+
25058
+ class SwapCompleted_ extends UniffiEnum implements SwapCompleted__interface {
25059
+ /**
25060
+ * @private
25061
+ * This field is private and should not be used, use `tag` instead.
25062
+ */
25063
+ readonly [uniffiTypeNameSymbol] = 'PublishSignedTransferPackageResponse';
25064
+ readonly tag = PublishSignedTransferPackageResponse_Tags.SwapCompleted;
25065
+ constructor() {
25066
+ super('PublishSignedTransferPackageResponse', 'SwapCompleted');
25067
+ }
25068
+
25069
+ static new(): SwapCompleted_ {
25070
+ return new SwapCompleted_();
25071
+ }
25072
+
25073
+ static instanceOf(obj: any): obj is SwapCompleted_ {
25074
+ return (
25075
+ obj.tag === PublishSignedTransferPackageResponse_Tags.SwapCompleted
25076
+ );
25077
+ }
25078
+ }
25079
+
25080
+ type PaymentSent__interface = {
25081
+ tag: PublishSignedTransferPackageResponse_Tags.PaymentSent;
25082
+ inner: Readonly<{ payment: Payment }>;
25083
+ };
25084
+
25085
+ class PaymentSent_ extends UniffiEnum implements PaymentSent__interface {
25086
+ /**
25087
+ * @private
25088
+ * This field is private and should not be used, use `tag` instead.
25089
+ */
25090
+ readonly [uniffiTypeNameSymbol] = 'PublishSignedTransferPackageResponse';
25091
+ readonly tag = PublishSignedTransferPackageResponse_Tags.PaymentSent;
25092
+ readonly inner: Readonly<{ payment: Payment }>;
25093
+ constructor(inner: { payment: Payment }) {
25094
+ super('PublishSignedTransferPackageResponse', 'PaymentSent');
25095
+ this.inner = Object.freeze(inner);
25096
+ }
25097
+
25098
+ static new(inner: { payment: Payment }): PaymentSent_ {
25099
+ return new PaymentSent_(inner);
25100
+ }
25101
+
25102
+ static instanceOf(obj: any): obj is PaymentSent_ {
25103
+ return obj.tag === PublishSignedTransferPackageResponse_Tags.PaymentSent;
25104
+ }
25105
+ }
25106
+
25107
+ function instanceOf(obj: any): obj is PublishSignedTransferPackageResponse {
25108
+ return obj[uniffiTypeNameSymbol] === 'PublishSignedTransferPackageResponse';
25109
+ }
25110
+
25111
+ return Object.freeze({
25112
+ instanceOf,
25113
+ SwapCompleted: SwapCompleted_,
25114
+ PaymentSent: PaymentSent_,
25115
+ });
25116
+ })();
25117
+
25118
+ export type PublishSignedTransferPackageResponse = InstanceType<
25119
+ (typeof PublishSignedTransferPackageResponse)[keyof Omit<
25120
+ typeof PublishSignedTransferPackageResponse,
25121
+ 'instanceOf'
25122
+ >]
25123
+ >;
25124
+
25125
+ // FfiConverter for enum PublishSignedTransferPackageResponse
25126
+ const FfiConverterTypePublishSignedTransferPackageResponse = (() => {
25127
+ const ordinalConverter = FfiConverterInt32;
25128
+ type TypeName = PublishSignedTransferPackageResponse;
25129
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
25130
+ read(from: RustBuffer): TypeName {
25131
+ switch (ordinalConverter.read(from)) {
25132
+ case 1:
25133
+ return new PublishSignedTransferPackageResponse.SwapCompleted();
25134
+ case 2:
25135
+ return new PublishSignedTransferPackageResponse.PaymentSent({
25136
+ payment: FfiConverterTypePayment.read(from),
25137
+ });
25138
+ default:
25139
+ throw new UniffiInternalError.UnexpectedEnumCase();
25140
+ }
25141
+ }
25142
+ write(value: TypeName, into: RustBuffer): void {
25143
+ switch (value.tag) {
25144
+ case PublishSignedTransferPackageResponse_Tags.SwapCompleted: {
25145
+ ordinalConverter.write(1, into);
25146
+ return;
25147
+ }
25148
+ case PublishSignedTransferPackageResponse_Tags.PaymentSent: {
25149
+ ordinalConverter.write(2, into);
25150
+ const inner = value.inner;
25151
+ FfiConverterTypePayment.write(inner.payment, into);
25152
+ return;
25153
+ }
25154
+ default:
25155
+ // Throwing from here means that PublishSignedTransferPackageResponse_Tags hasn't matched an ordinal.
25156
+ throw new UniffiInternalError.UnexpectedEnumCase();
25157
+ }
25158
+ }
25159
+ allocationSize(value: TypeName): number {
25160
+ switch (value.tag) {
25161
+ case PublishSignedTransferPackageResponse_Tags.SwapCompleted: {
25162
+ return ordinalConverter.allocationSize(1);
25163
+ }
25164
+ case PublishSignedTransferPackageResponse_Tags.PaymentSent: {
25165
+ const inner = value.inner;
25166
+ let size = ordinalConverter.allocationSize(2);
25167
+ size += FfiConverterTypePayment.allocationSize(inner.payment);
25168
+ return size;
25169
+ }
25170
+ default:
25171
+ throw new UniffiInternalError.UnexpectedEnumCase();
25172
+ }
25173
+ }
25174
+ }
25175
+ return new FFIConverter();
25176
+ })();
25177
+
24284
25178
  // Enum: ReceivePaymentMethod
24285
25179
  export enum ReceivePaymentMethod_Tags {
24286
25180
  SparkAddress = 'SparkAddress',
@@ -29547,6 +30441,712 @@ const FfiConverterTypeTokenTransactionType = (() => {
29547
30441
  return new FFIConverter();
29548
30442
  })();
29549
30443
 
30444
+ // Enum: TransferSignature
30445
+ export enum TransferSignature_Tags {
30446
+ Transfer = 'Transfer',
30447
+ Token = 'Token',
30448
+ }
30449
+ export const TransferSignature = (() => {
30450
+ type Transfer__interface = {
30451
+ tag: TransferSignature_Tags.Transfer;
30452
+ inner: Readonly<{ signed: ExternalPreparedTransfer }>;
30453
+ };
30454
+
30455
+ class Transfer_ extends UniffiEnum implements Transfer__interface {
30456
+ /**
30457
+ * @private
30458
+ * This field is private and should not be used, use `tag` instead.
30459
+ */
30460
+ readonly [uniffiTypeNameSymbol] = 'TransferSignature';
30461
+ readonly tag = TransferSignature_Tags.Transfer;
30462
+ readonly inner: Readonly<{ signed: ExternalPreparedTransfer }>;
30463
+ constructor(inner: { signed: ExternalPreparedTransfer }) {
30464
+ super('TransferSignature', 'Transfer');
30465
+ this.inner = Object.freeze(inner);
30466
+ }
30467
+
30468
+ static new(inner: { signed: ExternalPreparedTransfer }): Transfer_ {
30469
+ return new Transfer_(inner);
30470
+ }
30471
+
30472
+ static instanceOf(obj: any): obj is Transfer_ {
30473
+ return obj.tag === TransferSignature_Tags.Transfer;
30474
+ }
30475
+ }
30476
+
30477
+ type Token__interface = {
30478
+ tag: TransferSignature_Tags.Token;
30479
+ inner: Readonly<{ signed: ExternalPreparedTokenTransaction }>;
30480
+ };
30481
+
30482
+ class Token_ extends UniffiEnum implements Token__interface {
30483
+ /**
30484
+ * @private
30485
+ * This field is private and should not be used, use `tag` instead.
30486
+ */
30487
+ readonly [uniffiTypeNameSymbol] = 'TransferSignature';
30488
+ readonly tag = TransferSignature_Tags.Token;
30489
+ readonly inner: Readonly<{ signed: ExternalPreparedTokenTransaction }>;
30490
+ constructor(inner: { signed: ExternalPreparedTokenTransaction }) {
30491
+ super('TransferSignature', 'Token');
30492
+ this.inner = Object.freeze(inner);
30493
+ }
30494
+
30495
+ static new(inner: { signed: ExternalPreparedTokenTransaction }): Token_ {
30496
+ return new Token_(inner);
30497
+ }
30498
+
30499
+ static instanceOf(obj: any): obj is Token_ {
30500
+ return obj.tag === TransferSignature_Tags.Token;
30501
+ }
30502
+ }
30503
+
30504
+ function instanceOf(obj: any): obj is TransferSignature {
30505
+ return obj[uniffiTypeNameSymbol] === 'TransferSignature';
30506
+ }
30507
+
30508
+ return Object.freeze({
30509
+ instanceOf,
30510
+ Transfer: Transfer_,
30511
+ Token: Token_,
30512
+ });
30513
+ })();
30514
+
30515
+ export type TransferSignature = InstanceType<
30516
+ (typeof TransferSignature)[keyof Omit<typeof TransferSignature, 'instanceOf'>]
30517
+ >;
30518
+
30519
+ // FfiConverter for enum TransferSignature
30520
+ const FfiConverterTypeTransferSignature = (() => {
30521
+ const ordinalConverter = FfiConverterInt32;
30522
+ type TypeName = TransferSignature;
30523
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
30524
+ read(from: RustBuffer): TypeName {
30525
+ switch (ordinalConverter.read(from)) {
30526
+ case 1:
30527
+ return new TransferSignature.Transfer({
30528
+ signed: FfiConverterTypeExternalPreparedTransfer.read(from),
30529
+ });
30530
+ case 2:
30531
+ return new TransferSignature.Token({
30532
+ signed: FfiConverterTypeExternalPreparedTokenTransaction.read(from),
30533
+ });
30534
+ default:
30535
+ throw new UniffiInternalError.UnexpectedEnumCase();
30536
+ }
30537
+ }
30538
+ write(value: TypeName, into: RustBuffer): void {
30539
+ switch (value.tag) {
30540
+ case TransferSignature_Tags.Transfer: {
30541
+ ordinalConverter.write(1, into);
30542
+ const inner = value.inner;
30543
+ FfiConverterTypeExternalPreparedTransfer.write(inner.signed, into);
30544
+ return;
30545
+ }
30546
+ case TransferSignature_Tags.Token: {
30547
+ ordinalConverter.write(2, into);
30548
+ const inner = value.inner;
30549
+ FfiConverterTypeExternalPreparedTokenTransaction.write(
30550
+ inner.signed,
30551
+ into
30552
+ );
30553
+ return;
30554
+ }
30555
+ default:
30556
+ // Throwing from here means that TransferSignature_Tags hasn't matched an ordinal.
30557
+ throw new UniffiInternalError.UnexpectedEnumCase();
30558
+ }
30559
+ }
30560
+ allocationSize(value: TypeName): number {
30561
+ switch (value.tag) {
30562
+ case TransferSignature_Tags.Transfer: {
30563
+ const inner = value.inner;
30564
+ let size = ordinalConverter.allocationSize(1);
30565
+ size += FfiConverterTypeExternalPreparedTransfer.allocationSize(
30566
+ inner.signed
30567
+ );
30568
+ return size;
30569
+ }
30570
+ case TransferSignature_Tags.Token: {
30571
+ const inner = value.inner;
30572
+ let size = ordinalConverter.allocationSize(2);
30573
+ size +=
30574
+ FfiConverterTypeExternalPreparedTokenTransaction.allocationSize(
30575
+ inner.signed
30576
+ );
30577
+ return size;
30578
+ }
30579
+ default:
30580
+ throw new UniffiInternalError.UnexpectedEnumCase();
30581
+ }
30582
+ }
30583
+ }
30584
+ return new FFIConverter();
30585
+ })();
30586
+
30587
+ // Enum: TransferTarget
30588
+ export enum TransferTarget_Tags {
30589
+ Spark = 'Spark',
30590
+ Lightning = 'Lightning',
30591
+ CoopExit = 'CoopExit',
30592
+ }
30593
+ export const TransferTarget = (() => {
30594
+ type Spark__interface = {
30595
+ tag: TransferTarget_Tags.Spark;
30596
+ inner: Readonly<{ address: string; sparkInvoice: string | undefined }>;
30597
+ };
30598
+
30599
+ class Spark_ extends UniffiEnum implements Spark__interface {
30600
+ /**
30601
+ * @private
30602
+ * This field is private and should not be used, use `tag` instead.
30603
+ */
30604
+ readonly [uniffiTypeNameSymbol] = 'TransferTarget';
30605
+ readonly tag = TransferTarget_Tags.Spark;
30606
+ readonly inner: Readonly<{
30607
+ address: string;
30608
+ sparkInvoice: string | undefined;
30609
+ }>;
30610
+ constructor(inner: { address: string; sparkInvoice: string | undefined }) {
30611
+ super('TransferTarget', 'Spark');
30612
+ this.inner = Object.freeze(inner);
30613
+ }
30614
+
30615
+ static new(inner: {
30616
+ address: string;
30617
+ sparkInvoice: string | undefined;
30618
+ }): Spark_ {
30619
+ return new Spark_(inner);
30620
+ }
30621
+
30622
+ static instanceOf(obj: any): obj is Spark_ {
30623
+ return obj.tag === TransferTarget_Tags.Spark;
30624
+ }
30625
+ }
30626
+
30627
+ type Lightning__interface = {
30628
+ tag: TransferTarget_Tags.Lightning;
30629
+ inner: Readonly<{
30630
+ bolt11: string;
30631
+ lnurlPay: LnurlPayContext | undefined;
30632
+ feePolicy: FeePolicy;
30633
+ completionTimeoutSecs: /*u32*/ number | undefined;
30634
+ }>;
30635
+ };
30636
+
30637
+ class Lightning_ extends UniffiEnum implements Lightning__interface {
30638
+ /**
30639
+ * @private
30640
+ * This field is private and should not be used, use `tag` instead.
30641
+ */
30642
+ readonly [uniffiTypeNameSymbol] = 'TransferTarget';
30643
+ readonly tag = TransferTarget_Tags.Lightning;
30644
+ readonly inner: Readonly<{
30645
+ bolt11: string;
30646
+ lnurlPay: LnurlPayContext | undefined;
30647
+ feePolicy: FeePolicy;
30648
+ completionTimeoutSecs: /*u32*/ number | undefined;
30649
+ }>;
30650
+ constructor(inner: {
30651
+ bolt11: string;
30652
+ lnurlPay: LnurlPayContext | undefined;
30653
+ feePolicy: FeePolicy;
30654
+ completionTimeoutSecs: /*u32*/ number | undefined;
30655
+ }) {
30656
+ super('TransferTarget', 'Lightning');
30657
+ this.inner = Object.freeze(inner);
30658
+ }
30659
+
30660
+ static new(inner: {
30661
+ bolt11: string;
30662
+ lnurlPay: LnurlPayContext | undefined;
30663
+ feePolicy: FeePolicy;
30664
+ completionTimeoutSecs: /*u32*/ number | undefined;
30665
+ }): Lightning_ {
30666
+ return new Lightning_(inner);
30667
+ }
30668
+
30669
+ static instanceOf(obj: any): obj is Lightning_ {
30670
+ return obj.tag === TransferTarget_Tags.Lightning;
30671
+ }
30672
+ }
30673
+
30674
+ type CoopExit__interface = {
30675
+ tag: TransferTarget_Tags.CoopExit;
30676
+ inner: Readonly<{
30677
+ address: string;
30678
+ feeQuote: SendOnchainFeeQuote;
30679
+ confirmationSpeed: OnchainConfirmationSpeed;
30680
+ }>;
30681
+ };
30682
+
30683
+ class CoopExit_ extends UniffiEnum implements CoopExit__interface {
30684
+ /**
30685
+ * @private
30686
+ * This field is private and should not be used, use `tag` instead.
30687
+ */
30688
+ readonly [uniffiTypeNameSymbol] = 'TransferTarget';
30689
+ readonly tag = TransferTarget_Tags.CoopExit;
30690
+ readonly inner: Readonly<{
30691
+ address: string;
30692
+ feeQuote: SendOnchainFeeQuote;
30693
+ confirmationSpeed: OnchainConfirmationSpeed;
30694
+ }>;
30695
+ constructor(inner: {
30696
+ address: string;
30697
+ feeQuote: SendOnchainFeeQuote;
30698
+ confirmationSpeed: OnchainConfirmationSpeed;
30699
+ }) {
30700
+ super('TransferTarget', 'CoopExit');
30701
+ this.inner = Object.freeze(inner);
30702
+ }
30703
+
30704
+ static new(inner: {
30705
+ address: string;
30706
+ feeQuote: SendOnchainFeeQuote;
30707
+ confirmationSpeed: OnchainConfirmationSpeed;
30708
+ }): CoopExit_ {
30709
+ return new CoopExit_(inner);
30710
+ }
30711
+
30712
+ static instanceOf(obj: any): obj is CoopExit_ {
30713
+ return obj.tag === TransferTarget_Tags.CoopExit;
30714
+ }
30715
+ }
30716
+
30717
+ function instanceOf(obj: any): obj is TransferTarget {
30718
+ return obj[uniffiTypeNameSymbol] === 'TransferTarget';
30719
+ }
30720
+
30721
+ return Object.freeze({
30722
+ instanceOf,
30723
+ Spark: Spark_,
30724
+ Lightning: Lightning_,
30725
+ CoopExit: CoopExit_,
30726
+ });
30727
+ })();
30728
+
30729
+ export type TransferTarget = InstanceType<
30730
+ (typeof TransferTarget)[keyof Omit<typeof TransferTarget, 'instanceOf'>]
30731
+ >;
30732
+
30733
+ // FfiConverter for enum TransferTarget
30734
+ const FfiConverterTypeTransferTarget = (() => {
30735
+ const ordinalConverter = FfiConverterInt32;
30736
+ type TypeName = TransferTarget;
30737
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
30738
+ read(from: RustBuffer): TypeName {
30739
+ switch (ordinalConverter.read(from)) {
30740
+ case 1:
30741
+ return new TransferTarget.Spark({
30742
+ address: FfiConverterString.read(from),
30743
+ sparkInvoice: FfiConverterOptionalString.read(from),
30744
+ });
30745
+ case 2:
30746
+ return new TransferTarget.Lightning({
30747
+ bolt11: FfiConverterString.read(from),
30748
+ lnurlPay: FfiConverterOptionalTypeLnurlPayContext.read(from),
30749
+ feePolicy: FfiConverterTypeFeePolicy.read(from),
30750
+ completionTimeoutSecs: FfiConverterOptionalUInt32.read(from),
30751
+ });
30752
+ case 3:
30753
+ return new TransferTarget.CoopExit({
30754
+ address: FfiConverterString.read(from),
30755
+ feeQuote: FfiConverterTypeSendOnchainFeeQuote.read(from),
30756
+ confirmationSpeed:
30757
+ FfiConverterTypeOnchainConfirmationSpeed.read(from),
30758
+ });
30759
+ default:
30760
+ throw new UniffiInternalError.UnexpectedEnumCase();
30761
+ }
30762
+ }
30763
+ write(value: TypeName, into: RustBuffer): void {
30764
+ switch (value.tag) {
30765
+ case TransferTarget_Tags.Spark: {
30766
+ ordinalConverter.write(1, into);
30767
+ const inner = value.inner;
30768
+ FfiConverterString.write(inner.address, into);
30769
+ FfiConverterOptionalString.write(inner.sparkInvoice, into);
30770
+ return;
30771
+ }
30772
+ case TransferTarget_Tags.Lightning: {
30773
+ ordinalConverter.write(2, into);
30774
+ const inner = value.inner;
30775
+ FfiConverterString.write(inner.bolt11, into);
30776
+ FfiConverterOptionalTypeLnurlPayContext.write(inner.lnurlPay, into);
30777
+ FfiConverterTypeFeePolicy.write(inner.feePolicy, into);
30778
+ FfiConverterOptionalUInt32.write(inner.completionTimeoutSecs, into);
30779
+ return;
30780
+ }
30781
+ case TransferTarget_Tags.CoopExit: {
30782
+ ordinalConverter.write(3, into);
30783
+ const inner = value.inner;
30784
+ FfiConverterString.write(inner.address, into);
30785
+ FfiConverterTypeSendOnchainFeeQuote.write(inner.feeQuote, into);
30786
+ FfiConverterTypeOnchainConfirmationSpeed.write(
30787
+ inner.confirmationSpeed,
30788
+ into
30789
+ );
30790
+ return;
30791
+ }
30792
+ default:
30793
+ // Throwing from here means that TransferTarget_Tags hasn't matched an ordinal.
30794
+ throw new UniffiInternalError.UnexpectedEnumCase();
30795
+ }
30796
+ }
30797
+ allocationSize(value: TypeName): number {
30798
+ switch (value.tag) {
30799
+ case TransferTarget_Tags.Spark: {
30800
+ const inner = value.inner;
30801
+ let size = ordinalConverter.allocationSize(1);
30802
+ size += FfiConverterString.allocationSize(inner.address);
30803
+ size += FfiConverterOptionalString.allocationSize(inner.sparkInvoice);
30804
+ return size;
30805
+ }
30806
+ case TransferTarget_Tags.Lightning: {
30807
+ const inner = value.inner;
30808
+ let size = ordinalConverter.allocationSize(2);
30809
+ size += FfiConverterString.allocationSize(inner.bolt11);
30810
+ size += FfiConverterOptionalTypeLnurlPayContext.allocationSize(
30811
+ inner.lnurlPay
30812
+ );
30813
+ size += FfiConverterTypeFeePolicy.allocationSize(inner.feePolicy);
30814
+ size += FfiConverterOptionalUInt32.allocationSize(
30815
+ inner.completionTimeoutSecs
30816
+ );
30817
+ return size;
30818
+ }
30819
+ case TransferTarget_Tags.CoopExit: {
30820
+ const inner = value.inner;
30821
+ let size = ordinalConverter.allocationSize(3);
30822
+ size += FfiConverterString.allocationSize(inner.address);
30823
+ size += FfiConverterTypeSendOnchainFeeQuote.allocationSize(
30824
+ inner.feeQuote
30825
+ );
30826
+ size += FfiConverterTypeOnchainConfirmationSpeed.allocationSize(
30827
+ inner.confirmationSpeed
30828
+ );
30829
+ return size;
30830
+ }
30831
+ default:
30832
+ throw new UniffiInternalError.UnexpectedEnumCase();
30833
+ }
30834
+ }
30835
+ }
30836
+ return new FFIConverter();
30837
+ })();
30838
+
30839
+ // Enum: UnsignedTransferPackage
30840
+ export enum UnsignedTransferPackage_Tags {
30841
+ Swap = 'Swap',
30842
+ Transfer = 'Transfer',
30843
+ Token = 'Token',
30844
+ }
30845
+ export const UnsignedTransferPackage = (() => {
30846
+ type Swap__interface = {
30847
+ tag: UnsignedTransferPackage_Tags.Swap;
30848
+ inner: Readonly<{
30849
+ prepareTransfer: ExternalPrepareTransferRequest;
30850
+ targetAmounts: Array</*u64*/ bigint>;
30851
+ amountSat: /*u64*/ bigint;
30852
+ feeSat: /*u64*/ bigint;
30853
+ }>;
30854
+ };
30855
+
30856
+ class Swap_ extends UniffiEnum implements Swap__interface {
30857
+ /**
30858
+ * @private
30859
+ * This field is private and should not be used, use `tag` instead.
30860
+ */
30861
+ readonly [uniffiTypeNameSymbol] = 'UnsignedTransferPackage';
30862
+ readonly tag = UnsignedTransferPackage_Tags.Swap;
30863
+ readonly inner: Readonly<{
30864
+ prepareTransfer: ExternalPrepareTransferRequest;
30865
+ targetAmounts: Array</*u64*/ bigint>;
30866
+ amountSat: /*u64*/ bigint;
30867
+ feeSat: /*u64*/ bigint;
30868
+ }>;
30869
+ constructor(inner: {
30870
+ prepareTransfer: ExternalPrepareTransferRequest;
30871
+ targetAmounts: Array</*u64*/ bigint>;
30872
+ amountSat: /*u64*/ bigint;
30873
+ feeSat: /*u64*/ bigint;
30874
+ }) {
30875
+ super('UnsignedTransferPackage', 'Swap');
30876
+ this.inner = Object.freeze(inner);
30877
+ }
30878
+
30879
+ static new(inner: {
30880
+ prepareTransfer: ExternalPrepareTransferRequest;
30881
+ targetAmounts: Array</*u64*/ bigint>;
30882
+ amountSat: /*u64*/ bigint;
30883
+ feeSat: /*u64*/ bigint;
30884
+ }): Swap_ {
30885
+ return new Swap_(inner);
30886
+ }
30887
+
30888
+ static instanceOf(obj: any): obj is Swap_ {
30889
+ return obj.tag === UnsignedTransferPackage_Tags.Swap;
30890
+ }
30891
+ }
30892
+
30893
+ type Transfer__interface = {
30894
+ tag: UnsignedTransferPackage_Tags.Transfer;
30895
+ inner: Readonly<{
30896
+ prepareTransfer: ExternalPrepareTransferRequest;
30897
+ amountSat: /*u64*/ bigint;
30898
+ feeSat: /*u64*/ bigint;
30899
+ target: TransferTarget;
30900
+ }>;
30901
+ };
30902
+
30903
+ class Transfer_ extends UniffiEnum implements Transfer__interface {
30904
+ /**
30905
+ * @private
30906
+ * This field is private and should not be used, use `tag` instead.
30907
+ */
30908
+ readonly [uniffiTypeNameSymbol] = 'UnsignedTransferPackage';
30909
+ readonly tag = UnsignedTransferPackage_Tags.Transfer;
30910
+ readonly inner: Readonly<{
30911
+ prepareTransfer: ExternalPrepareTransferRequest;
30912
+ amountSat: /*u64*/ bigint;
30913
+ feeSat: /*u64*/ bigint;
30914
+ target: TransferTarget;
30915
+ }>;
30916
+ constructor(inner: {
30917
+ prepareTransfer: ExternalPrepareTransferRequest;
30918
+ amountSat: /*u64*/ bigint;
30919
+ feeSat: /*u64*/ bigint;
30920
+ target: TransferTarget;
30921
+ }) {
30922
+ super('UnsignedTransferPackage', 'Transfer');
30923
+ this.inner = Object.freeze(inner);
30924
+ }
30925
+
30926
+ static new(inner: {
30927
+ prepareTransfer: ExternalPrepareTransferRequest;
30928
+ amountSat: /*u64*/ bigint;
30929
+ feeSat: /*u64*/ bigint;
30930
+ target: TransferTarget;
30931
+ }): Transfer_ {
30932
+ return new Transfer_(inner);
30933
+ }
30934
+
30935
+ static instanceOf(obj: any): obj is Transfer_ {
30936
+ return obj.tag === UnsignedTransferPackage_Tags.Transfer;
30937
+ }
30938
+ }
30939
+
30940
+ type Token__interface = {
30941
+ tag: UnsignedTransferPackage_Tags.Token;
30942
+ inner: Readonly<{
30943
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
30944
+ tokenContext: ArrayBuffer;
30945
+ tokenIdentifier: string;
30946
+ amount: U128;
30947
+ fee: U128;
30948
+ isSwap: boolean;
30949
+ }>;
30950
+ };
30951
+
30952
+ class Token_ extends UniffiEnum implements Token__interface {
30953
+ /**
30954
+ * @private
30955
+ * This field is private and should not be used, use `tag` instead.
30956
+ */
30957
+ readonly [uniffiTypeNameSymbol] = 'UnsignedTransferPackage';
30958
+ readonly tag = UnsignedTransferPackage_Tags.Token;
30959
+ readonly inner: Readonly<{
30960
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
30961
+ tokenContext: ArrayBuffer;
30962
+ tokenIdentifier: string;
30963
+ amount: U128;
30964
+ fee: U128;
30965
+ isSwap: boolean;
30966
+ }>;
30967
+ constructor(inner: {
30968
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
30969
+ tokenContext: ArrayBuffer;
30970
+ tokenIdentifier: string;
30971
+ amount: U128;
30972
+ fee: U128;
30973
+ /**
30974
+ * When set, this package re-shapes the wallet's token outputs instead of
30975
+ * sending a payment. Publishing it returns `SwapCompleted`: rebuild the
30976
+ * original send from the same prepare response and submit again.
30977
+ */ isSwap: boolean;
30978
+ }) {
30979
+ super('UnsignedTransferPackage', 'Token');
30980
+ this.inner = Object.freeze(inner);
30981
+ }
30982
+
30983
+ static new(inner: {
30984
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
30985
+ tokenContext: ArrayBuffer;
30986
+ tokenIdentifier: string;
30987
+ amount: U128;
30988
+ fee: U128;
30989
+ /**
30990
+ * When set, this package re-shapes the wallet's token outputs instead of
30991
+ * sending a payment. Publishing it returns `SwapCompleted`: rebuild the
30992
+ * original send from the same prepare response and submit again.
30993
+ */ isSwap: boolean;
30994
+ }): Token_ {
30995
+ return new Token_(inner);
30996
+ }
30997
+
30998
+ static instanceOf(obj: any): obj is Token_ {
30999
+ return obj.tag === UnsignedTransferPackage_Tags.Token;
31000
+ }
31001
+ }
31002
+
31003
+ function instanceOf(obj: any): obj is UnsignedTransferPackage {
31004
+ return obj[uniffiTypeNameSymbol] === 'UnsignedTransferPackage';
31005
+ }
31006
+
31007
+ return Object.freeze({
31008
+ instanceOf,
31009
+ Swap: Swap_,
31010
+ Transfer: Transfer_,
31011
+ Token: Token_,
31012
+ });
31013
+ })();
31014
+
31015
+ export type UnsignedTransferPackage = InstanceType<
31016
+ (typeof UnsignedTransferPackage)[keyof Omit<
31017
+ typeof UnsignedTransferPackage,
31018
+ 'instanceOf'
31019
+ >]
31020
+ >;
31021
+
31022
+ // FfiConverter for enum UnsignedTransferPackage
31023
+ const FfiConverterTypeUnsignedTransferPackage = (() => {
31024
+ const ordinalConverter = FfiConverterInt32;
31025
+ type TypeName = UnsignedTransferPackage;
31026
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
31027
+ read(from: RustBuffer): TypeName {
31028
+ switch (ordinalConverter.read(from)) {
31029
+ case 1:
31030
+ return new UnsignedTransferPackage.Swap({
31031
+ prepareTransfer:
31032
+ FfiConverterTypeExternalPrepareTransferRequest.read(from),
31033
+ targetAmounts: FfiConverterArrayUInt64.read(from),
31034
+ amountSat: FfiConverterUInt64.read(from),
31035
+ feeSat: FfiConverterUInt64.read(from),
31036
+ });
31037
+ case 2:
31038
+ return new UnsignedTransferPackage.Transfer({
31039
+ prepareTransfer:
31040
+ FfiConverterTypeExternalPrepareTransferRequest.read(from),
31041
+ amountSat: FfiConverterUInt64.read(from),
31042
+ feeSat: FfiConverterUInt64.read(from),
31043
+ target: FfiConverterTypeTransferTarget.read(from),
31044
+ });
31045
+ case 3:
31046
+ return new UnsignedTransferPackage.Token({
31047
+ prepareTokenTransaction:
31048
+ FfiConverterTypeExternalPrepareTokenTransactionRequest.read(from),
31049
+ tokenContext: FfiConverterArrayBuffer.read(from),
31050
+ tokenIdentifier: FfiConverterString.read(from),
31051
+ amount: FfiConverterTypeu128.read(from),
31052
+ fee: FfiConverterTypeu128.read(from),
31053
+ isSwap: FfiConverterBool.read(from),
31054
+ });
31055
+ default:
31056
+ throw new UniffiInternalError.UnexpectedEnumCase();
31057
+ }
31058
+ }
31059
+ write(value: TypeName, into: RustBuffer): void {
31060
+ switch (value.tag) {
31061
+ case UnsignedTransferPackage_Tags.Swap: {
31062
+ ordinalConverter.write(1, into);
31063
+ const inner = value.inner;
31064
+ FfiConverterTypeExternalPrepareTransferRequest.write(
31065
+ inner.prepareTransfer,
31066
+ into
31067
+ );
31068
+ FfiConverterArrayUInt64.write(inner.targetAmounts, into);
31069
+ FfiConverterUInt64.write(inner.amountSat, into);
31070
+ FfiConverterUInt64.write(inner.feeSat, into);
31071
+ return;
31072
+ }
31073
+ case UnsignedTransferPackage_Tags.Transfer: {
31074
+ ordinalConverter.write(2, into);
31075
+ const inner = value.inner;
31076
+ FfiConverterTypeExternalPrepareTransferRequest.write(
31077
+ inner.prepareTransfer,
31078
+ into
31079
+ );
31080
+ FfiConverterUInt64.write(inner.amountSat, into);
31081
+ FfiConverterUInt64.write(inner.feeSat, into);
31082
+ FfiConverterTypeTransferTarget.write(inner.target, into);
31083
+ return;
31084
+ }
31085
+ case UnsignedTransferPackage_Tags.Token: {
31086
+ ordinalConverter.write(3, into);
31087
+ const inner = value.inner;
31088
+ FfiConverterTypeExternalPrepareTokenTransactionRequest.write(
31089
+ inner.prepareTokenTransaction,
31090
+ into
31091
+ );
31092
+ FfiConverterArrayBuffer.write(inner.tokenContext, into);
31093
+ FfiConverterString.write(inner.tokenIdentifier, into);
31094
+ FfiConverterTypeu128.write(inner.amount, into);
31095
+ FfiConverterTypeu128.write(inner.fee, into);
31096
+ FfiConverterBool.write(inner.isSwap, into);
31097
+ return;
31098
+ }
31099
+ default:
31100
+ // Throwing from here means that UnsignedTransferPackage_Tags hasn't matched an ordinal.
31101
+ throw new UniffiInternalError.UnexpectedEnumCase();
31102
+ }
31103
+ }
31104
+ allocationSize(value: TypeName): number {
31105
+ switch (value.tag) {
31106
+ case UnsignedTransferPackage_Tags.Swap: {
31107
+ const inner = value.inner;
31108
+ let size = ordinalConverter.allocationSize(1);
31109
+ size += FfiConverterTypeExternalPrepareTransferRequest.allocationSize(
31110
+ inner.prepareTransfer
31111
+ );
31112
+ size += FfiConverterArrayUInt64.allocationSize(inner.targetAmounts);
31113
+ size += FfiConverterUInt64.allocationSize(inner.amountSat);
31114
+ size += FfiConverterUInt64.allocationSize(inner.feeSat);
31115
+ return size;
31116
+ }
31117
+ case UnsignedTransferPackage_Tags.Transfer: {
31118
+ const inner = value.inner;
31119
+ let size = ordinalConverter.allocationSize(2);
31120
+ size += FfiConverterTypeExternalPrepareTransferRequest.allocationSize(
31121
+ inner.prepareTransfer
31122
+ );
31123
+ size += FfiConverterUInt64.allocationSize(inner.amountSat);
31124
+ size += FfiConverterUInt64.allocationSize(inner.feeSat);
31125
+ size += FfiConverterTypeTransferTarget.allocationSize(inner.target);
31126
+ return size;
31127
+ }
31128
+ case UnsignedTransferPackage_Tags.Token: {
31129
+ const inner = value.inner;
31130
+ let size = ordinalConverter.allocationSize(3);
31131
+ size +=
31132
+ FfiConverterTypeExternalPrepareTokenTransactionRequest.allocationSize(
31133
+ inner.prepareTokenTransaction
31134
+ );
31135
+ size += FfiConverterArrayBuffer.allocationSize(inner.tokenContext);
31136
+ size += FfiConverterString.allocationSize(inner.tokenIdentifier);
31137
+ size += FfiConverterTypeu128.allocationSize(inner.amount);
31138
+ size += FfiConverterTypeu128.allocationSize(inner.fee);
31139
+ size += FfiConverterBool.allocationSize(inner.isSwap);
31140
+ return size;
31141
+ }
31142
+ default:
31143
+ throw new UniffiInternalError.UnexpectedEnumCase();
31144
+ }
31145
+ }
31146
+ }
31147
+ return new FFIConverter();
31148
+ })();
31149
+
29550
31150
  // Enum: UpdateDepositPayload
29551
31151
  export enum UpdateDepositPayload_Tags {
29552
31152
  ClaimError = 'ClaimError',
@@ -30582,6 +32182,14 @@ export interface BreezSdkInterface {
30582
32182
  request: AuthorizeTransferRequest,
30583
32183
  asyncOpts_?: { signal: AbortSignal }
30584
32184
  ): /*throws*/ Promise<TransferAuthorization>;
32185
+ buildUnsignedLnurlPayPackage(
32186
+ request: BuildUnsignedLnurlPayPackageRequest,
32187
+ asyncOpts_?: { signal: AbortSignal }
32188
+ ): /*throws*/ Promise<UnsignedTransferPackage>;
32189
+ buildUnsignedTransferPackage(
32190
+ request: BuildUnsignedTransferPackageRequest,
32191
+ asyncOpts_?: { signal: AbortSignal }
32192
+ ): /*throws*/ Promise<UnsignedTransferPackage>;
30585
32193
  /**
30586
32194
  * Initiates a Bitcoin purchase flow via an external provider.
30587
32195
  *
@@ -30854,6 +32462,14 @@ export interface BreezSdkInterface {
30854
32462
  request: PrepareSendPaymentRequest,
30855
32463
  asyncOpts_?: { signal: AbortSignal }
30856
32464
  ): /*throws*/ Promise<PrepareSendPaymentResponse>;
32465
+ publishSignedLnurlPayPackage(
32466
+ request: PublishSignedLnurlPayPackageRequest,
32467
+ asyncOpts_?: { signal: AbortSignal }
32468
+ ): /*throws*/ Promise<PublishSignedLnurlPayResponse>;
32469
+ publishSignedTransferPackage(
32470
+ request: PublishSignedTransferPackageRequest,
32471
+ asyncOpts_?: { signal: AbortSignal }
32472
+ ): /*throws*/ Promise<PublishSignedTransferPackageResponse>;
30857
32473
  receivePayment(
30858
32474
  request: ReceivePaymentRequest,
30859
32475
  asyncOpts_?: { signal: AbortSignal }
@@ -31145,6 +32761,84 @@ export class BreezSdk
31145
32761
  }
31146
32762
  }
31147
32763
 
32764
+ public async buildUnsignedLnurlPayPackage(
32765
+ request: BuildUnsignedLnurlPayPackageRequest,
32766
+ asyncOpts_?: { signal: AbortSignal }
32767
+ ): Promise<UnsignedTransferPackage> /*throws*/ {
32768
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
32769
+ try {
32770
+ return await uniffiRustCallAsync(
32771
+ /*rustCaller:*/ uniffiCaller,
32772
+ /*rustFutureFunc:*/ () => {
32773
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
32774
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
32775
+ FfiConverterTypeBuildUnsignedLnurlPayPackageRequest.lower(request)
32776
+ );
32777
+ },
32778
+ /*pollFunc:*/ nativeModule()
32779
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
32780
+ /*cancelFunc:*/ nativeModule()
32781
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
32782
+ /*completeFunc:*/ nativeModule()
32783
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
32784
+ /*freeFunc:*/ nativeModule()
32785
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
32786
+ /*liftFunc:*/ FfiConverterTypeUnsignedTransferPackage.lift.bind(
32787
+ FfiConverterTypeUnsignedTransferPackage
32788
+ ),
32789
+ /*liftString:*/ FfiConverterString.lift,
32790
+ /*asyncOpts:*/ asyncOpts_,
32791
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
32792
+ FfiConverterTypeSdkError
32793
+ )
32794
+ );
32795
+ } catch (__error: any) {
32796
+ if (uniffiIsDebug && __error instanceof Error) {
32797
+ __error.stack = __stack;
32798
+ }
32799
+ throw __error;
32800
+ }
32801
+ }
32802
+
32803
+ public async buildUnsignedTransferPackage(
32804
+ request: BuildUnsignedTransferPackageRequest,
32805
+ asyncOpts_?: { signal: AbortSignal }
32806
+ ): Promise<UnsignedTransferPackage> /*throws*/ {
32807
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
32808
+ try {
32809
+ return await uniffiRustCallAsync(
32810
+ /*rustCaller:*/ uniffiCaller,
32811
+ /*rustFutureFunc:*/ () => {
32812
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_transfer_package(
32813
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
32814
+ FfiConverterTypeBuildUnsignedTransferPackageRequest.lower(request)
32815
+ );
32816
+ },
32817
+ /*pollFunc:*/ nativeModule()
32818
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
32819
+ /*cancelFunc:*/ nativeModule()
32820
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
32821
+ /*completeFunc:*/ nativeModule()
32822
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
32823
+ /*freeFunc:*/ nativeModule()
32824
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
32825
+ /*liftFunc:*/ FfiConverterTypeUnsignedTransferPackage.lift.bind(
32826
+ FfiConverterTypeUnsignedTransferPackage
32827
+ ),
32828
+ /*liftString:*/ FfiConverterString.lift,
32829
+ /*asyncOpts:*/ asyncOpts_,
32830
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
32831
+ FfiConverterTypeSdkError
32832
+ )
32833
+ );
32834
+ } catch (__error: any) {
32835
+ if (uniffiIsDebug && __error instanceof Error) {
32836
+ __error.stack = __stack;
32837
+ }
32838
+ throw __error;
32839
+ }
32840
+ }
32841
+
31148
32842
  /**
31149
32843
  * Initiates a Bitcoin purchase flow via an external provider.
31150
32844
  *
@@ -32432,6 +34126,84 @@ export class BreezSdk
32432
34126
  }
32433
34127
  }
32434
34128
 
34129
+ public async publishSignedLnurlPayPackage(
34130
+ request: PublishSignedLnurlPayPackageRequest,
34131
+ asyncOpts_?: { signal: AbortSignal }
34132
+ ): Promise<PublishSignedLnurlPayResponse> /*throws*/ {
34133
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
34134
+ try {
34135
+ return await uniffiRustCallAsync(
34136
+ /*rustCaller:*/ uniffiCaller,
34137
+ /*rustFutureFunc:*/ () => {
34138
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
34139
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
34140
+ FfiConverterTypePublishSignedLnurlPayPackageRequest.lower(request)
34141
+ );
34142
+ },
34143
+ /*pollFunc:*/ nativeModule()
34144
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
34145
+ /*cancelFunc:*/ nativeModule()
34146
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
34147
+ /*completeFunc:*/ nativeModule()
34148
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
34149
+ /*freeFunc:*/ nativeModule()
34150
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
34151
+ /*liftFunc:*/ FfiConverterTypePublishSignedLnurlPayResponse.lift.bind(
34152
+ FfiConverterTypePublishSignedLnurlPayResponse
34153
+ ),
34154
+ /*liftString:*/ FfiConverterString.lift,
34155
+ /*asyncOpts:*/ asyncOpts_,
34156
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
34157
+ FfiConverterTypeSdkError
34158
+ )
34159
+ );
34160
+ } catch (__error: any) {
34161
+ if (uniffiIsDebug && __error instanceof Error) {
34162
+ __error.stack = __stack;
34163
+ }
34164
+ throw __error;
34165
+ }
34166
+ }
34167
+
34168
+ public async publishSignedTransferPackage(
34169
+ request: PublishSignedTransferPackageRequest,
34170
+ asyncOpts_?: { signal: AbortSignal }
34171
+ ): Promise<PublishSignedTransferPackageResponse> /*throws*/ {
34172
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
34173
+ try {
34174
+ return await uniffiRustCallAsync(
34175
+ /*rustCaller:*/ uniffiCaller,
34176
+ /*rustFutureFunc:*/ () => {
34177
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_transfer_package(
34178
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
34179
+ FfiConverterTypePublishSignedTransferPackageRequest.lower(request)
34180
+ );
34181
+ },
34182
+ /*pollFunc:*/ nativeModule()
34183
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
34184
+ /*cancelFunc:*/ nativeModule()
34185
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
34186
+ /*completeFunc:*/ nativeModule()
34187
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
34188
+ /*freeFunc:*/ nativeModule()
34189
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
34190
+ /*liftFunc:*/ FfiConverterTypePublishSignedTransferPackageResponse.lift.bind(
34191
+ FfiConverterTypePublishSignedTransferPackageResponse
34192
+ ),
34193
+ /*liftString:*/ FfiConverterString.lift,
34194
+ /*asyncOpts:*/ asyncOpts_,
34195
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
34196
+ FfiConverterTypeSdkError
34197
+ )
34198
+ );
34199
+ } catch (__error: any) {
34200
+ if (uniffiIsDebug && __error instanceof Error) {
34201
+ __error.stack = __stack;
34202
+ }
34203
+ throw __error;
34204
+ }
34205
+ }
34206
+
32435
34207
  public async receivePayment(
32436
34208
  request: ReceivePaymentRequest,
32437
34209
  asyncOpts_?: { signal: AbortSignal }
@@ -34713,6 +36485,13 @@ export interface ExternalSparkSigner {
34713
36485
  leafId: ExternalTreeNodeId,
34714
36486
  asyncOpts_?: { signal: AbortSignal }
34715
36487
  ): /*throws*/ Promise<PublicKeyBytes>;
36488
+ /**
36489
+ * Whether this signer is backed by a remote service, so its operations are
36490
+ * network round-trips rather than local computation. Local signers return
36491
+ * false; a hosted signer like Turnkey returns true so the SDK can avoid
36492
+ * redundant calls, e.g. re-deriving keys for leaves it has already verified.
36493
+ */
36494
+ isRemote(): boolean;
34716
36495
  /**
34717
36496
  * The static-deposit signing public key at `index`.
34718
36497
  */
@@ -34906,6 +36685,26 @@ export class ExternalSparkSignerImpl
34906
36685
  }
34907
36686
  }
34908
36687
 
36688
+ /**
36689
+ * Whether this signer is backed by a remote service, so its operations are
36690
+ * network round-trips rather than local computation. Local signers return
36691
+ * false; a hosted signer like Turnkey returns true so the SDK can avoid
36692
+ * redundant calls, e.g. re-deriving keys for leaves it has already verified.
36693
+ */
36694
+ public isRemote(): boolean {
36695
+ return FfiConverterBool.lift(
36696
+ uniffiCaller.rustCall(
36697
+ /*caller:*/ (callStatus) => {
36698
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsparksigner_is_remote(
36699
+ uniffiTypeExternalSparkSignerImplObjectFactory.clonePointer(this),
36700
+ callStatus
36701
+ );
36702
+ },
36703
+ /*liftString:*/ FfiConverterString.lift
36704
+ )
36705
+ );
36706
+ }
36707
+
34909
36708
  /**
34910
36709
  * The static-deposit signing public key at `index`.
34911
36710
  */
@@ -35654,6 +37453,27 @@ const uniffiCallbackInterfaceExternalSparkSigner: {
35654
37453
  );
35655
37454
  return uniffiForeignFuture;
35656
37455
  },
37456
+ isRemote: (uniffiHandle: bigint) => {
37457
+ const uniffiMakeCall = (): boolean => {
37458
+ const jsCallback =
37459
+ FfiConverterTypeExternalSparkSigner.lift(uniffiHandle);
37460
+ return jsCallback.isRemote();
37461
+ };
37462
+ const uniffiResult = UniffiResult.ready<number>();
37463
+ const uniffiHandleSuccess = (obj: any) => {
37464
+ UniffiResult.writeSuccess(uniffiResult, FfiConverterBool.lower(obj));
37465
+ };
37466
+ const uniffiHandleError = (code: number, errBuf: UniffiByteArray) => {
37467
+ UniffiResult.writeError(uniffiResult, code, errBuf);
37468
+ };
37469
+ uniffiTraitInterfaceCall(
37470
+ /*makeCall:*/ uniffiMakeCall,
37471
+ /*handleSuccess:*/ uniffiHandleSuccess,
37472
+ /*handleError:*/ uniffiHandleError,
37473
+ /*lowerString:*/ FfiConverterString.lower
37474
+ );
37475
+ return uniffiResult;
37476
+ },
35657
37477
  getStaticDepositPublicKey: (
35658
37478
  uniffiHandle: bigint,
35659
37479
  index: number,
@@ -38843,6 +40663,19 @@ export interface SdkBuilderInterface {
38843
40663
  credentials: Credentials | undefined,
38844
40664
  asyncOpts_?: { signal: AbortSignal }
38845
40665
  ): Promise<void>;
40666
+ /**
40667
+ * Overrides the session store used to cache auth tokens, replacing the one
40668
+ * the backend provides. Supply any [`SessionStore`]: for example one that
40669
+ * wraps the backend's own store (from
40670
+ * [`default_session_store`](crate::default_session_store)) to add at-rest
40671
+ * encryption, which the SDK does not apply itself.
40672
+ * Arguments:
40673
+ * - `session_store`: The session store to use in place of the backend's.
40674
+ */
40675
+ withSessionStore(
40676
+ sessionStore: SessionStore,
40677
+ asyncOpts_?: { signal: AbortSignal }
40678
+ ): Promise<void>;
38846
40679
  /**
38847
40680
  * Threads a shared [`SdkContext`](crate::SdkContext) into the builder.
38848
40681
  *
@@ -39298,6 +41131,49 @@ export class SdkBuilder
39298
41131
  }
39299
41132
  }
39300
41133
 
41134
+ /**
41135
+ * Overrides the session store used to cache auth tokens, replacing the one
41136
+ * the backend provides. Supply any [`SessionStore`]: for example one that
41137
+ * wraps the backend's own store (from
41138
+ * [`default_session_store`](crate::default_session_store)) to add at-rest
41139
+ * encryption, which the SDK does not apply itself.
41140
+ * Arguments:
41141
+ * - `session_store`: The session store to use in place of the backend's.
41142
+ */
41143
+ public async withSessionStore(
41144
+ sessionStore: SessionStore,
41145
+ asyncOpts_?: { signal: AbortSignal }
41146
+ ): Promise<void> {
41147
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
41148
+ try {
41149
+ return await uniffiRustCallAsync(
41150
+ /*rustCaller:*/ uniffiCaller,
41151
+ /*rustFutureFunc:*/ () => {
41152
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_store(
41153
+ uniffiTypeSdkBuilderObjectFactory.clonePointer(this),
41154
+ FfiConverterTypeSessionStore.lower(sessionStore)
41155
+ );
41156
+ },
41157
+ /*pollFunc:*/ nativeModule()
41158
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
41159
+ /*cancelFunc:*/ nativeModule()
41160
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
41161
+ /*completeFunc:*/ nativeModule()
41162
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
41163
+ /*freeFunc:*/ nativeModule()
41164
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_void,
41165
+ /*liftFunc:*/ (_v) => {},
41166
+ /*liftString:*/ FfiConverterString.lift,
41167
+ /*asyncOpts:*/ asyncOpts_
41168
+ );
41169
+ } catch (__error: any) {
41170
+ if (uniffiIsDebug && __error instanceof Error) {
41171
+ __error.stack = __stack;
41172
+ }
41173
+ throw __error;
41174
+ }
41175
+ }
41176
+
39301
41177
  /**
39302
41178
  * Threads a shared [`SdkContext`](crate::SdkContext) into the builder.
39303
41179
  *
@@ -43849,6 +45725,11 @@ const FfiConverterOptionalTypeLightningAddressInfo = new FfiConverterOptional(
43849
45725
  FfiConverterTypeLightningAddressInfo
43850
45726
  );
43851
45727
 
45728
+ // FfiConverter for LnurlPayContext | undefined
45729
+ const FfiConverterOptionalTypeLnurlPayContext = new FfiConverterOptional(
45730
+ FfiConverterTypeLnurlPayContext
45731
+ );
45732
+
43852
45733
  // FfiConverter for LnurlPayInfo | undefined
43853
45734
  const FfiConverterOptionalTypeLnurlPayInfo = new FfiConverterOptional(
43854
45735
  FfiConverterTypeLnurlPayInfo
@@ -44126,6 +46007,9 @@ const FfiConverterArrayTypeWebhook = new FfiConverterArray(
44126
46007
  // FfiConverter for Array<string>
44127
46008
  const FfiConverterArrayString = new FfiConverterArray(FfiConverterString);
44128
46009
 
46010
+ // FfiConverter for Array</*u64*/bigint>
46011
+ const FfiConverterArrayUInt64 = new FfiConverterArray(FfiConverterUInt64);
46012
+
44129
46013
  // FfiConverter for Map<string, Array<Payment>>
44130
46014
  const FfiConverterMapStringArrayTypePayment = new FfiConverterMap(
44131
46015
  FfiConverterString,
@@ -44152,6 +46036,10 @@ const FfiConverterOptionalTypeAssetFilter = new FfiConverterOptional(
44152
46036
  FfiConverterTypeAssetFilter
44153
46037
  );
44154
46038
 
46039
+ // FfiConverter for BuildTransferPackageOptions | undefined
46040
+ const FfiConverterOptionalTypeBuildTransferPackageOptions =
46041
+ new FfiConverterOptional(FfiConverterTypeBuildTransferPackageOptions);
46042
+
44155
46043
  // FfiConverter for ConversionFilter | undefined
44156
46044
  const FfiConverterOptionalTypeConversionFilter = new FfiConverterOptional(
44157
46045
  FfiConverterTypeConversionFilter
@@ -44396,6 +46284,14 @@ function uniffiEnsureInitialized() {
44396
46284
  'uniffi_breez_sdk_spark_checksum_func_default_server_config'
44397
46285
  );
44398
46286
  }
46287
+ if (
46288
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_session_store() !==
46289
+ 24904
46290
+ ) {
46291
+ throw new UniffiInternalError.ApiChecksumMismatch(
46292
+ 'uniffi_breez_sdk_spark_checksum_func_default_session_store'
46293
+ );
46294
+ }
44399
46295
  if (
44400
46296
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_storage() !==
44401
46297
  56226
@@ -44500,6 +46396,22 @@ function uniffiEnsureInitialized() {
44500
46396
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_authorize_lightning_address_transfer'
44501
46397
  );
44502
46398
  }
46399
+ if (
46400
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package() !==
46401
+ 23822
46402
+ ) {
46403
+ throw new UniffiInternalError.ApiChecksumMismatch(
46404
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package'
46405
+ );
46406
+ }
46407
+ if (
46408
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package() !==
46409
+ 60228
46410
+ ) {
46411
+ throw new UniffiInternalError.ApiChecksumMismatch(
46412
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package'
46413
+ );
46414
+ }
44503
46415
  if (
44504
46416
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin() !==
44505
46417
  34179
@@ -44740,6 +46652,22 @@ function uniffiEnsureInitialized() {
44740
46652
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment'
44741
46653
  );
44742
46654
  }
46655
+ if (
46656
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package() !==
46657
+ 48698
46658
+ ) {
46659
+ throw new UniffiInternalError.ApiChecksumMismatch(
46660
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package'
46661
+ );
46662
+ }
46663
+ if (
46664
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package() !==
46665
+ 59188
46666
+ ) {
46667
+ throw new UniffiInternalError.ApiChecksumMismatch(
46668
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package'
46669
+ );
46670
+ }
44743
46671
  if (
44744
46672
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment() !==
44745
46673
  36984
@@ -44948,9 +46876,17 @@ function uniffiEnsureInitialized() {
44948
46876
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_public_key_for_leaf'
44949
46877
  );
44950
46878
  }
46879
+ if (
46880
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_remote() !==
46881
+ 63049
46882
+ ) {
46883
+ throw new UniffiInternalError.ApiChecksumMismatch(
46884
+ 'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_remote'
46885
+ );
46886
+ }
44951
46887
  if (
44952
46888
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_static_deposit_public_key() !==
44953
- 11994
46889
+ 54380
44954
46890
  ) {
44955
46891
  throw new UniffiInternalError.ApiChecksumMismatch(
44956
46892
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_static_deposit_public_key'
@@ -44958,7 +46894,7 @@ function uniffiEnsureInitialized() {
44958
46894
  }
44959
46895
  if (
44960
46896
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_authentication_challenge() !==
44961
- 57313
46897
+ 53611
44962
46898
  ) {
44963
46899
  throw new UniffiInternalError.ApiChecksumMismatch(
44964
46900
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_authentication_challenge'
@@ -44966,7 +46902,7 @@ function uniffiEnsureInitialized() {
44966
46902
  }
44967
46903
  if (
44968
46904
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_message() !==
44969
- 56093
46905
+ 1815
44970
46906
  ) {
44971
46907
  throw new UniffiInternalError.ApiChecksumMismatch(
44972
46908
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_message'
@@ -44974,7 +46910,7 @@ function uniffiEnsureInitialized() {
44974
46910
  }
44975
46911
  if (
44976
46912
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_frost() !==
44977
- 44871
46913
+ 41995
44978
46914
  ) {
44979
46915
  throw new UniffiInternalError.ApiChecksumMismatch(
44980
46916
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_frost'
@@ -44982,7 +46918,7 @@ function uniffiEnsureInitialized() {
44982
46918
  }
44983
46919
  if (
44984
46920
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_transfer() !==
44985
- 42596
46921
+ 7663
44986
46922
  ) {
44987
46923
  throw new UniffiInternalError.ApiChecksumMismatch(
44988
46924
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_transfer'
@@ -44990,7 +46926,7 @@ function uniffiEnsureInitialized() {
44990
46926
  }
44991
46927
  if (
44992
46928
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_claim() !==
44993
- 109
46929
+ 40463
44994
46930
  ) {
44995
46931
  throw new UniffiInternalError.ApiChecksumMismatch(
44996
46932
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_claim'
@@ -44998,7 +46934,7 @@ function uniffiEnsureInitialized() {
44998
46934
  }
44999
46935
  if (
45000
46936
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_lightning_receive() !==
45001
- 49812
46937
+ 22362
45002
46938
  ) {
45003
46939
  throw new UniffiInternalError.ApiChecksumMismatch(
45004
46940
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_lightning_receive'
@@ -45006,7 +46942,7 @@ function uniffiEnsureInitialized() {
45006
46942
  }
45007
46943
  if (
45008
46944
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_static_deposit() !==
45009
- 119
46945
+ 44945
45010
46946
  ) {
45011
46947
  throw new UniffiInternalError.ApiChecksumMismatch(
45012
46948
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_static_deposit'
@@ -45014,7 +46950,7 @@ function uniffiEnsureInitialized() {
45014
46950
  }
45015
46951
  if (
45016
46952
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_start_static_deposit_refund() !==
45017
- 22509
46953
+ 15575
45018
46954
  ) {
45019
46955
  throw new UniffiInternalError.ApiChecksumMismatch(
45020
46956
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_start_static_deposit_refund'
@@ -45022,7 +46958,7 @@ function uniffiEnsureInitialized() {
45022
46958
  }
45023
46959
  if (
45024
46960
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_static_deposit_refund() !==
45025
- 28885
46961
+ 3082
45026
46962
  ) {
45027
46963
  throw new UniffiInternalError.ApiChecksumMismatch(
45028
46964
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_static_deposit_refund'
@@ -45030,7 +46966,7 @@ function uniffiEnsureInitialized() {
45030
46966
  }
45031
46967
  if (
45032
46968
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_spark_invoice() !==
45033
- 11535
46969
+ 33
45034
46970
  ) {
45035
46971
  throw new UniffiInternalError.ApiChecksumMismatch(
45036
46972
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_spark_invoice'
@@ -45038,7 +46974,7 @@ function uniffiEnsureInitialized() {
45038
46974
  }
45039
46975
  if (
45040
46976
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_token_transaction() !==
45041
- 58955
46977
+ 33122
45042
46978
  ) {
45043
46979
  throw new UniffiInternalError.ApiChecksumMismatch(
45044
46980
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_token_transaction'
@@ -45046,7 +46982,7 @@ function uniffiEnsureInitialized() {
45046
46982
  }
45047
46983
  if (
45048
46984
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_static_deposit_claim() !==
45049
- 64724
46985
+ 14601
45050
46986
  ) {
45051
46987
  throw new UniffiInternalError.ApiChecksumMismatch(
45052
46988
  'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_static_deposit_claim'
@@ -45260,6 +47196,14 @@ function uniffiEnsureInitialized() {
45260
47196
  'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service'
45261
47197
  );
45262
47198
  }
47199
+ if (
47200
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_store() !==
47201
+ 32818
47202
+ ) {
47203
+ throw new UniffiInternalError.ApiChecksumMismatch(
47204
+ 'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_store'
47205
+ );
47206
+ }
45263
47207
  if (
45264
47208
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_shared_context() !==
45265
47209
  64829
@@ -45695,6 +47639,9 @@ export default Object.freeze({
45695
47639
  FfiConverterTypeBolt12OfferBlindedPath,
45696
47640
  FfiConverterTypeBolt12OfferDetails,
45697
47641
  FfiConverterTypeBreezSdk,
47642
+ FfiConverterTypeBuildTransferPackageOptions,
47643
+ FfiConverterTypeBuildUnsignedLnurlPayPackageRequest,
47644
+ FfiConverterTypeBuildUnsignedTransferPackageRequest,
45698
47645
  FfiConverterTypeBurnIssuerTokenRequest,
45699
47646
  FfiConverterTypeBuyBitcoinRequest,
45700
47647
  FfiConverterTypeBuyBitcoinResponse,
@@ -45818,6 +47765,7 @@ export default Object.freeze({
45818
47765
  FfiConverterTypeLnurlCallbackStatus,
45819
47766
  FfiConverterTypeLnurlErrorDetails,
45820
47767
  FfiConverterTypeLnurlInfo,
47768
+ FfiConverterTypeLnurlPayContext,
45821
47769
  FfiConverterTypeLnurlPayInfo,
45822
47770
  FfiConverterTypeLnurlPayRequest,
45823
47771
  FfiConverterTypeLnurlPayRequestDetails,
@@ -45870,6 +47818,10 @@ export default Object.freeze({
45870
47818
  FfiConverterTypeProvisionalPaymentDetails,
45871
47819
  FfiConverterTypePublicKey,
45872
47820
  FfiConverterTypePublicKeyBytes,
47821
+ FfiConverterTypePublishSignedLnurlPayPackageRequest,
47822
+ FfiConverterTypePublishSignedLnurlPayResponse,
47823
+ FfiConverterTypePublishSignedTransferPackageRequest,
47824
+ FfiConverterTypePublishSignedTransferPackageResponse,
45873
47825
  FfiConverterTypeRate,
45874
47826
  FfiConverterTypeReceivePaymentMethod,
45875
47827
  FfiConverterTypeReceivePaymentRequest,
@@ -45914,6 +47866,7 @@ export default Object.freeze({
45914
47866
  FfiConverterTypeSignInResponse,
45915
47867
  FfiConverterTypeSignMessageRequest,
45916
47868
  FfiConverterTypeSignMessageResponse,
47869
+ FfiConverterTypeSignedTransferPackage,
45917
47870
  FfiConverterTypeSignerError,
45918
47871
  FfiConverterTypeSigningOnlyExternalSigners,
45919
47872
  FfiConverterTypeSilentPaymentAddressDetails,
@@ -45948,12 +47901,15 @@ export default Object.freeze({
45948
47901
  FfiConverterTypeTokenOptimizationConfig,
45949
47902
  FfiConverterTypeTokenTransactionType,
45950
47903
  FfiConverterTypeTransferAuthorization,
47904
+ FfiConverterTypeTransferSignature,
47905
+ FfiConverterTypeTransferTarget,
45951
47906
  FfiConverterTypeTurnkeyConfig,
45952
47907
  FfiConverterTypeTurnkeyRetryConfig,
45953
47908
  FfiConverterTypeTxStatus,
45954
47909
  FfiConverterTypeUnfreezeIssuerTokenRequest,
45955
47910
  FfiConverterTypeUnfreezeIssuerTokenResponse,
45956
47911
  FfiConverterTypeUnregisterWebhookRequest,
47912
+ FfiConverterTypeUnsignedTransferPackage,
45957
47913
  FfiConverterTypeUnversionedRecordChange,
45958
47914
  FfiConverterTypeUpdateContactRequest,
45959
47915
  FfiConverterTypeUpdateDepositPayload,