@breeztech/breez-sdk-spark-react-native 0.7.21 → 0.8.2
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 +681 -898
- package/cpp/generated/breez_sdk_spark.hpp +41 -50
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +206 -145
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +205 -144
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +57 -62
- 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 +618 -450
- 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 +57 -62
- 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 +618 -450
- 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 +70 -84
- package/src/generated/breez_sdk_spark.ts +1986 -1532
|
@@ -49,6 +49,15 @@ export declare function defaultConfig(network: Network): Config;
|
|
|
49
49
|
* Result containing the signer as `Arc<dyn ExternalSigner>`
|
|
50
50
|
*/
|
|
51
51
|
export declare function defaultExternalSigner(mnemonic: string, passphrase: string | undefined, network: Network, keySetConfig: KeySetConfig | undefined): ExternalSigner;
|
|
52
|
+
/**
|
|
53
|
+
* Fetches the current status of Spark network services relevant to the SDK.
|
|
54
|
+
*
|
|
55
|
+
* This function queries the Spark status API and returns the worst status
|
|
56
|
+
* across the Spark Operators and SSP services.
|
|
57
|
+
*/
|
|
58
|
+
export declare function getSparkStatus(asyncOpts_?: {
|
|
59
|
+
signal: AbortSignal;
|
|
60
|
+
}): Promise<SparkStatus>;
|
|
52
61
|
export declare function initLogging(logDir: string | undefined, appLogger: Logger | undefined, logFilter: string | undefined): void;
|
|
53
62
|
/**
|
|
54
63
|
* Trait for event listeners
|
|
@@ -495,6 +504,67 @@ export declare const BurnIssuerTokenRequest: Readonly<{
|
|
|
495
504
|
*/
|
|
496
505
|
defaults: () => Partial<BurnIssuerTokenRequest>;
|
|
497
506
|
}>;
|
|
507
|
+
/**
|
|
508
|
+
* Request to buy Bitcoin using an external provider (`MoonPay`)
|
|
509
|
+
*/
|
|
510
|
+
export type BuyBitcoinRequest = {
|
|
511
|
+
/**
|
|
512
|
+
* Optional: Lock the purchase to a specific amount in satoshis.
|
|
513
|
+
* When provided, the user cannot change the amount in the purchase flow.
|
|
514
|
+
*/
|
|
515
|
+
lockedAmountSat: /*u64*/ bigint | undefined;
|
|
516
|
+
/**
|
|
517
|
+
* Optional: Custom redirect URL after purchase completion
|
|
518
|
+
*/
|
|
519
|
+
redirectUrl: string | undefined;
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Generated factory for {@link BuyBitcoinRequest} record objects.
|
|
523
|
+
*/
|
|
524
|
+
export declare const BuyBitcoinRequest: Readonly<{
|
|
525
|
+
/**
|
|
526
|
+
* Create a frozen instance of {@link BuyBitcoinRequest}, with defaults specified
|
|
527
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
528
|
+
*/
|
|
529
|
+
create: (partial: Partial<BuyBitcoinRequest> & Required<Omit<BuyBitcoinRequest, "lockedAmountSat" | "redirectUrl">>) => BuyBitcoinRequest;
|
|
530
|
+
/**
|
|
531
|
+
* Create a frozen instance of {@link BuyBitcoinRequest}, with defaults specified
|
|
532
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
533
|
+
*/
|
|
534
|
+
new: (partial: Partial<BuyBitcoinRequest> & Required<Omit<BuyBitcoinRequest, "lockedAmountSat" | "redirectUrl">>) => BuyBitcoinRequest;
|
|
535
|
+
/**
|
|
536
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
537
|
+
*/
|
|
538
|
+
defaults: () => Partial<BuyBitcoinRequest>;
|
|
539
|
+
}>;
|
|
540
|
+
/**
|
|
541
|
+
* Response containing a URL to complete the Bitcoin purchase
|
|
542
|
+
*/
|
|
543
|
+
export type BuyBitcoinResponse = {
|
|
544
|
+
/**
|
|
545
|
+
* The URL to open in a browser to complete the purchase
|
|
546
|
+
*/
|
|
547
|
+
url: string;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Generated factory for {@link BuyBitcoinResponse} record objects.
|
|
551
|
+
*/
|
|
552
|
+
export declare const BuyBitcoinResponse: Readonly<{
|
|
553
|
+
/**
|
|
554
|
+
* Create a frozen instance of {@link BuyBitcoinResponse}, with defaults specified
|
|
555
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
556
|
+
*/
|
|
557
|
+
create: (partial: Partial<BuyBitcoinResponse> & Required<Omit<BuyBitcoinResponse, never>>) => BuyBitcoinResponse;
|
|
558
|
+
/**
|
|
559
|
+
* Create a frozen instance of {@link BuyBitcoinResponse}, with defaults specified
|
|
560
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
561
|
+
*/
|
|
562
|
+
new: (partial: Partial<BuyBitcoinResponse> & Required<Omit<BuyBitcoinResponse, never>>) => BuyBitcoinResponse;
|
|
563
|
+
/**
|
|
564
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
565
|
+
*/
|
|
566
|
+
defaults: () => Partial<BuyBitcoinResponse>;
|
|
567
|
+
}>;
|
|
498
568
|
export type CheckLightningAddressRequest = {
|
|
499
569
|
username: string;
|
|
500
570
|
};
|
|
@@ -781,6 +851,38 @@ export declare const ConnectWithSignerRequest: Readonly<{
|
|
|
781
851
|
*/
|
|
782
852
|
defaults: () => Partial<ConnectWithSignerRequest>;
|
|
783
853
|
}>;
|
|
854
|
+
/**
|
|
855
|
+
* Outlines the steps involved in a conversion
|
|
856
|
+
*/
|
|
857
|
+
export type ConversionDetails = {
|
|
858
|
+
/**
|
|
859
|
+
* First step is converting from the available asset
|
|
860
|
+
*/
|
|
861
|
+
from: ConversionStep;
|
|
862
|
+
/**
|
|
863
|
+
* Second step is converting to the requested asset
|
|
864
|
+
*/
|
|
865
|
+
to: ConversionStep;
|
|
866
|
+
};
|
|
867
|
+
/**
|
|
868
|
+
* Generated factory for {@link ConversionDetails} record objects.
|
|
869
|
+
*/
|
|
870
|
+
export declare const ConversionDetails: Readonly<{
|
|
871
|
+
/**
|
|
872
|
+
* Create a frozen instance of {@link ConversionDetails}, with defaults specified
|
|
873
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
874
|
+
*/
|
|
875
|
+
create: (partial: Partial<ConversionDetails> & Required<Omit<ConversionDetails, never>>) => ConversionDetails;
|
|
876
|
+
/**
|
|
877
|
+
* Create a frozen instance of {@link ConversionDetails}, with defaults specified
|
|
878
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
879
|
+
*/
|
|
880
|
+
new: (partial: Partial<ConversionDetails> & Required<Omit<ConversionDetails, never>>) => ConversionDetails;
|
|
881
|
+
/**
|
|
882
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
883
|
+
*/
|
|
884
|
+
defaults: () => Partial<ConversionDetails>;
|
|
885
|
+
}>;
|
|
784
886
|
/**
|
|
785
887
|
* Response from estimating a conversion, used when preparing a payment that requires conversion
|
|
786
888
|
*/
|
|
@@ -873,7 +975,7 @@ export type ConversionOptions = {
|
|
|
873
975
|
conversionType: ConversionType;
|
|
874
976
|
/**
|
|
875
977
|
* The optional maximum slippage in basis points (1/100 of a percent) allowed when
|
|
876
|
-
* a conversion is needed to fulfill the payment. Defaults to
|
|
978
|
+
* a conversion is needed to fulfill the payment. Defaults to 10 bps (0.1%) if not set.
|
|
877
979
|
* The conversion will fail if the actual amount received is less than
|
|
878
980
|
* `estimated_amount * (1 - max_slippage_bps / 10_000)`.
|
|
879
981
|
*/
|
|
@@ -905,6 +1007,51 @@ export declare const ConversionOptions: Readonly<{
|
|
|
905
1007
|
*/
|
|
906
1008
|
defaults: () => Partial<ConversionOptions>;
|
|
907
1009
|
}>;
|
|
1010
|
+
/**
|
|
1011
|
+
* A single step in a conversion
|
|
1012
|
+
*/
|
|
1013
|
+
export type ConversionStep = {
|
|
1014
|
+
/**
|
|
1015
|
+
* The underlying payment id of the conversion step
|
|
1016
|
+
*/
|
|
1017
|
+
paymentId: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* Payment amount in satoshis or token base units
|
|
1020
|
+
*/
|
|
1021
|
+
amount: U128;
|
|
1022
|
+
/**
|
|
1023
|
+
* Fee paid in satoshis or token base units
|
|
1024
|
+
* This represents the payment fee + the conversion fee
|
|
1025
|
+
*/
|
|
1026
|
+
fee: U128;
|
|
1027
|
+
/**
|
|
1028
|
+
* Method of payment
|
|
1029
|
+
*/
|
|
1030
|
+
method: PaymentMethod;
|
|
1031
|
+
/**
|
|
1032
|
+
* Token metadata if a token is used for payment
|
|
1033
|
+
*/
|
|
1034
|
+
tokenMetadata: TokenMetadata | undefined;
|
|
1035
|
+
};
|
|
1036
|
+
/**
|
|
1037
|
+
* Generated factory for {@link ConversionStep} record objects.
|
|
1038
|
+
*/
|
|
1039
|
+
export declare const ConversionStep: Readonly<{
|
|
1040
|
+
/**
|
|
1041
|
+
* Create a frozen instance of {@link ConversionStep}, with defaults specified
|
|
1042
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1043
|
+
*/
|
|
1044
|
+
create: (partial: Partial<ConversionStep> & Required<Omit<ConversionStep, never>>) => ConversionStep;
|
|
1045
|
+
/**
|
|
1046
|
+
* Create a frozen instance of {@link ConversionStep}, with defaults specified
|
|
1047
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1048
|
+
*/
|
|
1049
|
+
new: (partial: Partial<ConversionStep> & Required<Omit<ConversionStep, never>>) => ConversionStep;
|
|
1050
|
+
/**
|
|
1051
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1052
|
+
*/
|
|
1053
|
+
defaults: () => Partial<ConversionStep>;
|
|
1054
|
+
}>;
|
|
908
1055
|
export type CreateIssuerTokenRequest = {
|
|
909
1056
|
name: string;
|
|
910
1057
|
ticker: string;
|
|
@@ -1650,6 +1797,10 @@ export declare const GetInfoRequest: Readonly<{
|
|
|
1650
1797
|
* Response containing the balance of the wallet
|
|
1651
1798
|
*/
|
|
1652
1799
|
export type GetInfoResponse = {
|
|
1800
|
+
/**
|
|
1801
|
+
* The identity public key of the wallet as a hex string
|
|
1802
|
+
*/
|
|
1803
|
+
identityPubkey: string;
|
|
1653
1804
|
/**
|
|
1654
1805
|
* The balance in satoshis
|
|
1655
1806
|
*/
|
|
@@ -1953,7 +2104,7 @@ export declare const LightningAddressDetails: Readonly<{
|
|
|
1953
2104
|
export type LightningAddressInfo = {
|
|
1954
2105
|
description: string;
|
|
1955
2106
|
lightningAddress: string;
|
|
1956
|
-
lnurl:
|
|
2107
|
+
lnurl: LnurlInfo;
|
|
1957
2108
|
username: string;
|
|
1958
2109
|
};
|
|
1959
2110
|
/**
|
|
@@ -2220,6 +2371,29 @@ export declare const LnurlErrorDetails: Readonly<{
|
|
|
2220
2371
|
*/
|
|
2221
2372
|
defaults: () => Partial<LnurlErrorDetails>;
|
|
2222
2373
|
}>;
|
|
2374
|
+
export type LnurlInfo = {
|
|
2375
|
+
url: string;
|
|
2376
|
+
bech32: string;
|
|
2377
|
+
};
|
|
2378
|
+
/**
|
|
2379
|
+
* Generated factory for {@link LnurlInfo} record objects.
|
|
2380
|
+
*/
|
|
2381
|
+
export declare const LnurlInfo: Readonly<{
|
|
2382
|
+
/**
|
|
2383
|
+
* Create a frozen instance of {@link LnurlInfo}, with defaults specified
|
|
2384
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2385
|
+
*/
|
|
2386
|
+
create: (partial: Partial<LnurlInfo> & Required<Omit<LnurlInfo, never>>) => LnurlInfo;
|
|
2387
|
+
/**
|
|
2388
|
+
* Create a frozen instance of {@link LnurlInfo}, with defaults specified
|
|
2389
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2390
|
+
*/
|
|
2391
|
+
new: (partial: Partial<LnurlInfo> & Required<Omit<LnurlInfo, never>>) => LnurlInfo;
|
|
2392
|
+
/**
|
|
2393
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2394
|
+
*/
|
|
2395
|
+
defaults: () => Partial<LnurlInfo>;
|
|
2396
|
+
}>;
|
|
2223
2397
|
/**
|
|
2224
2398
|
* Represents the payment LNURL info
|
|
2225
2399
|
*/
|
|
@@ -2777,6 +2951,10 @@ export type Payment = {
|
|
|
2777
2951
|
* Details of the payment
|
|
2778
2952
|
*/
|
|
2779
2953
|
details: PaymentDetails | undefined;
|
|
2954
|
+
/**
|
|
2955
|
+
* If set, this payment involved a conversion before the payment
|
|
2956
|
+
*/
|
|
2957
|
+
conversionDetails: ConversionDetails | undefined;
|
|
2780
2958
|
};
|
|
2781
2959
|
/**
|
|
2782
2960
|
* Generated factory for {@link Payment} record objects.
|
|
@@ -2850,10 +3028,21 @@ export declare const PaymentRequestSource: Readonly<{
|
|
|
2850
3028
|
defaults: () => Partial<PaymentRequestSource>;
|
|
2851
3029
|
}>;
|
|
2852
3030
|
export type PrepareLnurlPayRequest = {
|
|
3031
|
+
/**
|
|
3032
|
+
* The amount to send in satoshis.
|
|
3033
|
+
*/
|
|
2853
3034
|
amountSats: bigint;
|
|
2854
3035
|
payRequest: LnurlPayRequestDetails;
|
|
2855
3036
|
comment: string | undefined;
|
|
2856
3037
|
validateSuccessActionUrl: boolean | undefined;
|
|
3038
|
+
/**
|
|
3039
|
+
* If provided, the payment will include a token conversion step before sending the payment
|
|
3040
|
+
*/
|
|
3041
|
+
conversionOptions: ConversionOptions | undefined;
|
|
3042
|
+
/**
|
|
3043
|
+
* How fees should be handled. Defaults to `FeesExcluded` (fees added on top).
|
|
3044
|
+
*/
|
|
3045
|
+
feePolicy: FeePolicy | undefined;
|
|
2857
3046
|
};
|
|
2858
3047
|
/**
|
|
2859
3048
|
* Generated factory for {@link PrepareLnurlPayRequest} record objects.
|
|
@@ -2863,24 +3052,39 @@ export declare const PrepareLnurlPayRequest: Readonly<{
|
|
|
2863
3052
|
* Create a frozen instance of {@link PrepareLnurlPayRequest}, with defaults specified
|
|
2864
3053
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2865
3054
|
*/
|
|
2866
|
-
create: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl">>) => PrepareLnurlPayRequest;
|
|
3055
|
+
create: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl" | "conversionOptions" | "feePolicy">>) => PrepareLnurlPayRequest;
|
|
2867
3056
|
/**
|
|
2868
3057
|
* Create a frozen instance of {@link PrepareLnurlPayRequest}, with defaults specified
|
|
2869
3058
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2870
3059
|
*/
|
|
2871
|
-
new: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl">>) => PrepareLnurlPayRequest;
|
|
3060
|
+
new: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl" | "conversionOptions" | "feePolicy">>) => PrepareLnurlPayRequest;
|
|
2872
3061
|
/**
|
|
2873
3062
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2874
3063
|
*/
|
|
2875
3064
|
defaults: () => Partial<PrepareLnurlPayRequest>;
|
|
2876
3065
|
}>;
|
|
2877
3066
|
export type PrepareLnurlPayResponse = {
|
|
3067
|
+
/**
|
|
3068
|
+
* The amount to send in satoshis.
|
|
3069
|
+
*/
|
|
2878
3070
|
amountSats: bigint;
|
|
2879
3071
|
comment: string | undefined;
|
|
2880
3072
|
payRequest: LnurlPayRequestDetails;
|
|
3073
|
+
/**
|
|
3074
|
+
* The fee in satoshis. For `FeesIncluded` operations, this represents the total fee
|
|
3075
|
+
* (including potential overpayment).
|
|
3076
|
+
*/
|
|
2881
3077
|
feeSats: bigint;
|
|
2882
3078
|
invoiceDetails: Bolt11InvoiceDetails;
|
|
2883
3079
|
successAction: SuccessAction | undefined;
|
|
3080
|
+
/**
|
|
3081
|
+
* When set, the payment will include a token conversion step before sending the payment
|
|
3082
|
+
*/
|
|
3083
|
+
conversionEstimate: ConversionEstimate | undefined;
|
|
3084
|
+
/**
|
|
3085
|
+
* How fees are handled for this payment.
|
|
3086
|
+
*/
|
|
3087
|
+
feePolicy: FeePolicy;
|
|
2884
3088
|
};
|
|
2885
3089
|
/**
|
|
2886
3090
|
* Generated factory for {@link PrepareLnurlPayResponse} record objects.
|
|
@@ -2904,19 +3108,25 @@ export declare const PrepareLnurlPayResponse: Readonly<{
|
|
|
2904
3108
|
export type PrepareSendPaymentRequest = {
|
|
2905
3109
|
paymentRequest: string;
|
|
2906
3110
|
/**
|
|
2907
|
-
*
|
|
2908
|
-
*
|
|
3111
|
+
* The amount to send.
|
|
3112
|
+
* Optional for payment requests with embedded amounts (e.g., Spark/Bolt11 invoices with amounts).
|
|
3113
|
+
* Required for Spark addresses, Bitcoin addresses, and amountless invoices.
|
|
3114
|
+
* Denominated in satoshis for Bitcoin payments, or token base units for token payments.
|
|
2909
3115
|
*/
|
|
2910
3116
|
amount: U128 | undefined;
|
|
2911
3117
|
/**
|
|
2912
|
-
*
|
|
2913
|
-
*
|
|
3118
|
+
* Optional token identifier for token payments.
|
|
3119
|
+
* Absence indicates that the payment is a Bitcoin payment.
|
|
2914
3120
|
*/
|
|
2915
3121
|
tokenIdentifier: string | undefined;
|
|
2916
3122
|
/**
|
|
2917
3123
|
* If provided, the payment will include a conversion step before sending the payment
|
|
2918
3124
|
*/
|
|
2919
3125
|
conversionOptions: ConversionOptions | undefined;
|
|
3126
|
+
/**
|
|
3127
|
+
* How fees should be handled. Defaults to `FeesExcluded` (fees added on top).
|
|
3128
|
+
*/
|
|
3129
|
+
feePolicy: FeePolicy | undefined;
|
|
2920
3130
|
};
|
|
2921
3131
|
/**
|
|
2922
3132
|
* Generated factory for {@link PrepareSendPaymentRequest} record objects.
|
|
@@ -2926,12 +3136,12 @@ export declare const PrepareSendPaymentRequest: Readonly<{
|
|
|
2926
3136
|
* Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
|
|
2927
3137
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2928
3138
|
*/
|
|
2929
|
-
create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
|
|
3139
|
+
create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions" | "feePolicy">>) => PrepareSendPaymentRequest;
|
|
2930
3140
|
/**
|
|
2931
3141
|
* Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
|
|
2932
3142
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2933
3143
|
*/
|
|
2934
|
-
new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
|
|
3144
|
+
new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions" | "feePolicy">>) => PrepareSendPaymentRequest;
|
|
2935
3145
|
/**
|
|
2936
3146
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2937
3147
|
*/
|
|
@@ -2940,19 +3150,23 @@ export declare const PrepareSendPaymentRequest: Readonly<{
|
|
|
2940
3150
|
export type PrepareSendPaymentResponse = {
|
|
2941
3151
|
paymentMethod: SendPaymentMethod;
|
|
2942
3152
|
/**
|
|
2943
|
-
*
|
|
2944
|
-
*
|
|
3153
|
+
* The amount for the payment.
|
|
3154
|
+
* Denominated in satoshis for Bitcoin payments, or token base units for token payments.
|
|
2945
3155
|
*/
|
|
2946
3156
|
amount: U128;
|
|
2947
3157
|
/**
|
|
2948
|
-
*
|
|
2949
|
-
*
|
|
3158
|
+
* Optional token identifier for token payments.
|
|
3159
|
+
* Absence indicates that the payment is a Bitcoin payment.
|
|
2950
3160
|
*/
|
|
2951
3161
|
tokenIdentifier: string | undefined;
|
|
2952
3162
|
/**
|
|
2953
3163
|
* When set, the payment will include a conversion step before sending the payment
|
|
2954
3164
|
*/
|
|
2955
3165
|
conversionEstimate: ConversionEstimate | undefined;
|
|
3166
|
+
/**
|
|
3167
|
+
* How fees are handled for this payment.
|
|
3168
|
+
*/
|
|
3169
|
+
feePolicy: FeePolicy;
|
|
2956
3170
|
};
|
|
2957
3171
|
/**
|
|
2958
3172
|
* Generated factory for {@link PrepareSendPaymentResponse} record objects.
|
|
@@ -3161,7 +3375,7 @@ export type RecordChange = {
|
|
|
3161
3375
|
id: RecordId;
|
|
3162
3376
|
schemaVersion: string;
|
|
3163
3377
|
updatedFields: Map<string, string>;
|
|
3164
|
-
|
|
3378
|
+
localRevision: bigint;
|
|
3165
3379
|
};
|
|
3166
3380
|
/**
|
|
3167
3381
|
* Generated factory for {@link RecordChange} record objects.
|
|
@@ -3753,6 +3967,38 @@ export declare const SparkInvoicePaymentDetails: Readonly<{
|
|
|
3753
3967
|
*/
|
|
3754
3968
|
defaults: () => Partial<SparkInvoicePaymentDetails>;
|
|
3755
3969
|
}>;
|
|
3970
|
+
/**
|
|
3971
|
+
* The status of the Spark network services relevant to the SDK.
|
|
3972
|
+
*/
|
|
3973
|
+
export type SparkStatus = {
|
|
3974
|
+
/**
|
|
3975
|
+
* The worst status across all relevant services.
|
|
3976
|
+
*/
|
|
3977
|
+
status: ServiceStatus;
|
|
3978
|
+
/**
|
|
3979
|
+
* The last time the status was updated, as a unix timestamp in seconds.
|
|
3980
|
+
*/
|
|
3981
|
+
lastUpdated: bigint;
|
|
3982
|
+
};
|
|
3983
|
+
/**
|
|
3984
|
+
* Generated factory for {@link SparkStatus} record objects.
|
|
3985
|
+
*/
|
|
3986
|
+
export declare const SparkStatus: Readonly<{
|
|
3987
|
+
/**
|
|
3988
|
+
* Create a frozen instance of {@link SparkStatus}, with defaults specified
|
|
3989
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
3990
|
+
*/
|
|
3991
|
+
create: (partial: Partial<SparkStatus> & Required<Omit<SparkStatus, never>>) => SparkStatus;
|
|
3992
|
+
/**
|
|
3993
|
+
* Create a frozen instance of {@link SparkStatus}, with defaults specified
|
|
3994
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
3995
|
+
*/
|
|
3996
|
+
new: (partial: Partial<SparkStatus> & Required<Omit<SparkStatus, never>>) => SparkStatus;
|
|
3997
|
+
/**
|
|
3998
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
3999
|
+
*/
|
|
4000
|
+
defaults: () => Partial<SparkStatus>;
|
|
4001
|
+
}>;
|
|
3756
4002
|
/**
|
|
3757
4003
|
* Settings for the symbol representation of a currency
|
|
3758
4004
|
*/
|
|
@@ -5193,6 +5439,21 @@ export declare const Fee: Readonly<{
|
|
|
5193
5439
|
};
|
|
5194
5440
|
}>;
|
|
5195
5441
|
export type Fee = InstanceType<(typeof Fee)[keyof Omit<typeof Fee, 'instanceOf'>]>;
|
|
5442
|
+
/**
|
|
5443
|
+
* Specifies how fees are handled in a payment.
|
|
5444
|
+
*/
|
|
5445
|
+
export declare enum FeePolicy {
|
|
5446
|
+
/**
|
|
5447
|
+
* Fees are added on top of the specified amount (default behavior).
|
|
5448
|
+
* The receiver gets the exact amount specified.
|
|
5449
|
+
*/
|
|
5450
|
+
FeesExcluded = 0,
|
|
5451
|
+
/**
|
|
5452
|
+
* Fees are deducted from the specified amount.
|
|
5453
|
+
* The receiver gets the amount minus fees.
|
|
5454
|
+
*/
|
|
5455
|
+
FeesIncluded = 1
|
|
5456
|
+
}
|
|
5196
5457
|
export declare enum InputType_Tags {
|
|
5197
5458
|
BitcoinAddress = "BitcoinAddress",
|
|
5198
5459
|
Bolt11Invoice = "Bolt11Invoice",
|
|
@@ -6126,6 +6387,7 @@ export declare const PaymentDetails: Readonly<{
|
|
|
6126
6387
|
new (inner: {
|
|
6127
6388
|
metadata: TokenMetadata;
|
|
6128
6389
|
txHash: string;
|
|
6390
|
+
txType: TokenTransactionType;
|
|
6129
6391
|
/**
|
|
6130
6392
|
* The invoice details if the payment fulfilled a spark invoice
|
|
6131
6393
|
*/ invoiceDetails: SparkInvoicePaymentDetails | undefined;
|
|
@@ -6137,6 +6399,7 @@ export declare const PaymentDetails: Readonly<{
|
|
|
6137
6399
|
readonly inner: Readonly<{
|
|
6138
6400
|
metadata: TokenMetadata;
|
|
6139
6401
|
txHash: string;
|
|
6402
|
+
txType: TokenTransactionType;
|
|
6140
6403
|
invoiceDetails: SparkInvoicePaymentDetails | undefined;
|
|
6141
6404
|
conversionInfo: ConversionInfo | undefined;
|
|
6142
6405
|
}>;
|
|
@@ -6149,6 +6412,7 @@ export declare const PaymentDetails: Readonly<{
|
|
|
6149
6412
|
"new"(inner: {
|
|
6150
6413
|
metadata: TokenMetadata;
|
|
6151
6414
|
txHash: string;
|
|
6415
|
+
txType: TokenTransactionType;
|
|
6152
6416
|
/**
|
|
6153
6417
|
* The invoice details if the payment fulfilled a spark invoice
|
|
6154
6418
|
*/ invoiceDetails: SparkInvoicePaymentDetails | undefined;
|
|
@@ -6160,6 +6424,7 @@ export declare const PaymentDetails: Readonly<{
|
|
|
6160
6424
|
readonly inner: Readonly<{
|
|
6161
6425
|
metadata: TokenMetadata;
|
|
6162
6426
|
txHash: string;
|
|
6427
|
+
txType: TokenTransactionType;
|
|
6163
6428
|
invoiceDetails: SparkInvoicePaymentDetails | undefined;
|
|
6164
6429
|
conversionInfo: ConversionInfo | undefined;
|
|
6165
6430
|
}>;
|
|
@@ -6174,6 +6439,7 @@ export declare const PaymentDetails: Readonly<{
|
|
|
6174
6439
|
readonly inner: Readonly<{
|
|
6175
6440
|
metadata: TokenMetadata;
|
|
6176
6441
|
txHash: string;
|
|
6442
|
+
txType: TokenTransactionType;
|
|
6177
6443
|
invoiceDetails: SparkInvoicePaymentDetails | undefined;
|
|
6178
6444
|
conversionInfo: ConversionInfo | undefined;
|
|
6179
6445
|
}>;
|
|
@@ -6440,11 +6706,15 @@ export declare const PaymentDetailsFilter: Readonly<{
|
|
|
6440
6706
|
/**
|
|
6441
6707
|
* Filter by transaction hash
|
|
6442
6708
|
*/ txHash: string | undefined;
|
|
6709
|
+
/**
|
|
6710
|
+
* Filter by transaction type
|
|
6711
|
+
*/ txType: TokenTransactionType | undefined;
|
|
6443
6712
|
}): {
|
|
6444
6713
|
readonly tag: PaymentDetailsFilter_Tags.Token;
|
|
6445
6714
|
readonly inner: Readonly<{
|
|
6446
6715
|
conversionRefundNeeded: boolean | undefined;
|
|
6447
6716
|
txHash: string | undefined;
|
|
6717
|
+
txType: TokenTransactionType | undefined;
|
|
6448
6718
|
}>;
|
|
6449
6719
|
/**
|
|
6450
6720
|
* @private
|
|
@@ -6459,11 +6729,15 @@ export declare const PaymentDetailsFilter: Readonly<{
|
|
|
6459
6729
|
/**
|
|
6460
6730
|
* Filter by transaction hash
|
|
6461
6731
|
*/ txHash: string | undefined;
|
|
6732
|
+
/**
|
|
6733
|
+
* Filter by transaction type
|
|
6734
|
+
*/ txType: TokenTransactionType | undefined;
|
|
6462
6735
|
}): {
|
|
6463
6736
|
readonly tag: PaymentDetailsFilter_Tags.Token;
|
|
6464
6737
|
readonly inner: Readonly<{
|
|
6465
6738
|
conversionRefundNeeded: boolean | undefined;
|
|
6466
6739
|
txHash: string | undefined;
|
|
6740
|
+
txType: TokenTransactionType | undefined;
|
|
6467
6741
|
}>;
|
|
6468
6742
|
/**
|
|
6469
6743
|
* @private
|
|
@@ -6476,6 +6750,7 @@ export declare const PaymentDetailsFilter: Readonly<{
|
|
|
6476
6750
|
readonly inner: Readonly<{
|
|
6477
6751
|
conversionRefundNeeded: boolean | undefined;
|
|
6478
6752
|
txHash: string | undefined;
|
|
6753
|
+
txType: TokenTransactionType | undefined;
|
|
6479
6754
|
}>;
|
|
6480
6755
|
/**
|
|
6481
6756
|
* @private
|
|
@@ -8602,7 +8877,9 @@ export declare const SendPaymentOptions: Readonly<{
|
|
|
8602
8877
|
instanceOf: (obj: any) => obj is SendPaymentOptions;
|
|
8603
8878
|
BitcoinAddress: {
|
|
8604
8879
|
new (inner: {
|
|
8605
|
-
|
|
8880
|
+
/**
|
|
8881
|
+
* Confirmation speed for the on-chain transaction.
|
|
8882
|
+
*/ confirmationSpeed: OnchainConfirmationSpeed;
|
|
8606
8883
|
}): {
|
|
8607
8884
|
readonly tag: SendPaymentOptions_Tags.BitcoinAddress;
|
|
8608
8885
|
readonly inner: Readonly<{
|
|
@@ -8615,7 +8892,9 @@ export declare const SendPaymentOptions: Readonly<{
|
|
|
8615
8892
|
readonly [uniffiTypeNameSymbol]: "SendPaymentOptions";
|
|
8616
8893
|
};
|
|
8617
8894
|
"new"(inner: {
|
|
8618
|
-
|
|
8895
|
+
/**
|
|
8896
|
+
* Confirmation speed for the on-chain transaction.
|
|
8897
|
+
*/ confirmationSpeed: OnchainConfirmationSpeed;
|
|
8619
8898
|
}): {
|
|
8620
8899
|
readonly tag: SendPaymentOptions_Tags.BitcoinAddress;
|
|
8621
8900
|
readonly inner: Readonly<{
|
|
@@ -9486,6 +9765,31 @@ export declare const ServiceConnectivityError: Readonly<{
|
|
|
9486
9765
|
};
|
|
9487
9766
|
}>;
|
|
9488
9767
|
export type ServiceConnectivityError = InstanceType<(typeof ServiceConnectivityError)[keyof Omit<typeof ServiceConnectivityError, 'instanceOf'>]>;
|
|
9768
|
+
/**
|
|
9769
|
+
* The operational status of a Spark service.
|
|
9770
|
+
*/
|
|
9771
|
+
export declare enum ServiceStatus {
|
|
9772
|
+
/**
|
|
9773
|
+
* Service is fully operational.
|
|
9774
|
+
*/
|
|
9775
|
+
Operational = 0,
|
|
9776
|
+
/**
|
|
9777
|
+
* Service is experiencing degraded performance.
|
|
9778
|
+
*/
|
|
9779
|
+
Degraded = 1,
|
|
9780
|
+
/**
|
|
9781
|
+
* Service is partially unavailable.
|
|
9782
|
+
*/
|
|
9783
|
+
Partial = 2,
|
|
9784
|
+
/**
|
|
9785
|
+
* Service status is unknown.
|
|
9786
|
+
*/
|
|
9787
|
+
Unknown = 3,
|
|
9788
|
+
/**
|
|
9789
|
+
* Service is experiencing a major outage.
|
|
9790
|
+
*/
|
|
9791
|
+
Major = 4
|
|
9792
|
+
}
|
|
9489
9793
|
export declare enum SignerError_Tags {
|
|
9490
9794
|
KeyDerivation = "KeyDerivation",
|
|
9491
9795
|
Signing = "Signing",
|
|
@@ -10017,6 +10321,7 @@ export declare enum SparkHtlcStatus {
|
|
|
10017
10321
|
Returned = 2
|
|
10018
10322
|
}
|
|
10019
10323
|
export declare enum StorageError_Tags {
|
|
10324
|
+
Connection = "Connection",
|
|
10020
10325
|
Implementation = "Implementation",
|
|
10021
10326
|
InitializationError = "InitializationError",
|
|
10022
10327
|
Serialization = "Serialization"
|
|
@@ -10026,6 +10331,77 @@ export declare enum StorageError_Tags {
|
|
|
10026
10331
|
*/
|
|
10027
10332
|
export declare const StorageError: Readonly<{
|
|
10028
10333
|
instanceOf: (obj: any) => obj is StorageError;
|
|
10334
|
+
Connection: {
|
|
10335
|
+
new (v0: string): {
|
|
10336
|
+
readonly tag: StorageError_Tags.Connection;
|
|
10337
|
+
readonly inner: Readonly<[string]>;
|
|
10338
|
+
/**
|
|
10339
|
+
* @private
|
|
10340
|
+
* This field is private and should not be used, use `tag` instead.
|
|
10341
|
+
*/
|
|
10342
|
+
readonly [uniffiTypeNameSymbol]: "StorageError";
|
|
10343
|
+
name: string;
|
|
10344
|
+
message: string;
|
|
10345
|
+
stack?: string;
|
|
10346
|
+
cause?: unknown;
|
|
10347
|
+
};
|
|
10348
|
+
"new"(v0: string): {
|
|
10349
|
+
readonly tag: StorageError_Tags.Connection;
|
|
10350
|
+
readonly inner: Readonly<[string]>;
|
|
10351
|
+
/**
|
|
10352
|
+
* @private
|
|
10353
|
+
* This field is private and should not be used, use `tag` instead.
|
|
10354
|
+
*/
|
|
10355
|
+
readonly [uniffiTypeNameSymbol]: "StorageError";
|
|
10356
|
+
name: string;
|
|
10357
|
+
message: string;
|
|
10358
|
+
stack?: string;
|
|
10359
|
+
cause?: unknown;
|
|
10360
|
+
};
|
|
10361
|
+
instanceOf(obj: any): obj is {
|
|
10362
|
+
readonly tag: StorageError_Tags.Connection;
|
|
10363
|
+
readonly inner: Readonly<[string]>;
|
|
10364
|
+
/**
|
|
10365
|
+
* @private
|
|
10366
|
+
* This field is private and should not be used, use `tag` instead.
|
|
10367
|
+
*/
|
|
10368
|
+
readonly [uniffiTypeNameSymbol]: "StorageError";
|
|
10369
|
+
name: string;
|
|
10370
|
+
message: string;
|
|
10371
|
+
stack?: string;
|
|
10372
|
+
cause?: unknown;
|
|
10373
|
+
};
|
|
10374
|
+
hasInner(obj: any): obj is {
|
|
10375
|
+
readonly tag: StorageError_Tags.Connection;
|
|
10376
|
+
readonly inner: Readonly<[string]>;
|
|
10377
|
+
/**
|
|
10378
|
+
* @private
|
|
10379
|
+
* This field is private and should not be used, use `tag` instead.
|
|
10380
|
+
*/
|
|
10381
|
+
readonly [uniffiTypeNameSymbol]: "StorageError";
|
|
10382
|
+
name: string;
|
|
10383
|
+
message: string;
|
|
10384
|
+
stack?: string;
|
|
10385
|
+
cause?: unknown;
|
|
10386
|
+
};
|
|
10387
|
+
getInner(obj: {
|
|
10388
|
+
readonly tag: StorageError_Tags.Connection;
|
|
10389
|
+
readonly inner: Readonly<[string]>;
|
|
10390
|
+
/**
|
|
10391
|
+
* @private
|
|
10392
|
+
* This field is private and should not be used, use `tag` instead.
|
|
10393
|
+
*/
|
|
10394
|
+
readonly [uniffiTypeNameSymbol]: "StorageError";
|
|
10395
|
+
name: string;
|
|
10396
|
+
message: string;
|
|
10397
|
+
stack?: string;
|
|
10398
|
+
cause?: unknown;
|
|
10399
|
+
}): Readonly<[string]>;
|
|
10400
|
+
isError(error: unknown): error is Error;
|
|
10401
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
10402
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
10403
|
+
stackTraceLimit: number;
|
|
10404
|
+
};
|
|
10029
10405
|
Implementation: {
|
|
10030
10406
|
new (v0: string): {
|
|
10031
10407
|
readonly tag: StorageError_Tags.Implementation;
|
|
@@ -10518,234 +10894,11 @@ export declare const SuccessActionProcessed: Readonly<{
|
|
|
10518
10894
|
* Contents are identical to [`SuccessAction`], except for AES where the ciphertext is decrypted.
|
|
10519
10895
|
*/
|
|
10520
10896
|
export type SuccessActionProcessed = InstanceType<(typeof SuccessActionProcessed)[keyof Omit<typeof SuccessActionProcessed, 'instanceOf'>]>;
|
|
10521
|
-
export declare enum
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10897
|
+
export declare enum TokenTransactionType {
|
|
10898
|
+
Transfer = 0,
|
|
10899
|
+
Mint = 1,
|
|
10900
|
+
Burn = 2
|
|
10525
10901
|
}
|
|
10526
|
-
/**
|
|
10527
|
-
* Errors that can occur during storage operations
|
|
10528
|
-
*/
|
|
10529
|
-
export declare const SyncStorageError: Readonly<{
|
|
10530
|
-
instanceOf: (obj: any) => obj is SyncStorageError;
|
|
10531
|
-
Implementation: {
|
|
10532
|
-
new (v0: string): {
|
|
10533
|
-
readonly tag: SyncStorageError_Tags.Implementation;
|
|
10534
|
-
readonly inner: Readonly<[string]>;
|
|
10535
|
-
/**
|
|
10536
|
-
* @private
|
|
10537
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10538
|
-
*/
|
|
10539
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10540
|
-
name: string;
|
|
10541
|
-
message: string;
|
|
10542
|
-
stack?: string;
|
|
10543
|
-
cause?: unknown;
|
|
10544
|
-
};
|
|
10545
|
-
"new"(v0: string): {
|
|
10546
|
-
readonly tag: SyncStorageError_Tags.Implementation;
|
|
10547
|
-
readonly inner: Readonly<[string]>;
|
|
10548
|
-
/**
|
|
10549
|
-
* @private
|
|
10550
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10551
|
-
*/
|
|
10552
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10553
|
-
name: string;
|
|
10554
|
-
message: string;
|
|
10555
|
-
stack?: string;
|
|
10556
|
-
cause?: unknown;
|
|
10557
|
-
};
|
|
10558
|
-
instanceOf(obj: any): obj is {
|
|
10559
|
-
readonly tag: SyncStorageError_Tags.Implementation;
|
|
10560
|
-
readonly inner: Readonly<[string]>;
|
|
10561
|
-
/**
|
|
10562
|
-
* @private
|
|
10563
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10564
|
-
*/
|
|
10565
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10566
|
-
name: string;
|
|
10567
|
-
message: string;
|
|
10568
|
-
stack?: string;
|
|
10569
|
-
cause?: unknown;
|
|
10570
|
-
};
|
|
10571
|
-
hasInner(obj: any): obj is {
|
|
10572
|
-
readonly tag: SyncStorageError_Tags.Implementation;
|
|
10573
|
-
readonly inner: Readonly<[string]>;
|
|
10574
|
-
/**
|
|
10575
|
-
* @private
|
|
10576
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10577
|
-
*/
|
|
10578
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10579
|
-
name: string;
|
|
10580
|
-
message: string;
|
|
10581
|
-
stack?: string;
|
|
10582
|
-
cause?: unknown;
|
|
10583
|
-
};
|
|
10584
|
-
getInner(obj: {
|
|
10585
|
-
readonly tag: SyncStorageError_Tags.Implementation;
|
|
10586
|
-
readonly inner: Readonly<[string]>;
|
|
10587
|
-
/**
|
|
10588
|
-
* @private
|
|
10589
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10590
|
-
*/
|
|
10591
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10592
|
-
name: string;
|
|
10593
|
-
message: string;
|
|
10594
|
-
stack?: string;
|
|
10595
|
-
cause?: unknown;
|
|
10596
|
-
}): Readonly<[string]>;
|
|
10597
|
-
isError(error: unknown): error is Error;
|
|
10598
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
10599
|
-
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
10600
|
-
stackTraceLimit: number;
|
|
10601
|
-
};
|
|
10602
|
-
InitializationError: {
|
|
10603
|
-
new (v0: string): {
|
|
10604
|
-
readonly tag: SyncStorageError_Tags.InitializationError;
|
|
10605
|
-
readonly inner: Readonly<[string]>;
|
|
10606
|
-
/**
|
|
10607
|
-
* @private
|
|
10608
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10609
|
-
*/
|
|
10610
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10611
|
-
name: string;
|
|
10612
|
-
message: string;
|
|
10613
|
-
stack?: string;
|
|
10614
|
-
cause?: unknown;
|
|
10615
|
-
};
|
|
10616
|
-
"new"(v0: string): {
|
|
10617
|
-
readonly tag: SyncStorageError_Tags.InitializationError;
|
|
10618
|
-
readonly inner: Readonly<[string]>;
|
|
10619
|
-
/**
|
|
10620
|
-
* @private
|
|
10621
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10622
|
-
*/
|
|
10623
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10624
|
-
name: string;
|
|
10625
|
-
message: string;
|
|
10626
|
-
stack?: string;
|
|
10627
|
-
cause?: unknown;
|
|
10628
|
-
};
|
|
10629
|
-
instanceOf(obj: any): obj is {
|
|
10630
|
-
readonly tag: SyncStorageError_Tags.InitializationError;
|
|
10631
|
-
readonly inner: Readonly<[string]>;
|
|
10632
|
-
/**
|
|
10633
|
-
* @private
|
|
10634
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10635
|
-
*/
|
|
10636
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10637
|
-
name: string;
|
|
10638
|
-
message: string;
|
|
10639
|
-
stack?: string;
|
|
10640
|
-
cause?: unknown;
|
|
10641
|
-
};
|
|
10642
|
-
hasInner(obj: any): obj is {
|
|
10643
|
-
readonly tag: SyncStorageError_Tags.InitializationError;
|
|
10644
|
-
readonly inner: Readonly<[string]>;
|
|
10645
|
-
/**
|
|
10646
|
-
* @private
|
|
10647
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10648
|
-
*/
|
|
10649
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10650
|
-
name: string;
|
|
10651
|
-
message: string;
|
|
10652
|
-
stack?: string;
|
|
10653
|
-
cause?: unknown;
|
|
10654
|
-
};
|
|
10655
|
-
getInner(obj: {
|
|
10656
|
-
readonly tag: SyncStorageError_Tags.InitializationError;
|
|
10657
|
-
readonly inner: Readonly<[string]>;
|
|
10658
|
-
/**
|
|
10659
|
-
* @private
|
|
10660
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10661
|
-
*/
|
|
10662
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10663
|
-
name: string;
|
|
10664
|
-
message: string;
|
|
10665
|
-
stack?: string;
|
|
10666
|
-
cause?: unknown;
|
|
10667
|
-
}): Readonly<[string]>;
|
|
10668
|
-
isError(error: unknown): error is Error;
|
|
10669
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
10670
|
-
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
10671
|
-
stackTraceLimit: number;
|
|
10672
|
-
};
|
|
10673
|
-
Serialization: {
|
|
10674
|
-
new (v0: string): {
|
|
10675
|
-
readonly tag: SyncStorageError_Tags.Serialization;
|
|
10676
|
-
readonly inner: Readonly<[string]>;
|
|
10677
|
-
/**
|
|
10678
|
-
* @private
|
|
10679
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10680
|
-
*/
|
|
10681
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10682
|
-
name: string;
|
|
10683
|
-
message: string;
|
|
10684
|
-
stack?: string;
|
|
10685
|
-
cause?: unknown;
|
|
10686
|
-
};
|
|
10687
|
-
"new"(v0: string): {
|
|
10688
|
-
readonly tag: SyncStorageError_Tags.Serialization;
|
|
10689
|
-
readonly inner: Readonly<[string]>;
|
|
10690
|
-
/**
|
|
10691
|
-
* @private
|
|
10692
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10693
|
-
*/
|
|
10694
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10695
|
-
name: string;
|
|
10696
|
-
message: string;
|
|
10697
|
-
stack?: string;
|
|
10698
|
-
cause?: unknown;
|
|
10699
|
-
};
|
|
10700
|
-
instanceOf(obj: any): obj is {
|
|
10701
|
-
readonly tag: SyncStorageError_Tags.Serialization;
|
|
10702
|
-
readonly inner: Readonly<[string]>;
|
|
10703
|
-
/**
|
|
10704
|
-
* @private
|
|
10705
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10706
|
-
*/
|
|
10707
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10708
|
-
name: string;
|
|
10709
|
-
message: string;
|
|
10710
|
-
stack?: string;
|
|
10711
|
-
cause?: unknown;
|
|
10712
|
-
};
|
|
10713
|
-
hasInner(obj: any): obj is {
|
|
10714
|
-
readonly tag: SyncStorageError_Tags.Serialization;
|
|
10715
|
-
readonly inner: Readonly<[string]>;
|
|
10716
|
-
/**
|
|
10717
|
-
* @private
|
|
10718
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10719
|
-
*/
|
|
10720
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10721
|
-
name: string;
|
|
10722
|
-
message: string;
|
|
10723
|
-
stack?: string;
|
|
10724
|
-
cause?: unknown;
|
|
10725
|
-
};
|
|
10726
|
-
getInner(obj: {
|
|
10727
|
-
readonly tag: SyncStorageError_Tags.Serialization;
|
|
10728
|
-
readonly inner: Readonly<[string]>;
|
|
10729
|
-
/**
|
|
10730
|
-
* @private
|
|
10731
|
-
* This field is private and should not be used, use `tag` instead.
|
|
10732
|
-
*/
|
|
10733
|
-
readonly [uniffiTypeNameSymbol]: "SyncStorageError";
|
|
10734
|
-
name: string;
|
|
10735
|
-
message: string;
|
|
10736
|
-
stack?: string;
|
|
10737
|
-
cause?: unknown;
|
|
10738
|
-
}): Readonly<[string]>;
|
|
10739
|
-
isError(error: unknown): error is Error;
|
|
10740
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
10741
|
-
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
10742
|
-
stackTraceLimit: number;
|
|
10743
|
-
};
|
|
10744
|
-
}>;
|
|
10745
|
-
/**
|
|
10746
|
-
* Errors that can occur during storage operations
|
|
10747
|
-
*/
|
|
10748
|
-
export type SyncStorageError = InstanceType<(typeof SyncStorageError)[keyof Omit<typeof SyncStorageError, 'instanceOf'>]>;
|
|
10749
10902
|
export declare enum UpdateDepositPayload_Tags {
|
|
10750
10903
|
ClaimError = "ClaimError",
|
|
10751
10904
|
Refund = "Refund"
|
|
@@ -10899,6 +11052,24 @@ export interface BreezSdkInterface {
|
|
|
10899
11052
|
addEventListener(listener: EventListener, asyncOpts_?: {
|
|
10900
11053
|
signal: AbortSignal;
|
|
10901
11054
|
}): Promise<string>;
|
|
11055
|
+
/**
|
|
11056
|
+
* Initiates a Bitcoin purchase flow via an external provider (`MoonPay`).
|
|
11057
|
+
*
|
|
11058
|
+
* This method generates a URL that the user can open in a browser to complete
|
|
11059
|
+
* the Bitcoin purchase. The purchased Bitcoin will be sent to an automatically
|
|
11060
|
+
* generated deposit address.
|
|
11061
|
+
*
|
|
11062
|
+
* # Arguments
|
|
11063
|
+
*
|
|
11064
|
+
* * `request` - The purchase request containing optional amount and redirect URL
|
|
11065
|
+
*
|
|
11066
|
+
* # Returns
|
|
11067
|
+
*
|
|
11068
|
+
* A response containing the URL to open in a browser to complete the purchase
|
|
11069
|
+
*/
|
|
11070
|
+
buyBitcoin(request: BuyBitcoinRequest, asyncOpts_?: {
|
|
11071
|
+
signal: AbortSignal;
|
|
11072
|
+
}): Promise<BuyBitcoinResponse>;
|
|
10902
11073
|
/**
|
|
10903
11074
|
* Cancels the ongoing leaf optimization.
|
|
10904
11075
|
*
|
|
@@ -11001,21 +11172,20 @@ export interface BreezSdkInterface {
|
|
|
11001
11172
|
signal: AbortSignal;
|
|
11002
11173
|
}): Promise<ListFiatRatesResponse>;
|
|
11003
11174
|
/**
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
*/
|
|
11175
|
+
* Lists payments from the storage with pagination
|
|
11176
|
+
*
|
|
11177
|
+
* This method provides direct access to the payment history stored in the database.
|
|
11178
|
+
* It returns payments in reverse chronological order (newest first).
|
|
11179
|
+
*
|
|
11180
|
+
* # Arguments
|
|
11181
|
+
*
|
|
11182
|
+
* * `request` - Contains pagination parameters (offset and limit)
|
|
11183
|
+
*
|
|
11184
|
+
* # Returns
|
|
11185
|
+
*
|
|
11186
|
+
* * `Ok(ListPaymentsResponse)` - Contains the list of payments if successful
|
|
11187
|
+
* * `Err(SdkError)` - If there was an error accessing the storage
|
|
11188
|
+
*/
|
|
11019
11189
|
listPayments(request: ListPaymentsRequest, asyncOpts_?: {
|
|
11020
11190
|
signal: AbortSignal;
|
|
11021
11191
|
}): Promise<ListPaymentsResponse>;
|
|
@@ -11028,48 +11198,6 @@ export interface BreezSdkInterface {
|
|
|
11028
11198
|
* This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
|
|
11029
11199
|
* It derives a domain-specific linking key, signs the challenge, and sends the
|
|
11030
11200
|
* authentication request to the service.
|
|
11031
|
-
*
|
|
11032
|
-
* # Arguments
|
|
11033
|
-
*
|
|
11034
|
-
* * `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
|
|
11035
|
-
*
|
|
11036
|
-
* # Returns
|
|
11037
|
-
*
|
|
11038
|
-
* * `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
|
|
11039
|
-
* * `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
|
|
11040
|
-
* * `Err(SdkError)` - An error occurred during the authentication process
|
|
11041
|
-
*
|
|
11042
|
-
* # Example
|
|
11043
|
-
*
|
|
11044
|
-
* ```rust,no_run
|
|
11045
|
-
* # use breez_sdk_spark::{BreezSdk, InputType};
|
|
11046
|
-
* # async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
|
|
11047
|
-
* // 1. Parse the LNURL-auth string
|
|
11048
|
-
* let input = sdk.parse("lnurl1...").await?;
|
|
11049
|
-
* let auth_request = match input {
|
|
11050
|
-
* InputType::LnurlAuth(data) => data,
|
|
11051
|
-
* _ => return Err("Not an auth request".into()),
|
|
11052
|
-
* };
|
|
11053
|
-
*
|
|
11054
|
-
* // 2. Show user the domain and get confirmation
|
|
11055
|
-
* println!("Authenticate with {}?", auth_request.domain);
|
|
11056
|
-
*
|
|
11057
|
-
* // 3. Perform authentication
|
|
11058
|
-
* let status = sdk.lnurl_auth(auth_request).await?;
|
|
11059
|
-
* match status {
|
|
11060
|
-
* breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
|
|
11061
|
-
* breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
|
|
11062
|
-
* println!("Error: {}", error_details.reason)
|
|
11063
|
-
* }
|
|
11064
|
-
* }
|
|
11065
|
-
* # Ok(())
|
|
11066
|
-
* # }
|
|
11067
|
-
* ```
|
|
11068
|
-
*
|
|
11069
|
-
* # See Also
|
|
11070
|
-
*
|
|
11071
|
-
* * LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
11072
|
-
* * LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
|
|
11073
11201
|
*/
|
|
11074
11202
|
lnurlAuth(requestData: LnurlAuthRequestDetails, asyncOpts_?: {
|
|
11075
11203
|
signal: AbortSignal;
|
|
@@ -11202,6 +11330,24 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
11202
11330
|
addEventListener(listener: EventListener, asyncOpts_?: {
|
|
11203
11331
|
signal: AbortSignal;
|
|
11204
11332
|
}): Promise<string>;
|
|
11333
|
+
/**
|
|
11334
|
+
* Initiates a Bitcoin purchase flow via an external provider (`MoonPay`).
|
|
11335
|
+
*
|
|
11336
|
+
* This method generates a URL that the user can open in a browser to complete
|
|
11337
|
+
* the Bitcoin purchase. The purchased Bitcoin will be sent to an automatically
|
|
11338
|
+
* generated deposit address.
|
|
11339
|
+
*
|
|
11340
|
+
* # Arguments
|
|
11341
|
+
*
|
|
11342
|
+
* * `request` - The purchase request containing optional amount and redirect URL
|
|
11343
|
+
*
|
|
11344
|
+
* # Returns
|
|
11345
|
+
*
|
|
11346
|
+
* A response containing the URL to open in a browser to complete the purchase
|
|
11347
|
+
*/
|
|
11348
|
+
buyBitcoin(request: BuyBitcoinRequest, asyncOpts_?: {
|
|
11349
|
+
signal: AbortSignal;
|
|
11350
|
+
}): Promise<BuyBitcoinResponse>;
|
|
11205
11351
|
/**
|
|
11206
11352
|
* Cancels the ongoing leaf optimization.
|
|
11207
11353
|
*
|
|
@@ -11304,21 +11450,20 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
11304
11450
|
signal: AbortSignal;
|
|
11305
11451
|
}): Promise<ListFiatRatesResponse>;
|
|
11306
11452
|
/**
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
*/
|
|
11453
|
+
* Lists payments from the storage with pagination
|
|
11454
|
+
*
|
|
11455
|
+
* This method provides direct access to the payment history stored in the database.
|
|
11456
|
+
* It returns payments in reverse chronological order (newest first).
|
|
11457
|
+
*
|
|
11458
|
+
* # Arguments
|
|
11459
|
+
*
|
|
11460
|
+
* * `request` - Contains pagination parameters (offset and limit)
|
|
11461
|
+
*
|
|
11462
|
+
* # Returns
|
|
11463
|
+
*
|
|
11464
|
+
* * `Ok(ListPaymentsResponse)` - Contains the list of payments if successful
|
|
11465
|
+
* * `Err(SdkError)` - If there was an error accessing the storage
|
|
11466
|
+
*/
|
|
11322
11467
|
listPayments(request: ListPaymentsRequest, asyncOpts_?: {
|
|
11323
11468
|
signal: AbortSignal;
|
|
11324
11469
|
}): Promise<ListPaymentsResponse>;
|
|
@@ -11331,48 +11476,6 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
11331
11476
|
* This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
|
|
11332
11477
|
* It derives a domain-specific linking key, signs the challenge, and sends the
|
|
11333
11478
|
* authentication request to the service.
|
|
11334
|
-
*
|
|
11335
|
-
* # Arguments
|
|
11336
|
-
*
|
|
11337
|
-
* * `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
|
|
11338
|
-
*
|
|
11339
|
-
* # Returns
|
|
11340
|
-
*
|
|
11341
|
-
* * `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
|
|
11342
|
-
* * `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
|
|
11343
|
-
* * `Err(SdkError)` - An error occurred during the authentication process
|
|
11344
|
-
*
|
|
11345
|
-
* # Example
|
|
11346
|
-
*
|
|
11347
|
-
* ```rust,no_run
|
|
11348
|
-
* # use breez_sdk_spark::{BreezSdk, InputType};
|
|
11349
|
-
* # async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
|
|
11350
|
-
* // 1. Parse the LNURL-auth string
|
|
11351
|
-
* let input = sdk.parse("lnurl1...").await?;
|
|
11352
|
-
* let auth_request = match input {
|
|
11353
|
-
* InputType::LnurlAuth(data) => data,
|
|
11354
|
-
* _ => return Err("Not an auth request".into()),
|
|
11355
|
-
* };
|
|
11356
|
-
*
|
|
11357
|
-
* // 2. Show user the domain and get confirmation
|
|
11358
|
-
* println!("Authenticate with {}?", auth_request.domain);
|
|
11359
|
-
*
|
|
11360
|
-
* // 3. Perform authentication
|
|
11361
|
-
* let status = sdk.lnurl_auth(auth_request).await?;
|
|
11362
|
-
* match status {
|
|
11363
|
-
* breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
|
|
11364
|
-
* breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
|
|
11365
|
-
* println!("Error: {}", error_details.reason)
|
|
11366
|
-
* }
|
|
11367
|
-
* }
|
|
11368
|
-
* # Ok(())
|
|
11369
|
-
* # }
|
|
11370
|
-
* ```
|
|
11371
|
-
*
|
|
11372
|
-
* # See Also
|
|
11373
|
-
*
|
|
11374
|
-
* * LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
11375
|
-
* * LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
|
|
11376
11479
|
*/
|
|
11377
11480
|
lnurlAuth(requestData: LnurlAuthRequestDetails, asyncOpts_?: {
|
|
11378
11481
|
signal: AbortSignal;
|
|
@@ -11697,6 +11800,8 @@ export interface ExternalSigner {
|
|
|
11697
11800
|
/**
|
|
11698
11801
|
* Subtracts one secret from another.
|
|
11699
11802
|
*
|
|
11803
|
+
* This is a lower-level primitive used as part of key tweaking operations.
|
|
11804
|
+
*
|
|
11700
11805
|
* # Arguments
|
|
11701
11806
|
* * `signing_key` - The first secret
|
|
11702
11807
|
* * `new_signing_key` - The second secret to subtract
|
|
@@ -11996,6 +12101,8 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
|
|
|
11996
12101
|
/**
|
|
11997
12102
|
* Subtracts one secret from another.
|
|
11998
12103
|
*
|
|
12104
|
+
* This is a lower-level primitive used as part of key tweaking operations.
|
|
12105
|
+
*
|
|
11999
12106
|
* # Arguments
|
|
12000
12107
|
* * `signing_key` - The first secret
|
|
12001
12108
|
* * `new_signing_key` - The second secret to subtract
|
|
@@ -12288,14 +12395,6 @@ export interface SdkBuilderInterface {
|
|
|
12288
12395
|
withPaymentObserver(paymentObserver: PaymentObserver, asyncOpts_?: {
|
|
12289
12396
|
signal: AbortSignal;
|
|
12290
12397
|
}): Promise<void>;
|
|
12291
|
-
/**
|
|
12292
|
-
* Sets the real-time sync storage implementation to be used by the SDK.
|
|
12293
|
-
* Arguments:
|
|
12294
|
-
* - `storage`: The sync storage implementation to be used.
|
|
12295
|
-
*/
|
|
12296
|
-
withRealTimeSyncStorage(storage: SyncStorage, asyncOpts_?: {
|
|
12297
|
-
signal: AbortSignal;
|
|
12298
|
-
}): Promise<void>;
|
|
12299
12398
|
/**
|
|
12300
12399
|
* Sets the REST chain service to be used by the SDK.
|
|
12301
12400
|
* Arguments:
|
|
@@ -12380,14 +12479,6 @@ export declare class SdkBuilder extends UniffiAbstractObject implements SdkBuild
|
|
|
12380
12479
|
withPaymentObserver(paymentObserver: PaymentObserver, asyncOpts_?: {
|
|
12381
12480
|
signal: AbortSignal;
|
|
12382
12481
|
}): Promise<void>;
|
|
12383
|
-
/**
|
|
12384
|
-
* Sets the real-time sync storage implementation to be used by the SDK.
|
|
12385
|
-
* Arguments:
|
|
12386
|
-
* - `storage`: The sync storage implementation to be used.
|
|
12387
|
-
*/
|
|
12388
|
-
withRealTimeSyncStorage(storage: SyncStorage, asyncOpts_?: {
|
|
12389
|
-
signal: AbortSignal;
|
|
12390
|
-
}): Promise<void>;
|
|
12391
12482
|
/**
|
|
12392
12483
|
* Sets the REST chain service to be used by the SDK.
|
|
12393
12484
|
* Arguments:
|
|
@@ -12465,7 +12556,7 @@ export interface Storage {
|
|
|
12465
12556
|
*
|
|
12466
12557
|
* Success or a `StorageError`
|
|
12467
12558
|
*/
|
|
12468
|
-
|
|
12559
|
+
insertPaymentMetadata(paymentId: string, metadata: PaymentMetadata, asyncOpts_?: {
|
|
12469
12560
|
signal: AbortSignal;
|
|
12470
12561
|
}): Promise<void>;
|
|
12471
12562
|
/**
|
|
@@ -12493,6 +12584,21 @@ export interface Storage {
|
|
|
12493
12584
|
getPaymentByInvoice(invoice: string, asyncOpts_?: {
|
|
12494
12585
|
signal: AbortSignal;
|
|
12495
12586
|
}): Promise<Payment | undefined>;
|
|
12587
|
+
/**
|
|
12588
|
+
* Gets payments that have any of the specified parent payment IDs.
|
|
12589
|
+
* Used to load related payments for a set of parent payments.
|
|
12590
|
+
*
|
|
12591
|
+
* # Arguments
|
|
12592
|
+
*
|
|
12593
|
+
* * `parent_payment_ids` - The IDs of the parent payments
|
|
12594
|
+
*
|
|
12595
|
+
* # Returns
|
|
12596
|
+
*
|
|
12597
|
+
* A map of `parent_payment_id` -> Vec<Payment> or a `StorageError`
|
|
12598
|
+
*/
|
|
12599
|
+
getPaymentsByParentIds(parentPaymentIds: Array<string>, asyncOpts_?: {
|
|
12600
|
+
signal: AbortSignal;
|
|
12601
|
+
}): Promise<Map<string, Array<Payment>>>;
|
|
12496
12602
|
/**
|
|
12497
12603
|
* Add a deposit to storage
|
|
12498
12604
|
* # Arguments
|
|
@@ -12549,6 +12655,56 @@ export interface Storage {
|
|
|
12549
12655
|
setLnurlMetadata(metadata: Array<SetLnurlMetadataItem>, asyncOpts_?: {
|
|
12550
12656
|
signal: AbortSignal;
|
|
12551
12657
|
}): Promise<void>;
|
|
12658
|
+
addOutgoingChange(record: UnversionedRecordChange, asyncOpts_?: {
|
|
12659
|
+
signal: AbortSignal;
|
|
12660
|
+
}): Promise</*u64*/ bigint>;
|
|
12661
|
+
completeOutgoingSync(record: Record, localRevision: bigint, asyncOpts_?: {
|
|
12662
|
+
signal: AbortSignal;
|
|
12663
|
+
}): Promise<void>;
|
|
12664
|
+
getPendingOutgoingChanges(limit: number, asyncOpts_?: {
|
|
12665
|
+
signal: AbortSignal;
|
|
12666
|
+
}): Promise<Array<OutgoingChange>>;
|
|
12667
|
+
/**
|
|
12668
|
+
* Get the last committed sync revision.
|
|
12669
|
+
*
|
|
12670
|
+
* The `sync_revision` table tracks the highest revision that has been committed
|
|
12671
|
+
* (i.e. acknowledged by the server or received from it). It does NOT include
|
|
12672
|
+
* pending outgoing queue ids. This value is used by the sync protocol to
|
|
12673
|
+
* request changes from the server.
|
|
12674
|
+
*/
|
|
12675
|
+
getLastRevision(asyncOpts_?: {
|
|
12676
|
+
signal: AbortSignal;
|
|
12677
|
+
}): Promise</*u64*/ bigint>;
|
|
12678
|
+
/**
|
|
12679
|
+
* Insert incoming records from remote sync
|
|
12680
|
+
*/
|
|
12681
|
+
insertIncomingRecords(records: Array<Record>, asyncOpts_?: {
|
|
12682
|
+
signal: AbortSignal;
|
|
12683
|
+
}): Promise<void>;
|
|
12684
|
+
/**
|
|
12685
|
+
* Delete an incoming record after it has been processed
|
|
12686
|
+
*/
|
|
12687
|
+
deleteIncomingRecord(record: Record, asyncOpts_?: {
|
|
12688
|
+
signal: AbortSignal;
|
|
12689
|
+
}): Promise<void>;
|
|
12690
|
+
/**
|
|
12691
|
+
* Get incoming records that need to be processed, up to the specified limit
|
|
12692
|
+
*/
|
|
12693
|
+
getIncomingRecords(limit: number, asyncOpts_?: {
|
|
12694
|
+
signal: AbortSignal;
|
|
12695
|
+
}): Promise<Array<IncomingChange>>;
|
|
12696
|
+
/**
|
|
12697
|
+
* Get the latest outgoing record if any exists
|
|
12698
|
+
*/
|
|
12699
|
+
getLatestOutgoingChange(asyncOpts_?: {
|
|
12700
|
+
signal: AbortSignal;
|
|
12701
|
+
}): Promise<OutgoingChange | undefined>;
|
|
12702
|
+
/**
|
|
12703
|
+
* Update the sync state record from an incoming record
|
|
12704
|
+
*/
|
|
12705
|
+
updateRecordFromIncoming(record: Record, asyncOpts_?: {
|
|
12706
|
+
signal: AbortSignal;
|
|
12707
|
+
}): Promise<void>;
|
|
12552
12708
|
}
|
|
12553
12709
|
/**
|
|
12554
12710
|
* Trait for persistent storage
|
|
@@ -12607,7 +12763,7 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
|
|
|
12607
12763
|
*
|
|
12608
12764
|
* Success or a `StorageError`
|
|
12609
12765
|
*/
|
|
12610
|
-
|
|
12766
|
+
insertPaymentMetadata(paymentId: string, metadata: PaymentMetadata, asyncOpts_?: {
|
|
12611
12767
|
signal: AbortSignal;
|
|
12612
12768
|
}): Promise<void>;
|
|
12613
12769
|
/**
|
|
@@ -12635,6 +12791,21 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
|
|
|
12635
12791
|
getPaymentByInvoice(invoice: string, asyncOpts_?: {
|
|
12636
12792
|
signal: AbortSignal;
|
|
12637
12793
|
}): Promise<Payment | undefined>;
|
|
12794
|
+
/**
|
|
12795
|
+
* Gets payments that have any of the specified parent payment IDs.
|
|
12796
|
+
* Used to load related payments for a set of parent payments.
|
|
12797
|
+
*
|
|
12798
|
+
* # Arguments
|
|
12799
|
+
*
|
|
12800
|
+
* * `parent_payment_ids` - The IDs of the parent payments
|
|
12801
|
+
*
|
|
12802
|
+
* # Returns
|
|
12803
|
+
*
|
|
12804
|
+
* A map of `parent_payment_id` -> Vec<Payment> or a `StorageError`
|
|
12805
|
+
*/
|
|
12806
|
+
getPaymentsByParentIds(parentPaymentIds: Array<string>, asyncOpts_?: {
|
|
12807
|
+
signal: AbortSignal;
|
|
12808
|
+
}): Promise<Map<string, Array<Payment>>>;
|
|
12638
12809
|
/**
|
|
12639
12810
|
* Add a deposit to storage
|
|
12640
12811
|
* # Arguments
|
|
@@ -12691,81 +12862,22 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
|
|
|
12691
12862
|
setLnurlMetadata(metadata: Array<SetLnurlMetadataItem>, asyncOpts_?: {
|
|
12692
12863
|
signal: AbortSignal;
|
|
12693
12864
|
}): Promise<void>;
|
|
12694
|
-
/**
|
|
12695
|
-
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
12696
|
-
*/
|
|
12697
|
-
uniffiDestroy(): void;
|
|
12698
|
-
static instanceOf(obj: any): obj is StorageImpl;
|
|
12699
|
-
}
|
|
12700
|
-
export interface SyncStorage {
|
|
12701
|
-
addOutgoingChange(record: UnversionedRecordChange, asyncOpts_?: {
|
|
12702
|
-
signal: AbortSignal;
|
|
12703
|
-
}): Promise</*u64*/ bigint>;
|
|
12704
|
-
completeOutgoingSync(record: Record, asyncOpts_?: {
|
|
12705
|
-
signal: AbortSignal;
|
|
12706
|
-
}): Promise<void>;
|
|
12707
|
-
getPendingOutgoingChanges(limit: number, asyncOpts_?: {
|
|
12708
|
-
signal: AbortSignal;
|
|
12709
|
-
}): Promise<Array<OutgoingChange>>;
|
|
12710
|
-
/**
|
|
12711
|
-
* Get the revision number of the last synchronized record
|
|
12712
|
-
*/
|
|
12713
|
-
getLastRevision(asyncOpts_?: {
|
|
12714
|
-
signal: AbortSignal;
|
|
12715
|
-
}): Promise</*u64*/ bigint>;
|
|
12716
|
-
/**
|
|
12717
|
-
* Insert incoming records from remote sync
|
|
12718
|
-
*/
|
|
12719
|
-
insertIncomingRecords(records: Array<Record>, asyncOpts_?: {
|
|
12720
|
-
signal: AbortSignal;
|
|
12721
|
-
}): Promise<void>;
|
|
12722
|
-
/**
|
|
12723
|
-
* Delete an incoming record after it has been processed
|
|
12724
|
-
*/
|
|
12725
|
-
deleteIncomingRecord(record: Record, asyncOpts_?: {
|
|
12726
|
-
signal: AbortSignal;
|
|
12727
|
-
}): Promise<void>;
|
|
12728
|
-
/**
|
|
12729
|
-
* Update revision numbers of pending outgoing records to be higher than the given revision
|
|
12730
|
-
*/
|
|
12731
|
-
rebasePendingOutgoingRecords(revision: bigint, asyncOpts_?: {
|
|
12732
|
-
signal: AbortSignal;
|
|
12733
|
-
}): Promise<void>;
|
|
12734
|
-
/**
|
|
12735
|
-
* Get incoming records that need to be processed, up to the specified limit
|
|
12736
|
-
*/
|
|
12737
|
-
getIncomingRecords(limit: number, asyncOpts_?: {
|
|
12738
|
-
signal: AbortSignal;
|
|
12739
|
-
}): Promise<Array<IncomingChange>>;
|
|
12740
|
-
/**
|
|
12741
|
-
* Get the latest outgoing record if any exists
|
|
12742
|
-
*/
|
|
12743
|
-
getLatestOutgoingChange(asyncOpts_?: {
|
|
12744
|
-
signal: AbortSignal;
|
|
12745
|
-
}): Promise<OutgoingChange | undefined>;
|
|
12746
|
-
/**
|
|
12747
|
-
* Update the sync state record from an incoming record
|
|
12748
|
-
*/
|
|
12749
|
-
updateRecordFromIncoming(record: Record, asyncOpts_?: {
|
|
12750
|
-
signal: AbortSignal;
|
|
12751
|
-
}): Promise<void>;
|
|
12752
|
-
}
|
|
12753
|
-
export declare class SyncStorageImpl extends UniffiAbstractObject implements SyncStorage {
|
|
12754
|
-
readonly [uniffiTypeNameSymbol] = "SyncStorageImpl";
|
|
12755
|
-
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
12756
|
-
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
12757
|
-
private constructor();
|
|
12758
12865
|
addOutgoingChange(record: UnversionedRecordChange, asyncOpts_?: {
|
|
12759
12866
|
signal: AbortSignal;
|
|
12760
12867
|
}): Promise</*u64*/ bigint>;
|
|
12761
|
-
completeOutgoingSync(record: Record, asyncOpts_?: {
|
|
12868
|
+
completeOutgoingSync(record: Record, localRevision: bigint, asyncOpts_?: {
|
|
12762
12869
|
signal: AbortSignal;
|
|
12763
12870
|
}): Promise<void>;
|
|
12764
12871
|
getPendingOutgoingChanges(limit: number, asyncOpts_?: {
|
|
12765
12872
|
signal: AbortSignal;
|
|
12766
12873
|
}): Promise<Array<OutgoingChange>>;
|
|
12767
12874
|
/**
|
|
12768
|
-
* Get the
|
|
12875
|
+
* Get the last committed sync revision.
|
|
12876
|
+
*
|
|
12877
|
+
* The `sync_revision` table tracks the highest revision that has been committed
|
|
12878
|
+
* (i.e. acknowledged by the server or received from it). It does NOT include
|
|
12879
|
+
* pending outgoing queue ids. This value is used by the sync protocol to
|
|
12880
|
+
* request changes from the server.
|
|
12769
12881
|
*/
|
|
12770
12882
|
getLastRevision(asyncOpts_?: {
|
|
12771
12883
|
signal: AbortSignal;
|
|
@@ -12782,12 +12894,6 @@ export declare class SyncStorageImpl extends UniffiAbstractObject implements Syn
|
|
|
12782
12894
|
deleteIncomingRecord(record: Record, asyncOpts_?: {
|
|
12783
12895
|
signal: AbortSignal;
|
|
12784
12896
|
}): Promise<void>;
|
|
12785
|
-
/**
|
|
12786
|
-
* Update revision numbers of pending outgoing records to be higher than the given revision
|
|
12787
|
-
*/
|
|
12788
|
-
rebasePendingOutgoingRecords(revision: bigint, asyncOpts_?: {
|
|
12789
|
-
signal: AbortSignal;
|
|
12790
|
-
}): Promise<void>;
|
|
12791
12897
|
/**
|
|
12792
12898
|
* Get incoming records that need to be processed, up to the specified limit
|
|
12793
12899
|
*/
|
|
@@ -12810,7 +12916,7 @@ export declare class SyncStorageImpl extends UniffiAbstractObject implements Syn
|
|
|
12810
12916
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
12811
12917
|
*/
|
|
12812
12918
|
uniffiDestroy(): void;
|
|
12813
|
-
static instanceOf(obj: any): obj is
|
|
12919
|
+
static instanceOf(obj: any): obj is StorageImpl;
|
|
12814
12920
|
}
|
|
12815
12921
|
export interface TokenIssuerInterface {
|
|
12816
12922
|
/**
|
|
@@ -13189,6 +13295,20 @@ declare const _default: Readonly<{
|
|
|
13189
13295
|
lift(value: UniffiByteArray): BurnIssuerTokenRequest;
|
|
13190
13296
|
lower(value: BurnIssuerTokenRequest): UniffiByteArray;
|
|
13191
13297
|
};
|
|
13298
|
+
FfiConverterTypeBuyBitcoinRequest: {
|
|
13299
|
+
read(from: RustBuffer): BuyBitcoinRequest;
|
|
13300
|
+
write(value: BuyBitcoinRequest, into: RustBuffer): void;
|
|
13301
|
+
allocationSize(value: BuyBitcoinRequest): number;
|
|
13302
|
+
lift(value: UniffiByteArray): BuyBitcoinRequest;
|
|
13303
|
+
lower(value: BuyBitcoinRequest): UniffiByteArray;
|
|
13304
|
+
};
|
|
13305
|
+
FfiConverterTypeBuyBitcoinResponse: {
|
|
13306
|
+
read(from: RustBuffer): BuyBitcoinResponse;
|
|
13307
|
+
write(value: BuyBitcoinResponse, into: RustBuffer): void;
|
|
13308
|
+
allocationSize(value: BuyBitcoinResponse): number;
|
|
13309
|
+
lift(value: UniffiByteArray): BuyBitcoinResponse;
|
|
13310
|
+
lower(value: BuyBitcoinResponse): UniffiByteArray;
|
|
13311
|
+
};
|
|
13192
13312
|
FfiConverterTypeChainApiType: {
|
|
13193
13313
|
read(from: RustBuffer): ChainApiType;
|
|
13194
13314
|
write(value: ChainApiType, into: RustBuffer): void;
|
|
@@ -13266,6 +13386,13 @@ declare const _default: Readonly<{
|
|
|
13266
13386
|
lift(value: UniffiByteArray): ConnectWithSignerRequest;
|
|
13267
13387
|
lower(value: ConnectWithSignerRequest): UniffiByteArray;
|
|
13268
13388
|
};
|
|
13389
|
+
FfiConverterTypeConversionDetails: {
|
|
13390
|
+
read(from: RustBuffer): ConversionDetails;
|
|
13391
|
+
write(value: ConversionDetails, into: RustBuffer): void;
|
|
13392
|
+
allocationSize(value: ConversionDetails): number;
|
|
13393
|
+
lift(value: UniffiByteArray): ConversionDetails;
|
|
13394
|
+
lower(value: ConversionDetails): UniffiByteArray;
|
|
13395
|
+
};
|
|
13269
13396
|
FfiConverterTypeConversionEstimate: {
|
|
13270
13397
|
read(from: RustBuffer): ConversionEstimate;
|
|
13271
13398
|
write(value: ConversionEstimate, into: RustBuffer): void;
|
|
@@ -13301,6 +13428,13 @@ declare const _default: Readonly<{
|
|
|
13301
13428
|
lift(value: UniffiByteArray): ConversionStatus;
|
|
13302
13429
|
lower(value: ConversionStatus): UniffiByteArray;
|
|
13303
13430
|
};
|
|
13431
|
+
FfiConverterTypeConversionStep: {
|
|
13432
|
+
read(from: RustBuffer): ConversionStep;
|
|
13433
|
+
write(value: ConversionStep, into: RustBuffer): void;
|
|
13434
|
+
allocationSize(value: ConversionStep): number;
|
|
13435
|
+
lift(value: UniffiByteArray): ConversionStep;
|
|
13436
|
+
lower(value: ConversionStep): UniffiByteArray;
|
|
13437
|
+
};
|
|
13304
13438
|
FfiConverterTypeConversionType: {
|
|
13305
13439
|
read(from: RustBuffer): ConversionType;
|
|
13306
13440
|
write(value: ConversionType, into: RustBuffer): void;
|
|
@@ -13463,6 +13597,13 @@ declare const _default: Readonly<{
|
|
|
13463
13597
|
lift(value: UniffiByteArray): Fee;
|
|
13464
13598
|
lower(value: Fee): UniffiByteArray;
|
|
13465
13599
|
};
|
|
13600
|
+
FfiConverterTypeFeePolicy: {
|
|
13601
|
+
read(from: RustBuffer): FeePolicy;
|
|
13602
|
+
write(value: FeePolicy, into: RustBuffer): void;
|
|
13603
|
+
allocationSize(value: FeePolicy): number;
|
|
13604
|
+
lift(value: UniffiByteArray): FeePolicy;
|
|
13605
|
+
lower(value: FeePolicy): UniffiByteArray;
|
|
13606
|
+
};
|
|
13466
13607
|
FfiConverterTypeFetchConversionLimitsRequest: {
|
|
13467
13608
|
read(from: RustBuffer): FetchConversionLimitsRequest;
|
|
13468
13609
|
write(value: FetchConversionLimitsRequest, into: RustBuffer): void;
|
|
@@ -13674,6 +13815,13 @@ declare const _default: Readonly<{
|
|
|
13674
13815
|
lift(value: UniffiByteArray): LnurlErrorDetails;
|
|
13675
13816
|
lower(value: LnurlErrorDetails): UniffiByteArray;
|
|
13676
13817
|
};
|
|
13818
|
+
FfiConverterTypeLnurlInfo: {
|
|
13819
|
+
read(from: RustBuffer): LnurlInfo;
|
|
13820
|
+
write(value: LnurlInfo, into: RustBuffer): void;
|
|
13821
|
+
allocationSize(value: LnurlInfo): number;
|
|
13822
|
+
lift(value: UniffiByteArray): LnurlInfo;
|
|
13823
|
+
lower(value: LnurlInfo): UniffiByteArray;
|
|
13824
|
+
};
|
|
13677
13825
|
FfiConverterTypeLnurlPayInfo: {
|
|
13678
13826
|
read(from: RustBuffer): LnurlPayInfo;
|
|
13679
13827
|
write(value: LnurlPayInfo, into: RustBuffer): void;
|
|
@@ -14097,6 +14245,13 @@ declare const _default: Readonly<{
|
|
|
14097
14245
|
lift(value: UniffiByteArray): SendPaymentResponse;
|
|
14098
14246
|
lower(value: SendPaymentResponse): UniffiByteArray;
|
|
14099
14247
|
};
|
|
14248
|
+
FfiConverterTypeServiceStatus: {
|
|
14249
|
+
read(from: RustBuffer): ServiceStatus;
|
|
14250
|
+
write(value: ServiceStatus, into: RustBuffer): void;
|
|
14251
|
+
allocationSize(value: ServiceStatus): number;
|
|
14252
|
+
lift(value: UniffiByteArray): ServiceStatus;
|
|
14253
|
+
lower(value: ServiceStatus): UniffiByteArray;
|
|
14254
|
+
};
|
|
14100
14255
|
FfiConverterTypeSetLnurlMetadataItem: {
|
|
14101
14256
|
read(from: RustBuffer): SetLnurlMetadataItem;
|
|
14102
14257
|
write(value: SetLnurlMetadataItem, into: RustBuffer): void;
|
|
@@ -14167,6 +14322,13 @@ declare const _default: Readonly<{
|
|
|
14167
14322
|
lift(value: UniffiByteArray): SparkInvoicePaymentDetails;
|
|
14168
14323
|
lower(value: SparkInvoicePaymentDetails): UniffiByteArray;
|
|
14169
14324
|
};
|
|
14325
|
+
FfiConverterTypeSparkStatus: {
|
|
14326
|
+
read(from: RustBuffer): SparkStatus;
|
|
14327
|
+
write(value: SparkStatus, into: RustBuffer): void;
|
|
14328
|
+
allocationSize(value: SparkStatus): number;
|
|
14329
|
+
lift(value: UniffiByteArray): SparkStatus;
|
|
14330
|
+
lower(value: SparkStatus): UniffiByteArray;
|
|
14331
|
+
};
|
|
14170
14332
|
FfiConverterTypeStorage: FfiConverterObjectWithCallbacks<Storage>;
|
|
14171
14333
|
FfiConverterTypeSuccessAction: {
|
|
14172
14334
|
read(from: RustBuffer): SuccessAction;
|
|
@@ -14189,7 +14351,6 @@ declare const _default: Readonly<{
|
|
|
14189
14351
|
lift(value: UniffiByteArray): Symbol;
|
|
14190
14352
|
lower(value: Symbol): UniffiByteArray;
|
|
14191
14353
|
};
|
|
14192
|
-
FfiConverterTypeSyncStorage: FfiConverterObjectWithCallbacks<SyncStorage>;
|
|
14193
14354
|
FfiConverterTypeSyncWalletRequest: {
|
|
14194
14355
|
read(from: RustBuffer): SyncWalletRequest;
|
|
14195
14356
|
write(value: SyncWalletRequest, into: RustBuffer): void;
|
|
@@ -14219,6 +14380,13 @@ declare const _default: Readonly<{
|
|
|
14219
14380
|
lift(value: UniffiByteArray): TokenMetadata;
|
|
14220
14381
|
lower(value: TokenMetadata): UniffiByteArray;
|
|
14221
14382
|
};
|
|
14383
|
+
FfiConverterTypeTokenTransactionType: {
|
|
14384
|
+
read(from: RustBuffer): TokenTransactionType;
|
|
14385
|
+
write(value: TokenTransactionType, into: RustBuffer): void;
|
|
14386
|
+
allocationSize(value: TokenTransactionType): number;
|
|
14387
|
+
lift(value: UniffiByteArray): TokenTransactionType;
|
|
14388
|
+
lower(value: TokenTransactionType): UniffiByteArray;
|
|
14389
|
+
};
|
|
14222
14390
|
FfiConverterTypeTxStatus: {
|
|
14223
14391
|
read(from: RustBuffer): TxStatus;
|
|
14224
14392
|
write(value: TxStatus, into: RustBuffer): void;
|