@breeztech/breez-sdk-spark-react-native 0.1.9-dev2 → 0.2.1
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_common.cpp +675 -25
- package/cpp/generated/breez_sdk_common.hpp +27 -0
- package/cpp/generated/breez_sdk_spark.cpp +142 -1
- package/cpp/generated/breez_sdk_spark.hpp +21 -0
- package/lib/commonjs/generated/breez_sdk_common-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_common.js +185 -1
- package/lib/commonjs/generated/breez_sdk_common.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +320 -17
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_common-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_common.js +183 -0
- package/lib/module/generated/breez_sdk_common.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +320 -17
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common-ffi.d.ts +15 -0
- package/lib/typescript/commonjs/src/generated/breez_sdk_common-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +44 -0
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +7 -1
- 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 +229 -12
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_common-ffi.d.ts +15 -0
- package/lib/typescript/module/src/generated/breez_sdk_common-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts +44 -0
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +7 -1
- 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 +229 -12
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generated/breez_sdk_common-ffi.ts +38 -0
- package/src/generated/breez_sdk_common.ts +334 -0
- package/src/generated/breez_sdk_spark-ffi.ts +14 -1
- package/src/generated/breez_sdk_spark.ts +498 -22
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
4
4
|
// Trust me, you don't want to mess with it!
|
|
5
5
|
import nativeModule from "./breez_sdk_spark-ffi.js";
|
|
6
|
-
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterCallback, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTypeNameSymbol } from 'uniffi-bindgen-react-native';
|
|
6
|
+
import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterArrayBuffer, FfiConverterBool, FfiConverterCallback, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTypeNameSymbol } from 'uniffi-bindgen-react-native';
|
|
7
7
|
|
|
8
8
|
// Get converters from the other files, if any.
|
|
9
9
|
import uniffiBreezSdkCommonModule from "./breez_sdk_common.js";
|
|
10
10
|
const {
|
|
11
11
|
FfiConverterTypeBitcoinAddressDetails,
|
|
12
12
|
FfiConverterTypeBolt11InvoiceDetails,
|
|
13
|
+
FfiConverterTypeFiatCurrency,
|
|
14
|
+
FfiConverterTypeFiatService,
|
|
13
15
|
FfiConverterTypeInputType,
|
|
14
16
|
FfiConverterTypeLnurlPayRequestDetails,
|
|
17
|
+
FfiConverterTypeRate,
|
|
15
18
|
FfiConverterTypeRestClient,
|
|
16
19
|
FfiConverterTypeSuccessAction,
|
|
17
20
|
FfiConverterTypeSuccessActionProcessed
|
|
@@ -351,17 +354,17 @@ const FfiConverterTypeConnectRequest = (() => {
|
|
|
351
354
|
read(from) {
|
|
352
355
|
return {
|
|
353
356
|
config: FfiConverterTypeConfig.read(from),
|
|
354
|
-
|
|
357
|
+
seed: FfiConverterTypeSeed.read(from),
|
|
355
358
|
storageDir: FfiConverterString.read(from)
|
|
356
359
|
};
|
|
357
360
|
}
|
|
358
361
|
write(value, into) {
|
|
359
362
|
FfiConverterTypeConfig.write(value.config, into);
|
|
360
|
-
|
|
363
|
+
FfiConverterTypeSeed.write(value.seed, into);
|
|
361
364
|
FfiConverterString.write(value.storageDir, into);
|
|
362
365
|
}
|
|
363
366
|
allocationSize(value) {
|
|
364
|
-
return FfiConverterTypeConfig.allocationSize(value.config) +
|
|
367
|
+
return FfiConverterTypeConfig.allocationSize(value.config) + FfiConverterTypeSeed.allocationSize(value.seed) + FfiConverterString.allocationSize(value.storageDir);
|
|
365
368
|
}
|
|
366
369
|
}
|
|
367
370
|
return new FFIConverter();
|
|
@@ -678,6 +681,98 @@ const FfiConverterTypeLightningAddressInfo = (() => {
|
|
|
678
681
|
return new FFIConverter();
|
|
679
682
|
})();
|
|
680
683
|
|
|
684
|
+
/**
|
|
685
|
+
* Response from listing fiat currencies
|
|
686
|
+
*/
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Generated factory for {@link ListFiatCurrenciesResponse} record objects.
|
|
690
|
+
*/
|
|
691
|
+
export const ListFiatCurrenciesResponse = (() => {
|
|
692
|
+
const defaults = () => ({});
|
|
693
|
+
const create = (() => {
|
|
694
|
+
return uniffiCreateRecord(defaults);
|
|
695
|
+
})();
|
|
696
|
+
return Object.freeze({
|
|
697
|
+
/**
|
|
698
|
+
* Create a frozen instance of {@link ListFiatCurrenciesResponse}, with defaults specified
|
|
699
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
700
|
+
*/
|
|
701
|
+
create,
|
|
702
|
+
/**
|
|
703
|
+
* Create a frozen instance of {@link ListFiatCurrenciesResponse}, with defaults specified
|
|
704
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
705
|
+
*/
|
|
706
|
+
new: create,
|
|
707
|
+
/**
|
|
708
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
709
|
+
*/
|
|
710
|
+
defaults: () => Object.freeze(defaults())
|
|
711
|
+
});
|
|
712
|
+
})();
|
|
713
|
+
const FfiConverterTypeListFiatCurrenciesResponse = (() => {
|
|
714
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
715
|
+
read(from) {
|
|
716
|
+
return {
|
|
717
|
+
currencies: FfiConverterArrayTypeFiatCurrency.read(from)
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
write(value, into) {
|
|
721
|
+
FfiConverterArrayTypeFiatCurrency.write(value.currencies, into);
|
|
722
|
+
}
|
|
723
|
+
allocationSize(value) {
|
|
724
|
+
return FfiConverterArrayTypeFiatCurrency.allocationSize(value.currencies);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return new FFIConverter();
|
|
728
|
+
})();
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Response from listing fiat rates
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Generated factory for {@link ListFiatRatesResponse} record objects.
|
|
736
|
+
*/
|
|
737
|
+
export const ListFiatRatesResponse = (() => {
|
|
738
|
+
const defaults = () => ({});
|
|
739
|
+
const create = (() => {
|
|
740
|
+
return uniffiCreateRecord(defaults);
|
|
741
|
+
})();
|
|
742
|
+
return Object.freeze({
|
|
743
|
+
/**
|
|
744
|
+
* Create a frozen instance of {@link ListFiatRatesResponse}, with defaults specified
|
|
745
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
746
|
+
*/
|
|
747
|
+
create,
|
|
748
|
+
/**
|
|
749
|
+
* Create a frozen instance of {@link ListFiatRatesResponse}, with defaults specified
|
|
750
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
751
|
+
*/
|
|
752
|
+
new: create,
|
|
753
|
+
/**
|
|
754
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
755
|
+
*/
|
|
756
|
+
defaults: () => Object.freeze(defaults())
|
|
757
|
+
});
|
|
758
|
+
})();
|
|
759
|
+
const FfiConverterTypeListFiatRatesResponse = (() => {
|
|
760
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
761
|
+
read(from) {
|
|
762
|
+
return {
|
|
763
|
+
rates: FfiConverterArrayTypeRate.read(from)
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
write(value, into) {
|
|
767
|
+
FfiConverterArrayTypeRate.write(value.rates, into);
|
|
768
|
+
}
|
|
769
|
+
allocationSize(value) {
|
|
770
|
+
return FfiConverterArrayTypeRate.allocationSize(value.rates);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return new FFIConverter();
|
|
774
|
+
})();
|
|
775
|
+
|
|
681
776
|
/**
|
|
682
777
|
* Request to list payments with pagination
|
|
683
778
|
*/
|
|
@@ -1129,14 +1224,16 @@ const FfiConverterTypePaymentMetadata = (() => {
|
|
|
1129
1224
|
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1130
1225
|
read(from) {
|
|
1131
1226
|
return {
|
|
1132
|
-
lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from)
|
|
1227
|
+
lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
|
|
1228
|
+
lnurlDescription: FfiConverterOptionalString.read(from)
|
|
1133
1229
|
};
|
|
1134
1230
|
}
|
|
1135
1231
|
write(value, into) {
|
|
1136
1232
|
FfiConverterOptionalTypeLnurlPayInfo.write(value.lnurlPayInfo, into);
|
|
1233
|
+
FfiConverterOptionalString.write(value.lnurlDescription, into);
|
|
1137
1234
|
}
|
|
1138
1235
|
allocationSize(value) {
|
|
1139
|
-
return FfiConverterOptionalTypeLnurlPayInfo.allocationSize(value.lnurlPayInfo);
|
|
1236
|
+
return FfiConverterOptionalTypeLnurlPayInfo.allocationSize(value.lnurlPayInfo) + FfiConverterOptionalString.allocationSize(value.lnurlDescription);
|
|
1140
1237
|
}
|
|
1141
1238
|
}
|
|
1142
1239
|
return new FFIConverter();
|
|
@@ -1508,7 +1605,9 @@ const FfiConverterTypeRefundDepositResponse = (() => {
|
|
|
1508
1605
|
* Generated factory for {@link RegisterLightningAddressRequest} record objects.
|
|
1509
1606
|
*/
|
|
1510
1607
|
export const RegisterLightningAddressRequest = (() => {
|
|
1511
|
-
const defaults = () => ({
|
|
1608
|
+
const defaults = () => ({
|
|
1609
|
+
description: undefined
|
|
1610
|
+
});
|
|
1512
1611
|
const create = (() => {
|
|
1513
1612
|
return uniffiCreateRecord(defaults);
|
|
1514
1613
|
})();
|
|
@@ -1534,15 +1633,15 @@ const FfiConverterTypeRegisterLightningAddressRequest = (() => {
|
|
|
1534
1633
|
read(from) {
|
|
1535
1634
|
return {
|
|
1536
1635
|
username: FfiConverterString.read(from),
|
|
1537
|
-
description:
|
|
1636
|
+
description: FfiConverterOptionalString.read(from)
|
|
1538
1637
|
};
|
|
1539
1638
|
}
|
|
1540
1639
|
write(value, into) {
|
|
1541
1640
|
FfiConverterString.write(value.username, into);
|
|
1542
|
-
|
|
1641
|
+
FfiConverterOptionalString.write(value.description, into);
|
|
1543
1642
|
}
|
|
1544
1643
|
allocationSize(value) {
|
|
1545
|
-
return FfiConverterString.allocationSize(value.username) +
|
|
1644
|
+
return FfiConverterString.allocationSize(value.username) + FfiConverterOptionalString.allocationSize(value.description);
|
|
1546
1645
|
}
|
|
1547
1646
|
}
|
|
1548
1647
|
return new FFIConverter();
|
|
@@ -3677,6 +3776,138 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
3677
3776
|
return new FFIConverter();
|
|
3678
3777
|
})();
|
|
3679
3778
|
|
|
3779
|
+
// Enum: Seed
|
|
3780
|
+
export let Seed_Tags = /*#__PURE__*/function (Seed_Tags) {
|
|
3781
|
+
Seed_Tags["Mnemonic"] = "Mnemonic";
|
|
3782
|
+
Seed_Tags["Entropy"] = "Entropy";
|
|
3783
|
+
return Seed_Tags;
|
|
3784
|
+
}({});
|
|
3785
|
+
/**
|
|
3786
|
+
* Represents the seed for wallet generation, either as a mnemonic phrase with an optional
|
|
3787
|
+
* passphrase or as raw entropy bytes.
|
|
3788
|
+
*/
|
|
3789
|
+
export const Seed = (() => {
|
|
3790
|
+
/**
|
|
3791
|
+
* A BIP-39 mnemonic phrase with an optional passphrase.
|
|
3792
|
+
*/
|
|
3793
|
+
class Mnemonic_ extends UniffiEnum {
|
|
3794
|
+
/**
|
|
3795
|
+
* @private
|
|
3796
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3797
|
+
*/
|
|
3798
|
+
[uniffiTypeNameSymbol] = 'Seed';
|
|
3799
|
+
tag = Seed_Tags.Mnemonic;
|
|
3800
|
+
constructor(inner) {
|
|
3801
|
+
super('Seed', 'Mnemonic');
|
|
3802
|
+
this.inner = Object.freeze(inner);
|
|
3803
|
+
}
|
|
3804
|
+
static new(inner) {
|
|
3805
|
+
return new Mnemonic_(inner);
|
|
3806
|
+
}
|
|
3807
|
+
static instanceOf(obj) {
|
|
3808
|
+
return obj.tag === Seed_Tags.Mnemonic;
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
/**
|
|
3812
|
+
* Raw entropy bytes.
|
|
3813
|
+
*/
|
|
3814
|
+
class Entropy_ extends UniffiEnum {
|
|
3815
|
+
/**
|
|
3816
|
+
* @private
|
|
3817
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3818
|
+
*/
|
|
3819
|
+
[uniffiTypeNameSymbol] = 'Seed';
|
|
3820
|
+
tag = Seed_Tags.Entropy;
|
|
3821
|
+
constructor(v0) {
|
|
3822
|
+
super('Seed', 'Entropy');
|
|
3823
|
+
this.inner = Object.freeze([v0]);
|
|
3824
|
+
}
|
|
3825
|
+
static new(v0) {
|
|
3826
|
+
return new Entropy_(v0);
|
|
3827
|
+
}
|
|
3828
|
+
static instanceOf(obj) {
|
|
3829
|
+
return obj.tag === Seed_Tags.Entropy;
|
|
3830
|
+
}
|
|
3831
|
+
}
|
|
3832
|
+
function instanceOf(obj) {
|
|
3833
|
+
return obj[uniffiTypeNameSymbol] === 'Seed';
|
|
3834
|
+
}
|
|
3835
|
+
return Object.freeze({
|
|
3836
|
+
instanceOf,
|
|
3837
|
+
Mnemonic: Mnemonic_,
|
|
3838
|
+
Entropy: Entropy_
|
|
3839
|
+
});
|
|
3840
|
+
})();
|
|
3841
|
+
|
|
3842
|
+
/**
|
|
3843
|
+
* Represents the seed for wallet generation, either as a mnemonic phrase with an optional
|
|
3844
|
+
* passphrase or as raw entropy bytes.
|
|
3845
|
+
*/
|
|
3846
|
+
|
|
3847
|
+
// FfiConverter for enum Seed
|
|
3848
|
+
const FfiConverterTypeSeed = (() => {
|
|
3849
|
+
const ordinalConverter = FfiConverterInt32;
|
|
3850
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
3851
|
+
read(from) {
|
|
3852
|
+
switch (ordinalConverter.read(from)) {
|
|
3853
|
+
case 1:
|
|
3854
|
+
return new Seed.Mnemonic({
|
|
3855
|
+
mnemonic: FfiConverterString.read(from),
|
|
3856
|
+
passphrase: FfiConverterOptionalString.read(from)
|
|
3857
|
+
});
|
|
3858
|
+
case 2:
|
|
3859
|
+
return new Seed.Entropy(FfiConverterArrayBuffer.read(from));
|
|
3860
|
+
default:
|
|
3861
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3862
|
+
}
|
|
3863
|
+
}
|
|
3864
|
+
write(value, into) {
|
|
3865
|
+
switch (value.tag) {
|
|
3866
|
+
case Seed_Tags.Mnemonic:
|
|
3867
|
+
{
|
|
3868
|
+
ordinalConverter.write(1, into);
|
|
3869
|
+
const inner = value.inner;
|
|
3870
|
+
FfiConverterString.write(inner.mnemonic, into);
|
|
3871
|
+
FfiConverterOptionalString.write(inner.passphrase, into);
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
3874
|
+
case Seed_Tags.Entropy:
|
|
3875
|
+
{
|
|
3876
|
+
ordinalConverter.write(2, into);
|
|
3877
|
+
const inner = value.inner;
|
|
3878
|
+
FfiConverterArrayBuffer.write(inner[0], into);
|
|
3879
|
+
return;
|
|
3880
|
+
}
|
|
3881
|
+
default:
|
|
3882
|
+
// Throwing from here means that Seed_Tags hasn't matched an ordinal.
|
|
3883
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
allocationSize(value) {
|
|
3887
|
+
switch (value.tag) {
|
|
3888
|
+
case Seed_Tags.Mnemonic:
|
|
3889
|
+
{
|
|
3890
|
+
const inner = value.inner;
|
|
3891
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3892
|
+
size += FfiConverterString.allocationSize(inner.mnemonic);
|
|
3893
|
+
size += FfiConverterOptionalString.allocationSize(inner.passphrase);
|
|
3894
|
+
return size;
|
|
3895
|
+
}
|
|
3896
|
+
case Seed_Tags.Entropy:
|
|
3897
|
+
{
|
|
3898
|
+
const inner = value.inner;
|
|
3899
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3900
|
+
size += FfiConverterArrayBuffer.allocationSize(inner[0]);
|
|
3901
|
+
return size;
|
|
3902
|
+
}
|
|
3903
|
+
default:
|
|
3904
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
}
|
|
3908
|
+
return new FFIConverter();
|
|
3909
|
+
})();
|
|
3910
|
+
|
|
3680
3911
|
// Enum: SendPaymentMethod
|
|
3681
3912
|
export let SendPaymentMethod_Tags = /*#__PURE__*/function (SendPaymentMethod_Tags) {
|
|
3682
3913
|
SendPaymentMethod_Tags["BitcoinAddress"] = "BitcoinAddress";
|
|
@@ -3906,7 +4137,7 @@ const FfiConverterTypeSendPaymentOptions = (() => {
|
|
|
3906
4137
|
});
|
|
3907
4138
|
case 2:
|
|
3908
4139
|
return new SendPaymentOptions.Bolt11Invoice({
|
|
3909
|
-
|
|
4140
|
+
preferSpark: FfiConverterBool.read(from)
|
|
3910
4141
|
});
|
|
3911
4142
|
default:
|
|
3912
4143
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -3925,7 +4156,7 @@ const FfiConverterTypeSendPaymentOptions = (() => {
|
|
|
3925
4156
|
{
|
|
3926
4157
|
ordinalConverter.write(2, into);
|
|
3927
4158
|
const inner = value.inner;
|
|
3928
|
-
FfiConverterBool.write(inner.
|
|
4159
|
+
FfiConverterBool.write(inner.preferSpark, into);
|
|
3929
4160
|
return;
|
|
3930
4161
|
}
|
|
3931
4162
|
default:
|
|
@@ -3946,7 +4177,7 @@ const FfiConverterTypeSendPaymentOptions = (() => {
|
|
|
3946
4177
|
{
|
|
3947
4178
|
const inner = value.inner;
|
|
3948
4179
|
let size = ordinalConverter.allocationSize(2);
|
|
3949
|
-
size += FfiConverterBool.allocationSize(inner.
|
|
4180
|
+
size += FfiConverterBool.allocationSize(inner.preferSpark);
|
|
3950
4181
|
return size;
|
|
3951
4182
|
}
|
|
3952
4183
|
default:
|
|
@@ -4576,6 +4807,41 @@ export class BreezSdk extends UniffiAbstractObject {
|
|
|
4576
4807
|
}
|
|
4577
4808
|
}
|
|
4578
4809
|
|
|
4810
|
+
/**
|
|
4811
|
+
* List fiat currencies for which there is a known exchange rate,
|
|
4812
|
+
* sorted by the canonical name of the currency.
|
|
4813
|
+
*/
|
|
4814
|
+
async listFiatCurrencies(asyncOpts_) /*throws*/{
|
|
4815
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4816
|
+
try {
|
|
4817
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4818
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(uniffiTypeBreezSdkObjectFactory.clonePointer(this));
|
|
4819
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeListFiatCurrenciesResponse.lift.bind(FfiConverterTypeListFiatCurrenciesResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
4820
|
+
} catch (__error) {
|
|
4821
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
4822
|
+
__error.stack = __stack;
|
|
4823
|
+
}
|
|
4824
|
+
throw __error;
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
|
|
4828
|
+
/**
|
|
4829
|
+
* List the latest rates of fiat currencies, sorted by name.
|
|
4830
|
+
*/
|
|
4831
|
+
async listFiatRates(asyncOpts_) /*throws*/{
|
|
4832
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4833
|
+
try {
|
|
4834
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4835
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_rates(uniffiTypeBreezSdkObjectFactory.clonePointer(this));
|
|
4836
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeListFiatRatesResponse.lift.bind(FfiConverterTypeListFiatRatesResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
4837
|
+
} catch (__error) {
|
|
4838
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
4839
|
+
__error.stack = __stack;
|
|
4840
|
+
}
|
|
4841
|
+
throw __error;
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
|
|
4579
4845
|
/**
|
|
4580
4846
|
* Lists payments from the storage with pagination
|
|
4581
4847
|
*
|
|
@@ -4833,13 +5099,13 @@ export class SdkBuilder extends UniffiAbstractObject {
|
|
|
4833
5099
|
* Creates a new `SdkBuilder` with the provided configuration.
|
|
4834
5100
|
* Arguments:
|
|
4835
5101
|
* - `config`: The configuration to be used.
|
|
4836
|
-
* - `
|
|
5102
|
+
* - `seed`: The seed for wallet generation.
|
|
4837
5103
|
* - `storage`: The storage backend to be used.
|
|
4838
5104
|
*/
|
|
4839
|
-
constructor(config,
|
|
5105
|
+
constructor(config, seed, storage) {
|
|
4840
5106
|
super();
|
|
4841
5107
|
const pointer = uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
4842
|
-
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new(FfiConverterTypeConfig.lower(config),
|
|
5108
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new(FfiConverterTypeConfig.lower(config), FfiConverterTypeSeed.lower(seed), FfiConverterTypeStorage.lower(storage), callStatus);
|
|
4843
5109
|
}, /*liftString:*/FfiConverterString.lift);
|
|
4844
5110
|
this[pointerLiteralSymbol] = pointer;
|
|
4845
5111
|
this[destructorGuardSymbol] = uniffiTypeSdkBuilderObjectFactory.bless(pointer);
|
|
@@ -4881,6 +5147,25 @@ export class SdkBuilder extends UniffiAbstractObject {
|
|
|
4881
5147
|
}
|
|
4882
5148
|
}
|
|
4883
5149
|
|
|
5150
|
+
/**
|
|
5151
|
+
* Sets the fiat service to be used by the SDK.
|
|
5152
|
+
* Arguments:
|
|
5153
|
+
* - `fiat_service`: The fiat service to be used.
|
|
5154
|
+
*/
|
|
5155
|
+
async withFiatService(fiatService, asyncOpts_) {
|
|
5156
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5157
|
+
try {
|
|
5158
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
5159
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_fiat_service(uniffiTypeSdkBuilderObjectFactory.clonePointer(this), FfiConverterTypeFiatService.lower(fiatService));
|
|
5160
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_);
|
|
5161
|
+
} catch (__error) {
|
|
5162
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
5163
|
+
__error.stack = __stack;
|
|
5164
|
+
}
|
|
5165
|
+
throw __error;
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5168
|
+
|
|
4884
5169
|
/**
|
|
4885
5170
|
* Sets the key set type to be used by the SDK.
|
|
4886
5171
|
* Arguments:
|
|
@@ -5606,6 +5891,12 @@ const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);
|
|
|
5606
5891
|
// FfiConverter for /*u64*/bigint | undefined
|
|
5607
5892
|
const FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
|
|
5608
5893
|
|
|
5894
|
+
// FfiConverter for Array<FiatCurrency>
|
|
5895
|
+
const FfiConverterArrayTypeFiatCurrency = new FfiConverterArray(FfiConverterTypeFiatCurrency);
|
|
5896
|
+
|
|
5897
|
+
// FfiConverter for Array<Rate>
|
|
5898
|
+
const FfiConverterArrayTypeRate = new FfiConverterArray(FfiConverterTypeRate);
|
|
5899
|
+
|
|
5609
5900
|
// FfiConverter for Array<DepositInfo>
|
|
5610
5901
|
const FfiConverterArrayTypeDepositInfo = new FfiConverterArray(FfiConverterTypeDepositInfo);
|
|
5611
5902
|
|
|
@@ -5693,6 +5984,12 @@ function uniffiEnsureInitialized() {
|
|
|
5693
5984
|
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment() !== 11540) {
|
|
5694
5985
|
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment');
|
|
5695
5986
|
}
|
|
5987
|
+
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies() !== 63366) {
|
|
5988
|
+
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies');
|
|
5989
|
+
}
|
|
5990
|
+
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates() !== 5904) {
|
|
5991
|
+
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates');
|
|
5992
|
+
}
|
|
5696
5993
|
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments() !== 16156) {
|
|
5697
5994
|
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments');
|
|
5698
5995
|
}
|
|
@@ -5741,6 +6038,9 @@ function uniffiEnsureInitialized() {
|
|
|
5741
6038
|
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() !== 2848) {
|
|
5742
6039
|
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service');
|
|
5743
6040
|
}
|
|
6041
|
+
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service() !== 41113) {
|
|
6042
|
+
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service');
|
|
6043
|
+
}
|
|
5744
6044
|
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() !== 55523) {
|
|
5745
6045
|
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set');
|
|
5746
6046
|
}
|
|
@@ -5783,7 +6083,7 @@ function uniffiEnsureInitialized() {
|
|
|
5783
6083
|
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() !== 48478) {
|
|
5784
6084
|
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_update_deposit');
|
|
5785
6085
|
}
|
|
5786
|
-
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() !==
|
|
6086
|
+
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() !== 53882) {
|
|
5787
6087
|
throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new');
|
|
5788
6088
|
}
|
|
5789
6089
|
if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event() !== 10824) {
|
|
@@ -5817,6 +6117,8 @@ export default Object.freeze({
|
|
|
5817
6117
|
FfiConverterTypeGetPaymentResponse,
|
|
5818
6118
|
FfiConverterTypeKeySetType,
|
|
5819
6119
|
FfiConverterTypeLightningAddressInfo,
|
|
6120
|
+
FfiConverterTypeListFiatCurrenciesResponse,
|
|
6121
|
+
FfiConverterTypeListFiatRatesResponse,
|
|
5820
6122
|
FfiConverterTypeListPaymentsRequest,
|
|
5821
6123
|
FfiConverterTypeListPaymentsResponse,
|
|
5822
6124
|
FfiConverterTypeListUnclaimedDepositsRequest,
|
|
@@ -5845,6 +6147,7 @@ export default Object.freeze({
|
|
|
5845
6147
|
FfiConverterTypeRegisterLightningAddressRequest,
|
|
5846
6148
|
FfiConverterTypeSdkBuilder,
|
|
5847
6149
|
FfiConverterTypeSdkEvent,
|
|
6150
|
+
FfiConverterTypeSeed,
|
|
5848
6151
|
FfiConverterTypeSendOnchainFeeQuote,
|
|
5849
6152
|
FfiConverterTypeSendOnchainSpeedFeeQuote,
|
|
5850
6153
|
FfiConverterTypeSendPaymentMethod,
|