@breeztech/breez-sdk-spark-react-native 0.25.0 → 0.26.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.
- package/cpp/generated/breez_sdk_spark.cpp +645 -233
- package/cpp/generated/breez_sdk_spark.hpp +16 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +270 -52
- 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 +269 -51
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +42 -34
- 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 +1137 -66
- 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 +42 -34
- 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 +1137 -66
- 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 +57 -33
- package/src/generated/breez_sdk_spark.ts +2082 -429
|
@@ -385,9 +385,9 @@ export function defaultConfig(network: Network): Config {
|
|
|
385
385
|
*
|
|
386
386
|
* * `mnemonic` - BIP39 mnemonic phrase (12 or 24 words)
|
|
387
387
|
* * `passphrase` - Optional passphrase for the mnemonic
|
|
388
|
-
* * `network` - Network to use (Mainnet or Regtest)
|
|
388
|
+
* * `network` - Network to use (Mainnet, Signet, or Regtest)
|
|
389
389
|
* * `account_number` - Account number in the derivation path. Unset uses the
|
|
390
|
-
* network default: 0 on Regtest, 1 on
|
|
390
|
+
* network default: 0 on Regtest and Signet, 1 on Mainnet.
|
|
391
391
|
*/
|
|
392
392
|
export function defaultExternalSigners(
|
|
393
393
|
mnemonic: string,
|
|
@@ -2815,9 +2815,20 @@ export type ClaimDepositRequest = {
|
|
|
2815
2815
|
txid: string;
|
|
2816
2816
|
vout: /*u32*/ number;
|
|
2817
2817
|
/**
|
|
2818
|
-
* Caps what the claim may cost
|
|
2819
|
-
*
|
|
2820
|
-
*
|
|
2818
|
+
* Caps what the claim may cost, and is recorded on the deposit so later
|
|
2819
|
+
* automatic attempts are held to it too.
|
|
2820
|
+
*
|
|
2821
|
+
* Raising it above the quoted spread is what lets a deposit be claimed ahead
|
|
2822
|
+
* of maturity without further input. Lowering it below the spread keeps the
|
|
2823
|
+
* deposit from being claimed early, and does not hold back its claim at
|
|
2824
|
+
* maturity: that one runs under whichever is larger, this or the configured
|
|
2825
|
+
* max deposit claim fee.
|
|
2826
|
+
*
|
|
2827
|
+
* Unset claims under the configured max deposit claim fee and clears any
|
|
2828
|
+
* ceiling previously recorded on the deposit.
|
|
2829
|
+
*
|
|
2830
|
+
* The ceiling is recorded before the claim is attempted, so it stands even
|
|
2831
|
+
* when the attempt is then declined for exceeding it.
|
|
2821
2832
|
*/
|
|
2822
2833
|
maxFee: MaxFee | undefined;
|
|
2823
2834
|
};
|
|
@@ -2880,14 +2891,11 @@ const FfiConverterTypeClaimDepositRequest = (() => {
|
|
|
2880
2891
|
|
|
2881
2892
|
export type ClaimDepositResponse = {
|
|
2882
2893
|
/**
|
|
2883
|
-
*
|
|
2884
|
-
*
|
|
2885
|
-
*
|
|
2886
|
-
* `list_payments`. Which of the two happens follows from the deposit's maturity
|
|
2887
|
-
* and the fee ceiling, not from anything the caller asks for, so treat the
|
|
2888
|
-
* payment as optional on every claim.
|
|
2894
|
+
* What the call did. Which outcome occurs follows from the deposit's maturity
|
|
2895
|
+
* and the fee ceiling, not from anything the caller asks for, so handle all
|
|
2896
|
+
* three on every claim.
|
|
2889
2897
|
*/
|
|
2890
|
-
|
|
2898
|
+
outcome: ClaimDepositOutcome;
|
|
2891
2899
|
};
|
|
2892
2900
|
|
|
2893
2901
|
/**
|
|
@@ -2926,14 +2934,14 @@ const FfiConverterTypeClaimDepositResponse = (() => {
|
|
|
2926
2934
|
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2927
2935
|
read(from: RustBuffer): TypeName {
|
|
2928
2936
|
return {
|
|
2929
|
-
|
|
2937
|
+
outcome: FfiConverterTypeClaimDepositOutcome.read(from),
|
|
2930
2938
|
};
|
|
2931
2939
|
}
|
|
2932
2940
|
write(value: TypeName, into: RustBuffer): void {
|
|
2933
|
-
|
|
2941
|
+
FfiConverterTypeClaimDepositOutcome.write(value.outcome, into);
|
|
2934
2942
|
}
|
|
2935
2943
|
allocationSize(value: TypeName): number {
|
|
2936
|
-
return
|
|
2944
|
+
return FfiConverterTypeClaimDepositOutcome.allocationSize(value.outcome);
|
|
2937
2945
|
}
|
|
2938
2946
|
}
|
|
2939
2947
|
return new FFIConverter();
|
|
@@ -3142,15 +3150,20 @@ export type Config = {
|
|
|
3142
3150
|
preferSparkOverLightning: boolean;
|
|
3143
3151
|
/**
|
|
3144
3152
|
* Whether the data needed to exit a payment unilaterally, without the Spark
|
|
3145
|
-
* operators, is collected as funds arrive. Collection runs in
|
|
3146
|
-
*
|
|
3147
|
-
*
|
|
3148
|
-
*
|
|
3153
|
+
* operators, is collected automatically as funds arrive. Collection runs in
|
|
3154
|
+
* the background, after an operation rather than during it. A leaf the
|
|
3155
|
+
* operators cannot complete stays un-exitable until a later attempt
|
|
3156
|
+
* succeeds.
|
|
3157
|
+
*
|
|
3158
|
+
* Turn it off when collecting behind every operation costs more than it is
|
|
3159
|
+
* worth, on a busy wallet holding many leaves. `sync_wallet` collects
|
|
3160
|
+
* regardless of this flag, and waits for the pass before returning, so an
|
|
3161
|
+
* explicit sync on a cadence of your choosing is how the data is kept
|
|
3162
|
+
* current with the automatic collection off.
|
|
3149
3163
|
*
|
|
3150
|
-
*
|
|
3151
|
-
*
|
|
3152
|
-
*
|
|
3153
|
-
* moment: a leaf cannot be exited without them until one is collected.
|
|
3164
|
+
* Only that automatic collection is governed, so this has no effect at all
|
|
3165
|
+
* where none runs: with `background_tasks_enabled` off there is no
|
|
3166
|
+
* background collector, and every sync is an explicit one.
|
|
3154
3167
|
*
|
|
3155
3168
|
* Default value is true.
|
|
3156
3169
|
*/
|
|
@@ -4664,6 +4677,77 @@ const FfiConverterTypeCredentials = (() => {
|
|
|
4664
4677
|
return new FFIConverter();
|
|
4665
4678
|
})();
|
|
4666
4679
|
|
|
4680
|
+
/**
|
|
4681
|
+
* A Spark-side asset a route accepts, with the amount bounds that apply to it.
|
|
4682
|
+
*
|
|
4683
|
+
* Bounds are per asset rather than per route: the same external endpoint can
|
|
4684
|
+
* carry a dust floor when moved as sats and none when moved as a token.
|
|
4685
|
+
*/
|
|
4686
|
+
export type CrossChainAcceptedAsset = {
|
|
4687
|
+
asset: SparkAsset;
|
|
4688
|
+
/**
|
|
4689
|
+
* Unset when the provider publishes no bounds for this pairing.
|
|
4690
|
+
*/
|
|
4691
|
+
limits: CrossChainRouteLimits | undefined;
|
|
4692
|
+
};
|
|
4693
|
+
|
|
4694
|
+
/**
|
|
4695
|
+
* Generated factory for {@link CrossChainAcceptedAsset} record objects.
|
|
4696
|
+
*/
|
|
4697
|
+
export const CrossChainAcceptedAsset = (() => {
|
|
4698
|
+
const defaults = () => ({});
|
|
4699
|
+
const create = (() => {
|
|
4700
|
+
return uniffiCreateRecord<
|
|
4701
|
+
CrossChainAcceptedAsset,
|
|
4702
|
+
ReturnType<typeof defaults>
|
|
4703
|
+
>(defaults);
|
|
4704
|
+
})();
|
|
4705
|
+
return Object.freeze({
|
|
4706
|
+
/**
|
|
4707
|
+
* Create a frozen instance of {@link CrossChainAcceptedAsset}, with defaults specified
|
|
4708
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
4709
|
+
*/
|
|
4710
|
+
create,
|
|
4711
|
+
|
|
4712
|
+
/**
|
|
4713
|
+
* Create a frozen instance of {@link CrossChainAcceptedAsset}, with defaults specified
|
|
4714
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
4715
|
+
*/
|
|
4716
|
+
new: create,
|
|
4717
|
+
|
|
4718
|
+
/**
|
|
4719
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
4720
|
+
*/
|
|
4721
|
+
defaults: () =>
|
|
4722
|
+
Object.freeze(defaults()) as Partial<CrossChainAcceptedAsset>,
|
|
4723
|
+
});
|
|
4724
|
+
})();
|
|
4725
|
+
|
|
4726
|
+
const FfiConverterTypeCrossChainAcceptedAsset = (() => {
|
|
4727
|
+
type TypeName = CrossChainAcceptedAsset;
|
|
4728
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
4729
|
+
read(from: RustBuffer): TypeName {
|
|
4730
|
+
return {
|
|
4731
|
+
asset: FfiConverterTypeSparkAsset.read(from),
|
|
4732
|
+
limits: FfiConverterOptionalTypeCrossChainRouteLimits.read(from),
|
|
4733
|
+
};
|
|
4734
|
+
}
|
|
4735
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
4736
|
+
FfiConverterTypeSparkAsset.write(value.asset, into);
|
|
4737
|
+
FfiConverterOptionalTypeCrossChainRouteLimits.write(value.limits, into);
|
|
4738
|
+
}
|
|
4739
|
+
allocationSize(value: TypeName): number {
|
|
4740
|
+
return (
|
|
4741
|
+
FfiConverterTypeSparkAsset.allocationSize(value.asset) +
|
|
4742
|
+
FfiConverterOptionalTypeCrossChainRouteLimits.allocationSize(
|
|
4743
|
+
value.limits
|
|
4744
|
+
)
|
|
4745
|
+
);
|
|
4746
|
+
}
|
|
4747
|
+
}
|
|
4748
|
+
return new FFIConverter();
|
|
4749
|
+
})();
|
|
4750
|
+
|
|
4667
4751
|
export type CrossChainAddressDetails = {
|
|
4668
4752
|
address: string;
|
|
4669
4753
|
addressFamily: CrossChainAddressFamily;
|
|
@@ -4861,6 +4945,11 @@ export type CrossChainReceiveInfo = {
|
|
|
4861
4945
|
* in sats.
|
|
4862
4946
|
*/
|
|
4863
4947
|
serviceFeeAsset: string | undefined;
|
|
4948
|
+
/**
|
|
4949
|
+
* Decimals of `service_fee_asset`, for formatting `service_fee_amount`.
|
|
4950
|
+
* Unset when the fee is in sats or the provider did not report them.
|
|
4951
|
+
*/
|
|
4952
|
+
serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
4864
4953
|
/**
|
|
4865
4954
|
* Quote expiry as a unix timestamp in seconds.
|
|
4866
4955
|
*/
|
|
@@ -4910,6 +4999,7 @@ const FfiConverterTypeCrossChainReceiveInfo = (() => {
|
|
|
4910
4999
|
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
4911
5000
|
serviceFeeAmount: FfiConverterTypeu128.read(from),
|
|
4912
5001
|
serviceFeeAsset: FfiConverterOptionalString.read(from),
|
|
5002
|
+
serviceFeeAssetDecimals: FfiConverterOptionalUInt32.read(from),
|
|
4913
5003
|
expiresAt: FfiConverterUInt64.read(from),
|
|
4914
5004
|
};
|
|
4915
5005
|
}
|
|
@@ -4921,6 +5011,7 @@ const FfiConverterTypeCrossChainReceiveInfo = (() => {
|
|
|
4921
5011
|
FfiConverterOptionalString.write(value.tokenIdentifier, into);
|
|
4922
5012
|
FfiConverterTypeu128.write(value.serviceFeeAmount, into);
|
|
4923
5013
|
FfiConverterOptionalString.write(value.serviceFeeAsset, into);
|
|
5014
|
+
FfiConverterOptionalUInt32.write(value.serviceFeeAssetDecimals, into);
|
|
4924
5015
|
FfiConverterUInt64.write(value.expiresAt, into);
|
|
4925
5016
|
}
|
|
4926
5017
|
allocationSize(value: TypeName): number {
|
|
@@ -4932,6 +5023,9 @@ const FfiConverterTypeCrossChainReceiveInfo = (() => {
|
|
|
4932
5023
|
FfiConverterOptionalString.allocationSize(value.tokenIdentifier) +
|
|
4933
5024
|
FfiConverterTypeu128.allocationSize(value.serviceFeeAmount) +
|
|
4934
5025
|
FfiConverterOptionalString.allocationSize(value.serviceFeeAsset) +
|
|
5026
|
+
FfiConverterOptionalUInt32.allocationSize(
|
|
5027
|
+
value.serviceFeeAssetDecimals
|
|
5028
|
+
) +
|
|
4935
5029
|
FfiConverterUInt64.allocationSize(value.expiresAt)
|
|
4936
5030
|
);
|
|
4937
5031
|
}
|
|
@@ -4939,6 +5033,101 @@ const FfiConverterTypeCrossChainReceiveInfo = (() => {
|
|
|
4939
5033
|
return new FFIConverter();
|
|
4940
5034
|
})();
|
|
4941
5035
|
|
|
5036
|
+
/**
|
|
5037
|
+
* Amount bounds a provider publishes for moving a route with one Spark-side
|
|
5038
|
+
* asset.
|
|
5039
|
+
*
|
|
5040
|
+
* A route can enforce a tighter bound than it publishes, so an amount inside
|
|
5041
|
+
* these can still be rejected when the payment is prepared.
|
|
5042
|
+
*
|
|
5043
|
+
* The two groups are independent, and either can be absent: a route may
|
|
5044
|
+
* publish a base-unit floor (a dust minimum on a sats-funded route), a USD
|
|
5045
|
+
* notional band, both, or neither.
|
|
5046
|
+
*
|
|
5047
|
+
* `min_amount` / `max_amount` bound the asset that is paid in, so which asset
|
|
5048
|
+
* they are denominated in follows the direction: the Spark-side asset on a
|
|
5049
|
+
* send, the external asset on a receive. The USD band bounds the order's
|
|
5050
|
+
* value and reads the same in both directions.
|
|
5051
|
+
*/
|
|
5052
|
+
export type CrossChainRouteLimits = {
|
|
5053
|
+
/**
|
|
5054
|
+
* Smallest amount accepted, in the base units of the asset paid in.
|
|
5055
|
+
*/
|
|
5056
|
+
minAmount: U128 | undefined;
|
|
5057
|
+
/**
|
|
5058
|
+
* Largest amount accepted, in the base units of the asset paid in.
|
|
5059
|
+
*/
|
|
5060
|
+
maxAmount: U128 | undefined;
|
|
5061
|
+
/**
|
|
5062
|
+
* Smallest order value accepted, in USD cents.
|
|
5063
|
+
*/
|
|
5064
|
+
minUsdCents: /*u64*/ bigint | undefined;
|
|
5065
|
+
/**
|
|
5066
|
+
* Largest order value accepted, in USD cents.
|
|
5067
|
+
*/
|
|
5068
|
+
maxUsdCents: /*u64*/ bigint | undefined;
|
|
5069
|
+
};
|
|
5070
|
+
|
|
5071
|
+
/**
|
|
5072
|
+
* Generated factory for {@link CrossChainRouteLimits} record objects.
|
|
5073
|
+
*/
|
|
5074
|
+
export const CrossChainRouteLimits = (() => {
|
|
5075
|
+
const defaults = () => ({});
|
|
5076
|
+
const create = (() => {
|
|
5077
|
+
return uniffiCreateRecord<
|
|
5078
|
+
CrossChainRouteLimits,
|
|
5079
|
+
ReturnType<typeof defaults>
|
|
5080
|
+
>(defaults);
|
|
5081
|
+
})();
|
|
5082
|
+
return Object.freeze({
|
|
5083
|
+
/**
|
|
5084
|
+
* Create a frozen instance of {@link CrossChainRouteLimits}, with defaults specified
|
|
5085
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
5086
|
+
*/
|
|
5087
|
+
create,
|
|
5088
|
+
|
|
5089
|
+
/**
|
|
5090
|
+
* Create a frozen instance of {@link CrossChainRouteLimits}, with defaults specified
|
|
5091
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
5092
|
+
*/
|
|
5093
|
+
new: create,
|
|
5094
|
+
|
|
5095
|
+
/**
|
|
5096
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
5097
|
+
*/
|
|
5098
|
+
defaults: () => Object.freeze(defaults()) as Partial<CrossChainRouteLimits>,
|
|
5099
|
+
});
|
|
5100
|
+
})();
|
|
5101
|
+
|
|
5102
|
+
const FfiConverterTypeCrossChainRouteLimits = (() => {
|
|
5103
|
+
type TypeName = CrossChainRouteLimits;
|
|
5104
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
5105
|
+
read(from: RustBuffer): TypeName {
|
|
5106
|
+
return {
|
|
5107
|
+
minAmount: FfiConverterOptionalTypeu128.read(from),
|
|
5108
|
+
maxAmount: FfiConverterOptionalTypeu128.read(from),
|
|
5109
|
+
minUsdCents: FfiConverterOptionalUInt64.read(from),
|
|
5110
|
+
maxUsdCents: FfiConverterOptionalUInt64.read(from),
|
|
5111
|
+
};
|
|
5112
|
+
}
|
|
5113
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
5114
|
+
FfiConverterOptionalTypeu128.write(value.minAmount, into);
|
|
5115
|
+
FfiConverterOptionalTypeu128.write(value.maxAmount, into);
|
|
5116
|
+
FfiConverterOptionalUInt64.write(value.minUsdCents, into);
|
|
5117
|
+
FfiConverterOptionalUInt64.write(value.maxUsdCents, into);
|
|
5118
|
+
}
|
|
5119
|
+
allocationSize(value: TypeName): number {
|
|
5120
|
+
return (
|
|
5121
|
+
FfiConverterOptionalTypeu128.allocationSize(value.minAmount) +
|
|
5122
|
+
FfiConverterOptionalTypeu128.allocationSize(value.maxAmount) +
|
|
5123
|
+
FfiConverterOptionalUInt64.allocationSize(value.minUsdCents) +
|
|
5124
|
+
FfiConverterOptionalUInt64.allocationSize(value.maxUsdCents)
|
|
5125
|
+
);
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5128
|
+
return new FFIConverter();
|
|
5129
|
+
})();
|
|
5130
|
+
|
|
4942
5131
|
/**
|
|
4943
5132
|
* A single route available for cross-chain transfers, tagged with the provider
|
|
4944
5133
|
* that offers it. Returned by `get_cross_chain_routes()`.
|
|
@@ -4975,9 +5164,9 @@ export type CrossChainRoutePair = {
|
|
|
4975
5164
|
*/
|
|
4976
5165
|
exactOutEligible: boolean;
|
|
4977
5166
|
/**
|
|
4978
|
-
* Spark-side assets this route accepts.
|
|
5167
|
+
* Spark-side assets this route accepts, each with its own amount bounds.
|
|
4979
5168
|
*/
|
|
4980
|
-
acceptedAssets: Array<
|
|
5169
|
+
acceptedAssets: Array<CrossChainAcceptedAsset>;
|
|
4981
5170
|
/**
|
|
4982
5171
|
* Rails this route can be delivered over, orthogonal to
|
|
4983
5172
|
* `accepted_assets` (the asset moved vs the rail moved on).
|
|
@@ -5027,7 +5216,7 @@ const FfiConverterTypeCrossChainRoutePair = (() => {
|
|
|
5027
5216
|
contractAddress: FfiConverterOptionalString.read(from),
|
|
5028
5217
|
decimals: FfiConverterUInt8.read(from),
|
|
5029
5218
|
exactOutEligible: FfiConverterBool.read(from),
|
|
5030
|
-
acceptedAssets:
|
|
5219
|
+
acceptedAssets: FfiConverterArrayTypeCrossChainAcceptedAsset.read(from),
|
|
5031
5220
|
deliveryMethods: FfiConverterArrayTypeDeliveryMethod.read(from),
|
|
5032
5221
|
};
|
|
5033
5222
|
}
|
|
@@ -5039,7 +5228,10 @@ const FfiConverterTypeCrossChainRoutePair = (() => {
|
|
|
5039
5228
|
FfiConverterOptionalString.write(value.contractAddress, into);
|
|
5040
5229
|
FfiConverterUInt8.write(value.decimals, into);
|
|
5041
5230
|
FfiConverterBool.write(value.exactOutEligible, into);
|
|
5042
|
-
|
|
5231
|
+
FfiConverterArrayTypeCrossChainAcceptedAsset.write(
|
|
5232
|
+
value.acceptedAssets,
|
|
5233
|
+
into
|
|
5234
|
+
);
|
|
5043
5235
|
FfiConverterArrayTypeDeliveryMethod.write(value.deliveryMethods, into);
|
|
5044
5236
|
}
|
|
5045
5237
|
allocationSize(value: TypeName): number {
|
|
@@ -5051,7 +5243,9 @@ const FfiConverterTypeCrossChainRoutePair = (() => {
|
|
|
5051
5243
|
FfiConverterOptionalString.allocationSize(value.contractAddress) +
|
|
5052
5244
|
FfiConverterUInt8.allocationSize(value.decimals) +
|
|
5053
5245
|
FfiConverterBool.allocationSize(value.exactOutEligible) +
|
|
5054
|
-
|
|
5246
|
+
FfiConverterArrayTypeCrossChainAcceptedAsset.allocationSize(
|
|
5247
|
+
value.acceptedAssets
|
|
5248
|
+
) +
|
|
5055
5249
|
FfiConverterArrayTypeDeliveryMethod.allocationSize(
|
|
5056
5250
|
value.deliveryMethods
|
|
5057
5251
|
)
|
|
@@ -5182,6 +5376,14 @@ export type DepositInfo = {
|
|
|
5182
5376
|
* Unset when no instant claim has been attempted.
|
|
5183
5377
|
*/
|
|
5184
5378
|
instantClaimStatus: InstantClaimStatus | undefined;
|
|
5379
|
+
/**
|
|
5380
|
+
* The fee ceiling standing for this deposit alone. It caps what may be paid
|
|
5381
|
+
* to claim the deposit ahead of maturity. The claim at maturity runs under
|
|
5382
|
+
* whichever is larger, this or the configured max deposit claim fee, so a
|
|
5383
|
+
* ceiling set below that one does not hold the deposit back from it. Unset
|
|
5384
|
+
* means the configured ceiling applies to both.
|
|
5385
|
+
*/
|
|
5386
|
+
maxClaimFee: MaxFee | undefined;
|
|
5185
5387
|
};
|
|
5186
5388
|
|
|
5187
5389
|
/**
|
|
@@ -5229,6 +5431,7 @@ const FfiConverterTypeDepositInfo = (() => {
|
|
|
5229
5431
|
claimError: FfiConverterOptionalTypeDepositClaimError.read(from),
|
|
5230
5432
|
instantClaimStatus:
|
|
5231
5433
|
FfiConverterOptionalTypeInstantClaimStatus.read(from),
|
|
5434
|
+
maxClaimFee: FfiConverterOptionalTypeMaxFee.read(from),
|
|
5232
5435
|
};
|
|
5233
5436
|
}
|
|
5234
5437
|
write(value: TypeName, into: RustBuffer): void {
|
|
@@ -5244,6 +5447,7 @@ const FfiConverterTypeDepositInfo = (() => {
|
|
|
5244
5447
|
value.instantClaimStatus,
|
|
5245
5448
|
into
|
|
5246
5449
|
);
|
|
5450
|
+
FfiConverterOptionalTypeMaxFee.write(value.maxClaimFee, into);
|
|
5247
5451
|
}
|
|
5248
5452
|
allocationSize(value: TypeName): number {
|
|
5249
5453
|
return (
|
|
@@ -5259,7 +5463,8 @@ const FfiConverterTypeDepositInfo = (() => {
|
|
|
5259
5463
|
) +
|
|
5260
5464
|
FfiConverterOptionalTypeInstantClaimStatus.allocationSize(
|
|
5261
5465
|
value.instantClaimStatus
|
|
5262
|
-
)
|
|
5466
|
+
) +
|
|
5467
|
+
FfiConverterOptionalTypeMaxFee.allocationSize(value.maxClaimFee)
|
|
5263
5468
|
);
|
|
5264
5469
|
}
|
|
5265
5470
|
}
|
|
@@ -6270,6 +6475,66 @@ const FfiConverterTypeExternalInputParser = (() => {
|
|
|
6270
6475
|
return new FFIConverter();
|
|
6271
6476
|
})();
|
|
6272
6477
|
|
|
6478
|
+
/**
|
|
6479
|
+
* FFI-safe representation of `spark_wallet::LeafSigningKey`: the leaf signing
|
|
6480
|
+
* key derived from `derived_from`.
|
|
6481
|
+
*/
|
|
6482
|
+
export type ExternalLeafSigningKey = {
|
|
6483
|
+
derivedFrom: ExternalTreeNodeId;
|
|
6484
|
+
};
|
|
6485
|
+
|
|
6486
|
+
/**
|
|
6487
|
+
* Generated factory for {@link ExternalLeafSigningKey} record objects.
|
|
6488
|
+
*/
|
|
6489
|
+
export const ExternalLeafSigningKey = (() => {
|
|
6490
|
+
const defaults = () => ({});
|
|
6491
|
+
const create = (() => {
|
|
6492
|
+
return uniffiCreateRecord<
|
|
6493
|
+
ExternalLeafSigningKey,
|
|
6494
|
+
ReturnType<typeof defaults>
|
|
6495
|
+
>(defaults);
|
|
6496
|
+
})();
|
|
6497
|
+
return Object.freeze({
|
|
6498
|
+
/**
|
|
6499
|
+
* Create a frozen instance of {@link ExternalLeafSigningKey}, with defaults specified
|
|
6500
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
6501
|
+
*/
|
|
6502
|
+
create,
|
|
6503
|
+
|
|
6504
|
+
/**
|
|
6505
|
+
* Create a frozen instance of {@link ExternalLeafSigningKey}, with defaults specified
|
|
6506
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
6507
|
+
*/
|
|
6508
|
+
new: create,
|
|
6509
|
+
|
|
6510
|
+
/**
|
|
6511
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
6512
|
+
*/
|
|
6513
|
+
defaults: () =>
|
|
6514
|
+
Object.freeze(defaults()) as Partial<ExternalLeafSigningKey>,
|
|
6515
|
+
});
|
|
6516
|
+
})();
|
|
6517
|
+
|
|
6518
|
+
const FfiConverterTypeExternalLeafSigningKey = (() => {
|
|
6519
|
+
type TypeName = ExternalLeafSigningKey;
|
|
6520
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
6521
|
+
read(from: RustBuffer): TypeName {
|
|
6522
|
+
return {
|
|
6523
|
+
derivedFrom: FfiConverterTypeExternalTreeNodeId.read(from),
|
|
6524
|
+
};
|
|
6525
|
+
}
|
|
6526
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
6527
|
+
FfiConverterTypeExternalTreeNodeId.write(value.derivedFrom, into);
|
|
6528
|
+
}
|
|
6529
|
+
allocationSize(value: TypeName): number {
|
|
6530
|
+
return FfiConverterTypeExternalTreeNodeId.allocationSize(
|
|
6531
|
+
value.derivedFrom
|
|
6532
|
+
);
|
|
6533
|
+
}
|
|
6534
|
+
}
|
|
6535
|
+
return new FFIConverter();
|
|
6536
|
+
})();
|
|
6537
|
+
|
|
6273
6538
|
/**
|
|
6274
6539
|
* FFI-safe representation of `spark_wallet::NewLeafKey`.
|
|
6275
6540
|
*/
|
|
@@ -7842,12 +8107,14 @@ const FfiConverterTypeExternalStartedStaticDepositRefund = (() => {
|
|
|
7842
8107
|
})();
|
|
7843
8108
|
|
|
7844
8109
|
/**
|
|
7845
|
-
* FFI-safe representation of `spark_wallet::TransferLeafInput`. Conveys the
|
|
7846
|
-
* leaf id and the new (post-transfer) leaf id;
|
|
8110
|
+
* FFI-safe representation of `spark_wallet::TransferLeafInput`. Conveys the
|
|
8111
|
+
* leaf id, the key the leaf is held under and the new (post-transfer) leaf id;
|
|
8112
|
+
* the signer derives the keys from them.
|
|
7847
8113
|
*/
|
|
7848
8114
|
export type ExternalTransferLeafInput = {
|
|
7849
8115
|
nodeId: ExternalTreeNodeId;
|
|
7850
8116
|
newLeafId: ExternalTreeNodeId;
|
|
8117
|
+
signingKey: ExternalLeafSigningKey;
|
|
7851
8118
|
};
|
|
7852
8119
|
|
|
7853
8120
|
/**
|
|
@@ -7889,16 +8156,19 @@ const FfiConverterTypeExternalTransferLeafInput = (() => {
|
|
|
7889
8156
|
return {
|
|
7890
8157
|
nodeId: FfiConverterTypeExternalTreeNodeId.read(from),
|
|
7891
8158
|
newLeafId: FfiConverterTypeExternalTreeNodeId.read(from),
|
|
8159
|
+
signingKey: FfiConverterTypeExternalLeafSigningKey.read(from),
|
|
7892
8160
|
};
|
|
7893
8161
|
}
|
|
7894
8162
|
write(value: TypeName, into: RustBuffer): void {
|
|
7895
8163
|
FfiConverterTypeExternalTreeNodeId.write(value.nodeId, into);
|
|
7896
8164
|
FfiConverterTypeExternalTreeNodeId.write(value.newLeafId, into);
|
|
8165
|
+
FfiConverterTypeExternalLeafSigningKey.write(value.signingKey, into);
|
|
7897
8166
|
}
|
|
7898
8167
|
allocationSize(value: TypeName): number {
|
|
7899
8168
|
return (
|
|
7900
8169
|
FfiConverterTypeExternalTreeNodeId.allocationSize(value.nodeId) +
|
|
7901
|
-
FfiConverterTypeExternalTreeNodeId.allocationSize(value.newLeafId)
|
|
8170
|
+
FfiConverterTypeExternalTreeNodeId.allocationSize(value.newLeafId) +
|
|
8171
|
+
FfiConverterTypeExternalLeafSigningKey.allocationSize(value.signingKey)
|
|
7902
8172
|
);
|
|
7903
8173
|
}
|
|
7904
8174
|
}
|
|
@@ -12551,6 +12821,11 @@ export type PreparePaymentLinkResponse = {
|
|
|
12551
12821
|
* denominates its fee in sats, Orchestra in the stablecoin.
|
|
12552
12822
|
*/
|
|
12553
12823
|
serviceFeeAsset: string | undefined;
|
|
12824
|
+
/**
|
|
12825
|
+
* Decimals of `service_fee_asset`, for formatting `service_fee_amount`.
|
|
12826
|
+
* Unset when the fee is in sats or the provider did not report them.
|
|
12827
|
+
*/
|
|
12828
|
+
serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
12554
12829
|
/**
|
|
12555
12830
|
* RFC3339 timestamp after which the quote is no longer valid.
|
|
12556
12831
|
*/
|
|
@@ -12600,6 +12875,7 @@ const FfiConverterTypePreparePaymentLinkResponse = (() => {
|
|
|
12600
12875
|
asset: FfiConverterString.read(from),
|
|
12601
12876
|
serviceFeeAmount: FfiConverterTypeu128.read(from),
|
|
12602
12877
|
serviceFeeAsset: FfiConverterOptionalString.read(from),
|
|
12878
|
+
serviceFeeAssetDecimals: FfiConverterOptionalUInt32.read(from),
|
|
12603
12879
|
expiresAt: FfiConverterString.read(from),
|
|
12604
12880
|
};
|
|
12605
12881
|
}
|
|
@@ -12610,6 +12886,7 @@ const FfiConverterTypePreparePaymentLinkResponse = (() => {
|
|
|
12610
12886
|
FfiConverterString.write(value.asset, into);
|
|
12611
12887
|
FfiConverterTypeu128.write(value.serviceFeeAmount, into);
|
|
12612
12888
|
FfiConverterOptionalString.write(value.serviceFeeAsset, into);
|
|
12889
|
+
FfiConverterOptionalUInt32.write(value.serviceFeeAssetDecimals, into);
|
|
12613
12890
|
FfiConverterString.write(value.expiresAt, into);
|
|
12614
12891
|
}
|
|
12615
12892
|
allocationSize(value: TypeName): number {
|
|
@@ -12620,6 +12897,9 @@ const FfiConverterTypePreparePaymentLinkResponse = (() => {
|
|
|
12620
12897
|
FfiConverterString.allocationSize(value.asset) +
|
|
12621
12898
|
FfiConverterTypeu128.allocationSize(value.serviceFeeAmount) +
|
|
12622
12899
|
FfiConverterOptionalString.allocationSize(value.serviceFeeAsset) +
|
|
12900
|
+
FfiConverterOptionalUInt32.allocationSize(
|
|
12901
|
+
value.serviceFeeAssetDecimals
|
|
12902
|
+
) +
|
|
12623
12903
|
FfiConverterString.allocationSize(value.expiresAt)
|
|
12624
12904
|
);
|
|
12625
12905
|
}
|
|
@@ -13038,6 +13318,11 @@ const FfiConverterTypePrepareUnilateralExitRequest = (() => {
|
|
|
13038
13318
|
* fee at the requested rate, and how much to fund.
|
|
13039
13319
|
*/
|
|
13040
13320
|
export type PrepareUnilateralExitResponse = {
|
|
13321
|
+
/**
|
|
13322
|
+
* The leaves the exit covers. A leaf whose exit already finished is left out,
|
|
13323
|
+
* even when named: `exit_chain_state` shows its refund swept or its branch
|
|
13324
|
+
* stopped.
|
|
13325
|
+
*/
|
|
13041
13326
|
leaves: Array<UnilateralExitLeaf>;
|
|
13042
13327
|
/**
|
|
13043
13328
|
* Total value of the selected leaves, in satoshis.
|
|
@@ -17681,6 +17966,7 @@ export type TurnkeyConfig = {
|
|
|
17681
17966
|
/**
|
|
17682
17967
|
* Network the wallet operates on; selects the Spark address format
|
|
17683
17968
|
* (mainnet or regtest) used for Spark-protocol and Schnorr signing.
|
|
17969
|
+
* Signet is unsupported by Turnkey's Spark account formats.
|
|
17684
17970
|
*/
|
|
17685
17971
|
network: Network;
|
|
17686
17972
|
/**
|
|
@@ -19072,6 +19358,79 @@ const FfiConverterTypeWalletSetup = (() => {
|
|
|
19072
19358
|
return new FFIConverter();
|
|
19073
19359
|
})();
|
|
19074
19360
|
|
|
19361
|
+
/**
|
|
19362
|
+
* A static deposit address being watched on-chain for unconfirmed deposits.
|
|
19363
|
+
*/
|
|
19364
|
+
export type WatchedDepositAddress = {
|
|
19365
|
+
address: string;
|
|
19366
|
+
/**
|
|
19367
|
+
* When the address was handed out, in seconds since the epoch. The watch
|
|
19368
|
+
* window is measured from here.
|
|
19369
|
+
*/
|
|
19370
|
+
issuedAt: /*u64*/ bigint;
|
|
19371
|
+
/**
|
|
19372
|
+
* Whether a deposit to it has been seen unconfirmed.
|
|
19373
|
+
*/
|
|
19374
|
+
seen: boolean;
|
|
19375
|
+
};
|
|
19376
|
+
|
|
19377
|
+
/**
|
|
19378
|
+
* Generated factory for {@link WatchedDepositAddress} record objects.
|
|
19379
|
+
*/
|
|
19380
|
+
export const WatchedDepositAddress = (() => {
|
|
19381
|
+
const defaults = () => ({});
|
|
19382
|
+
const create = (() => {
|
|
19383
|
+
return uniffiCreateRecord<
|
|
19384
|
+
WatchedDepositAddress,
|
|
19385
|
+
ReturnType<typeof defaults>
|
|
19386
|
+
>(defaults);
|
|
19387
|
+
})();
|
|
19388
|
+
return Object.freeze({
|
|
19389
|
+
/**
|
|
19390
|
+
* Create a frozen instance of {@link WatchedDepositAddress}, with defaults specified
|
|
19391
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
19392
|
+
*/
|
|
19393
|
+
create,
|
|
19394
|
+
|
|
19395
|
+
/**
|
|
19396
|
+
* Create a frozen instance of {@link WatchedDepositAddress}, with defaults specified
|
|
19397
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
19398
|
+
*/
|
|
19399
|
+
new: create,
|
|
19400
|
+
|
|
19401
|
+
/**
|
|
19402
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
19403
|
+
*/
|
|
19404
|
+
defaults: () => Object.freeze(defaults()) as Partial<WatchedDepositAddress>,
|
|
19405
|
+
});
|
|
19406
|
+
})();
|
|
19407
|
+
|
|
19408
|
+
const FfiConverterTypeWatchedDepositAddress = (() => {
|
|
19409
|
+
type TypeName = WatchedDepositAddress;
|
|
19410
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
19411
|
+
read(from: RustBuffer): TypeName {
|
|
19412
|
+
return {
|
|
19413
|
+
address: FfiConverterString.read(from),
|
|
19414
|
+
issuedAt: FfiConverterUInt64.read(from),
|
|
19415
|
+
seen: FfiConverterBool.read(from),
|
|
19416
|
+
};
|
|
19417
|
+
}
|
|
19418
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
19419
|
+
FfiConverterString.write(value.address, into);
|
|
19420
|
+
FfiConverterUInt64.write(value.issuedAt, into);
|
|
19421
|
+
FfiConverterBool.write(value.seen, into);
|
|
19422
|
+
}
|
|
19423
|
+
allocationSize(value: TypeName): number {
|
|
19424
|
+
return (
|
|
19425
|
+
FfiConverterString.allocationSize(value.address) +
|
|
19426
|
+
FfiConverterUInt64.allocationSize(value.issuedAt) +
|
|
19427
|
+
FfiConverterBool.allocationSize(value.seen)
|
|
19428
|
+
);
|
|
19429
|
+
}
|
|
19430
|
+
}
|
|
19431
|
+
return new FFIConverter();
|
|
19432
|
+
})();
|
|
19433
|
+
|
|
19075
19434
|
/**
|
|
19076
19435
|
* A registered webhook entry.
|
|
19077
19436
|
*/
|
|
@@ -20634,6 +20993,7 @@ const FfiConverterTypeChainApiType = (() => {
|
|
|
20634
20993
|
export enum ChainServiceError_Tags {
|
|
20635
20994
|
InvalidAddress = 'InvalidAddress',
|
|
20636
20995
|
ServiceConnectivity = 'ServiceConnectivity',
|
|
20996
|
+
NotFound = 'NotFound',
|
|
20637
20997
|
Generic = 'Generic',
|
|
20638
20998
|
}
|
|
20639
20999
|
export const ChainServiceError = (() => {
|
|
@@ -20713,6 +21073,45 @@ export const ChainServiceError = (() => {
|
|
|
20713
21073
|
}
|
|
20714
21074
|
}
|
|
20715
21075
|
|
|
21076
|
+
type NotFound__interface = {
|
|
21077
|
+
tag: ChainServiceError_Tags.NotFound;
|
|
21078
|
+
inner: Readonly<[string]>;
|
|
21079
|
+
};
|
|
21080
|
+
|
|
21081
|
+
/**
|
|
21082
|
+
* The backend does not know this transaction or output. Distinct from a
|
|
21083
|
+
* connectivity failure: it is an answer, not the absence of one.
|
|
21084
|
+
*/
|
|
21085
|
+
class NotFound_ extends UniffiError implements NotFound__interface {
|
|
21086
|
+
/**
|
|
21087
|
+
* @private
|
|
21088
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21089
|
+
*/
|
|
21090
|
+
readonly [uniffiTypeNameSymbol] = 'ChainServiceError';
|
|
21091
|
+
readonly tag = ChainServiceError_Tags.NotFound;
|
|
21092
|
+
readonly inner: Readonly<[string]>;
|
|
21093
|
+
constructor(v0: string) {
|
|
21094
|
+
super('ChainServiceError', 'NotFound');
|
|
21095
|
+
this.inner = Object.freeze([v0]);
|
|
21096
|
+
}
|
|
21097
|
+
|
|
21098
|
+
static new(v0: string): NotFound_ {
|
|
21099
|
+
return new NotFound_(v0);
|
|
21100
|
+
}
|
|
21101
|
+
|
|
21102
|
+
static instanceOf(obj: any): obj is NotFound_ {
|
|
21103
|
+
return obj.tag === ChainServiceError_Tags.NotFound;
|
|
21104
|
+
}
|
|
21105
|
+
|
|
21106
|
+
static hasInner(obj: any): obj is NotFound_ {
|
|
21107
|
+
return NotFound_.instanceOf(obj);
|
|
21108
|
+
}
|
|
21109
|
+
|
|
21110
|
+
static getInner(obj: NotFound_): Readonly<[string]> {
|
|
21111
|
+
return obj.inner;
|
|
21112
|
+
}
|
|
21113
|
+
}
|
|
21114
|
+
|
|
20716
21115
|
type Generic__interface = {
|
|
20717
21116
|
tag: ChainServiceError_Tags.Generic;
|
|
20718
21117
|
inner: Readonly<[string]>;
|
|
@@ -20756,6 +21155,7 @@ export const ChainServiceError = (() => {
|
|
|
20756
21155
|
instanceOf,
|
|
20757
21156
|
InvalidAddress: InvalidAddress_,
|
|
20758
21157
|
ServiceConnectivity: ServiceConnectivity_,
|
|
21158
|
+
NotFound: NotFound_,
|
|
20759
21159
|
Generic: Generic_,
|
|
20760
21160
|
});
|
|
20761
21161
|
})();
|
|
@@ -20780,6 +21180,8 @@ const FfiConverterTypeChainServiceError = (() => {
|
|
|
20780
21180
|
FfiConverterString.read(from)
|
|
20781
21181
|
);
|
|
20782
21182
|
case 3:
|
|
21183
|
+
return new ChainServiceError.NotFound(FfiConverterString.read(from));
|
|
21184
|
+
case 4:
|
|
20783
21185
|
return new ChainServiceError.Generic(FfiConverterString.read(from));
|
|
20784
21186
|
default:
|
|
20785
21187
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -20799,12 +21201,18 @@ const FfiConverterTypeChainServiceError = (() => {
|
|
|
20799
21201
|
FfiConverterString.write(inner[0], into);
|
|
20800
21202
|
return;
|
|
20801
21203
|
}
|
|
20802
|
-
case ChainServiceError_Tags.
|
|
21204
|
+
case ChainServiceError_Tags.NotFound: {
|
|
20803
21205
|
ordinalConverter.write(3, into);
|
|
20804
21206
|
const inner = value.inner;
|
|
20805
21207
|
FfiConverterString.write(inner[0], into);
|
|
20806
21208
|
return;
|
|
20807
21209
|
}
|
|
21210
|
+
case ChainServiceError_Tags.Generic: {
|
|
21211
|
+
ordinalConverter.write(4, into);
|
|
21212
|
+
const inner = value.inner;
|
|
21213
|
+
FfiConverterString.write(inner[0], into);
|
|
21214
|
+
return;
|
|
21215
|
+
}
|
|
20808
21216
|
default:
|
|
20809
21217
|
// Throwing from here means that ChainServiceError_Tags hasn't matched an ordinal.
|
|
20810
21218
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -20824,12 +21232,451 @@ const FfiConverterTypeChainServiceError = (() => {
|
|
|
20824
21232
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
20825
21233
|
return size;
|
|
20826
21234
|
}
|
|
20827
|
-
case ChainServiceError_Tags.
|
|
21235
|
+
case ChainServiceError_Tags.NotFound: {
|
|
20828
21236
|
const inner = value.inner;
|
|
20829
21237
|
let size = ordinalConverter.allocationSize(3);
|
|
20830
21238
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
20831
21239
|
return size;
|
|
20832
21240
|
}
|
|
21241
|
+
case ChainServiceError_Tags.Generic: {
|
|
21242
|
+
const inner = value.inner;
|
|
21243
|
+
let size = ordinalConverter.allocationSize(4);
|
|
21244
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
21245
|
+
return size;
|
|
21246
|
+
}
|
|
21247
|
+
default:
|
|
21248
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
21249
|
+
}
|
|
21250
|
+
}
|
|
21251
|
+
}
|
|
21252
|
+
return new FFIConverter();
|
|
21253
|
+
})();
|
|
21254
|
+
|
|
21255
|
+
// Enum: ClaimDeferredReason
|
|
21256
|
+
export enum ClaimDeferredReason_Tags {
|
|
21257
|
+
MaxFeeExceeded = 'MaxFeeExceeded',
|
|
21258
|
+
NoEarlyClaimAvailable = 'NoEarlyClaimAvailable',
|
|
21259
|
+
ProviderDeclined = 'ProviderDeclined',
|
|
21260
|
+
}
|
|
21261
|
+
/**
|
|
21262
|
+
* Why a claim was deferred rather than made.
|
|
21263
|
+
*/
|
|
21264
|
+
export const ClaimDeferredReason = (() => {
|
|
21265
|
+
type MaxFeeExceeded__interface = {
|
|
21266
|
+
tag: ClaimDeferredReason_Tags.MaxFeeExceeded;
|
|
21267
|
+
inner: Readonly<{
|
|
21268
|
+
requiredFeeSats: /*u64*/ bigint;
|
|
21269
|
+
maxFeeSats: /*u64*/ bigint;
|
|
21270
|
+
}>;
|
|
21271
|
+
};
|
|
21272
|
+
|
|
21273
|
+
/**
|
|
21274
|
+
* Claiming ahead of maturity costs more than the fee ceiling allows. Unlike a
|
|
21275
|
+
* depth that has not arrived, this does not clear on its own: the deposit is
|
|
21276
|
+
* claimed at maturity unless the ceiling is raised.
|
|
21277
|
+
*
|
|
21278
|
+
* `required_fee_sats` is what the early claim would have cost, so a caller can
|
|
21279
|
+
* offer it at that price rather than quoting again.
|
|
21280
|
+
*/
|
|
21281
|
+
class MaxFeeExceeded_
|
|
21282
|
+
extends UniffiEnum
|
|
21283
|
+
implements MaxFeeExceeded__interface
|
|
21284
|
+
{
|
|
21285
|
+
/**
|
|
21286
|
+
* @private
|
|
21287
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21288
|
+
*/
|
|
21289
|
+
readonly [uniffiTypeNameSymbol] = 'ClaimDeferredReason';
|
|
21290
|
+
readonly tag = ClaimDeferredReason_Tags.MaxFeeExceeded;
|
|
21291
|
+
readonly inner: Readonly<{
|
|
21292
|
+
requiredFeeSats: /*u64*/ bigint;
|
|
21293
|
+
maxFeeSats: /*u64*/ bigint;
|
|
21294
|
+
}>;
|
|
21295
|
+
constructor(inner: {
|
|
21296
|
+
/**
|
|
21297
|
+
* What the provider asked to credit the deposit early.
|
|
21298
|
+
*/ requiredFeeSats: /*u64*/ bigint;
|
|
21299
|
+
/**
|
|
21300
|
+
* The ceiling it was held to.
|
|
21301
|
+
*/ maxFeeSats: /*u64*/ bigint;
|
|
21302
|
+
}) {
|
|
21303
|
+
super('ClaimDeferredReason', 'MaxFeeExceeded');
|
|
21304
|
+
this.inner = Object.freeze(inner);
|
|
21305
|
+
}
|
|
21306
|
+
|
|
21307
|
+
static new(inner: {
|
|
21308
|
+
/**
|
|
21309
|
+
* What the provider asked to credit the deposit early.
|
|
21310
|
+
*/ requiredFeeSats: /*u64*/ bigint;
|
|
21311
|
+
/**
|
|
21312
|
+
* The ceiling it was held to.
|
|
21313
|
+
*/ maxFeeSats: /*u64*/ bigint;
|
|
21314
|
+
}): MaxFeeExceeded_ {
|
|
21315
|
+
return new MaxFeeExceeded_(inner);
|
|
21316
|
+
}
|
|
21317
|
+
|
|
21318
|
+
static instanceOf(obj: any): obj is MaxFeeExceeded_ {
|
|
21319
|
+
return obj.tag === ClaimDeferredReason_Tags.MaxFeeExceeded;
|
|
21320
|
+
}
|
|
21321
|
+
}
|
|
21322
|
+
|
|
21323
|
+
type NoEarlyClaimAvailable__interface = {
|
|
21324
|
+
tag: ClaimDeferredReason_Tags.NoEarlyClaimAvailable;
|
|
21325
|
+
};
|
|
21326
|
+
|
|
21327
|
+
/**
|
|
21328
|
+
* The provider offers no early claim at the deposit's current depth, either
|
|
21329
|
+
* because it is too shallow for any plan or because none was offered for it.
|
|
21330
|
+
* Depth is the usual cause, and it resolves itself: the next confirmation may
|
|
21331
|
+
* well bring an early claim within reach.
|
|
21332
|
+
*/
|
|
21333
|
+
class NoEarlyClaimAvailable_
|
|
21334
|
+
extends UniffiEnum
|
|
21335
|
+
implements NoEarlyClaimAvailable__interface
|
|
21336
|
+
{
|
|
21337
|
+
/**
|
|
21338
|
+
* @private
|
|
21339
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21340
|
+
*/
|
|
21341
|
+
readonly [uniffiTypeNameSymbol] = 'ClaimDeferredReason';
|
|
21342
|
+
readonly tag = ClaimDeferredReason_Tags.NoEarlyClaimAvailable;
|
|
21343
|
+
constructor() {
|
|
21344
|
+
super('ClaimDeferredReason', 'NoEarlyClaimAvailable');
|
|
21345
|
+
}
|
|
21346
|
+
|
|
21347
|
+
static new(): NoEarlyClaimAvailable_ {
|
|
21348
|
+
return new NoEarlyClaimAvailable_();
|
|
21349
|
+
}
|
|
21350
|
+
|
|
21351
|
+
static instanceOf(obj: any): obj is NoEarlyClaimAvailable_ {
|
|
21352
|
+
return obj.tag === ClaimDeferredReason_Tags.NoEarlyClaimAvailable;
|
|
21353
|
+
}
|
|
21354
|
+
}
|
|
21355
|
+
|
|
21356
|
+
type ProviderDeclined__interface = {
|
|
21357
|
+
tag: ClaimDeferredReason_Tags.ProviderDeclined;
|
|
21358
|
+
inner: Readonly<{ message: string }>;
|
|
21359
|
+
};
|
|
21360
|
+
|
|
21361
|
+
/**
|
|
21362
|
+
* The provider refused the early claim or could not be reached, so nothing was
|
|
21363
|
+
* submitted. Unlike a depth that has not arrived, waiting for a confirmation
|
|
21364
|
+
* does not address this, and the deposit is claimed at maturity unless a later
|
|
21365
|
+
* call succeeds. `message` is what the provider or the transport reported.
|
|
21366
|
+
*/
|
|
21367
|
+
class ProviderDeclined_
|
|
21368
|
+
extends UniffiEnum
|
|
21369
|
+
implements ProviderDeclined__interface
|
|
21370
|
+
{
|
|
21371
|
+
/**
|
|
21372
|
+
* @private
|
|
21373
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21374
|
+
*/
|
|
21375
|
+
readonly [uniffiTypeNameSymbol] = 'ClaimDeferredReason';
|
|
21376
|
+
readonly tag = ClaimDeferredReason_Tags.ProviderDeclined;
|
|
21377
|
+
readonly inner: Readonly<{ message: string }>;
|
|
21378
|
+
constructor(inner: { message: string }) {
|
|
21379
|
+
super('ClaimDeferredReason', 'ProviderDeclined');
|
|
21380
|
+
this.inner = Object.freeze(inner);
|
|
21381
|
+
}
|
|
21382
|
+
|
|
21383
|
+
static new(inner: { message: string }): ProviderDeclined_ {
|
|
21384
|
+
return new ProviderDeclined_(inner);
|
|
21385
|
+
}
|
|
21386
|
+
|
|
21387
|
+
static instanceOf(obj: any): obj is ProviderDeclined_ {
|
|
21388
|
+
return obj.tag === ClaimDeferredReason_Tags.ProviderDeclined;
|
|
21389
|
+
}
|
|
21390
|
+
}
|
|
21391
|
+
|
|
21392
|
+
function instanceOf(obj: any): obj is ClaimDeferredReason {
|
|
21393
|
+
return obj[uniffiTypeNameSymbol] === 'ClaimDeferredReason';
|
|
21394
|
+
}
|
|
21395
|
+
|
|
21396
|
+
return Object.freeze({
|
|
21397
|
+
instanceOf,
|
|
21398
|
+
MaxFeeExceeded: MaxFeeExceeded_,
|
|
21399
|
+
NoEarlyClaimAvailable: NoEarlyClaimAvailable_,
|
|
21400
|
+
ProviderDeclined: ProviderDeclined_,
|
|
21401
|
+
});
|
|
21402
|
+
})();
|
|
21403
|
+
|
|
21404
|
+
/**
|
|
21405
|
+
* Why a claim was deferred rather than made.
|
|
21406
|
+
*/
|
|
21407
|
+
|
|
21408
|
+
export type ClaimDeferredReason = InstanceType<
|
|
21409
|
+
(typeof ClaimDeferredReason)[keyof Omit<
|
|
21410
|
+
typeof ClaimDeferredReason,
|
|
21411
|
+
'instanceOf'
|
|
21412
|
+
>]
|
|
21413
|
+
>;
|
|
21414
|
+
|
|
21415
|
+
// FfiConverter for enum ClaimDeferredReason
|
|
21416
|
+
const FfiConverterTypeClaimDeferredReason = (() => {
|
|
21417
|
+
const ordinalConverter = FfiConverterInt32;
|
|
21418
|
+
type TypeName = ClaimDeferredReason;
|
|
21419
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
21420
|
+
read(from: RustBuffer): TypeName {
|
|
21421
|
+
switch (ordinalConverter.read(from)) {
|
|
21422
|
+
case 1:
|
|
21423
|
+
return new ClaimDeferredReason.MaxFeeExceeded({
|
|
21424
|
+
requiredFeeSats: FfiConverterUInt64.read(from),
|
|
21425
|
+
maxFeeSats: FfiConverterUInt64.read(from),
|
|
21426
|
+
});
|
|
21427
|
+
case 2:
|
|
21428
|
+
return new ClaimDeferredReason.NoEarlyClaimAvailable();
|
|
21429
|
+
case 3:
|
|
21430
|
+
return new ClaimDeferredReason.ProviderDeclined({
|
|
21431
|
+
message: FfiConverterString.read(from),
|
|
21432
|
+
});
|
|
21433
|
+
default:
|
|
21434
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
21435
|
+
}
|
|
21436
|
+
}
|
|
21437
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
21438
|
+
switch (value.tag) {
|
|
21439
|
+
case ClaimDeferredReason_Tags.MaxFeeExceeded: {
|
|
21440
|
+
ordinalConverter.write(1, into);
|
|
21441
|
+
const inner = value.inner;
|
|
21442
|
+
FfiConverterUInt64.write(inner.requiredFeeSats, into);
|
|
21443
|
+
FfiConverterUInt64.write(inner.maxFeeSats, into);
|
|
21444
|
+
return;
|
|
21445
|
+
}
|
|
21446
|
+
case ClaimDeferredReason_Tags.NoEarlyClaimAvailable: {
|
|
21447
|
+
ordinalConverter.write(2, into);
|
|
21448
|
+
return;
|
|
21449
|
+
}
|
|
21450
|
+
case ClaimDeferredReason_Tags.ProviderDeclined: {
|
|
21451
|
+
ordinalConverter.write(3, into);
|
|
21452
|
+
const inner = value.inner;
|
|
21453
|
+
FfiConverterString.write(inner.message, into);
|
|
21454
|
+
return;
|
|
21455
|
+
}
|
|
21456
|
+
default:
|
|
21457
|
+
// Throwing from here means that ClaimDeferredReason_Tags hasn't matched an ordinal.
|
|
21458
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
21459
|
+
}
|
|
21460
|
+
}
|
|
21461
|
+
allocationSize(value: TypeName): number {
|
|
21462
|
+
switch (value.tag) {
|
|
21463
|
+
case ClaimDeferredReason_Tags.MaxFeeExceeded: {
|
|
21464
|
+
const inner = value.inner;
|
|
21465
|
+
let size = ordinalConverter.allocationSize(1);
|
|
21466
|
+
size += FfiConverterUInt64.allocationSize(inner.requiredFeeSats);
|
|
21467
|
+
size += FfiConverterUInt64.allocationSize(inner.maxFeeSats);
|
|
21468
|
+
return size;
|
|
21469
|
+
}
|
|
21470
|
+
case ClaimDeferredReason_Tags.NoEarlyClaimAvailable: {
|
|
21471
|
+
return ordinalConverter.allocationSize(2);
|
|
21472
|
+
}
|
|
21473
|
+
case ClaimDeferredReason_Tags.ProviderDeclined: {
|
|
21474
|
+
const inner = value.inner;
|
|
21475
|
+
let size = ordinalConverter.allocationSize(3);
|
|
21476
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
21477
|
+
return size;
|
|
21478
|
+
}
|
|
21479
|
+
default:
|
|
21480
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
21481
|
+
}
|
|
21482
|
+
}
|
|
21483
|
+
}
|
|
21484
|
+
return new FFIConverter();
|
|
21485
|
+
})();
|
|
21486
|
+
|
|
21487
|
+
// Enum: ClaimDepositOutcome
|
|
21488
|
+
export enum ClaimDepositOutcome_Tags {
|
|
21489
|
+
Settled = 'Settled',
|
|
21490
|
+
Submitted = 'Submitted',
|
|
21491
|
+
Deferred = 'Deferred',
|
|
21492
|
+
}
|
|
21493
|
+
/**
|
|
21494
|
+
* What became of a claim.
|
|
21495
|
+
*/
|
|
21496
|
+
export const ClaimDepositOutcome = (() => {
|
|
21497
|
+
type Settled__interface = {
|
|
21498
|
+
tag: ClaimDepositOutcome_Tags.Settled;
|
|
21499
|
+
inner: Readonly<{ payment: Payment }>;
|
|
21500
|
+
};
|
|
21501
|
+
|
|
21502
|
+
/**
|
|
21503
|
+
* Claimed at maturity and settled, carrying the payment it produced.
|
|
21504
|
+
*/
|
|
21505
|
+
class Settled_ extends UniffiEnum implements Settled__interface {
|
|
21506
|
+
/**
|
|
21507
|
+
* @private
|
|
21508
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21509
|
+
*/
|
|
21510
|
+
readonly [uniffiTypeNameSymbol] = 'ClaimDepositOutcome';
|
|
21511
|
+
readonly tag = ClaimDepositOutcome_Tags.Settled;
|
|
21512
|
+
readonly inner: Readonly<{ payment: Payment }>;
|
|
21513
|
+
constructor(inner: { payment: Payment }) {
|
|
21514
|
+
super('ClaimDepositOutcome', 'Settled');
|
|
21515
|
+
this.inner = Object.freeze(inner);
|
|
21516
|
+
}
|
|
21517
|
+
|
|
21518
|
+
static new(inner: { payment: Payment }): Settled_ {
|
|
21519
|
+
return new Settled_(inner);
|
|
21520
|
+
}
|
|
21521
|
+
|
|
21522
|
+
static instanceOf(obj: any): obj is Settled_ {
|
|
21523
|
+
return obj.tag === ClaimDepositOutcome_Tags.Settled;
|
|
21524
|
+
}
|
|
21525
|
+
}
|
|
21526
|
+
|
|
21527
|
+
type Submitted__interface = {
|
|
21528
|
+
tag: ClaimDepositOutcome_Tags.Submitted;
|
|
21529
|
+
};
|
|
21530
|
+
|
|
21531
|
+
/**
|
|
21532
|
+
* Claimed ahead of maturity and submitted. The transfer settles
|
|
21533
|
+
* asynchronously, so no payment is returned yet: watch for it via events or
|
|
21534
|
+
* `list_payments`.
|
|
21535
|
+
*/
|
|
21536
|
+
class Submitted_ extends UniffiEnum implements Submitted__interface {
|
|
21537
|
+
/**
|
|
21538
|
+
* @private
|
|
21539
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21540
|
+
*/
|
|
21541
|
+
readonly [uniffiTypeNameSymbol] = 'ClaimDepositOutcome';
|
|
21542
|
+
readonly tag = ClaimDepositOutcome_Tags.Submitted;
|
|
21543
|
+
constructor() {
|
|
21544
|
+
super('ClaimDepositOutcome', 'Submitted');
|
|
21545
|
+
}
|
|
21546
|
+
|
|
21547
|
+
static new(): Submitted_ {
|
|
21548
|
+
return new Submitted_();
|
|
21549
|
+
}
|
|
21550
|
+
|
|
21551
|
+
static instanceOf(obj: any): obj is Submitted_ {
|
|
21552
|
+
return obj.tag === ClaimDepositOutcome_Tags.Submitted;
|
|
21553
|
+
}
|
|
21554
|
+
}
|
|
21555
|
+
|
|
21556
|
+
type Deferred__interface = {
|
|
21557
|
+
tag: ClaimDepositOutcome_Tags.Deferred;
|
|
21558
|
+
inner: Readonly<{ reason: ClaimDeferredReason }>;
|
|
21559
|
+
};
|
|
21560
|
+
|
|
21561
|
+
/**
|
|
21562
|
+
* Nothing was claimed yet, and no further call is needed: any fee ceiling this
|
|
21563
|
+
* one asked for stands on the deposit, and the SDK keeps claiming it on its
|
|
21564
|
+
* own. An early claim is attempted again as the deposit gains confirmations,
|
|
21565
|
+
* so one declined for being too shallow is often claimed early a block or two
|
|
21566
|
+
* later. Failing that, the deposit is claimed at maturity.
|
|
21567
|
+
*
|
|
21568
|
+
* An ordinary outcome rather than a failure. `reason` says which of the two to
|
|
21569
|
+
* expect: a depth that has not arrived yet, or a cost the ceiling will not
|
|
21570
|
+
* cover.
|
|
21571
|
+
*/
|
|
21572
|
+
class Deferred_ extends UniffiEnum implements Deferred__interface {
|
|
21573
|
+
/**
|
|
21574
|
+
* @private
|
|
21575
|
+
* This field is private and should not be used, use `tag` instead.
|
|
21576
|
+
*/
|
|
21577
|
+
readonly [uniffiTypeNameSymbol] = 'ClaimDepositOutcome';
|
|
21578
|
+
readonly tag = ClaimDepositOutcome_Tags.Deferred;
|
|
21579
|
+
readonly inner: Readonly<{ reason: ClaimDeferredReason }>;
|
|
21580
|
+
constructor(inner: { reason: ClaimDeferredReason }) {
|
|
21581
|
+
super('ClaimDepositOutcome', 'Deferred');
|
|
21582
|
+
this.inner = Object.freeze(inner);
|
|
21583
|
+
}
|
|
21584
|
+
|
|
21585
|
+
static new(inner: { reason: ClaimDeferredReason }): Deferred_ {
|
|
21586
|
+
return new Deferred_(inner);
|
|
21587
|
+
}
|
|
21588
|
+
|
|
21589
|
+
static instanceOf(obj: any): obj is Deferred_ {
|
|
21590
|
+
return obj.tag === ClaimDepositOutcome_Tags.Deferred;
|
|
21591
|
+
}
|
|
21592
|
+
}
|
|
21593
|
+
|
|
21594
|
+
function instanceOf(obj: any): obj is ClaimDepositOutcome {
|
|
21595
|
+
return obj[uniffiTypeNameSymbol] === 'ClaimDepositOutcome';
|
|
21596
|
+
}
|
|
21597
|
+
|
|
21598
|
+
return Object.freeze({
|
|
21599
|
+
instanceOf,
|
|
21600
|
+
Settled: Settled_,
|
|
21601
|
+
Submitted: Submitted_,
|
|
21602
|
+
Deferred: Deferred_,
|
|
21603
|
+
});
|
|
21604
|
+
})();
|
|
21605
|
+
|
|
21606
|
+
/**
|
|
21607
|
+
* What became of a claim.
|
|
21608
|
+
*/
|
|
21609
|
+
|
|
21610
|
+
export type ClaimDepositOutcome = InstanceType<
|
|
21611
|
+
(typeof ClaimDepositOutcome)[keyof Omit<
|
|
21612
|
+
typeof ClaimDepositOutcome,
|
|
21613
|
+
'instanceOf'
|
|
21614
|
+
>]
|
|
21615
|
+
>;
|
|
21616
|
+
|
|
21617
|
+
// FfiConverter for enum ClaimDepositOutcome
|
|
21618
|
+
const FfiConverterTypeClaimDepositOutcome = (() => {
|
|
21619
|
+
const ordinalConverter = FfiConverterInt32;
|
|
21620
|
+
type TypeName = ClaimDepositOutcome;
|
|
21621
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
21622
|
+
read(from: RustBuffer): TypeName {
|
|
21623
|
+
switch (ordinalConverter.read(from)) {
|
|
21624
|
+
case 1:
|
|
21625
|
+
return new ClaimDepositOutcome.Settled({
|
|
21626
|
+
payment: FfiConverterTypePayment.read(from),
|
|
21627
|
+
});
|
|
21628
|
+
case 2:
|
|
21629
|
+
return new ClaimDepositOutcome.Submitted();
|
|
21630
|
+
case 3:
|
|
21631
|
+
return new ClaimDepositOutcome.Deferred({
|
|
21632
|
+
reason: FfiConverterTypeClaimDeferredReason.read(from),
|
|
21633
|
+
});
|
|
21634
|
+
default:
|
|
21635
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
21636
|
+
}
|
|
21637
|
+
}
|
|
21638
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
21639
|
+
switch (value.tag) {
|
|
21640
|
+
case ClaimDepositOutcome_Tags.Settled: {
|
|
21641
|
+
ordinalConverter.write(1, into);
|
|
21642
|
+
const inner = value.inner;
|
|
21643
|
+
FfiConverterTypePayment.write(inner.payment, into);
|
|
21644
|
+
return;
|
|
21645
|
+
}
|
|
21646
|
+
case ClaimDepositOutcome_Tags.Submitted: {
|
|
21647
|
+
ordinalConverter.write(2, into);
|
|
21648
|
+
return;
|
|
21649
|
+
}
|
|
21650
|
+
case ClaimDepositOutcome_Tags.Deferred: {
|
|
21651
|
+
ordinalConverter.write(3, into);
|
|
21652
|
+
const inner = value.inner;
|
|
21653
|
+
FfiConverterTypeClaimDeferredReason.write(inner.reason, into);
|
|
21654
|
+
return;
|
|
21655
|
+
}
|
|
21656
|
+
default:
|
|
21657
|
+
// Throwing from here means that ClaimDepositOutcome_Tags hasn't matched an ordinal.
|
|
21658
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
21659
|
+
}
|
|
21660
|
+
}
|
|
21661
|
+
allocationSize(value: TypeName): number {
|
|
21662
|
+
switch (value.tag) {
|
|
21663
|
+
case ClaimDepositOutcome_Tags.Settled: {
|
|
21664
|
+
const inner = value.inner;
|
|
21665
|
+
let size = ordinalConverter.allocationSize(1);
|
|
21666
|
+
size += FfiConverterTypePayment.allocationSize(inner.payment);
|
|
21667
|
+
return size;
|
|
21668
|
+
}
|
|
21669
|
+
case ClaimDepositOutcome_Tags.Submitted: {
|
|
21670
|
+
return ordinalConverter.allocationSize(2);
|
|
21671
|
+
}
|
|
21672
|
+
case ClaimDepositOutcome_Tags.Deferred: {
|
|
21673
|
+
const inner = value.inner;
|
|
21674
|
+
let size = ordinalConverter.allocationSize(3);
|
|
21675
|
+
size += FfiConverterTypeClaimDeferredReason.allocationSize(
|
|
21676
|
+
inner.reason
|
|
21677
|
+
);
|
|
21678
|
+
return size;
|
|
21679
|
+
}
|
|
20833
21680
|
default:
|
|
20834
21681
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
20835
21682
|
}
|
|
@@ -21218,6 +22065,7 @@ export const ConversionInfo = (() => {
|
|
|
21218
22065
|
feeAmount: U128 | undefined;
|
|
21219
22066
|
serviceFeeAmount: U128 | undefined;
|
|
21220
22067
|
serviceFeeAsset: string | undefined;
|
|
22068
|
+
serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
21221
22069
|
assetDecimals: /*u32*/ number;
|
|
21222
22070
|
assetContract: string | undefined;
|
|
21223
22071
|
}>;
|
|
@@ -21255,6 +22103,7 @@ export const ConversionInfo = (() => {
|
|
|
21255
22103
|
feeAmount: U128 | undefined;
|
|
21256
22104
|
serviceFeeAmount: U128 | undefined;
|
|
21257
22105
|
serviceFeeAsset: string | undefined;
|
|
22106
|
+
serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
21258
22107
|
assetDecimals: /*u32*/ number;
|
|
21259
22108
|
assetContract: string | undefined;
|
|
21260
22109
|
}>;
|
|
@@ -21316,74 +22165,82 @@ export const ConversionInfo = (() => {
|
|
|
21316
22165
|
* Asset the service fee is denominated in. Unset means BTC sats.
|
|
21317
22166
|
*/ serviceFeeAsset: string | undefined;
|
|
21318
22167
|
/**
|
|
21319
|
-
*
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
*
|
|
21324
|
-
*/
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
|
|
21344
|
-
|
|
21345
|
-
*
|
|
21346
|
-
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
*
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
*
|
|
21354
|
-
*/
|
|
21355
|
-
/**
|
|
21356
|
-
*
|
|
21357
|
-
*
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
*
|
|
21362
|
-
* time.
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
-
*
|
|
21367
|
-
*
|
|
21368
|
-
*/
|
|
21369
|
-
/**
|
|
21370
|
-
*
|
|
21371
|
-
*
|
|
21372
|
-
|
|
21373
|
-
|
|
21374
|
-
*
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
*
|
|
21379
|
-
|
|
21380
|
-
|
|
21381
|
-
/**
|
|
21382
|
-
*
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21386
|
-
|
|
22168
|
+
* Decimals of `service_fee_asset`, for formatting `service_fee_amount`.
|
|
22169
|
+
* Unset when the fee is in sats or the provider did not report them.
|
|
22170
|
+
*/ serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
22171
|
+
/**
|
|
22172
|
+
* Asset decimals (e.g. 6 for USDC).
|
|
22173
|
+
*/ assetDecimals: /*u32*/ number;
|
|
22174
|
+
/**
|
|
22175
|
+
* Token contract / mint address on `chain`. Unset when that side is
|
|
22176
|
+
* the chain's native asset.
|
|
22177
|
+
*/ assetContract: string | undefined;
|
|
22178
|
+
}) {
|
|
22179
|
+
super('ConversionInfo', 'Orchestra');
|
|
22180
|
+
this.inner = Object.freeze(inner);
|
|
22181
|
+
}
|
|
22182
|
+
|
|
22183
|
+
static new(inner: {
|
|
22184
|
+
/**
|
|
22185
|
+
* The Orchestra order id returned by `/v1/orchestration/submit`.
|
|
22186
|
+
*/ orderId: string;
|
|
22187
|
+
/**
|
|
22188
|
+
* The Orchestra quote id used to create this order.
|
|
22189
|
+
*/ quoteId: string;
|
|
22190
|
+
/**
|
|
22191
|
+
* Opaque token required for querying order status.
|
|
22192
|
+
*/ readToken: string | undefined;
|
|
22193
|
+
/**
|
|
22194
|
+
* Chain name (e.g. `"base"`, `"solana"`, `"tron"`).
|
|
22195
|
+
*/ chain: string;
|
|
22196
|
+
/**
|
|
22197
|
+
* Stable chain identifier (e.g. EVM `chainId` decimal string `"8453"`
|
|
22198
|
+
* for Base, SLIP-44 or similar for other chains). `None` if the
|
|
22199
|
+
* provider doesn't expose one for this route.
|
|
22200
|
+
*/ chainId: string | undefined;
|
|
22201
|
+
/**
|
|
22202
|
+
* Asset ticker (e.g. `"USDC"`, `"USDT"`).
|
|
22203
|
+
*/ asset: string;
|
|
22204
|
+
/**
|
|
22205
|
+
* The target-chain address on a send, the receiving Spark address
|
|
22206
|
+
* on a receive.
|
|
22207
|
+
*/ recipientAddress: string;
|
|
22208
|
+
/**
|
|
22209
|
+
* Amount paid in, in `asset` base units. On a send it is the Spark
|
|
22210
|
+
* amount expressed in `asset` via the rate the SDK used at prepare
|
|
22211
|
+
* time. On a receive it is the deposit the sender made on `chain`.
|
|
22212
|
+
*/ assetAmountIn: U128 | undefined;
|
|
22213
|
+
/**
|
|
22214
|
+
* Estimated amount delivered to the receiving end, frozen at prepare
|
|
22215
|
+
* time. In `asset` base units on a send, and in Spark-side units on
|
|
22216
|
+
* a receive (sats for Bitcoin, token base units for a token).
|
|
22217
|
+
*/ estimatedOut: U128;
|
|
22218
|
+
/**
|
|
22219
|
+
* Actual delivered amount, in the same units as `estimated_out`.
|
|
22220
|
+
* Unset until the order reaches a terminal state.
|
|
22221
|
+
*/ deliveredAmount: U128 | undefined;
|
|
22222
|
+
/**
|
|
22223
|
+
* Transaction on `chain`, the non-Spark side of the conversion: the
|
|
22224
|
+
* delivery on a send, the funding deposit on a receive. Format follows
|
|
22225
|
+
* the chain (e.g. `0x`-prefixed hex on EVM, a base58 signature on
|
|
22226
|
+
* Solana). Unset until that transaction exists, and on orders that
|
|
22227
|
+
* failed or were refunded.
|
|
22228
|
+
*/ externalTxHash: string | undefined;
|
|
22229
|
+
status: ConversionStatus;
|
|
22230
|
+
/**
|
|
22231
|
+
* Best-available total fee, in `asset` base units.
|
|
22232
|
+
* Prepare-time estimate while pending, realized fee when Completed.
|
|
22233
|
+
*/ feeAmount: U128 | undefined;
|
|
22234
|
+
/**
|
|
22235
|
+
* Orchestra service fee.
|
|
22236
|
+
*/ serviceFeeAmount: U128 | undefined;
|
|
22237
|
+
/**
|
|
22238
|
+
* Asset the service fee is denominated in. Unset means BTC sats.
|
|
22239
|
+
*/ serviceFeeAsset: string | undefined;
|
|
22240
|
+
/**
|
|
22241
|
+
* Decimals of `service_fee_asset`, for formatting `service_fee_amount`.
|
|
22242
|
+
* Unset when the fee is in sats or the provider did not report them.
|
|
22243
|
+
*/ serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
21387
22244
|
/**
|
|
21388
22245
|
* Asset decimals (e.g. 6 for USDC).
|
|
21389
22246
|
*/ assetDecimals: /*u32*/ number;
|
|
@@ -21666,6 +22523,7 @@ const FfiConverterTypeConversionInfo = (() => {
|
|
|
21666
22523
|
feeAmount: FfiConverterOptionalTypeu128.read(from),
|
|
21667
22524
|
serviceFeeAmount: FfiConverterOptionalTypeu128.read(from),
|
|
21668
22525
|
serviceFeeAsset: FfiConverterOptionalString.read(from),
|
|
22526
|
+
serviceFeeAssetDecimals: FfiConverterOptionalUInt32.read(from),
|
|
21669
22527
|
assetDecimals: FfiConverterUInt32.read(from),
|
|
21670
22528
|
assetContract: FfiConverterOptionalString.read(from),
|
|
21671
22529
|
});
|
|
@@ -21733,6 +22591,7 @@ const FfiConverterTypeConversionInfo = (() => {
|
|
|
21733
22591
|
FfiConverterOptionalTypeu128.write(inner.feeAmount, into);
|
|
21734
22592
|
FfiConverterOptionalTypeu128.write(inner.serviceFeeAmount, into);
|
|
21735
22593
|
FfiConverterOptionalString.write(inner.serviceFeeAsset, into);
|
|
22594
|
+
FfiConverterOptionalUInt32.write(inner.serviceFeeAssetDecimals, into);
|
|
21736
22595
|
FfiConverterUInt32.write(inner.assetDecimals, into);
|
|
21737
22596
|
FfiConverterOptionalString.write(inner.assetContract, into);
|
|
21738
22597
|
return;
|
|
@@ -21814,6 +22673,9 @@ const FfiConverterTypeConversionInfo = (() => {
|
|
|
21814
22673
|
size += FfiConverterOptionalString.allocationSize(
|
|
21815
22674
|
inner.serviceFeeAsset
|
|
21816
22675
|
);
|
|
22676
|
+
size += FfiConverterOptionalUInt32.allocationSize(
|
|
22677
|
+
inner.serviceFeeAssetDecimals
|
|
22678
|
+
);
|
|
21817
22679
|
size += FfiConverterUInt32.allocationSize(inner.assetDecimals);
|
|
21818
22680
|
size += FfiConverterOptionalString.allocationSize(
|
|
21819
22681
|
inner.assetContract
|
|
@@ -24000,7 +24862,8 @@ export const ExitLeafSelection = (() => {
|
|
|
24000
24862
|
};
|
|
24001
24863
|
|
|
24002
24864
|
/**
|
|
24003
|
-
* Exit exactly these leaves, regardless of profitability
|
|
24865
|
+
* Exit exactly these leaves, regardless of profitability, apart from any
|
|
24866
|
+
* whose exit already finished.
|
|
24004
24867
|
*/
|
|
24005
24868
|
class Specific_ extends UniffiEnum implements Specific__interface {
|
|
24006
24869
|
/**
|
|
@@ -25834,6 +26697,7 @@ const FfiConverterTypeInputType = (() => {
|
|
|
25834
26697
|
export enum InstantClaimStatus_Tags {
|
|
25835
26698
|
Declined = 'Declined',
|
|
25836
26699
|
Submitted = 'Submitted',
|
|
26700
|
+
Claimed = 'Claimed',
|
|
25837
26701
|
}
|
|
25838
26702
|
/**
|
|
25839
26703
|
* State of an instant claim attempt on a deposit.
|
|
@@ -25890,9 +26754,7 @@ export const InstantClaimStatus = (() => {
|
|
|
25890
26754
|
};
|
|
25891
26755
|
|
|
25892
26756
|
/**
|
|
25893
|
-
* An instant claim was submitted and is settling.
|
|
25894
|
-
* re-claimed (instant or normal) until the claim settles and it is reconciled
|
|
25895
|
-
* out. Carries the SSP claim id.
|
|
26757
|
+
* An instant claim was submitted and is settling. Carries the SSP claim id.
|
|
25896
26758
|
*/
|
|
25897
26759
|
class Submitted_ extends UniffiEnum implements Submitted__interface {
|
|
25898
26760
|
/**
|
|
@@ -25916,6 +26778,36 @@ export const InstantClaimStatus = (() => {
|
|
|
25916
26778
|
}
|
|
25917
26779
|
}
|
|
25918
26780
|
|
|
26781
|
+
type Claimed__interface = {
|
|
26782
|
+
tag: InstantClaimStatus_Tags.Claimed;
|
|
26783
|
+
};
|
|
26784
|
+
|
|
26785
|
+
/**
|
|
26786
|
+
* A claim has taken the deposit: either its credit arrived here, or the
|
|
26787
|
+
* provider reports the deposit as already claimed. It stays listed until
|
|
26788
|
+
* the provider spends the output, so treat it as settled rather than as
|
|
26789
|
+
* awaiting action.
|
|
26790
|
+
*/
|
|
26791
|
+
class Claimed_ extends UniffiEnum implements Claimed__interface {
|
|
26792
|
+
/**
|
|
26793
|
+
* @private
|
|
26794
|
+
* This field is private and should not be used, use `tag` instead.
|
|
26795
|
+
*/
|
|
26796
|
+
readonly [uniffiTypeNameSymbol] = 'InstantClaimStatus';
|
|
26797
|
+
readonly tag = InstantClaimStatus_Tags.Claimed;
|
|
26798
|
+
constructor() {
|
|
26799
|
+
super('InstantClaimStatus', 'Claimed');
|
|
26800
|
+
}
|
|
26801
|
+
|
|
26802
|
+
static new(): Claimed_ {
|
|
26803
|
+
return new Claimed_();
|
|
26804
|
+
}
|
|
26805
|
+
|
|
26806
|
+
static instanceOf(obj: any): obj is Claimed_ {
|
|
26807
|
+
return obj.tag === InstantClaimStatus_Tags.Claimed;
|
|
26808
|
+
}
|
|
26809
|
+
}
|
|
26810
|
+
|
|
25919
26811
|
function instanceOf(obj: any): obj is InstantClaimStatus {
|
|
25920
26812
|
return obj[uniffiTypeNameSymbol] === 'InstantClaimStatus';
|
|
25921
26813
|
}
|
|
@@ -25924,6 +26816,7 @@ export const InstantClaimStatus = (() => {
|
|
|
25924
26816
|
instanceOf,
|
|
25925
26817
|
Declined: Declined_,
|
|
25926
26818
|
Submitted: Submitted_,
|
|
26819
|
+
Claimed: Claimed_,
|
|
25927
26820
|
});
|
|
25928
26821
|
})();
|
|
25929
26822
|
|
|
@@ -25954,6 +26847,8 @@ const FfiConverterTypeInstantClaimStatus = (() => {
|
|
|
25954
26847
|
return new InstantClaimStatus.Submitted({
|
|
25955
26848
|
claimId: FfiConverterString.read(from),
|
|
25956
26849
|
});
|
|
26850
|
+
case 3:
|
|
26851
|
+
return new InstantClaimStatus.Claimed();
|
|
25957
26852
|
default:
|
|
25958
26853
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
25959
26854
|
}
|
|
@@ -25973,6 +26868,10 @@ const FfiConverterTypeInstantClaimStatus = (() => {
|
|
|
25973
26868
|
FfiConverterString.write(inner.claimId, into);
|
|
25974
26869
|
return;
|
|
25975
26870
|
}
|
|
26871
|
+
case InstantClaimStatus_Tags.Claimed: {
|
|
26872
|
+
ordinalConverter.write(3, into);
|
|
26873
|
+
return;
|
|
26874
|
+
}
|
|
25976
26875
|
default:
|
|
25977
26876
|
// Throwing from here means that InstantClaimStatus_Tags hasn't matched an ordinal.
|
|
25978
26877
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -25993,6 +26892,9 @@ const FfiConverterTypeInstantClaimStatus = (() => {
|
|
|
25993
26892
|
size += FfiConverterString.allocationSize(inner.claimId);
|
|
25994
26893
|
return size;
|
|
25995
26894
|
}
|
|
26895
|
+
case InstantClaimStatus_Tags.Claimed: {
|
|
26896
|
+
return ordinalConverter.allocationSize(3);
|
|
26897
|
+
}
|
|
25996
26898
|
default:
|
|
25997
26899
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
25998
26900
|
}
|
|
@@ -26330,6 +27232,7 @@ const FfiConverterTypeMaxFee = (() => {
|
|
|
26330
27232
|
export enum Network {
|
|
26331
27233
|
Mainnet,
|
|
26332
27234
|
Regtest,
|
|
27235
|
+
Signet,
|
|
26333
27236
|
}
|
|
26334
27237
|
|
|
26335
27238
|
const FfiConverterTypeNetwork = (() => {
|
|
@@ -26342,6 +27245,8 @@ const FfiConverterTypeNetwork = (() => {
|
|
|
26342
27245
|
return Network.Mainnet;
|
|
26343
27246
|
case 2:
|
|
26344
27247
|
return Network.Regtest;
|
|
27248
|
+
case 3:
|
|
27249
|
+
return Network.Signet;
|
|
26345
27250
|
default:
|
|
26346
27251
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
26347
27252
|
}
|
|
@@ -26352,6 +27257,8 @@ const FfiConverterTypeNetwork = (() => {
|
|
|
26352
27257
|
return ordinalConverter.write(1, into);
|
|
26353
27258
|
case Network.Regtest:
|
|
26354
27259
|
return ordinalConverter.write(2, into);
|
|
27260
|
+
case Network.Signet:
|
|
27261
|
+
return ordinalConverter.write(3, into);
|
|
26355
27262
|
}
|
|
26356
27263
|
}
|
|
26357
27264
|
allocationSize(value: TypeName): number {
|
|
@@ -30766,6 +31673,8 @@ export enum SdkError_Tags {
|
|
|
30766
31673
|
InsufficientFunds = 'InsufficientFunds',
|
|
30767
31674
|
InvalidUuid = 'InvalidUuid',
|
|
30768
31675
|
InvalidInput = 'InvalidInput',
|
|
31676
|
+
CrossChainAmountOutOfRange = 'CrossChainAmountOutOfRange',
|
|
31677
|
+
CrossChainRouteUnavailable = 'CrossChainRouteUnavailable',
|
|
30769
31678
|
NetworkError = 'NetworkError',
|
|
30770
31679
|
StorageError = 'StorageError',
|
|
30771
31680
|
ChainServiceError = 'ChainServiceError',
|
|
@@ -30942,6 +31851,157 @@ export const SdkError = (() => {
|
|
|
30942
31851
|
}
|
|
30943
31852
|
}
|
|
30944
31853
|
|
|
31854
|
+
type CrossChainAmountOutOfRange__interface = {
|
|
31855
|
+
tag: SdkError_Tags.CrossChainAmountOutOfRange;
|
|
31856
|
+
inner: Readonly<{
|
|
31857
|
+
reason: string;
|
|
31858
|
+
tooSmall: boolean;
|
|
31859
|
+
boundAmount: U128 | undefined;
|
|
31860
|
+
boundUsdCents: /*u64*/ bigint | undefined;
|
|
31861
|
+
}>;
|
|
31862
|
+
};
|
|
31863
|
+
|
|
31864
|
+
/**
|
|
31865
|
+
* A cross-chain provider rejected the amount as outside what it accepts
|
|
31866
|
+
* for the route.
|
|
31867
|
+
*
|
|
31868
|
+
* The bound fields carry what the route publishes in the direction that
|
|
31869
|
+
* failed, in whichever denominations the provider publishes. A route can
|
|
31870
|
+
* enforce a tighter bound than it publishes, so an amount inside the
|
|
31871
|
+
* published one can still land here.
|
|
31872
|
+
*
|
|
31873
|
+
* The message is the provider's own rejection text with the published
|
|
31874
|
+
* bound appended, so it already names the direction.
|
|
31875
|
+
*/
|
|
31876
|
+
class CrossChainAmountOutOfRange_
|
|
31877
|
+
extends UniffiError
|
|
31878
|
+
implements CrossChainAmountOutOfRange__interface
|
|
31879
|
+
{
|
|
31880
|
+
/**
|
|
31881
|
+
* @private
|
|
31882
|
+
* This field is private and should not be used, use `tag` instead.
|
|
31883
|
+
*/
|
|
31884
|
+
readonly [uniffiTypeNameSymbol] = 'SdkError';
|
|
31885
|
+
readonly tag = SdkError_Tags.CrossChainAmountOutOfRange;
|
|
31886
|
+
readonly inner: Readonly<{
|
|
31887
|
+
reason: string;
|
|
31888
|
+
tooSmall: boolean;
|
|
31889
|
+
boundAmount: U128 | undefined;
|
|
31890
|
+
boundUsdCents: /*u64*/ bigint | undefined;
|
|
31891
|
+
}>;
|
|
31892
|
+
constructor(inner: {
|
|
31893
|
+
reason: string;
|
|
31894
|
+
/**
|
|
31895
|
+
* `true` for a rejection below the minimum, `false` for one above the
|
|
31896
|
+
* maximum or beyond available liquidity.
|
|
31897
|
+
*/ tooSmall: boolean;
|
|
31898
|
+
/**
|
|
31899
|
+
* The published bound in the base units of the asset paid in: the
|
|
31900
|
+
* Spark-side asset on a send, the external asset on a receive.
|
|
31901
|
+
*/ boundAmount: U128 | undefined;
|
|
31902
|
+
/**
|
|
31903
|
+
* The published bound as an order value in USD cents.
|
|
31904
|
+
*/ boundUsdCents: /*u64*/ bigint | undefined;
|
|
31905
|
+
}) {
|
|
31906
|
+
super('SdkError', 'CrossChainAmountOutOfRange');
|
|
31907
|
+
this.inner = Object.freeze(inner);
|
|
31908
|
+
}
|
|
31909
|
+
|
|
31910
|
+
static new(inner: {
|
|
31911
|
+
reason: string;
|
|
31912
|
+
/**
|
|
31913
|
+
* `true` for a rejection below the minimum, `false` for one above the
|
|
31914
|
+
* maximum or beyond available liquidity.
|
|
31915
|
+
*/ tooSmall: boolean;
|
|
31916
|
+
/**
|
|
31917
|
+
* The published bound in the base units of the asset paid in: the
|
|
31918
|
+
* Spark-side asset on a send, the external asset on a receive.
|
|
31919
|
+
*/ boundAmount: U128 | undefined;
|
|
31920
|
+
/**
|
|
31921
|
+
* The published bound as an order value in USD cents.
|
|
31922
|
+
*/ boundUsdCents: /*u64*/ bigint | undefined;
|
|
31923
|
+
}): CrossChainAmountOutOfRange_ {
|
|
31924
|
+
return new CrossChainAmountOutOfRange_(inner);
|
|
31925
|
+
}
|
|
31926
|
+
|
|
31927
|
+
static instanceOf(obj: any): obj is CrossChainAmountOutOfRange_ {
|
|
31928
|
+
return obj.tag === SdkError_Tags.CrossChainAmountOutOfRange;
|
|
31929
|
+
}
|
|
31930
|
+
|
|
31931
|
+
static hasInner(obj: any): obj is CrossChainAmountOutOfRange_ {
|
|
31932
|
+
return CrossChainAmountOutOfRange_.instanceOf(obj);
|
|
31933
|
+
}
|
|
31934
|
+
|
|
31935
|
+
static getInner(
|
|
31936
|
+
obj: CrossChainAmountOutOfRange_
|
|
31937
|
+
): Readonly<{
|
|
31938
|
+
reason: string;
|
|
31939
|
+
tooSmall: boolean;
|
|
31940
|
+
boundAmount: U128 | undefined;
|
|
31941
|
+
boundUsdCents: /*u64*/ bigint | undefined;
|
|
31942
|
+
}> {
|
|
31943
|
+
return obj.inner;
|
|
31944
|
+
}
|
|
31945
|
+
}
|
|
31946
|
+
|
|
31947
|
+
type CrossChainRouteUnavailable__interface = {
|
|
31948
|
+
tag: SdkError_Tags.CrossChainRouteUnavailable;
|
|
31949
|
+
inner: Readonly<{ reason: string; temporary: boolean }>;
|
|
31950
|
+
};
|
|
31951
|
+
|
|
31952
|
+
/**
|
|
31953
|
+
* A cross-chain provider won't serve the route, for now or at all.
|
|
31954
|
+
*
|
|
31955
|
+
* The message leads with a fixed phrase for each case, for bindings that
|
|
31956
|
+
* only see the text, followed by the provider's own reason.
|
|
31957
|
+
*/
|
|
31958
|
+
class CrossChainRouteUnavailable_
|
|
31959
|
+
extends UniffiError
|
|
31960
|
+
implements CrossChainRouteUnavailable__interface
|
|
31961
|
+
{
|
|
31962
|
+
/**
|
|
31963
|
+
* @private
|
|
31964
|
+
* This field is private and should not be used, use `tag` instead.
|
|
31965
|
+
*/
|
|
31966
|
+
readonly [uniffiTypeNameSymbol] = 'SdkError';
|
|
31967
|
+
readonly tag = SdkError_Tags.CrossChainRouteUnavailable;
|
|
31968
|
+
readonly inner: Readonly<{ reason: string; temporary: boolean }>;
|
|
31969
|
+
constructor(inner: {
|
|
31970
|
+
reason: string;
|
|
31971
|
+
/**
|
|
31972
|
+
* `true` when the provider expects the route back shortly, so the
|
|
31973
|
+
* same request can succeed later. Otherwise try another route.
|
|
31974
|
+
*/ temporary: boolean;
|
|
31975
|
+
}) {
|
|
31976
|
+
super('SdkError', 'CrossChainRouteUnavailable');
|
|
31977
|
+
this.inner = Object.freeze(inner);
|
|
31978
|
+
}
|
|
31979
|
+
|
|
31980
|
+
static new(inner: {
|
|
31981
|
+
reason: string;
|
|
31982
|
+
/**
|
|
31983
|
+
* `true` when the provider expects the route back shortly, so the
|
|
31984
|
+
* same request can succeed later. Otherwise try another route.
|
|
31985
|
+
*/ temporary: boolean;
|
|
31986
|
+
}): CrossChainRouteUnavailable_ {
|
|
31987
|
+
return new CrossChainRouteUnavailable_(inner);
|
|
31988
|
+
}
|
|
31989
|
+
|
|
31990
|
+
static instanceOf(obj: any): obj is CrossChainRouteUnavailable_ {
|
|
31991
|
+
return obj.tag === SdkError_Tags.CrossChainRouteUnavailable;
|
|
31992
|
+
}
|
|
31993
|
+
|
|
31994
|
+
static hasInner(obj: any): obj is CrossChainRouteUnavailable_ {
|
|
31995
|
+
return CrossChainRouteUnavailable_.instanceOf(obj);
|
|
31996
|
+
}
|
|
31997
|
+
|
|
31998
|
+
static getInner(
|
|
31999
|
+
obj: CrossChainRouteUnavailable_
|
|
32000
|
+
): Readonly<{ reason: string; temporary: boolean }> {
|
|
32001
|
+
return obj.inner;
|
|
32002
|
+
}
|
|
32003
|
+
}
|
|
32004
|
+
|
|
30945
32005
|
type NetworkError__interface = {
|
|
30946
32006
|
tag: SdkError_Tags.NetworkError;
|
|
30947
32007
|
inner: Readonly<[string]>;
|
|
@@ -31496,6 +32556,8 @@ export const SdkError = (() => {
|
|
|
31496
32556
|
InsufficientFunds: InsufficientFunds_,
|
|
31497
32557
|
InvalidUuid: InvalidUuid_,
|
|
31498
32558
|
InvalidInput: InvalidInput_,
|
|
32559
|
+
CrossChainAmountOutOfRange: CrossChainAmountOutOfRange_,
|
|
32560
|
+
CrossChainRouteUnavailable: CrossChainRouteUnavailable_,
|
|
31499
32561
|
NetworkError: NetworkError_,
|
|
31500
32562
|
StorageError: StorageError_,
|
|
31501
32563
|
ChainServiceError: ChainServiceError_,
|
|
@@ -31538,12 +32600,24 @@ const FfiConverterTypeSdkError = (() => {
|
|
|
31538
32600
|
case 4:
|
|
31539
32601
|
return new SdkError.InvalidInput(FfiConverterString.read(from));
|
|
31540
32602
|
case 5:
|
|
31541
|
-
return new SdkError.
|
|
32603
|
+
return new SdkError.CrossChainAmountOutOfRange({
|
|
32604
|
+
reason: FfiConverterString.read(from),
|
|
32605
|
+
tooSmall: FfiConverterBool.read(from),
|
|
32606
|
+
boundAmount: FfiConverterOptionalTypeu128.read(from),
|
|
32607
|
+
boundUsdCents: FfiConverterOptionalUInt64.read(from),
|
|
32608
|
+
});
|
|
31542
32609
|
case 6:
|
|
31543
|
-
return new SdkError.
|
|
32610
|
+
return new SdkError.CrossChainRouteUnavailable({
|
|
32611
|
+
reason: FfiConverterString.read(from),
|
|
32612
|
+
temporary: FfiConverterBool.read(from),
|
|
32613
|
+
});
|
|
31544
32614
|
case 7:
|
|
31545
|
-
return new SdkError.
|
|
32615
|
+
return new SdkError.NetworkError(FfiConverterString.read(from));
|
|
31546
32616
|
case 8:
|
|
32617
|
+
return new SdkError.StorageError(FfiConverterString.read(from));
|
|
32618
|
+
case 9:
|
|
32619
|
+
return new SdkError.ChainServiceError(FfiConverterString.read(from));
|
|
32620
|
+
case 10:
|
|
31547
32621
|
return new SdkError.MaxDepositClaimFeeExceeded({
|
|
31548
32622
|
tx: FfiConverterString.read(from),
|
|
31549
32623
|
vout: FfiConverterUInt32.read(from),
|
|
@@ -31551,34 +32625,34 @@ const FfiConverterTypeSdkError = (() => {
|
|
|
31551
32625
|
requiredFeeSats: FfiConverterUInt64.read(from),
|
|
31552
32626
|
requiredFeeRateSatPerVbyte: FfiConverterUInt64.read(from),
|
|
31553
32627
|
});
|
|
31554
|
-
case
|
|
32628
|
+
case 11:
|
|
31555
32629
|
return new SdkError.MissingUtxo({
|
|
31556
32630
|
tx: FfiConverterString.read(from),
|
|
31557
32631
|
vout: FfiConverterUInt32.read(from),
|
|
31558
32632
|
});
|
|
31559
|
-
case
|
|
32633
|
+
case 12:
|
|
31560
32634
|
return new SdkError.DepositClaimInProgress({
|
|
31561
32635
|
tx: FfiConverterString.read(from),
|
|
31562
32636
|
vout: FfiConverterUInt32.read(from),
|
|
31563
32637
|
});
|
|
31564
|
-
case
|
|
32638
|
+
case 13:
|
|
31565
32639
|
return new SdkError.RefundReplacementFeeTooLow({
|
|
31566
32640
|
pendingFeeSats: FfiConverterUInt64.read(from),
|
|
31567
32641
|
requiredFeeSats: FfiConverterUInt64.read(from),
|
|
31568
32642
|
});
|
|
31569
|
-
case
|
|
32643
|
+
case 14:
|
|
31570
32644
|
return new SdkError.LnurlError(FfiConverterString.read(from));
|
|
31571
|
-
case
|
|
32645
|
+
case 15:
|
|
31572
32646
|
return new SdkError.Signer(FfiConverterString.read(from));
|
|
31573
|
-
case
|
|
32647
|
+
case 16:
|
|
31574
32648
|
return new SdkError.OptimizationAlreadyRunning();
|
|
31575
|
-
case
|
|
32649
|
+
case 17:
|
|
31576
32650
|
return new SdkError.OptimizationCancelled();
|
|
31577
|
-
case
|
|
32651
|
+
case 18:
|
|
31578
32652
|
return new SdkError.InsufficientCpfpFunds({
|
|
31579
32653
|
requiredSat: FfiConverterUInt64.read(from),
|
|
31580
32654
|
});
|
|
31581
|
-
case
|
|
32655
|
+
case 19:
|
|
31582
32656
|
return new SdkError.Generic(FfiConverterString.read(from));
|
|
31583
32657
|
default:
|
|
31584
32658
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -31610,26 +32684,42 @@ const FfiConverterTypeSdkError = (() => {
|
|
|
31610
32684
|
FfiConverterString.write(inner[0], into);
|
|
31611
32685
|
return;
|
|
31612
32686
|
}
|
|
31613
|
-
case SdkError_Tags.
|
|
32687
|
+
case SdkError_Tags.CrossChainAmountOutOfRange: {
|
|
31614
32688
|
ordinalConverter.write(5, into);
|
|
31615
32689
|
const inner = value.inner;
|
|
32690
|
+
FfiConverterString.write(inner.reason, into);
|
|
32691
|
+
FfiConverterBool.write(inner.tooSmall, into);
|
|
32692
|
+
FfiConverterOptionalTypeu128.write(inner.boundAmount, into);
|
|
32693
|
+
FfiConverterOptionalUInt64.write(inner.boundUsdCents, into);
|
|
32694
|
+
return;
|
|
32695
|
+
}
|
|
32696
|
+
case SdkError_Tags.CrossChainRouteUnavailable: {
|
|
32697
|
+
ordinalConverter.write(6, into);
|
|
32698
|
+
const inner = value.inner;
|
|
32699
|
+
FfiConverterString.write(inner.reason, into);
|
|
32700
|
+
FfiConverterBool.write(inner.temporary, into);
|
|
32701
|
+
return;
|
|
32702
|
+
}
|
|
32703
|
+
case SdkError_Tags.NetworkError: {
|
|
32704
|
+
ordinalConverter.write(7, into);
|
|
32705
|
+
const inner = value.inner;
|
|
31616
32706
|
FfiConverterString.write(inner[0], into);
|
|
31617
32707
|
return;
|
|
31618
32708
|
}
|
|
31619
32709
|
case SdkError_Tags.StorageError: {
|
|
31620
|
-
ordinalConverter.write(
|
|
32710
|
+
ordinalConverter.write(8, into);
|
|
31621
32711
|
const inner = value.inner;
|
|
31622
32712
|
FfiConverterString.write(inner[0], into);
|
|
31623
32713
|
return;
|
|
31624
32714
|
}
|
|
31625
32715
|
case SdkError_Tags.ChainServiceError: {
|
|
31626
|
-
ordinalConverter.write(
|
|
32716
|
+
ordinalConverter.write(9, into);
|
|
31627
32717
|
const inner = value.inner;
|
|
31628
32718
|
FfiConverterString.write(inner[0], into);
|
|
31629
32719
|
return;
|
|
31630
32720
|
}
|
|
31631
32721
|
case SdkError_Tags.MaxDepositClaimFeeExceeded: {
|
|
31632
|
-
ordinalConverter.write(
|
|
32722
|
+
ordinalConverter.write(10, into);
|
|
31633
32723
|
const inner = value.inner;
|
|
31634
32724
|
FfiConverterString.write(inner.tx, into);
|
|
31635
32725
|
FfiConverterUInt32.write(inner.vout, into);
|
|
@@ -31639,54 +32729,54 @@ const FfiConverterTypeSdkError = (() => {
|
|
|
31639
32729
|
return;
|
|
31640
32730
|
}
|
|
31641
32731
|
case SdkError_Tags.MissingUtxo: {
|
|
31642
|
-
ordinalConverter.write(
|
|
32732
|
+
ordinalConverter.write(11, into);
|
|
31643
32733
|
const inner = value.inner;
|
|
31644
32734
|
FfiConverterString.write(inner.tx, into);
|
|
31645
32735
|
FfiConverterUInt32.write(inner.vout, into);
|
|
31646
32736
|
return;
|
|
31647
32737
|
}
|
|
31648
32738
|
case SdkError_Tags.DepositClaimInProgress: {
|
|
31649
|
-
ordinalConverter.write(
|
|
32739
|
+
ordinalConverter.write(12, into);
|
|
31650
32740
|
const inner = value.inner;
|
|
31651
32741
|
FfiConverterString.write(inner.tx, into);
|
|
31652
32742
|
FfiConverterUInt32.write(inner.vout, into);
|
|
31653
32743
|
return;
|
|
31654
32744
|
}
|
|
31655
32745
|
case SdkError_Tags.RefundReplacementFeeTooLow: {
|
|
31656
|
-
ordinalConverter.write(
|
|
32746
|
+
ordinalConverter.write(13, into);
|
|
31657
32747
|
const inner = value.inner;
|
|
31658
32748
|
FfiConverterUInt64.write(inner.pendingFeeSats, into);
|
|
31659
32749
|
FfiConverterUInt64.write(inner.requiredFeeSats, into);
|
|
31660
32750
|
return;
|
|
31661
32751
|
}
|
|
31662
32752
|
case SdkError_Tags.LnurlError: {
|
|
31663
|
-
ordinalConverter.write(
|
|
32753
|
+
ordinalConverter.write(14, into);
|
|
31664
32754
|
const inner = value.inner;
|
|
31665
32755
|
FfiConverterString.write(inner[0], into);
|
|
31666
32756
|
return;
|
|
31667
32757
|
}
|
|
31668
32758
|
case SdkError_Tags.Signer: {
|
|
31669
|
-
ordinalConverter.write(
|
|
32759
|
+
ordinalConverter.write(15, into);
|
|
31670
32760
|
const inner = value.inner;
|
|
31671
32761
|
FfiConverterString.write(inner[0], into);
|
|
31672
32762
|
return;
|
|
31673
32763
|
}
|
|
31674
32764
|
case SdkError_Tags.OptimizationAlreadyRunning: {
|
|
31675
|
-
ordinalConverter.write(
|
|
32765
|
+
ordinalConverter.write(16, into);
|
|
31676
32766
|
return;
|
|
31677
32767
|
}
|
|
31678
32768
|
case SdkError_Tags.OptimizationCancelled: {
|
|
31679
|
-
ordinalConverter.write(
|
|
32769
|
+
ordinalConverter.write(17, into);
|
|
31680
32770
|
return;
|
|
31681
32771
|
}
|
|
31682
32772
|
case SdkError_Tags.InsufficientCpfpFunds: {
|
|
31683
|
-
ordinalConverter.write(
|
|
32773
|
+
ordinalConverter.write(18, into);
|
|
31684
32774
|
const inner = value.inner;
|
|
31685
32775
|
FfiConverterUInt64.write(inner.requiredSat, into);
|
|
31686
32776
|
return;
|
|
31687
32777
|
}
|
|
31688
32778
|
case SdkError_Tags.Generic: {
|
|
31689
|
-
ordinalConverter.write(
|
|
32779
|
+
ordinalConverter.write(19, into);
|
|
31690
32780
|
const inner = value.inner;
|
|
31691
32781
|
FfiConverterString.write(inner[0], into);
|
|
31692
32782
|
return;
|
|
@@ -31724,27 +32814,47 @@ const FfiConverterTypeSdkError = (() => {
|
|
|
31724
32814
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31725
32815
|
return size;
|
|
31726
32816
|
}
|
|
31727
|
-
case SdkError_Tags.
|
|
32817
|
+
case SdkError_Tags.CrossChainAmountOutOfRange: {
|
|
31728
32818
|
const inner = value.inner;
|
|
31729
32819
|
let size = ordinalConverter.allocationSize(5);
|
|
32820
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
32821
|
+
size += FfiConverterBool.allocationSize(inner.tooSmall);
|
|
32822
|
+
size += FfiConverterOptionalTypeu128.allocationSize(
|
|
32823
|
+
inner.boundAmount
|
|
32824
|
+
);
|
|
32825
|
+
size += FfiConverterOptionalUInt64.allocationSize(
|
|
32826
|
+
inner.boundUsdCents
|
|
32827
|
+
);
|
|
32828
|
+
return size;
|
|
32829
|
+
}
|
|
32830
|
+
case SdkError_Tags.CrossChainRouteUnavailable: {
|
|
32831
|
+
const inner = value.inner;
|
|
32832
|
+
let size = ordinalConverter.allocationSize(6);
|
|
32833
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
32834
|
+
size += FfiConverterBool.allocationSize(inner.temporary);
|
|
32835
|
+
return size;
|
|
32836
|
+
}
|
|
32837
|
+
case SdkError_Tags.NetworkError: {
|
|
32838
|
+
const inner = value.inner;
|
|
32839
|
+
let size = ordinalConverter.allocationSize(7);
|
|
31730
32840
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31731
32841
|
return size;
|
|
31732
32842
|
}
|
|
31733
32843
|
case SdkError_Tags.StorageError: {
|
|
31734
32844
|
const inner = value.inner;
|
|
31735
|
-
let size = ordinalConverter.allocationSize(
|
|
32845
|
+
let size = ordinalConverter.allocationSize(8);
|
|
31736
32846
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31737
32847
|
return size;
|
|
31738
32848
|
}
|
|
31739
32849
|
case SdkError_Tags.ChainServiceError: {
|
|
31740
32850
|
const inner = value.inner;
|
|
31741
|
-
let size = ordinalConverter.allocationSize(
|
|
32851
|
+
let size = ordinalConverter.allocationSize(9);
|
|
31742
32852
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31743
32853
|
return size;
|
|
31744
32854
|
}
|
|
31745
32855
|
case SdkError_Tags.MaxDepositClaimFeeExceeded: {
|
|
31746
32856
|
const inner = value.inner;
|
|
31747
|
-
let size = ordinalConverter.allocationSize(
|
|
32857
|
+
let size = ordinalConverter.allocationSize(10);
|
|
31748
32858
|
size += FfiConverterString.allocationSize(inner.tx);
|
|
31749
32859
|
size += FfiConverterUInt32.allocationSize(inner.vout);
|
|
31750
32860
|
size += FfiConverterOptionalTypeFee.allocationSize(inner.maxFee);
|
|
@@ -31756,52 +32866,52 @@ const FfiConverterTypeSdkError = (() => {
|
|
|
31756
32866
|
}
|
|
31757
32867
|
case SdkError_Tags.MissingUtxo: {
|
|
31758
32868
|
const inner = value.inner;
|
|
31759
|
-
let size = ordinalConverter.allocationSize(
|
|
32869
|
+
let size = ordinalConverter.allocationSize(11);
|
|
31760
32870
|
size += FfiConverterString.allocationSize(inner.tx);
|
|
31761
32871
|
size += FfiConverterUInt32.allocationSize(inner.vout);
|
|
31762
32872
|
return size;
|
|
31763
32873
|
}
|
|
31764
32874
|
case SdkError_Tags.DepositClaimInProgress: {
|
|
31765
32875
|
const inner = value.inner;
|
|
31766
|
-
let size = ordinalConverter.allocationSize(
|
|
32876
|
+
let size = ordinalConverter.allocationSize(12);
|
|
31767
32877
|
size += FfiConverterString.allocationSize(inner.tx);
|
|
31768
32878
|
size += FfiConverterUInt32.allocationSize(inner.vout);
|
|
31769
32879
|
return size;
|
|
31770
32880
|
}
|
|
31771
32881
|
case SdkError_Tags.RefundReplacementFeeTooLow: {
|
|
31772
32882
|
const inner = value.inner;
|
|
31773
|
-
let size = ordinalConverter.allocationSize(
|
|
32883
|
+
let size = ordinalConverter.allocationSize(13);
|
|
31774
32884
|
size += FfiConverterUInt64.allocationSize(inner.pendingFeeSats);
|
|
31775
32885
|
size += FfiConverterUInt64.allocationSize(inner.requiredFeeSats);
|
|
31776
32886
|
return size;
|
|
31777
32887
|
}
|
|
31778
32888
|
case SdkError_Tags.LnurlError: {
|
|
31779
32889
|
const inner = value.inner;
|
|
31780
|
-
let size = ordinalConverter.allocationSize(
|
|
32890
|
+
let size = ordinalConverter.allocationSize(14);
|
|
31781
32891
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31782
32892
|
return size;
|
|
31783
32893
|
}
|
|
31784
32894
|
case SdkError_Tags.Signer: {
|
|
31785
32895
|
const inner = value.inner;
|
|
31786
|
-
let size = ordinalConverter.allocationSize(
|
|
32896
|
+
let size = ordinalConverter.allocationSize(15);
|
|
31787
32897
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31788
32898
|
return size;
|
|
31789
32899
|
}
|
|
31790
32900
|
case SdkError_Tags.OptimizationAlreadyRunning: {
|
|
31791
|
-
return ordinalConverter.allocationSize(
|
|
32901
|
+
return ordinalConverter.allocationSize(16);
|
|
31792
32902
|
}
|
|
31793
32903
|
case SdkError_Tags.OptimizationCancelled: {
|
|
31794
|
-
return ordinalConverter.allocationSize(
|
|
32904
|
+
return ordinalConverter.allocationSize(17);
|
|
31795
32905
|
}
|
|
31796
32906
|
case SdkError_Tags.InsufficientCpfpFunds: {
|
|
31797
32907
|
const inner = value.inner;
|
|
31798
|
-
let size = ordinalConverter.allocationSize(
|
|
32908
|
+
let size = ordinalConverter.allocationSize(18);
|
|
31799
32909
|
size += FfiConverterUInt64.allocationSize(inner.requiredSat);
|
|
31800
32910
|
return size;
|
|
31801
32911
|
}
|
|
31802
32912
|
case SdkError_Tags.Generic: {
|
|
31803
32913
|
const inner = value.inner;
|
|
31804
|
-
let size = ordinalConverter.allocationSize(
|
|
32914
|
+
let size = ordinalConverter.allocationSize(19);
|
|
31805
32915
|
size += FfiConverterString.allocationSize(inner[0]);
|
|
31806
32916
|
return size;
|
|
31807
32917
|
}
|
|
@@ -31821,6 +32931,7 @@ export enum SdkEvent_Tags {
|
|
|
31821
32931
|
PaymentSucceeded = 'PaymentSucceeded',
|
|
31822
32932
|
PaymentPending = 'PaymentPending',
|
|
31823
32933
|
PaymentFailed = 'PaymentFailed',
|
|
32934
|
+
PaymentMetadataUpdated = 'PaymentMetadataUpdated',
|
|
31824
32935
|
AutoOptimization = 'AutoOptimization',
|
|
31825
32936
|
LightningAddressChanged = 'LightningAddressChanged',
|
|
31826
32937
|
NewDeposits = 'NewDeposits',
|
|
@@ -32027,6 +33138,41 @@ export const SdkEvent = (() => {
|
|
|
32027
33138
|
}
|
|
32028
33139
|
}
|
|
32029
33140
|
|
|
33141
|
+
type PaymentMetadataUpdated__interface = {
|
|
33142
|
+
tag: SdkEvent_Tags.PaymentMetadataUpdated;
|
|
33143
|
+
inner: Readonly<{ payment: Payment }>;
|
|
33144
|
+
};
|
|
33145
|
+
|
|
33146
|
+
/**
|
|
33147
|
+
* Emitted when details of an already stored payment changed, such as the
|
|
33148
|
+
* conversion info of a cross-chain receive arriving after the payment
|
|
33149
|
+
* settled. Carries the updated payment.
|
|
33150
|
+
*/
|
|
33151
|
+
class PaymentMetadataUpdated_
|
|
33152
|
+
extends UniffiEnum
|
|
33153
|
+
implements PaymentMetadataUpdated__interface
|
|
33154
|
+
{
|
|
33155
|
+
/**
|
|
33156
|
+
* @private
|
|
33157
|
+
* This field is private and should not be used, use `tag` instead.
|
|
33158
|
+
*/
|
|
33159
|
+
readonly [uniffiTypeNameSymbol] = 'SdkEvent';
|
|
33160
|
+
readonly tag = SdkEvent_Tags.PaymentMetadataUpdated;
|
|
33161
|
+
readonly inner: Readonly<{ payment: Payment }>;
|
|
33162
|
+
constructor(inner: { payment: Payment }) {
|
|
33163
|
+
super('SdkEvent', 'PaymentMetadataUpdated');
|
|
33164
|
+
this.inner = Object.freeze(inner);
|
|
33165
|
+
}
|
|
33166
|
+
|
|
33167
|
+
static new(inner: { payment: Payment }): PaymentMetadataUpdated_ {
|
|
33168
|
+
return new PaymentMetadataUpdated_(inner);
|
|
33169
|
+
}
|
|
33170
|
+
|
|
33171
|
+
static instanceOf(obj: any): obj is PaymentMetadataUpdated_ {
|
|
33172
|
+
return obj.tag === SdkEvent_Tags.PaymentMetadataUpdated;
|
|
33173
|
+
}
|
|
33174
|
+
}
|
|
33175
|
+
|
|
32030
33176
|
type AutoOptimization__interface = {
|
|
32031
33177
|
tag: SdkEvent_Tags.AutoOptimization;
|
|
32032
33178
|
inner: Readonly<{ optimizationEvent: AutoOptimizationEvent }>;
|
|
@@ -32179,6 +33325,7 @@ export const SdkEvent = (() => {
|
|
|
32179
33325
|
PaymentSucceeded: PaymentSucceeded_,
|
|
32180
33326
|
PaymentPending: PaymentPending_,
|
|
32181
33327
|
PaymentFailed: PaymentFailed_,
|
|
33328
|
+
PaymentMetadataUpdated: PaymentMetadataUpdated_,
|
|
32182
33329
|
AutoOptimization: AutoOptimization_,
|
|
32183
33330
|
LightningAddressChanged: LightningAddressChanged_,
|
|
32184
33331
|
NewDeposits: NewDeposits_,
|
|
@@ -32224,19 +33371,23 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32224
33371
|
payment: FfiConverterTypePayment.read(from),
|
|
32225
33372
|
});
|
|
32226
33373
|
case 7:
|
|
33374
|
+
return new SdkEvent.PaymentMetadataUpdated({
|
|
33375
|
+
payment: FfiConverterTypePayment.read(from),
|
|
33376
|
+
});
|
|
33377
|
+
case 8:
|
|
32227
33378
|
return new SdkEvent.AutoOptimization({
|
|
32228
33379
|
optimizationEvent: FfiConverterTypeAutoOptimizationEvent.read(from),
|
|
32229
33380
|
});
|
|
32230
|
-
case
|
|
33381
|
+
case 9:
|
|
32231
33382
|
return new SdkEvent.LightningAddressChanged({
|
|
32232
33383
|
lightningAddress:
|
|
32233
33384
|
FfiConverterOptionalTypeLightningAddressInfo.read(from),
|
|
32234
33385
|
});
|
|
32235
|
-
case
|
|
33386
|
+
case 10:
|
|
32236
33387
|
return new SdkEvent.NewDeposits({
|
|
32237
33388
|
newDeposits: FfiConverterArrayTypeDepositInfo.read(from),
|
|
32238
33389
|
});
|
|
32239
|
-
case
|
|
33390
|
+
case 11:
|
|
32240
33391
|
return new SdkEvent.UnilateralExitStateChanged();
|
|
32241
33392
|
default:
|
|
32242
33393
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -32278,9 +33429,15 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32278
33429
|
FfiConverterTypePayment.write(inner.payment, into);
|
|
32279
33430
|
return;
|
|
32280
33431
|
}
|
|
32281
|
-
case SdkEvent_Tags.
|
|
33432
|
+
case SdkEvent_Tags.PaymentMetadataUpdated: {
|
|
32282
33433
|
ordinalConverter.write(7, into);
|
|
32283
33434
|
const inner = value.inner;
|
|
33435
|
+
FfiConverterTypePayment.write(inner.payment, into);
|
|
33436
|
+
return;
|
|
33437
|
+
}
|
|
33438
|
+
case SdkEvent_Tags.AutoOptimization: {
|
|
33439
|
+
ordinalConverter.write(8, into);
|
|
33440
|
+
const inner = value.inner;
|
|
32284
33441
|
FfiConverterTypeAutoOptimizationEvent.write(
|
|
32285
33442
|
inner.optimizationEvent,
|
|
32286
33443
|
into
|
|
@@ -32288,7 +33445,7 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32288
33445
|
return;
|
|
32289
33446
|
}
|
|
32290
33447
|
case SdkEvent_Tags.LightningAddressChanged: {
|
|
32291
|
-
ordinalConverter.write(
|
|
33448
|
+
ordinalConverter.write(9, into);
|
|
32292
33449
|
const inner = value.inner;
|
|
32293
33450
|
FfiConverterOptionalTypeLightningAddressInfo.write(
|
|
32294
33451
|
inner.lightningAddress,
|
|
@@ -32297,13 +33454,13 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32297
33454
|
return;
|
|
32298
33455
|
}
|
|
32299
33456
|
case SdkEvent_Tags.NewDeposits: {
|
|
32300
|
-
ordinalConverter.write(
|
|
33457
|
+
ordinalConverter.write(10, into);
|
|
32301
33458
|
const inner = value.inner;
|
|
32302
33459
|
FfiConverterArrayTypeDepositInfo.write(inner.newDeposits, into);
|
|
32303
33460
|
return;
|
|
32304
33461
|
}
|
|
32305
33462
|
case SdkEvent_Tags.UnilateralExitStateChanged: {
|
|
32306
|
-
ordinalConverter.write(
|
|
33463
|
+
ordinalConverter.write(11, into);
|
|
32307
33464
|
return;
|
|
32308
33465
|
}
|
|
32309
33466
|
default:
|
|
@@ -32350,9 +33507,15 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32350
33507
|
size += FfiConverterTypePayment.allocationSize(inner.payment);
|
|
32351
33508
|
return size;
|
|
32352
33509
|
}
|
|
32353
|
-
case SdkEvent_Tags.
|
|
33510
|
+
case SdkEvent_Tags.PaymentMetadataUpdated: {
|
|
32354
33511
|
const inner = value.inner;
|
|
32355
33512
|
let size = ordinalConverter.allocationSize(7);
|
|
33513
|
+
size += FfiConverterTypePayment.allocationSize(inner.payment);
|
|
33514
|
+
return size;
|
|
33515
|
+
}
|
|
33516
|
+
case SdkEvent_Tags.AutoOptimization: {
|
|
33517
|
+
const inner = value.inner;
|
|
33518
|
+
let size = ordinalConverter.allocationSize(8);
|
|
32356
33519
|
size += FfiConverterTypeAutoOptimizationEvent.allocationSize(
|
|
32357
33520
|
inner.optimizationEvent
|
|
32358
33521
|
);
|
|
@@ -32360,7 +33523,7 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32360
33523
|
}
|
|
32361
33524
|
case SdkEvent_Tags.LightningAddressChanged: {
|
|
32362
33525
|
const inner = value.inner;
|
|
32363
|
-
let size = ordinalConverter.allocationSize(
|
|
33526
|
+
let size = ordinalConverter.allocationSize(9);
|
|
32364
33527
|
size += FfiConverterOptionalTypeLightningAddressInfo.allocationSize(
|
|
32365
33528
|
inner.lightningAddress
|
|
32366
33529
|
);
|
|
@@ -32368,14 +33531,14 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
32368
33531
|
}
|
|
32369
33532
|
case SdkEvent_Tags.NewDeposits: {
|
|
32370
33533
|
const inner = value.inner;
|
|
32371
|
-
let size = ordinalConverter.allocationSize(
|
|
33534
|
+
let size = ordinalConverter.allocationSize(10);
|
|
32372
33535
|
size += FfiConverterArrayTypeDepositInfo.allocationSize(
|
|
32373
33536
|
inner.newDeposits
|
|
32374
33537
|
);
|
|
32375
33538
|
return size;
|
|
32376
33539
|
}
|
|
32377
33540
|
case SdkEvent_Tags.UnilateralExitStateChanged: {
|
|
32378
|
-
return ordinalConverter.allocationSize(
|
|
33541
|
+
return ordinalConverter.allocationSize(11);
|
|
32379
33542
|
}
|
|
32380
33543
|
default:
|
|
32381
33544
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -32768,6 +33931,7 @@ export const SendPaymentMethod = (() => {
|
|
|
32768
33931
|
feeAmount: U128;
|
|
32769
33932
|
serviceFeeAmount: U128;
|
|
32770
33933
|
serviceFeeAsset: string | undefined;
|
|
33934
|
+
serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
32771
33935
|
sourceTransferFeeSats: /*u64*/ bigint;
|
|
32772
33936
|
feeMode: CrossChainFeeMode;
|
|
32773
33937
|
expiresAt: string;
|
|
@@ -32797,6 +33961,7 @@ export const SendPaymentMethod = (() => {
|
|
|
32797
33961
|
feeAmount: U128;
|
|
32798
33962
|
serviceFeeAmount: U128;
|
|
32799
33963
|
serviceFeeAsset: string | undefined;
|
|
33964
|
+
serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
32800
33965
|
sourceTransferFeeSats: /*u64*/ bigint;
|
|
32801
33966
|
feeMode: CrossChainFeeMode;
|
|
32802
33967
|
expiresAt: string;
|
|
@@ -32836,6 +34001,10 @@ export const SendPaymentMethod = (() => {
|
|
|
32836
34001
|
/**
|
|
32837
34002
|
* Asset which service fee is denominated in. Unset means BTC sats.
|
|
32838
34003
|
*/ serviceFeeAsset: string | undefined;
|
|
34004
|
+
/**
|
|
34005
|
+
* Decimals of `service_fee_asset`, for formatting `service_fee_amount`.
|
|
34006
|
+
* Unset when the fee is in sats or the provider did not report them.
|
|
34007
|
+
*/ serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
32839
34008
|
/**
|
|
32840
34009
|
* Sats budget for moving the amount in from the wallet to the provider.
|
|
32841
34010
|
*/ sourceTransferFeeSats: /*u64*/ bigint;
|
|
@@ -32888,6 +34057,10 @@ export const SendPaymentMethod = (() => {
|
|
|
32888
34057
|
/**
|
|
32889
34058
|
* Asset which service fee is denominated in. Unset means BTC sats.
|
|
32890
34059
|
*/ serviceFeeAsset: string | undefined;
|
|
34060
|
+
/**
|
|
34061
|
+
* Decimals of `service_fee_asset`, for formatting `service_fee_amount`.
|
|
34062
|
+
* Unset when the fee is in sats or the provider did not report them.
|
|
34063
|
+
*/ serviceFeeAssetDecimals: /*u32*/ number | undefined;
|
|
32891
34064
|
/**
|
|
32892
34065
|
* Sats budget for moving the amount in from the wallet to the provider.
|
|
32893
34066
|
*/ sourceTransferFeeSats: /*u64*/ bigint;
|
|
@@ -32968,6 +34141,7 @@ const FfiConverterTypeSendPaymentMethod = (() => {
|
|
|
32968
34141
|
feeAmount: FfiConverterTypeu128.read(from),
|
|
32969
34142
|
serviceFeeAmount: FfiConverterTypeu128.read(from),
|
|
32970
34143
|
serviceFeeAsset: FfiConverterOptionalString.read(from),
|
|
34144
|
+
serviceFeeAssetDecimals: FfiConverterOptionalUInt32.read(from),
|
|
32971
34145
|
sourceTransferFeeSats: FfiConverterUInt64.read(from),
|
|
32972
34146
|
feeMode: FfiConverterTypeCrossChainFeeMode.read(from),
|
|
32973
34147
|
expiresAt: FfiConverterString.read(from),
|
|
@@ -33028,6 +34202,7 @@ const FfiConverterTypeSendPaymentMethod = (() => {
|
|
|
33028
34202
|
FfiConverterTypeu128.write(inner.feeAmount, into);
|
|
33029
34203
|
FfiConverterTypeu128.write(inner.serviceFeeAmount, into);
|
|
33030
34204
|
FfiConverterOptionalString.write(inner.serviceFeeAsset, into);
|
|
34205
|
+
FfiConverterOptionalUInt32.write(inner.serviceFeeAssetDecimals, into);
|
|
33031
34206
|
FfiConverterUInt64.write(inner.sourceTransferFeeSats, into);
|
|
33032
34207
|
FfiConverterTypeCrossChainFeeMode.write(inner.feeMode, into);
|
|
33033
34208
|
FfiConverterString.write(inner.expiresAt, into);
|
|
@@ -33104,6 +34279,9 @@ const FfiConverterTypeSendPaymentMethod = (() => {
|
|
|
33104
34279
|
size += FfiConverterOptionalString.allocationSize(
|
|
33105
34280
|
inner.serviceFeeAsset
|
|
33106
34281
|
);
|
|
34282
|
+
size += FfiConverterOptionalUInt32.allocationSize(
|
|
34283
|
+
inner.serviceFeeAssetDecimals
|
|
34284
|
+
);
|
|
33107
34285
|
size += FfiConverterUInt64.allocationSize(
|
|
33108
34286
|
inner.sourceTransferFeeSats
|
|
33109
34287
|
);
|
|
@@ -37281,6 +38459,7 @@ export enum UpdateDepositPayload_Tags {
|
|
|
37281
38459
|
Refund = 'Refund',
|
|
37282
38460
|
InstantClaim = 'InstantClaim',
|
|
37283
38461
|
RefundBroadcastState = 'RefundBroadcastState',
|
|
38462
|
+
MaxClaimFee = 'MaxClaimFee',
|
|
37284
38463
|
}
|
|
37285
38464
|
export const UpdateDepositPayload = (() => {
|
|
37286
38465
|
type ClaimError__interface = {
|
|
@@ -37419,6 +38598,38 @@ export const UpdateDepositPayload = (() => {
|
|
|
37419
38598
|
}
|
|
37420
38599
|
}
|
|
37421
38600
|
|
|
38601
|
+
type MaxClaimFee__interface = {
|
|
38602
|
+
tag: UpdateDepositPayload_Tags.MaxClaimFee;
|
|
38603
|
+
inner: Readonly<{ maxFee: MaxFee | undefined }>;
|
|
38604
|
+
};
|
|
38605
|
+
|
|
38606
|
+
/**
|
|
38607
|
+
* Sets the fee ceiling standing for this deposit, which later automatic
|
|
38608
|
+
* claims run under. `None` clears it, returning the deposit to the
|
|
38609
|
+
* configured ceiling.
|
|
38610
|
+
*/
|
|
38611
|
+
class MaxClaimFee_ extends UniffiEnum implements MaxClaimFee__interface {
|
|
38612
|
+
/**
|
|
38613
|
+
* @private
|
|
38614
|
+
* This field is private and should not be used, use `tag` instead.
|
|
38615
|
+
*/
|
|
38616
|
+
readonly [uniffiTypeNameSymbol] = 'UpdateDepositPayload';
|
|
38617
|
+
readonly tag = UpdateDepositPayload_Tags.MaxClaimFee;
|
|
38618
|
+
readonly inner: Readonly<{ maxFee: MaxFee | undefined }>;
|
|
38619
|
+
constructor(inner: { maxFee: MaxFee | undefined }) {
|
|
38620
|
+
super('UpdateDepositPayload', 'MaxClaimFee');
|
|
38621
|
+
this.inner = Object.freeze(inner);
|
|
38622
|
+
}
|
|
38623
|
+
|
|
38624
|
+
static new(inner: { maxFee: MaxFee | undefined }): MaxClaimFee_ {
|
|
38625
|
+
return new MaxClaimFee_(inner);
|
|
38626
|
+
}
|
|
38627
|
+
|
|
38628
|
+
static instanceOf(obj: any): obj is MaxClaimFee_ {
|
|
38629
|
+
return obj.tag === UpdateDepositPayload_Tags.MaxClaimFee;
|
|
38630
|
+
}
|
|
38631
|
+
}
|
|
38632
|
+
|
|
37422
38633
|
function instanceOf(obj: any): obj is UpdateDepositPayload {
|
|
37423
38634
|
return obj[uniffiTypeNameSymbol] === 'UpdateDepositPayload';
|
|
37424
38635
|
}
|
|
@@ -37429,6 +38640,7 @@ export const UpdateDepositPayload = (() => {
|
|
|
37429
38640
|
Refund: Refund_,
|
|
37430
38641
|
InstantClaim: InstantClaim_,
|
|
37431
38642
|
RefundBroadcastState: RefundBroadcastState_,
|
|
38643
|
+
MaxClaimFee: MaxClaimFee_,
|
|
37432
38644
|
});
|
|
37433
38645
|
})();
|
|
37434
38646
|
|
|
@@ -37465,6 +38677,10 @@ const FfiConverterTypeUpdateDepositPayload = (() => {
|
|
|
37465
38677
|
refundTxid: FfiConverterString.read(from),
|
|
37466
38678
|
state: FfiConverterTypeRefundState.read(from),
|
|
37467
38679
|
});
|
|
38680
|
+
case 5:
|
|
38681
|
+
return new UpdateDepositPayload.MaxClaimFee({
|
|
38682
|
+
maxFee: FfiConverterOptionalTypeMaxFee.read(from),
|
|
38683
|
+
});
|
|
37468
38684
|
default:
|
|
37469
38685
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
37470
38686
|
}
|
|
@@ -37498,6 +38714,12 @@ const FfiConverterTypeUpdateDepositPayload = (() => {
|
|
|
37498
38714
|
FfiConverterTypeRefundState.write(inner.state, into);
|
|
37499
38715
|
return;
|
|
37500
38716
|
}
|
|
38717
|
+
case UpdateDepositPayload_Tags.MaxClaimFee: {
|
|
38718
|
+
ordinalConverter.write(5, into);
|
|
38719
|
+
const inner = value.inner;
|
|
38720
|
+
FfiConverterOptionalTypeMaxFee.write(inner.maxFee, into);
|
|
38721
|
+
return;
|
|
38722
|
+
}
|
|
37501
38723
|
default:
|
|
37502
38724
|
// Throwing from here means that UpdateDepositPayload_Tags hasn't matched an ordinal.
|
|
37503
38725
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -37534,6 +38756,197 @@ const FfiConverterTypeUpdateDepositPayload = (() => {
|
|
|
37534
38756
|
size += FfiConverterTypeRefundState.allocationSize(inner.state);
|
|
37535
38757
|
return size;
|
|
37536
38758
|
}
|
|
38759
|
+
case UpdateDepositPayload_Tags.MaxClaimFee: {
|
|
38760
|
+
const inner = value.inner;
|
|
38761
|
+
let size = ordinalConverter.allocationSize(5);
|
|
38762
|
+
size += FfiConverterOptionalTypeMaxFee.allocationSize(inner.maxFee);
|
|
38763
|
+
return size;
|
|
38764
|
+
}
|
|
38765
|
+
default:
|
|
38766
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
38767
|
+
}
|
|
38768
|
+
}
|
|
38769
|
+
}
|
|
38770
|
+
return new FFIConverter();
|
|
38771
|
+
})();
|
|
38772
|
+
|
|
38773
|
+
// Enum: UpdateWatchedAddressPayload
|
|
38774
|
+
export enum UpdateWatchedAddressPayload_Tags {
|
|
38775
|
+
Watch = 'Watch',
|
|
38776
|
+
Seen = 'Seen',
|
|
38777
|
+
Unwatch = 'Unwatch',
|
|
38778
|
+
}
|
|
38779
|
+
export const UpdateWatchedAddressPayload = (() => {
|
|
38780
|
+
type Watch__interface = {
|
|
38781
|
+
tag: UpdateWatchedAddressPayload_Tags.Watch;
|
|
38782
|
+
inner: Readonly<{ issuedAt: /*u64*/ bigint }>;
|
|
38783
|
+
};
|
|
38784
|
+
|
|
38785
|
+
/**
|
|
38786
|
+
* Starts watching the address, or restarts the window on one already
|
|
38787
|
+
* watched, clearing `seen`.
|
|
38788
|
+
*/
|
|
38789
|
+
class Watch_ extends UniffiEnum implements Watch__interface {
|
|
38790
|
+
/**
|
|
38791
|
+
* @private
|
|
38792
|
+
* This field is private and should not be used, use `tag` instead.
|
|
38793
|
+
*/
|
|
38794
|
+
readonly [uniffiTypeNameSymbol] = 'UpdateWatchedAddressPayload';
|
|
38795
|
+
readonly tag = UpdateWatchedAddressPayload_Tags.Watch;
|
|
38796
|
+
readonly inner: Readonly<{ issuedAt: /*u64*/ bigint }>;
|
|
38797
|
+
constructor(inner: { issuedAt: /*u64*/ bigint }) {
|
|
38798
|
+
super('UpdateWatchedAddressPayload', 'Watch');
|
|
38799
|
+
this.inner = Object.freeze(inner);
|
|
38800
|
+
}
|
|
38801
|
+
|
|
38802
|
+
static new(inner: { issuedAt: /*u64*/ bigint }): Watch_ {
|
|
38803
|
+
return new Watch_(inner);
|
|
38804
|
+
}
|
|
38805
|
+
|
|
38806
|
+
static instanceOf(obj: any): obj is Watch_ {
|
|
38807
|
+
return obj.tag === UpdateWatchedAddressPayload_Tags.Watch;
|
|
38808
|
+
}
|
|
38809
|
+
}
|
|
38810
|
+
|
|
38811
|
+
type Seen__interface = {
|
|
38812
|
+
tag: UpdateWatchedAddressPayload_Tags.Seen;
|
|
38813
|
+
};
|
|
38814
|
+
|
|
38815
|
+
/**
|
|
38816
|
+
* Records that a deposit to it has been seen unconfirmed.
|
|
38817
|
+
*/
|
|
38818
|
+
class Seen_ extends UniffiEnum implements Seen__interface {
|
|
38819
|
+
/**
|
|
38820
|
+
* @private
|
|
38821
|
+
* This field is private and should not be used, use `tag` instead.
|
|
38822
|
+
*/
|
|
38823
|
+
readonly [uniffiTypeNameSymbol] = 'UpdateWatchedAddressPayload';
|
|
38824
|
+
readonly tag = UpdateWatchedAddressPayload_Tags.Seen;
|
|
38825
|
+
constructor() {
|
|
38826
|
+
super('UpdateWatchedAddressPayload', 'Seen');
|
|
38827
|
+
}
|
|
38828
|
+
|
|
38829
|
+
static new(): Seen_ {
|
|
38830
|
+
return new Seen_();
|
|
38831
|
+
}
|
|
38832
|
+
|
|
38833
|
+
static instanceOf(obj: any): obj is Seen_ {
|
|
38834
|
+
return obj.tag === UpdateWatchedAddressPayload_Tags.Seen;
|
|
38835
|
+
}
|
|
38836
|
+
}
|
|
38837
|
+
|
|
38838
|
+
type Unwatch__interface = {
|
|
38839
|
+
tag: UpdateWatchedAddressPayload_Tags.Unwatch;
|
|
38840
|
+
inner: Readonly<{ issuedAt: /*u64*/ bigint }>;
|
|
38841
|
+
};
|
|
38842
|
+
|
|
38843
|
+
/**
|
|
38844
|
+
* Stops watching it, removing the row. Applies only while `issued_at` is
|
|
38845
|
+
* still the stored value, so an address handed out again since it was read
|
|
38846
|
+
* is not retired by a decision taken before that.
|
|
38847
|
+
*/
|
|
38848
|
+
class Unwatch_ extends UniffiEnum implements Unwatch__interface {
|
|
38849
|
+
/**
|
|
38850
|
+
* @private
|
|
38851
|
+
* This field is private and should not be used, use `tag` instead.
|
|
38852
|
+
*/
|
|
38853
|
+
readonly [uniffiTypeNameSymbol] = 'UpdateWatchedAddressPayload';
|
|
38854
|
+
readonly tag = UpdateWatchedAddressPayload_Tags.Unwatch;
|
|
38855
|
+
readonly inner: Readonly<{ issuedAt: /*u64*/ bigint }>;
|
|
38856
|
+
constructor(inner: { issuedAt: /*u64*/ bigint }) {
|
|
38857
|
+
super('UpdateWatchedAddressPayload', 'Unwatch');
|
|
38858
|
+
this.inner = Object.freeze(inner);
|
|
38859
|
+
}
|
|
38860
|
+
|
|
38861
|
+
static new(inner: { issuedAt: /*u64*/ bigint }): Unwatch_ {
|
|
38862
|
+
return new Unwatch_(inner);
|
|
38863
|
+
}
|
|
38864
|
+
|
|
38865
|
+
static instanceOf(obj: any): obj is Unwatch_ {
|
|
38866
|
+
return obj.tag === UpdateWatchedAddressPayload_Tags.Unwatch;
|
|
38867
|
+
}
|
|
38868
|
+
}
|
|
38869
|
+
|
|
38870
|
+
function instanceOf(obj: any): obj is UpdateWatchedAddressPayload {
|
|
38871
|
+
return obj[uniffiTypeNameSymbol] === 'UpdateWatchedAddressPayload';
|
|
38872
|
+
}
|
|
38873
|
+
|
|
38874
|
+
return Object.freeze({
|
|
38875
|
+
instanceOf,
|
|
38876
|
+
Watch: Watch_,
|
|
38877
|
+
Seen: Seen_,
|
|
38878
|
+
Unwatch: Unwatch_,
|
|
38879
|
+
});
|
|
38880
|
+
})();
|
|
38881
|
+
|
|
38882
|
+
export type UpdateWatchedAddressPayload = InstanceType<
|
|
38883
|
+
(typeof UpdateWatchedAddressPayload)[keyof Omit<
|
|
38884
|
+
typeof UpdateWatchedAddressPayload,
|
|
38885
|
+
'instanceOf'
|
|
38886
|
+
>]
|
|
38887
|
+
>;
|
|
38888
|
+
|
|
38889
|
+
// FfiConverter for enum UpdateWatchedAddressPayload
|
|
38890
|
+
const FfiConverterTypeUpdateWatchedAddressPayload = (() => {
|
|
38891
|
+
const ordinalConverter = FfiConverterInt32;
|
|
38892
|
+
type TypeName = UpdateWatchedAddressPayload;
|
|
38893
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
38894
|
+
read(from: RustBuffer): TypeName {
|
|
38895
|
+
switch (ordinalConverter.read(from)) {
|
|
38896
|
+
case 1:
|
|
38897
|
+
return new UpdateWatchedAddressPayload.Watch({
|
|
38898
|
+
issuedAt: FfiConverterUInt64.read(from),
|
|
38899
|
+
});
|
|
38900
|
+
case 2:
|
|
38901
|
+
return new UpdateWatchedAddressPayload.Seen();
|
|
38902
|
+
case 3:
|
|
38903
|
+
return new UpdateWatchedAddressPayload.Unwatch({
|
|
38904
|
+
issuedAt: FfiConverterUInt64.read(from),
|
|
38905
|
+
});
|
|
38906
|
+
default:
|
|
38907
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
38908
|
+
}
|
|
38909
|
+
}
|
|
38910
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
38911
|
+
switch (value.tag) {
|
|
38912
|
+
case UpdateWatchedAddressPayload_Tags.Watch: {
|
|
38913
|
+
ordinalConverter.write(1, into);
|
|
38914
|
+
const inner = value.inner;
|
|
38915
|
+
FfiConverterUInt64.write(inner.issuedAt, into);
|
|
38916
|
+
return;
|
|
38917
|
+
}
|
|
38918
|
+
case UpdateWatchedAddressPayload_Tags.Seen: {
|
|
38919
|
+
ordinalConverter.write(2, into);
|
|
38920
|
+
return;
|
|
38921
|
+
}
|
|
38922
|
+
case UpdateWatchedAddressPayload_Tags.Unwatch: {
|
|
38923
|
+
ordinalConverter.write(3, into);
|
|
38924
|
+
const inner = value.inner;
|
|
38925
|
+
FfiConverterUInt64.write(inner.issuedAt, into);
|
|
38926
|
+
return;
|
|
38927
|
+
}
|
|
38928
|
+
default:
|
|
38929
|
+
// Throwing from here means that UpdateWatchedAddressPayload_Tags hasn't matched an ordinal.
|
|
38930
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
38931
|
+
}
|
|
38932
|
+
}
|
|
38933
|
+
allocationSize(value: TypeName): number {
|
|
38934
|
+
switch (value.tag) {
|
|
38935
|
+
case UpdateWatchedAddressPayload_Tags.Watch: {
|
|
38936
|
+
const inner = value.inner;
|
|
38937
|
+
let size = ordinalConverter.allocationSize(1);
|
|
38938
|
+
size += FfiConverterUInt64.allocationSize(inner.issuedAt);
|
|
38939
|
+
return size;
|
|
38940
|
+
}
|
|
38941
|
+
case UpdateWatchedAddressPayload_Tags.Seen: {
|
|
38942
|
+
return ordinalConverter.allocationSize(2);
|
|
38943
|
+
}
|
|
38944
|
+
case UpdateWatchedAddressPayload_Tags.Unwatch: {
|
|
38945
|
+
const inner = value.inner;
|
|
38946
|
+
let size = ordinalConverter.allocationSize(3);
|
|
38947
|
+
size += FfiConverterUInt64.allocationSize(inner.issuedAt);
|
|
38948
|
+
return size;
|
|
38949
|
+
}
|
|
37537
38950
|
default:
|
|
37538
38951
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
37539
38952
|
}
|
|
@@ -39237,7 +40650,13 @@ export interface BreezSdkInterface {
|
|
|
39237
40650
|
asyncOpts_?: { signal: AbortSignal }
|
|
39238
40651
|
): /*throws*/ Promise<SignMessageResponse>;
|
|
39239
40652
|
/**
|
|
39240
|
-
* Synchronizes the wallet with the Spark network
|
|
40653
|
+
* Synchronizes the wallet with the Spark network.
|
|
40654
|
+
*
|
|
40655
|
+
* Also collects the data a unilateral exit needs for any leaf still missing
|
|
40656
|
+
* it, and waits for that before returning. This happens regardless of
|
|
40657
|
+
* [`exit_chain_auto_fetch_enabled`](crate::Config::exit_chain_auto_fetch_enabled),
|
|
40658
|
+
* which governs only the automatic collection: syncing is how to run one at
|
|
40659
|
+
* a moment of your choosing with that turned off.
|
|
39241
40660
|
*/
|
|
39242
40661
|
syncWallet(
|
|
39243
40662
|
request: SyncWalletRequest,
|
|
@@ -41750,7 +43169,13 @@ export class BreezSdk
|
|
|
41750
43169
|
}
|
|
41751
43170
|
|
|
41752
43171
|
/**
|
|
41753
|
-
* Synchronizes the wallet with the Spark network
|
|
43172
|
+
* Synchronizes the wallet with the Spark network.
|
|
43173
|
+
*
|
|
43174
|
+
* Also collects the data a unilateral exit needs for any leaf still missing
|
|
43175
|
+
* it, and waits for that before returning. This happens regardless of
|
|
43176
|
+
* [`exit_chain_auto_fetch_enabled`](crate::Config::exit_chain_auto_fetch_enabled),
|
|
43177
|
+
* which governs only the automatic collection: syncing is how to run one at
|
|
43178
|
+
* a moment of your choosing with that turned off.
|
|
41754
43179
|
*/
|
|
41755
43180
|
public async syncWallet(
|
|
41756
43181
|
request: SyncWalletRequest,
|
|
@@ -43918,7 +45343,7 @@ export interface ExternalSparkSigner {
|
|
|
43918
45343
|
signal: AbortSignal;
|
|
43919
45344
|
}): /*throws*/ Promise<PublicKeyBytes>;
|
|
43920
45345
|
/**
|
|
43921
|
-
* The
|
|
45346
|
+
* The public key of the leaf signing key derived from `leaf_id`.
|
|
43922
45347
|
*/
|
|
43923
45348
|
getPublicKeyForLeaf(
|
|
43924
45349
|
leafId: ExternalTreeNodeId,
|
|
@@ -43954,7 +45379,8 @@ export interface ExternalSparkSigner {
|
|
|
43954
45379
|
): /*throws*/ Promise<EcdsaSignatureBytes>;
|
|
43955
45380
|
/**
|
|
43956
45381
|
* Schnorr-sign `sighash` to spend a tree leaf's P2TR refund output as a
|
|
43957
|
-
* BIP341 key-path spend (empty script tree)
|
|
45382
|
+
* BIP341 key-path spend (empty script tree), with the leaf signing key
|
|
45383
|
+
* derived from `leaf_id`.
|
|
43958
45384
|
*/
|
|
43959
45385
|
signLeafRefundSpend(
|
|
43960
45386
|
leafId: ExternalTreeNodeId,
|
|
@@ -44092,7 +45518,7 @@ export class ExternalSparkSignerImpl
|
|
|
44092
45518
|
}
|
|
44093
45519
|
|
|
44094
45520
|
/**
|
|
44095
|
-
* The
|
|
45521
|
+
* The public key of the leaf signing key derived from `leaf_id`.
|
|
44096
45522
|
*/
|
|
44097
45523
|
public async getPublicKeyForLeaf(
|
|
44098
45524
|
leafId: ExternalTreeNodeId,
|
|
@@ -44281,7 +45707,8 @@ export class ExternalSparkSignerImpl
|
|
|
44281
45707
|
|
|
44282
45708
|
/**
|
|
44283
45709
|
* Schnorr-sign `sighash` to spend a tree leaf's P2TR refund output as a
|
|
44284
|
-
* BIP341 key-path spend (empty script tree)
|
|
45710
|
+
* BIP341 key-path spend (empty script tree), with the leaf signing key
|
|
45711
|
+
* derived from `leaf_id`.
|
|
44285
45712
|
*/
|
|
44286
45713
|
public async signLeafRefundSpend(
|
|
44287
45714
|
leafId: ExternalTreeNodeId,
|
|
@@ -48189,7 +49616,7 @@ export interface SdkBuilderInterface {
|
|
|
48189
49616
|
* Sets the account number for key derivation. All wallet keys derive from
|
|
48190
49617
|
* the seed at `m/8797555'/<account number>'`, so each account number
|
|
48191
49618
|
* yields an independent wallet from the same seed. Defaults to 0 on
|
|
48192
|
-
* Regtest and 1 on
|
|
49619
|
+
* Regtest and Signet, and 1 on Mainnet when unset.
|
|
48193
49620
|
* Arguments:
|
|
48194
49621
|
* - `account_number`: The account number in the derivation path.
|
|
48195
49622
|
*/
|
|
@@ -48445,7 +49872,7 @@ export class SdkBuilder
|
|
|
48445
49872
|
* Sets the account number for key derivation. All wallet keys derive from
|
|
48446
49873
|
* the seed at `m/8797555'/<account number>'`, so each account number
|
|
48447
49874
|
* yields an independent wallet from the same seed. Defaults to 0 on
|
|
48448
|
-
* Regtest and 1 on
|
|
49875
|
+
* Regtest and Signet, and 1 on Mainnet when unset.
|
|
48449
49876
|
* Arguments:
|
|
48450
49877
|
* - `account_number`: The account number in the derivation path.
|
|
48451
49878
|
*/
|
|
@@ -49605,6 +51032,22 @@ export interface Storage {
|
|
|
49605
51032
|
payload: UpdateDepositPayload,
|
|
49606
51033
|
asyncOpts_?: { signal: AbortSignal }
|
|
49607
51034
|
): /*throws*/ Promise<void>;
|
|
51035
|
+
/**
|
|
51036
|
+
* Lists the deposit addresses currently being watched for unconfirmed
|
|
51037
|
+
* deposits, most recently issued first.
|
|
51038
|
+
*/
|
|
51039
|
+
listWatchedDepositAddresses(asyncOpts_?: {
|
|
51040
|
+
signal: AbortSignal;
|
|
51041
|
+
}): /*throws*/ Promise<Array<WatchedDepositAddress>>;
|
|
51042
|
+
/**
|
|
51043
|
+
* Applies one change to a watched deposit address. `Watch` inserts or
|
|
51044
|
+
* restarts it, `Seen` marks it, and `Unwatch` removes it.
|
|
51045
|
+
*/
|
|
51046
|
+
updateWatchedDepositAddress(
|
|
51047
|
+
address: string,
|
|
51048
|
+
payload: UpdateWatchedAddressPayload,
|
|
51049
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
51050
|
+
): /*throws*/ Promise<void>;
|
|
49608
51051
|
setLnurlMetadata(
|
|
49609
51052
|
metadata: Array<SetLnurlMetadataItem>,
|
|
49610
51053
|
asyncOpts_?: { signal: AbortSignal }
|
|
@@ -50254,20 +51697,114 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
|
|
|
50254
51697
|
}
|
|
50255
51698
|
|
|
50256
51699
|
/**
|
|
50257
|
-
* Lists all unclaimed deposits from storage
|
|
50258
|
-
* # Returns
|
|
50259
|
-
*
|
|
50260
|
-
* A vector of `DepositInfo` or a `StorageError`
|
|
51700
|
+
* Lists all unclaimed deposits from storage
|
|
51701
|
+
* # Returns
|
|
51702
|
+
*
|
|
51703
|
+
* A vector of `DepositInfo` or a `StorageError`
|
|
51704
|
+
*/
|
|
51705
|
+
public async listDeposits(asyncOpts_?: {
|
|
51706
|
+
signal: AbortSignal;
|
|
51707
|
+
}): Promise<Array<DepositInfo>> /*throws*/ {
|
|
51708
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
51709
|
+
try {
|
|
51710
|
+
return await uniffiRustCallAsync(
|
|
51711
|
+
/*rustCaller:*/ uniffiCaller,
|
|
51712
|
+
/*rustFutureFunc:*/ () => {
|
|
51713
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_deposits(
|
|
51714
|
+
uniffiTypeStorageImplObjectFactory.clonePointer(this)
|
|
51715
|
+
);
|
|
51716
|
+
},
|
|
51717
|
+
/*pollFunc:*/ nativeModule()
|
|
51718
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
51719
|
+
/*cancelFunc:*/ nativeModule()
|
|
51720
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
|
|
51721
|
+
/*completeFunc:*/ nativeModule()
|
|
51722
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
51723
|
+
/*freeFunc:*/ nativeModule()
|
|
51724
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
51725
|
+
/*liftFunc:*/ FfiConverterArrayTypeDepositInfo.lift.bind(
|
|
51726
|
+
FfiConverterArrayTypeDepositInfo
|
|
51727
|
+
),
|
|
51728
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
51729
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
51730
|
+
/*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
|
|
51731
|
+
FfiConverterTypeStorageError
|
|
51732
|
+
)
|
|
51733
|
+
);
|
|
51734
|
+
} catch (__error: any) {
|
|
51735
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
51736
|
+
__error.stack = __stack;
|
|
51737
|
+
}
|
|
51738
|
+
throw __error;
|
|
51739
|
+
}
|
|
51740
|
+
}
|
|
51741
|
+
|
|
51742
|
+
/**
|
|
51743
|
+
* Updates or inserts unclaimed deposit details
|
|
51744
|
+
* # Arguments
|
|
51745
|
+
*
|
|
51746
|
+
* * `txid` - The transaction ID of the deposit
|
|
51747
|
+
* * `vout` - The output index of the deposit
|
|
51748
|
+
* * `payload` - The payload for the update
|
|
51749
|
+
*
|
|
51750
|
+
* # Returns
|
|
51751
|
+
*
|
|
51752
|
+
* Success or a `StorageError`
|
|
51753
|
+
*/
|
|
51754
|
+
public async updateDeposit(
|
|
51755
|
+
txid: string,
|
|
51756
|
+
vout: /*u32*/ number,
|
|
51757
|
+
payload: UpdateDepositPayload,
|
|
51758
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
51759
|
+
): Promise<void> /*throws*/ {
|
|
51760
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
51761
|
+
try {
|
|
51762
|
+
return await uniffiRustCallAsync(
|
|
51763
|
+
/*rustCaller:*/ uniffiCaller,
|
|
51764
|
+
/*rustFutureFunc:*/ () => {
|
|
51765
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_deposit(
|
|
51766
|
+
uniffiTypeStorageImplObjectFactory.clonePointer(this),
|
|
51767
|
+
FfiConverterString.lower(txid),
|
|
51768
|
+
FfiConverterUInt32.lower(vout),
|
|
51769
|
+
FfiConverterTypeUpdateDepositPayload.lower(payload)
|
|
51770
|
+
);
|
|
51771
|
+
},
|
|
51772
|
+
/*pollFunc:*/ nativeModule()
|
|
51773
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
|
|
51774
|
+
/*cancelFunc:*/ nativeModule()
|
|
51775
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
|
|
51776
|
+
/*completeFunc:*/ nativeModule()
|
|
51777
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
|
|
51778
|
+
/*freeFunc:*/ nativeModule()
|
|
51779
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_void,
|
|
51780
|
+
/*liftFunc:*/ (_v) => {},
|
|
51781
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
51782
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
51783
|
+
/*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
|
|
51784
|
+
FfiConverterTypeStorageError
|
|
51785
|
+
)
|
|
51786
|
+
);
|
|
51787
|
+
} catch (__error: any) {
|
|
51788
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
51789
|
+
__error.stack = __stack;
|
|
51790
|
+
}
|
|
51791
|
+
throw __error;
|
|
51792
|
+
}
|
|
51793
|
+
}
|
|
51794
|
+
|
|
51795
|
+
/**
|
|
51796
|
+
* Lists the deposit addresses currently being watched for unconfirmed
|
|
51797
|
+
* deposits, most recently issued first.
|
|
50261
51798
|
*/
|
|
50262
|
-
public async
|
|
51799
|
+
public async listWatchedDepositAddresses(asyncOpts_?: {
|
|
50263
51800
|
signal: AbortSignal;
|
|
50264
|
-
}): Promise<Array<
|
|
51801
|
+
}): Promise<Array<WatchedDepositAddress>> /*throws*/ {
|
|
50265
51802
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
50266
51803
|
try {
|
|
50267
51804
|
return await uniffiRustCallAsync(
|
|
50268
51805
|
/*rustCaller:*/ uniffiCaller,
|
|
50269
51806
|
/*rustFutureFunc:*/ () => {
|
|
50270
|
-
return nativeModule().
|
|
51807
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_watched_deposit_addresses(
|
|
50271
51808
|
uniffiTypeStorageImplObjectFactory.clonePointer(this)
|
|
50272
51809
|
);
|
|
50273
51810
|
},
|
|
@@ -50279,8 +51816,8 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
|
|
|
50279
51816
|
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
50280
51817
|
/*freeFunc:*/ nativeModule()
|
|
50281
51818
|
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
50282
|
-
/*liftFunc:*/
|
|
50283
|
-
|
|
51819
|
+
/*liftFunc:*/ FfiConverterArrayTypeWatchedDepositAddress.lift.bind(
|
|
51820
|
+
FfiConverterArrayTypeWatchedDepositAddress
|
|
50284
51821
|
),
|
|
50285
51822
|
/*liftString:*/ FfiConverterString.lift,
|
|
50286
51823
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -50297,21 +51834,12 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
|
|
|
50297
51834
|
}
|
|
50298
51835
|
|
|
50299
51836
|
/**
|
|
50300
|
-
*
|
|
50301
|
-
*
|
|
50302
|
-
*
|
|
50303
|
-
* * `txid` - The transaction ID of the deposit
|
|
50304
|
-
* * `vout` - The output index of the deposit
|
|
50305
|
-
* * `payload` - The payload for the update
|
|
50306
|
-
*
|
|
50307
|
-
* # Returns
|
|
50308
|
-
*
|
|
50309
|
-
* Success or a `StorageError`
|
|
51837
|
+
* Applies one change to a watched deposit address. `Watch` inserts or
|
|
51838
|
+
* restarts it, `Seen` marks it, and `Unwatch` removes it.
|
|
50310
51839
|
*/
|
|
50311
|
-
public async
|
|
50312
|
-
|
|
50313
|
-
|
|
50314
|
-
payload: UpdateDepositPayload,
|
|
51840
|
+
public async updateWatchedDepositAddress(
|
|
51841
|
+
address: string,
|
|
51842
|
+
payload: UpdateWatchedAddressPayload,
|
|
50315
51843
|
asyncOpts_?: { signal: AbortSignal }
|
|
50316
51844
|
): Promise<void> /*throws*/ {
|
|
50317
51845
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
@@ -50319,11 +51847,10 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
|
|
|
50319
51847
|
return await uniffiRustCallAsync(
|
|
50320
51848
|
/*rustCaller:*/ uniffiCaller,
|
|
50321
51849
|
/*rustFutureFunc:*/ () => {
|
|
50322
|
-
return nativeModule().
|
|
51850
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_watched_deposit_address(
|
|
50323
51851
|
uniffiTypeStorageImplObjectFactory.clonePointer(this),
|
|
50324
|
-
FfiConverterString.lower(
|
|
50325
|
-
|
|
50326
|
-
FfiConverterTypeUpdateDepositPayload.lower(payload)
|
|
51852
|
+
FfiConverterString.lower(address),
|
|
51853
|
+
FfiConverterTypeUpdateWatchedAddressPayload.lower(payload)
|
|
50327
51854
|
);
|
|
50328
51855
|
},
|
|
50329
51856
|
/*pollFunc:*/ nativeModule()
|
|
@@ -51178,26 +52705,257 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51178
52705
|
);
|
|
51179
52706
|
return uniffiForeignFuture;
|
|
51180
52707
|
},
|
|
51181
|
-
getCachedItem: (
|
|
52708
|
+
getCachedItem: (
|
|
52709
|
+
uniffiHandle: bigint,
|
|
52710
|
+
key: Uint8Array,
|
|
52711
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
52712
|
+
uniffiCallbackData: bigint
|
|
52713
|
+
) => {
|
|
52714
|
+
const uniffiMakeCall = async (
|
|
52715
|
+
signal: AbortSignal
|
|
52716
|
+
): Promise<string | undefined> => {
|
|
52717
|
+
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
52718
|
+
return await jsCallback.getCachedItem(FfiConverterString.lift(key), {
|
|
52719
|
+
signal,
|
|
52720
|
+
});
|
|
52721
|
+
};
|
|
52722
|
+
const uniffiHandleSuccess = (returnValue: string | undefined) => {
|
|
52723
|
+
uniffiFutureCallback.call(
|
|
52724
|
+
uniffiFutureCallback,
|
|
52725
|
+
uniffiCallbackData,
|
|
52726
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
52727
|
+
returnValue: FfiConverterOptionalString.lower(returnValue),
|
|
52728
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
52729
|
+
}
|
|
52730
|
+
);
|
|
52731
|
+
};
|
|
52732
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
52733
|
+
uniffiFutureCallback.call(
|
|
52734
|
+
uniffiFutureCallback,
|
|
52735
|
+
uniffiCallbackData,
|
|
52736
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
52737
|
+
returnValue: /*empty*/ new Uint8Array(0),
|
|
52738
|
+
// TODO create callstatus with error.
|
|
52739
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
52740
|
+
}
|
|
52741
|
+
);
|
|
52742
|
+
};
|
|
52743
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
52744
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
52745
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
52746
|
+
/*handleError:*/ uniffiHandleError,
|
|
52747
|
+
/*isErrorType:*/ StorageError.instanceOf,
|
|
52748
|
+
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
52749
|
+
FfiConverterTypeStorageError
|
|
52750
|
+
),
|
|
52751
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
52752
|
+
);
|
|
52753
|
+
return uniffiForeignFuture;
|
|
52754
|
+
},
|
|
52755
|
+
setCachedItem: (
|
|
52756
|
+
uniffiHandle: bigint,
|
|
52757
|
+
key: Uint8Array,
|
|
52758
|
+
value: Uint8Array,
|
|
52759
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
52760
|
+
uniffiCallbackData: bigint
|
|
52761
|
+
) => {
|
|
52762
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
52763
|
+
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
52764
|
+
return await jsCallback.setCachedItem(
|
|
52765
|
+
FfiConverterString.lift(key),
|
|
52766
|
+
FfiConverterString.lift(value),
|
|
52767
|
+
{ signal }
|
|
52768
|
+
);
|
|
52769
|
+
};
|
|
52770
|
+
const uniffiHandleSuccess = (returnValue: void) => {
|
|
52771
|
+
uniffiFutureCallback.call(
|
|
52772
|
+
uniffiFutureCallback,
|
|
52773
|
+
uniffiCallbackData,
|
|
52774
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
52775
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
52776
|
+
}
|
|
52777
|
+
);
|
|
52778
|
+
};
|
|
52779
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
52780
|
+
uniffiFutureCallback.call(
|
|
52781
|
+
uniffiFutureCallback,
|
|
52782
|
+
uniffiCallbackData,
|
|
52783
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
52784
|
+
// TODO create callstatus with error.
|
|
52785
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
52786
|
+
}
|
|
52787
|
+
);
|
|
52788
|
+
};
|
|
52789
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
52790
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
52791
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
52792
|
+
/*handleError:*/ uniffiHandleError,
|
|
52793
|
+
/*isErrorType:*/ StorageError.instanceOf,
|
|
52794
|
+
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
52795
|
+
FfiConverterTypeStorageError
|
|
52796
|
+
),
|
|
52797
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
52798
|
+
);
|
|
52799
|
+
return uniffiForeignFuture;
|
|
52800
|
+
},
|
|
52801
|
+
listPayments: (
|
|
52802
|
+
uniffiHandle: bigint,
|
|
52803
|
+
request: Uint8Array,
|
|
52804
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
52805
|
+
uniffiCallbackData: bigint
|
|
52806
|
+
) => {
|
|
52807
|
+
const uniffiMakeCall = async (
|
|
52808
|
+
signal: AbortSignal
|
|
52809
|
+
): Promise<Array<Payment>> => {
|
|
52810
|
+
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
52811
|
+
return await jsCallback.listPayments(
|
|
52812
|
+
FfiConverterTypeStorageListPaymentsRequest.lift(request),
|
|
52813
|
+
{ signal }
|
|
52814
|
+
);
|
|
52815
|
+
};
|
|
52816
|
+
const uniffiHandleSuccess = (returnValue: Array<Payment>) => {
|
|
52817
|
+
uniffiFutureCallback.call(
|
|
52818
|
+
uniffiFutureCallback,
|
|
52819
|
+
uniffiCallbackData,
|
|
52820
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
52821
|
+
returnValue: FfiConverterArrayTypePayment.lower(returnValue),
|
|
52822
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
52823
|
+
}
|
|
52824
|
+
);
|
|
52825
|
+
};
|
|
52826
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
52827
|
+
uniffiFutureCallback.call(
|
|
52828
|
+
uniffiFutureCallback,
|
|
52829
|
+
uniffiCallbackData,
|
|
52830
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
52831
|
+
returnValue: /*empty*/ new Uint8Array(0),
|
|
52832
|
+
// TODO create callstatus with error.
|
|
52833
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
52834
|
+
}
|
|
52835
|
+
);
|
|
52836
|
+
};
|
|
52837
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
52838
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
52839
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
52840
|
+
/*handleError:*/ uniffiHandleError,
|
|
52841
|
+
/*isErrorType:*/ StorageError.instanceOf,
|
|
52842
|
+
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
52843
|
+
FfiConverterTypeStorageError
|
|
52844
|
+
),
|
|
52845
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
52846
|
+
);
|
|
52847
|
+
return uniffiForeignFuture;
|
|
52848
|
+
},
|
|
52849
|
+
applyPaymentUpdate: (
|
|
52850
|
+
uniffiHandle: bigint,
|
|
52851
|
+
payment: Uint8Array,
|
|
52852
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteI8,
|
|
52853
|
+
uniffiCallbackData: bigint
|
|
52854
|
+
) => {
|
|
52855
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<boolean> => {
|
|
52856
|
+
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
52857
|
+
return await jsCallback.applyPaymentUpdate(
|
|
52858
|
+
FfiConverterTypePayment.lift(payment),
|
|
52859
|
+
{ signal }
|
|
52860
|
+
);
|
|
52861
|
+
};
|
|
52862
|
+
const uniffiHandleSuccess = (returnValue: boolean) => {
|
|
52863
|
+
uniffiFutureCallback.call(
|
|
52864
|
+
uniffiFutureCallback,
|
|
52865
|
+
uniffiCallbackData,
|
|
52866
|
+
/* UniffiForeignFutureStructI8 */ {
|
|
52867
|
+
returnValue: FfiConverterBool.lower(returnValue),
|
|
52868
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
52869
|
+
}
|
|
52870
|
+
);
|
|
52871
|
+
};
|
|
52872
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
52873
|
+
uniffiFutureCallback.call(
|
|
52874
|
+
uniffiFutureCallback,
|
|
52875
|
+
uniffiCallbackData,
|
|
52876
|
+
/* UniffiForeignFutureStructI8 */ {
|
|
52877
|
+
returnValue: 0,
|
|
52878
|
+
// TODO create callstatus with error.
|
|
52879
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
52880
|
+
}
|
|
52881
|
+
);
|
|
52882
|
+
};
|
|
52883
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
52884
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
52885
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
52886
|
+
/*handleError:*/ uniffiHandleError,
|
|
52887
|
+
/*isErrorType:*/ StorageError.instanceOf,
|
|
52888
|
+
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
52889
|
+
FfiConverterTypeStorageError
|
|
52890
|
+
),
|
|
52891
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
52892
|
+
);
|
|
52893
|
+
return uniffiForeignFuture;
|
|
52894
|
+
},
|
|
52895
|
+
insertPaymentMetadata: (
|
|
52896
|
+
uniffiHandle: bigint,
|
|
52897
|
+
paymentId: Uint8Array,
|
|
52898
|
+
metadata: Uint8Array,
|
|
52899
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
52900
|
+
uniffiCallbackData: bigint
|
|
52901
|
+
) => {
|
|
52902
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
52903
|
+
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
52904
|
+
return await jsCallback.insertPaymentMetadata(
|
|
52905
|
+
FfiConverterString.lift(paymentId),
|
|
52906
|
+
FfiConverterTypePaymentMetadata.lift(metadata),
|
|
52907
|
+
{ signal }
|
|
52908
|
+
);
|
|
52909
|
+
};
|
|
52910
|
+
const uniffiHandleSuccess = (returnValue: void) => {
|
|
52911
|
+
uniffiFutureCallback.call(
|
|
52912
|
+
uniffiFutureCallback,
|
|
52913
|
+
uniffiCallbackData,
|
|
52914
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
52915
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
52916
|
+
}
|
|
52917
|
+
);
|
|
52918
|
+
};
|
|
52919
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
52920
|
+
uniffiFutureCallback.call(
|
|
52921
|
+
uniffiFutureCallback,
|
|
52922
|
+
uniffiCallbackData,
|
|
52923
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
52924
|
+
// TODO create callstatus with error.
|
|
52925
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
52926
|
+
}
|
|
52927
|
+
);
|
|
52928
|
+
};
|
|
52929
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
52930
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
52931
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
52932
|
+
/*handleError:*/ uniffiHandleError,
|
|
52933
|
+
/*isErrorType:*/ StorageError.instanceOf,
|
|
52934
|
+
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
52935
|
+
FfiConverterTypeStorageError
|
|
52936
|
+
),
|
|
52937
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
52938
|
+
);
|
|
52939
|
+
return uniffiForeignFuture;
|
|
52940
|
+
},
|
|
52941
|
+
getPaymentById: (
|
|
51182
52942
|
uniffiHandle: bigint,
|
|
51183
|
-
|
|
52943
|
+
id: Uint8Array,
|
|
51184
52944
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
51185
52945
|
uniffiCallbackData: bigint
|
|
51186
52946
|
) => {
|
|
51187
|
-
const uniffiMakeCall = async (
|
|
51188
|
-
signal: AbortSignal
|
|
51189
|
-
): Promise<string | undefined> => {
|
|
52947
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<Payment> => {
|
|
51190
52948
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51191
|
-
return await jsCallback.
|
|
52949
|
+
return await jsCallback.getPaymentById(FfiConverterString.lift(id), {
|
|
51192
52950
|
signal,
|
|
51193
52951
|
});
|
|
51194
52952
|
};
|
|
51195
|
-
const uniffiHandleSuccess = (returnValue:
|
|
52953
|
+
const uniffiHandleSuccess = (returnValue: Payment) => {
|
|
51196
52954
|
uniffiFutureCallback.call(
|
|
51197
52955
|
uniffiFutureCallback,
|
|
51198
52956
|
uniffiCallbackData,
|
|
51199
52957
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
51200
|
-
returnValue:
|
|
52958
|
+
returnValue: FfiConverterTypePayment.lower(returnValue),
|
|
51201
52959
|
callStatus: uniffiCaller.createCallStatus(),
|
|
51202
52960
|
}
|
|
51203
52961
|
);
|
|
@@ -51225,73 +52983,27 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51225
52983
|
);
|
|
51226
52984
|
return uniffiForeignFuture;
|
|
51227
52985
|
},
|
|
51228
|
-
|
|
51229
|
-
uniffiHandle: bigint,
|
|
51230
|
-
key: Uint8Array,
|
|
51231
|
-
value: Uint8Array,
|
|
51232
|
-
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
51233
|
-
uniffiCallbackData: bigint
|
|
51234
|
-
) => {
|
|
51235
|
-
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
51236
|
-
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51237
|
-
return await jsCallback.setCachedItem(
|
|
51238
|
-
FfiConverterString.lift(key),
|
|
51239
|
-
FfiConverterString.lift(value),
|
|
51240
|
-
{ signal }
|
|
51241
|
-
);
|
|
51242
|
-
};
|
|
51243
|
-
const uniffiHandleSuccess = (returnValue: void) => {
|
|
51244
|
-
uniffiFutureCallback.call(
|
|
51245
|
-
uniffiFutureCallback,
|
|
51246
|
-
uniffiCallbackData,
|
|
51247
|
-
/* UniffiForeignFutureStructVoid */ {
|
|
51248
|
-
callStatus: uniffiCaller.createCallStatus(),
|
|
51249
|
-
}
|
|
51250
|
-
);
|
|
51251
|
-
};
|
|
51252
|
-
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
51253
|
-
uniffiFutureCallback.call(
|
|
51254
|
-
uniffiFutureCallback,
|
|
51255
|
-
uniffiCallbackData,
|
|
51256
|
-
/* UniffiForeignFutureStructVoid */ {
|
|
51257
|
-
// TODO create callstatus with error.
|
|
51258
|
-
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
51259
|
-
}
|
|
51260
|
-
);
|
|
51261
|
-
};
|
|
51262
|
-
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
51263
|
-
/*makeCall:*/ uniffiMakeCall,
|
|
51264
|
-
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
51265
|
-
/*handleError:*/ uniffiHandleError,
|
|
51266
|
-
/*isErrorType:*/ StorageError.instanceOf,
|
|
51267
|
-
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
51268
|
-
FfiConverterTypeStorageError
|
|
51269
|
-
),
|
|
51270
|
-
/*lowerString:*/ FfiConverterString.lower
|
|
51271
|
-
);
|
|
51272
|
-
return uniffiForeignFuture;
|
|
51273
|
-
},
|
|
51274
|
-
listPayments: (
|
|
52986
|
+
getPaymentByInvoice: (
|
|
51275
52987
|
uniffiHandle: bigint,
|
|
51276
|
-
|
|
52988
|
+
invoice: Uint8Array,
|
|
51277
52989
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
51278
52990
|
uniffiCallbackData: bigint
|
|
51279
52991
|
) => {
|
|
51280
52992
|
const uniffiMakeCall = async (
|
|
51281
52993
|
signal: AbortSignal
|
|
51282
|
-
): Promise<
|
|
52994
|
+
): Promise<Payment | undefined> => {
|
|
51283
52995
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51284
|
-
return await jsCallback.
|
|
51285
|
-
|
|
52996
|
+
return await jsCallback.getPaymentByInvoice(
|
|
52997
|
+
FfiConverterString.lift(invoice),
|
|
51286
52998
|
{ signal }
|
|
51287
52999
|
);
|
|
51288
53000
|
};
|
|
51289
|
-
const uniffiHandleSuccess = (returnValue:
|
|
53001
|
+
const uniffiHandleSuccess = (returnValue: Payment | undefined) => {
|
|
51290
53002
|
uniffiFutureCallback.call(
|
|
51291
53003
|
uniffiFutureCallback,
|
|
51292
53004
|
uniffiCallbackData,
|
|
51293
53005
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
51294
|
-
returnValue:
|
|
53006
|
+
returnValue: FfiConverterOptionalTypePayment.lower(returnValue),
|
|
51295
53007
|
callStatus: uniffiCaller.createCallStatus(),
|
|
51296
53008
|
}
|
|
51297
53009
|
);
|
|
@@ -51319,25 +53031,30 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51319
53031
|
);
|
|
51320
53032
|
return uniffiForeignFuture;
|
|
51321
53033
|
},
|
|
51322
|
-
|
|
53034
|
+
getPaymentsByParentIds: (
|
|
51323
53035
|
uniffiHandle: bigint,
|
|
51324
|
-
|
|
51325
|
-
uniffiFutureCallback:
|
|
53036
|
+
parentPaymentIds: Uint8Array,
|
|
53037
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
51326
53038
|
uniffiCallbackData: bigint
|
|
51327
53039
|
) => {
|
|
51328
|
-
const uniffiMakeCall = async (
|
|
53040
|
+
const uniffiMakeCall = async (
|
|
53041
|
+
signal: AbortSignal
|
|
53042
|
+
): Promise<Map<string, Array<Payment>>> => {
|
|
51329
53043
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51330
|
-
return await jsCallback.
|
|
51331
|
-
|
|
53044
|
+
return await jsCallback.getPaymentsByParentIds(
|
|
53045
|
+
FfiConverterArrayString.lift(parentPaymentIds),
|
|
51332
53046
|
{ signal }
|
|
51333
53047
|
);
|
|
51334
53048
|
};
|
|
51335
|
-
const uniffiHandleSuccess = (
|
|
53049
|
+
const uniffiHandleSuccess = (
|
|
53050
|
+
returnValue: Map<string, Array<Payment>>
|
|
53051
|
+
) => {
|
|
51336
53052
|
uniffiFutureCallback.call(
|
|
51337
53053
|
uniffiFutureCallback,
|
|
51338
53054
|
uniffiCallbackData,
|
|
51339
|
-
/*
|
|
51340
|
-
returnValue:
|
|
53055
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
53056
|
+
returnValue:
|
|
53057
|
+
FfiConverterMapStringArrayTypePayment.lower(returnValue),
|
|
51341
53058
|
callStatus: uniffiCaller.createCallStatus(),
|
|
51342
53059
|
}
|
|
51343
53060
|
);
|
|
@@ -51346,8 +53063,8 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51346
53063
|
uniffiFutureCallback.call(
|
|
51347
53064
|
uniffiFutureCallback,
|
|
51348
53065
|
uniffiCallbackData,
|
|
51349
|
-
/*
|
|
51350
|
-
returnValue: 0,
|
|
53066
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
53067
|
+
returnValue: /*empty*/ new Uint8Array(0),
|
|
51351
53068
|
// TODO create callstatus with error.
|
|
51352
53069
|
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
51353
53070
|
}
|
|
@@ -51365,18 +53082,22 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51365
53082
|
);
|
|
51366
53083
|
return uniffiForeignFuture;
|
|
51367
53084
|
},
|
|
51368
|
-
|
|
53085
|
+
addDeposit: (
|
|
51369
53086
|
uniffiHandle: bigint,
|
|
51370
|
-
|
|
51371
|
-
|
|
53087
|
+
txid: Uint8Array,
|
|
53088
|
+
vout: number,
|
|
53089
|
+
amountSats: bigint,
|
|
53090
|
+
isMature: number,
|
|
51372
53091
|
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
51373
53092
|
uniffiCallbackData: bigint
|
|
51374
53093
|
) => {
|
|
51375
53094
|
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
51376
53095
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51377
|
-
return await jsCallback.
|
|
51378
|
-
FfiConverterString.lift(
|
|
51379
|
-
|
|
53096
|
+
return await jsCallback.addDeposit(
|
|
53097
|
+
FfiConverterString.lift(txid),
|
|
53098
|
+
FfiConverterUInt32.lift(vout),
|
|
53099
|
+
FfiConverterUInt64.lift(amountSats),
|
|
53100
|
+
FfiConverterBool.lift(isMature),
|
|
51380
53101
|
{ signal }
|
|
51381
53102
|
);
|
|
51382
53103
|
};
|
|
@@ -51411,72 +53132,26 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51411
53132
|
);
|
|
51412
53133
|
return uniffiForeignFuture;
|
|
51413
53134
|
},
|
|
51414
|
-
|
|
51415
|
-
uniffiHandle: bigint,
|
|
51416
|
-
id: Uint8Array,
|
|
51417
|
-
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
51418
|
-
uniffiCallbackData: bigint
|
|
51419
|
-
) => {
|
|
51420
|
-
const uniffiMakeCall = async (signal: AbortSignal): Promise<Payment> => {
|
|
51421
|
-
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51422
|
-
return await jsCallback.getPaymentById(FfiConverterString.lift(id), {
|
|
51423
|
-
signal,
|
|
51424
|
-
});
|
|
51425
|
-
};
|
|
51426
|
-
const uniffiHandleSuccess = (returnValue: Payment) => {
|
|
51427
|
-
uniffiFutureCallback.call(
|
|
51428
|
-
uniffiFutureCallback,
|
|
51429
|
-
uniffiCallbackData,
|
|
51430
|
-
/* UniffiForeignFutureStructRustBuffer */ {
|
|
51431
|
-
returnValue: FfiConverterTypePayment.lower(returnValue),
|
|
51432
|
-
callStatus: uniffiCaller.createCallStatus(),
|
|
51433
|
-
}
|
|
51434
|
-
);
|
|
51435
|
-
};
|
|
51436
|
-
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
51437
|
-
uniffiFutureCallback.call(
|
|
51438
|
-
uniffiFutureCallback,
|
|
51439
|
-
uniffiCallbackData,
|
|
51440
|
-
/* UniffiForeignFutureStructRustBuffer */ {
|
|
51441
|
-
returnValue: /*empty*/ new Uint8Array(0),
|
|
51442
|
-
// TODO create callstatus with error.
|
|
51443
|
-
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
51444
|
-
}
|
|
51445
|
-
);
|
|
51446
|
-
};
|
|
51447
|
-
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
51448
|
-
/*makeCall:*/ uniffiMakeCall,
|
|
51449
|
-
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
51450
|
-
/*handleError:*/ uniffiHandleError,
|
|
51451
|
-
/*isErrorType:*/ StorageError.instanceOf,
|
|
51452
|
-
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
51453
|
-
FfiConverterTypeStorageError
|
|
51454
|
-
),
|
|
51455
|
-
/*lowerString:*/ FfiConverterString.lower
|
|
51456
|
-
);
|
|
51457
|
-
return uniffiForeignFuture;
|
|
51458
|
-
},
|
|
51459
|
-
getPaymentByInvoice: (
|
|
53135
|
+
deleteDeposit: (
|
|
51460
53136
|
uniffiHandle: bigint,
|
|
51461
|
-
|
|
51462
|
-
|
|
53137
|
+
txid: Uint8Array,
|
|
53138
|
+
vout: number,
|
|
53139
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
51463
53140
|
uniffiCallbackData: bigint
|
|
51464
53141
|
) => {
|
|
51465
|
-
const uniffiMakeCall = async (
|
|
51466
|
-
signal: AbortSignal
|
|
51467
|
-
): Promise<Payment | undefined> => {
|
|
53142
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
51468
53143
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51469
|
-
return await jsCallback.
|
|
51470
|
-
FfiConverterString.lift(
|
|
53144
|
+
return await jsCallback.deleteDeposit(
|
|
53145
|
+
FfiConverterString.lift(txid),
|
|
53146
|
+
FfiConverterUInt32.lift(vout),
|
|
51471
53147
|
{ signal }
|
|
51472
53148
|
);
|
|
51473
53149
|
};
|
|
51474
|
-
const uniffiHandleSuccess = (returnValue:
|
|
53150
|
+
const uniffiHandleSuccess = (returnValue: void) => {
|
|
51475
53151
|
uniffiFutureCallback.call(
|
|
51476
53152
|
uniffiFutureCallback,
|
|
51477
53153
|
uniffiCallbackData,
|
|
51478
|
-
/*
|
|
51479
|
-
returnValue: FfiConverterOptionalTypePayment.lower(returnValue),
|
|
53154
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
51480
53155
|
callStatus: uniffiCaller.createCallStatus(),
|
|
51481
53156
|
}
|
|
51482
53157
|
);
|
|
@@ -51485,8 +53160,7 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51485
53160
|
uniffiFutureCallback.call(
|
|
51486
53161
|
uniffiFutureCallback,
|
|
51487
53162
|
uniffiCallbackData,
|
|
51488
|
-
/*
|
|
51489
|
-
returnValue: /*empty*/ new Uint8Array(0),
|
|
53163
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
51490
53164
|
// TODO create callstatus with error.
|
|
51491
53165
|
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
51492
53166
|
}
|
|
@@ -51504,30 +53178,23 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51504
53178
|
);
|
|
51505
53179
|
return uniffiForeignFuture;
|
|
51506
53180
|
},
|
|
51507
|
-
|
|
53181
|
+
listDeposits: (
|
|
51508
53182
|
uniffiHandle: bigint,
|
|
51509
|
-
parentPaymentIds: Uint8Array,
|
|
51510
53183
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
51511
53184
|
uniffiCallbackData: bigint
|
|
51512
53185
|
) => {
|
|
51513
53186
|
const uniffiMakeCall = async (
|
|
51514
53187
|
signal: AbortSignal
|
|
51515
|
-
): Promise<
|
|
53188
|
+
): Promise<Array<DepositInfo>> => {
|
|
51516
53189
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51517
|
-
return await jsCallback.
|
|
51518
|
-
FfiConverterArrayString.lift(parentPaymentIds),
|
|
51519
|
-
{ signal }
|
|
51520
|
-
);
|
|
53190
|
+
return await jsCallback.listDeposits({ signal });
|
|
51521
53191
|
};
|
|
51522
|
-
const uniffiHandleSuccess = (
|
|
51523
|
-
returnValue: Map<string, Array<Payment>>
|
|
51524
|
-
) => {
|
|
53192
|
+
const uniffiHandleSuccess = (returnValue: Array<DepositInfo>) => {
|
|
51525
53193
|
uniffiFutureCallback.call(
|
|
51526
53194
|
uniffiFutureCallback,
|
|
51527
53195
|
uniffiCallbackData,
|
|
51528
53196
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
51529
|
-
returnValue:
|
|
51530
|
-
FfiConverterMapStringArrayTypePayment.lower(returnValue),
|
|
53197
|
+
returnValue: FfiConverterArrayTypeDepositInfo.lower(returnValue),
|
|
51531
53198
|
callStatus: uniffiCaller.createCallStatus(),
|
|
51532
53199
|
}
|
|
51533
53200
|
);
|
|
@@ -51555,68 +53222,20 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51555
53222
|
);
|
|
51556
53223
|
return uniffiForeignFuture;
|
|
51557
53224
|
},
|
|
51558
|
-
|
|
51559
|
-
uniffiHandle: bigint,
|
|
51560
|
-
txid: Uint8Array,
|
|
51561
|
-
vout: number,
|
|
51562
|
-
amountSats: bigint,
|
|
51563
|
-
isMature: number,
|
|
51564
|
-
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
51565
|
-
uniffiCallbackData: bigint
|
|
51566
|
-
) => {
|
|
51567
|
-
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
51568
|
-
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51569
|
-
return await jsCallback.addDeposit(
|
|
51570
|
-
FfiConverterString.lift(txid),
|
|
51571
|
-
FfiConverterUInt32.lift(vout),
|
|
51572
|
-
FfiConverterUInt64.lift(amountSats),
|
|
51573
|
-
FfiConverterBool.lift(isMature),
|
|
51574
|
-
{ signal }
|
|
51575
|
-
);
|
|
51576
|
-
};
|
|
51577
|
-
const uniffiHandleSuccess = (returnValue: void) => {
|
|
51578
|
-
uniffiFutureCallback.call(
|
|
51579
|
-
uniffiFutureCallback,
|
|
51580
|
-
uniffiCallbackData,
|
|
51581
|
-
/* UniffiForeignFutureStructVoid */ {
|
|
51582
|
-
callStatus: uniffiCaller.createCallStatus(),
|
|
51583
|
-
}
|
|
51584
|
-
);
|
|
51585
|
-
};
|
|
51586
|
-
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
51587
|
-
uniffiFutureCallback.call(
|
|
51588
|
-
uniffiFutureCallback,
|
|
51589
|
-
uniffiCallbackData,
|
|
51590
|
-
/* UniffiForeignFutureStructVoid */ {
|
|
51591
|
-
// TODO create callstatus with error.
|
|
51592
|
-
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
51593
|
-
}
|
|
51594
|
-
);
|
|
51595
|
-
};
|
|
51596
|
-
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
51597
|
-
/*makeCall:*/ uniffiMakeCall,
|
|
51598
|
-
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
51599
|
-
/*handleError:*/ uniffiHandleError,
|
|
51600
|
-
/*isErrorType:*/ StorageError.instanceOf,
|
|
51601
|
-
/*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
|
|
51602
|
-
FfiConverterTypeStorageError
|
|
51603
|
-
),
|
|
51604
|
-
/*lowerString:*/ FfiConverterString.lower
|
|
51605
|
-
);
|
|
51606
|
-
return uniffiForeignFuture;
|
|
51607
|
-
},
|
|
51608
|
-
deleteDeposit: (
|
|
53225
|
+
updateDeposit: (
|
|
51609
53226
|
uniffiHandle: bigint,
|
|
51610
53227
|
txid: Uint8Array,
|
|
51611
53228
|
vout: number,
|
|
53229
|
+
payload: Uint8Array,
|
|
51612
53230
|
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
51613
53231
|
uniffiCallbackData: bigint
|
|
51614
53232
|
) => {
|
|
51615
53233
|
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
51616
53234
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51617
|
-
return await jsCallback.
|
|
53235
|
+
return await jsCallback.updateDeposit(
|
|
51618
53236
|
FfiConverterString.lift(txid),
|
|
51619
53237
|
FfiConverterUInt32.lift(vout),
|
|
53238
|
+
FfiConverterTypeUpdateDepositPayload.lift(payload),
|
|
51620
53239
|
{ signal }
|
|
51621
53240
|
);
|
|
51622
53241
|
};
|
|
@@ -51651,23 +53270,26 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51651
53270
|
);
|
|
51652
53271
|
return uniffiForeignFuture;
|
|
51653
53272
|
},
|
|
51654
|
-
|
|
53273
|
+
listWatchedDepositAddresses: (
|
|
51655
53274
|
uniffiHandle: bigint,
|
|
51656
53275
|
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
51657
53276
|
uniffiCallbackData: bigint
|
|
51658
53277
|
) => {
|
|
51659
53278
|
const uniffiMakeCall = async (
|
|
51660
53279
|
signal: AbortSignal
|
|
51661
|
-
): Promise<Array<
|
|
53280
|
+
): Promise<Array<WatchedDepositAddress>> => {
|
|
51662
53281
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51663
|
-
return await jsCallback.
|
|
53282
|
+
return await jsCallback.listWatchedDepositAddresses({ signal });
|
|
51664
53283
|
};
|
|
51665
|
-
const uniffiHandleSuccess = (
|
|
53284
|
+
const uniffiHandleSuccess = (
|
|
53285
|
+
returnValue: Array<WatchedDepositAddress>
|
|
53286
|
+
) => {
|
|
51666
53287
|
uniffiFutureCallback.call(
|
|
51667
53288
|
uniffiFutureCallback,
|
|
51668
53289
|
uniffiCallbackData,
|
|
51669
53290
|
/* UniffiForeignFutureStructRustBuffer */ {
|
|
51670
|
-
returnValue:
|
|
53291
|
+
returnValue:
|
|
53292
|
+
FfiConverterArrayTypeWatchedDepositAddress.lower(returnValue),
|
|
51671
53293
|
callStatus: uniffiCaller.createCallStatus(),
|
|
51672
53294
|
}
|
|
51673
53295
|
);
|
|
@@ -51695,20 +53317,18 @@ const uniffiCallbackInterfaceStorage: {
|
|
|
51695
53317
|
);
|
|
51696
53318
|
return uniffiForeignFuture;
|
|
51697
53319
|
},
|
|
51698
|
-
|
|
53320
|
+
updateWatchedDepositAddress: (
|
|
51699
53321
|
uniffiHandle: bigint,
|
|
51700
|
-
|
|
51701
|
-
vout: number,
|
|
53322
|
+
address: Uint8Array,
|
|
51702
53323
|
payload: Uint8Array,
|
|
51703
53324
|
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
51704
53325
|
uniffiCallbackData: bigint
|
|
51705
53326
|
) => {
|
|
51706
53327
|
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
51707
53328
|
const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
|
|
51708
|
-
return await jsCallback.
|
|
51709
|
-
FfiConverterString.lift(
|
|
51710
|
-
|
|
51711
|
-
FfiConverterTypeUpdateDepositPayload.lift(payload),
|
|
53329
|
+
return await jsCallback.updateWatchedDepositAddress(
|
|
53330
|
+
FfiConverterString.lift(address),
|
|
53331
|
+
FfiConverterTypeUpdateWatchedAddressPayload.lift(payload),
|
|
51712
53332
|
{ signal }
|
|
51713
53333
|
);
|
|
51714
53334
|
};
|
|
@@ -53319,6 +54939,11 @@ const FfiConverterOptionalTypeCrossChainReceiveInfo = new FfiConverterOptional(
|
|
|
53319
54939
|
FfiConverterTypeCrossChainReceiveInfo
|
|
53320
54940
|
);
|
|
53321
54941
|
|
|
54942
|
+
// FfiConverter for CrossChainRouteLimits | undefined
|
|
54943
|
+
const FfiConverterOptionalTypeCrossChainRouteLimits = new FfiConverterOptional(
|
|
54944
|
+
FfiConverterTypeCrossChainRouteLimits
|
|
54945
|
+
);
|
|
54946
|
+
|
|
53322
54947
|
// FfiConverter for LightningAddressInfo | undefined
|
|
53323
54948
|
const FfiConverterOptionalTypeLightningAddressInfo = new FfiConverterOptional(
|
|
53324
54949
|
FfiConverterTypeLightningAddressInfo
|
|
@@ -53477,6 +55102,11 @@ const FfiConverterArrayTypeConversion = new FfiConverterArray(
|
|
|
53477
55102
|
FfiConverterTypeConversion
|
|
53478
55103
|
);
|
|
53479
55104
|
|
|
55105
|
+
// FfiConverter for Array<CrossChainAcceptedAsset>
|
|
55106
|
+
const FfiConverterArrayTypeCrossChainAcceptedAsset = new FfiConverterArray(
|
|
55107
|
+
FfiConverterTypeCrossChainAcceptedAsset
|
|
55108
|
+
);
|
|
55109
|
+
|
|
53480
55110
|
// FfiConverter for Array<CrossChainRoutePair>
|
|
53481
55111
|
const FfiConverterArrayTypeCrossChainRoutePair = new FfiConverterArray(
|
|
53482
55112
|
FfiConverterTypeCrossChainRoutePair
|
|
@@ -53643,6 +55273,11 @@ const FfiConverterArrayTypeUnilateralExitTransaction = new FfiConverterArray(
|
|
|
53643
55273
|
// FfiConverter for Array<Utxo>
|
|
53644
55274
|
const FfiConverterArrayTypeUtxo = new FfiConverterArray(FfiConverterTypeUtxo);
|
|
53645
55275
|
|
|
55276
|
+
// FfiConverter for Array<WatchedDepositAddress>
|
|
55277
|
+
const FfiConverterArrayTypeWatchedDepositAddress = new FfiConverterArray(
|
|
55278
|
+
FfiConverterTypeWatchedDepositAddress
|
|
55279
|
+
);
|
|
55280
|
+
|
|
53646
55281
|
// FfiConverter for Array<Webhook>
|
|
53647
55282
|
const FfiConverterArrayTypeWebhook = new FfiConverterArray(
|
|
53648
55283
|
FfiConverterTypeWebhook
|
|
@@ -53831,11 +55466,6 @@ const FfiConverterArrayTypePaymentType = new FfiConverterArray(
|
|
|
53831
55466
|
FfiConverterTypePaymentType
|
|
53832
55467
|
);
|
|
53833
55468
|
|
|
53834
|
-
// FfiConverter for Array<SparkAsset>
|
|
53835
|
-
const FfiConverterArrayTypeSparkAsset = new FfiConverterArray(
|
|
53836
|
-
FfiConverterTypeSparkAsset
|
|
53837
|
-
);
|
|
53838
|
-
|
|
53839
55469
|
// FfiConverter for Array<SparkHtlcStatus>
|
|
53840
55470
|
const FfiConverterArrayTypeSparkHtlcStatus = new FfiConverterArray(
|
|
53841
55471
|
FfiConverterTypeSparkHtlcStatus
|
|
@@ -53953,7 +55583,7 @@ function uniffiEnsureInitialized() {
|
|
|
53953
55583
|
}
|
|
53954
55584
|
if (
|
|
53955
55585
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_external_signers() !==
|
|
53956
|
-
|
|
55586
|
+
7133
|
|
53957
55587
|
) {
|
|
53958
55588
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
53959
55589
|
'uniffi_breez_sdk_spark_checksum_func_default_external_signers'
|
|
@@ -54529,7 +56159,7 @@ function uniffiEnsureInitialized() {
|
|
|
54529
56159
|
}
|
|
54530
56160
|
if (
|
|
54531
56161
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() !==
|
|
54532
|
-
|
|
56162
|
+
62870
|
|
54533
56163
|
) {
|
|
54534
56164
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
54535
56165
|
'uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet'
|
|
@@ -54673,7 +56303,7 @@ function uniffiEnsureInitialized() {
|
|
|
54673
56303
|
}
|
|
54674
56304
|
if (
|
|
54675
56305
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_public_key_for_leaf() !==
|
|
54676
|
-
|
|
56306
|
+
59013
|
|
54677
56307
|
) {
|
|
54678
56308
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
54679
56309
|
'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_public_key_for_leaf'
|
|
@@ -54713,7 +56343,7 @@ function uniffiEnsureInitialized() {
|
|
|
54713
56343
|
}
|
|
54714
56344
|
if (
|
|
54715
56345
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_leaf_refund_spend() !==
|
|
54716
|
-
|
|
56346
|
+
61127
|
|
54717
56347
|
) {
|
|
54718
56348
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
54719
56349
|
'uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_leaf_refund_spend'
|
|
@@ -54953,7 +56583,7 @@ function uniffiEnsureInitialized() {
|
|
|
54953
56583
|
}
|
|
54954
56584
|
if (
|
|
54955
56585
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_account_number() !==
|
|
54956
|
-
|
|
56586
|
+
18776
|
|
54957
56587
|
) {
|
|
54958
56588
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
54959
56589
|
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_account_number'
|
|
@@ -55159,9 +56789,25 @@ function uniffiEnsureInitialized() {
|
|
|
55159
56789
|
'uniffi_breez_sdk_spark_checksum_method_storage_update_deposit'
|
|
55160
56790
|
);
|
|
55161
56791
|
}
|
|
56792
|
+
if (
|
|
56793
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_watched_deposit_addresses() !==
|
|
56794
|
+
43297
|
|
56795
|
+
) {
|
|
56796
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
56797
|
+
'uniffi_breez_sdk_spark_checksum_method_storage_list_watched_deposit_addresses'
|
|
56798
|
+
);
|
|
56799
|
+
}
|
|
56800
|
+
if (
|
|
56801
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_watched_deposit_address() !==
|
|
56802
|
+
23278
|
|
56803
|
+
) {
|
|
56804
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
56805
|
+
'uniffi_breez_sdk_spark_checksum_method_storage_update_watched_deposit_address'
|
|
56806
|
+
);
|
|
56807
|
+
}
|
|
55162
56808
|
if (
|
|
55163
56809
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata() !==
|
|
55164
|
-
|
|
56810
|
+
3637
|
|
55165
56811
|
) {
|
|
55166
56812
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55167
56813
|
'uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata'
|
|
@@ -55169,7 +56815,7 @@ function uniffiEnsureInitialized() {
|
|
|
55169
56815
|
}
|
|
55170
56816
|
if (
|
|
55171
56817
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_contacts() !==
|
|
55172
|
-
|
|
56818
|
+
40145
|
|
55173
56819
|
) {
|
|
55174
56820
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55175
56821
|
'uniffi_breez_sdk_spark_checksum_method_storage_list_contacts'
|
|
@@ -55177,7 +56823,7 @@ function uniffiEnsureInitialized() {
|
|
|
55177
56823
|
}
|
|
55178
56824
|
if (
|
|
55179
56825
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_contact() !==
|
|
55180
|
-
|
|
56826
|
+
51536
|
|
55181
56827
|
) {
|
|
55182
56828
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55183
56829
|
'uniffi_breez_sdk_spark_checksum_method_storage_get_contact'
|
|
@@ -55185,7 +56831,7 @@ function uniffiEnsureInitialized() {
|
|
|
55185
56831
|
}
|
|
55186
56832
|
if (
|
|
55187
56833
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_contact() !==
|
|
55188
|
-
|
|
56834
|
+
48412
|
|
55189
56835
|
) {
|
|
55190
56836
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55191
56837
|
'uniffi_breez_sdk_spark_checksum_method_storage_insert_contact'
|
|
@@ -55193,7 +56839,7 @@ function uniffiEnsureInitialized() {
|
|
|
55193
56839
|
}
|
|
55194
56840
|
if (
|
|
55195
56841
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_contact() !==
|
|
55196
|
-
|
|
56842
|
+
4102
|
|
55197
56843
|
) {
|
|
55198
56844
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55199
56845
|
'uniffi_breez_sdk_spark_checksum_method_storage_delete_contact'
|
|
@@ -55201,7 +56847,7 @@ function uniffiEnsureInitialized() {
|
|
|
55201
56847
|
}
|
|
55202
56848
|
if (
|
|
55203
56849
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_cross_chain_swap() !==
|
|
55204
|
-
|
|
56850
|
+
17340
|
|
55205
56851
|
) {
|
|
55206
56852
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55207
56853
|
'uniffi_breez_sdk_spark_checksum_method_storage_set_cross_chain_swap'
|
|
@@ -55209,7 +56855,7 @@ function uniffiEnsureInitialized() {
|
|
|
55209
56855
|
}
|
|
55210
56856
|
if (
|
|
55211
56857
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_cross_chain_swap() !==
|
|
55212
|
-
|
|
56858
|
+
39794
|
|
55213
56859
|
) {
|
|
55214
56860
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55215
56861
|
'uniffi_breez_sdk_spark_checksum_method_storage_get_cross_chain_swap'
|
|
@@ -55217,7 +56863,7 @@ function uniffiEnsureInitialized() {
|
|
|
55217
56863
|
}
|
|
55218
56864
|
if (
|
|
55219
56865
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_active_cross_chain_swaps() !==
|
|
55220
|
-
|
|
56866
|
+
3449
|
|
55221
56867
|
) {
|
|
55222
56868
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55223
56869
|
'uniffi_breez_sdk_spark_checksum_method_storage_list_active_cross_chain_swaps'
|
|
@@ -55225,7 +56871,7 @@ function uniffiEnsureInitialized() {
|
|
|
55225
56871
|
}
|
|
55226
56872
|
if (
|
|
55227
56873
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change() !==
|
|
55228
|
-
|
|
56874
|
+
59529
|
|
55229
56875
|
) {
|
|
55230
56876
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55231
56877
|
'uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change'
|
|
@@ -55233,7 +56879,7 @@ function uniffiEnsureInitialized() {
|
|
|
55233
56879
|
}
|
|
55234
56880
|
if (
|
|
55235
56881
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync() !==
|
|
55236
|
-
|
|
56882
|
+
21965
|
|
55237
56883
|
) {
|
|
55238
56884
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55239
56885
|
'uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync'
|
|
@@ -55241,7 +56887,7 @@ function uniffiEnsureInitialized() {
|
|
|
55241
56887
|
}
|
|
55242
56888
|
if (
|
|
55243
56889
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes() !==
|
|
55244
|
-
|
|
56890
|
+
21366
|
|
55245
56891
|
) {
|
|
55246
56892
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55247
56893
|
'uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes'
|
|
@@ -55249,7 +56895,7 @@ function uniffiEnsureInitialized() {
|
|
|
55249
56895
|
}
|
|
55250
56896
|
if (
|
|
55251
56897
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision() !==
|
|
55252
|
-
|
|
56898
|
+
43970
|
|
55253
56899
|
) {
|
|
55254
56900
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55255
56901
|
'uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision'
|
|
@@ -55257,7 +56903,7 @@ function uniffiEnsureInitialized() {
|
|
|
55257
56903
|
}
|
|
55258
56904
|
if (
|
|
55259
56905
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records() !==
|
|
55260
|
-
|
|
56906
|
+
59416
|
|
55261
56907
|
) {
|
|
55262
56908
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55263
56909
|
'uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records'
|
|
@@ -55265,7 +56911,7 @@ function uniffiEnsureInitialized() {
|
|
|
55265
56911
|
}
|
|
55266
56912
|
if (
|
|
55267
56913
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record() !==
|
|
55268
|
-
|
|
56914
|
+
12675
|
|
55269
56915
|
) {
|
|
55270
56916
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55271
56917
|
'uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record'
|
|
@@ -55273,7 +56919,7 @@ function uniffiEnsureInitialized() {
|
|
|
55273
56919
|
}
|
|
55274
56920
|
if (
|
|
55275
56921
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records() !==
|
|
55276
|
-
|
|
56922
|
+
20470
|
|
55277
56923
|
) {
|
|
55278
56924
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55279
56925
|
'uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records'
|
|
@@ -55281,7 +56927,7 @@ function uniffiEnsureInitialized() {
|
|
|
55281
56927
|
}
|
|
55282
56928
|
if (
|
|
55283
56929
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change() !==
|
|
55284
|
-
|
|
56930
|
+
25691
|
|
55285
56931
|
) {
|
|
55286
56932
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55287
56933
|
'uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change'
|
|
@@ -55289,7 +56935,7 @@ function uniffiEnsureInitialized() {
|
|
|
55289
56935
|
}
|
|
55290
56936
|
if (
|
|
55291
56937
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming() !==
|
|
55292
|
-
|
|
56938
|
+
61274
|
|
55293
56939
|
) {
|
|
55294
56940
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
55295
56941
|
'uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming'
|
|
@@ -55468,6 +57114,8 @@ export default Object.freeze({
|
|
|
55468
57114
|
FfiConverterTypeCheckMessageResponse,
|
|
55469
57115
|
FfiConverterTypeCheckUnilateralExitRequest,
|
|
55470
57116
|
FfiConverterTypeCheckUnilateralExitResponse,
|
|
57117
|
+
FfiConverterTypeClaimDeferredReason,
|
|
57118
|
+
FfiConverterTypeClaimDepositOutcome,
|
|
55471
57119
|
FfiConverterTypeClaimDepositQuote,
|
|
55472
57120
|
FfiConverterTypeClaimDepositRequest,
|
|
55473
57121
|
FfiConverterTypeClaimDepositResponse,
|
|
@@ -55501,6 +57149,7 @@ export default Object.freeze({
|
|
|
55501
57149
|
FfiConverterTypeCreateIssuerTokenRequest,
|
|
55502
57150
|
FfiConverterTypeCreatePasskeyOutput,
|
|
55503
57151
|
FfiConverterTypeCredentials,
|
|
57152
|
+
FfiConverterTypeCrossChainAcceptedAsset,
|
|
55504
57153
|
FfiConverterTypeCrossChainAddressDetails,
|
|
55505
57154
|
FfiConverterTypeCrossChainAddressFamily,
|
|
55506
57155
|
FfiConverterTypeCrossChainConfig,
|
|
@@ -55509,6 +57158,7 @@ export default Object.freeze({
|
|
|
55509
57158
|
FfiConverterTypeCrossChainProviderContext,
|
|
55510
57159
|
FfiConverterTypeCrossChainReceiveInfo,
|
|
55511
57160
|
FfiConverterTypeCrossChainRouteFilter,
|
|
57161
|
+
FfiConverterTypeCrossChainRouteLimits,
|
|
55512
57162
|
FfiConverterTypeCrossChainRoutePair,
|
|
55513
57163
|
FfiConverterTypeCurrencyInfo,
|
|
55514
57164
|
FfiConverterTypeDeliveryMethod,
|
|
@@ -55536,6 +57186,7 @@ export default Object.freeze({
|
|
|
55536
57186
|
FfiConverterTypeExternalFrostSignatureShare,
|
|
55537
57187
|
FfiConverterTypeExternalIdentifier,
|
|
55538
57188
|
FfiConverterTypeExternalInputParser,
|
|
57189
|
+
FfiConverterTypeExternalLeafSigningKey,
|
|
55539
57190
|
FfiConverterTypeExternalNewLeafKey,
|
|
55540
57191
|
FfiConverterTypeExternalOperatorPackage,
|
|
55541
57192
|
FfiConverterTypeExternalOperatorRecipient,
|
|
@@ -55777,11 +57428,13 @@ export default Object.freeze({
|
|
|
55777
57428
|
FfiConverterTypeUpdateContactRequest,
|
|
55778
57429
|
FfiConverterTypeUpdateDepositPayload,
|
|
55779
57430
|
FfiConverterTypeUpdateUserSettingsRequest,
|
|
57431
|
+
FfiConverterTypeUpdateWatchedAddressPayload,
|
|
55780
57432
|
FfiConverterTypeUrlSuccessActionData,
|
|
55781
57433
|
FfiConverterTypeUserSettings,
|
|
55782
57434
|
FfiConverterTypeUtxo,
|
|
55783
57435
|
FfiConverterTypeWallet,
|
|
55784
57436
|
FfiConverterTypeWalletSetup,
|
|
57437
|
+
FfiConverterTypeWatchedDepositAddress,
|
|
55785
57438
|
FfiConverterTypeWebhook,
|
|
55786
57439
|
FfiConverterTypeWebhookEventType,
|
|
55787
57440
|
FfiConverterTypeu128,
|