@breeztech/breez-sdk-spark-react-native 0.1.8-dev1
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/LICENSE +20 -0
- package/README.md +54 -0
- package/android/CMakeLists.txt +79 -0
- package/android/build.gradle +143 -0
- package/android/cpp-adapter.cpp +63 -0
- package/android/generated/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeBreezSdkSparkReactNativeSpec.java +41 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/BreezSdkSparkReactNativeSpec-generated.cpp +38 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/BreezSdkSparkReactNativeSpec.h +31 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +36 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpecJSI-generated.cpp +32 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpecJSI.h +80 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.h +24 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.cpp +16 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.h +17 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.cpp +19 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.h +18 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.cpp +17 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.h +23 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/States.cpp +16 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/States.h +19 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/breeztech/breezsdkspark/BreezSdkSparkReactNativeModule.kt +43 -0
- package/android/src/main/java/com/breeztech/breezsdkspark/BreezSdkSparkReactNativePackage.kt +34 -0
- package/breeztech-breez-sdk-spark-react-native.podspec +44 -0
- package/cpp/breeztech-breez-sdk-spark-react-native.cpp +20 -0
- package/cpp/breeztech-breez-sdk-spark-react-native.h +15 -0
- package/cpp/generated/breez_sdk_common.cpp +3834 -0
- package/cpp/generated/breez_sdk_common.hpp +251 -0
- package/cpp/generated/breez_sdk_spark.cpp +8722 -0
- package/cpp/generated/breez_sdk_spark.hpp +589 -0
- package/cpp/generated/breez_sdk_spark_bindings.cpp +1750 -0
- package/cpp/generated/breez_sdk_spark_bindings.hpp +65 -0
- package/ios/BreezSdkSparkReactNative.h +16 -0
- package/ios/BreezSdkSparkReactNative.mm +66 -0
- package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpec-generated.mm +46 -0
- package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpec.h +63 -0
- package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpecJSI-generated.cpp +32 -0
- package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpecJSI.h +80 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.cpp +16 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.h +17 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.cpp +19 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.h +18 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/RCTComponentViewHelpers.h +18 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.h +23 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/States.cpp +16 -0
- package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/States.h +19 -0
- package/lib/commonjs/NativeBreezSdkSparkReactNative.js +10 -0
- package/lib/commonjs/NativeBreezSdkSparkReactNative.js.map +1 -0
- package/lib/commonjs/generated/breez_sdk_common-ffi.js +44 -0
- package/lib/commonjs/generated/breez_sdk_common-ffi.js.map +1 -0
- package/lib/commonjs/generated/breez_sdk_common.js +3948 -0
- package/lib/commonjs/generated/breez_sdk_common.js.map +1 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js +44 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -0
- package/lib/commonjs/generated/breez_sdk_spark.js +5775 -0
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -0
- package/lib/commonjs/generated/breez_sdk_spark_bindings-ffi.js +44 -0
- package/lib/commonjs/generated/breez_sdk_spark_bindings-ffi.js.map +1 -0
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js +51 -0
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -0
- package/lib/commonjs/index.js +81 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/NativeBreezSdkSparkReactNative.js +7 -0
- package/lib/module/NativeBreezSdkSparkReactNative.js.map +1 -0
- package/lib/module/generated/breez_sdk_common-ffi.js +43 -0
- package/lib/module/generated/breez_sdk_common-ffi.js.map +1 -0
- package/lib/module/generated/breez_sdk_common.js +3942 -0
- package/lib/module/generated/breez_sdk_common.js.map +1 -0
- package/lib/module/generated/breez_sdk_spark-ffi.js +43 -0
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -0
- package/lib/module/generated/breez_sdk_spark.js +5759 -0
- package/lib/module/generated/breez_sdk_spark.js.map +1 -0
- package/lib/module/generated/breez_sdk_spark_bindings-ffi.js +43 -0
- package/lib/module/generated/breez_sdk_spark_bindings-ffi.js.map +1 -0
- package/lib/module/generated/breez_sdk_spark_bindings.js +46 -0
- package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -0
- package/lib/module/index.js +44 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeBreezSdkSparkReactNative.d.ts +8 -0
- package/lib/typescript/commonjs/src/NativeBreezSdkSparkReactNative.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/NativeBreezSdkSparkReactNative.d.ts +8 -0
- package/lib/typescript/module/src/NativeBreezSdkSparkReactNative.d.ts.map +1 -0
- package/package.json +189 -0
- package/react-native.config.js +12 -0
- package/scripts/postinstall.sh +14 -0
- package/src/NativeBreezSdkSparkReactNative.ts +10 -0
- package/src/generated/breez_sdk_common-ffi.ts +394 -0
- package/src/generated/breez_sdk_common.ts +5502 -0
- package/src/generated/breez_sdk_spark-ffi.ts +751 -0
- package/src/generated/breez_sdk_spark.ts +9179 -0
- package/src/generated/breez_sdk_spark_bindings-ffi.ts +185 -0
- package/src/generated/breez_sdk_spark_bindings.ts +103 -0
- package/src/index.tsx +42 -0
|
@@ -0,0 +1,3948 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.UrlSuccessActionData = exports.TokensPaymentDetails = exports.Symbol = exports.SuccessAction_Tags = exports.SuccessActionProcessed_Tags = exports.SuccessActionProcessed = exports.SuccessAction = exports.SparkInvoiceFields = exports.SparkAddressPaymentType_Tags = exports.SparkAddressPaymentType = exports.SparkAddressDetails = exports.SparkAddress = exports.SilentPaymentAddressDetails = exports.ServiceConnectivityError_Tags = exports.ServiceConnectivityError = exports.SatsPaymentDetails = exports.RestResponse = exports.RestClientImpl = exports.Rate = exports.PaymentRequestSource = exports.MessageSuccessActionData = exports.LocalizedName = exports.LocaleOverrides = exports.LnurlWithdrawRequestDetails = exports.LnurlPayRequestDetails = exports.LnurlErrorDetails = exports.LnurlCallbackStatus_Tags = exports.LnurlCallbackStatus = exports.LnurlAuthRequestDetails = exports.LightningAddressDetails = exports.InputType_Tags = exports.InputType = exports.FiatCurrency = exports.CurrencyInfo = exports.Bolt12OfferDetails = exports.Bolt12OfferBlindedPath = exports.Bolt12Offer = exports.Bolt12InvoiceRequestDetails = exports.Bolt12InvoiceDetails = exports.Bolt12Invoice = exports.Bolt11RouteHintHop = exports.Bolt11RouteHint = exports.Bolt11InvoiceDetails = exports.Bolt11Invoice = exports.BitcoinNetwork = exports.BitcoinAddressDetails = exports.Bip21Extra = exports.Bip21Details = exports.Amount_Tags = exports.Amount = exports.AesSuccessActionDataResult_Tags = exports.AesSuccessActionDataResult = exports.AesSuccessActionDataDecrypted = exports.AesSuccessActionData = void 0;
|
|
7
|
+
var _breez_sdk_commonFfi = _interopRequireDefault(require("./breez_sdk_common-ffi.js"));
|
|
8
|
+
var _uniffiBindgenReactNative = require("uniffi-bindgen-react-native");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
11
|
+
// Trust me, you don't want to mess with it!
|
|
12
|
+
|
|
13
|
+
// Get converters from the other files, if any.
|
|
14
|
+
const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller();
|
|
15
|
+
const uniffiIsDebug =
|
|
16
|
+
// @ts-ignore -- The process global might not be defined
|
|
17
|
+
typeof process !== 'object' ||
|
|
18
|
+
// @ts-ignore -- The process global might not be defined
|
|
19
|
+
process?.env?.NODE_ENV !== 'production' || false;
|
|
20
|
+
// Public interface members begin here.
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Payload of the AES success action, as received from the LNURL endpoint
|
|
24
|
+
*
|
|
25
|
+
* See [`AesSuccessActionDataDecrypted`] for a similar wrapper containing the decrypted payload
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Generated factory for {@link AesSuccessActionData} record objects.
|
|
30
|
+
*/
|
|
31
|
+
const AesSuccessActionData = exports.AesSuccessActionData = (() => {
|
|
32
|
+
const defaults = () => ({});
|
|
33
|
+
const create = (() => {
|
|
34
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
35
|
+
})();
|
|
36
|
+
return Object.freeze({
|
|
37
|
+
/**
|
|
38
|
+
* Create a frozen instance of {@link AesSuccessActionData}, with defaults specified
|
|
39
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
40
|
+
*/
|
|
41
|
+
create,
|
|
42
|
+
/**
|
|
43
|
+
* Create a frozen instance of {@link AesSuccessActionData}, with defaults specified
|
|
44
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
45
|
+
*/
|
|
46
|
+
new: create,
|
|
47
|
+
/**
|
|
48
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
49
|
+
*/
|
|
50
|
+
defaults: () => Object.freeze(defaults())
|
|
51
|
+
});
|
|
52
|
+
})();
|
|
53
|
+
const FfiConverterTypeAesSuccessActionData = (() => {
|
|
54
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
55
|
+
read(from) {
|
|
56
|
+
return {
|
|
57
|
+
description: FfiConverterString.read(from),
|
|
58
|
+
ciphertext: FfiConverterString.read(from),
|
|
59
|
+
iv: FfiConverterString.read(from)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
write(value, into) {
|
|
63
|
+
FfiConverterString.write(value.description, into);
|
|
64
|
+
FfiConverterString.write(value.ciphertext, into);
|
|
65
|
+
FfiConverterString.write(value.iv, into);
|
|
66
|
+
}
|
|
67
|
+
allocationSize(value) {
|
|
68
|
+
return FfiConverterString.allocationSize(value.description) + FfiConverterString.allocationSize(value.ciphertext) + FfiConverterString.allocationSize(value.iv);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return new FFIConverter();
|
|
72
|
+
})();
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Wrapper for the decrypted [`AesSuccessActionData`] payload
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Generated factory for {@link AesSuccessActionDataDecrypted} record objects.
|
|
80
|
+
*/
|
|
81
|
+
const AesSuccessActionDataDecrypted = exports.AesSuccessActionDataDecrypted = (() => {
|
|
82
|
+
const defaults = () => ({});
|
|
83
|
+
const create = (() => {
|
|
84
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
85
|
+
})();
|
|
86
|
+
return Object.freeze({
|
|
87
|
+
/**
|
|
88
|
+
* Create a frozen instance of {@link AesSuccessActionDataDecrypted}, with defaults specified
|
|
89
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
90
|
+
*/
|
|
91
|
+
create,
|
|
92
|
+
/**
|
|
93
|
+
* Create a frozen instance of {@link AesSuccessActionDataDecrypted}, with defaults specified
|
|
94
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
95
|
+
*/
|
|
96
|
+
new: create,
|
|
97
|
+
/**
|
|
98
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
99
|
+
*/
|
|
100
|
+
defaults: () => Object.freeze(defaults())
|
|
101
|
+
});
|
|
102
|
+
})();
|
|
103
|
+
const FfiConverterTypeAesSuccessActionDataDecrypted = (() => {
|
|
104
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
105
|
+
read(from) {
|
|
106
|
+
return {
|
|
107
|
+
description: FfiConverterString.read(from),
|
|
108
|
+
plaintext: FfiConverterString.read(from)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
write(value, into) {
|
|
112
|
+
FfiConverterString.write(value.description, into);
|
|
113
|
+
FfiConverterString.write(value.plaintext, into);
|
|
114
|
+
}
|
|
115
|
+
allocationSize(value) {
|
|
116
|
+
return FfiConverterString.allocationSize(value.description) + FfiConverterString.allocationSize(value.plaintext);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return new FFIConverter();
|
|
120
|
+
})();
|
|
121
|
+
/**
|
|
122
|
+
* Generated factory for {@link Bip21Details} record objects.
|
|
123
|
+
*/
|
|
124
|
+
const Bip21Details = exports.Bip21Details = (() => {
|
|
125
|
+
const defaults = () => ({});
|
|
126
|
+
const create = (() => {
|
|
127
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
128
|
+
})();
|
|
129
|
+
return Object.freeze({
|
|
130
|
+
/**
|
|
131
|
+
* Create a frozen instance of {@link Bip21Details}, with defaults specified
|
|
132
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
133
|
+
*/
|
|
134
|
+
create,
|
|
135
|
+
/**
|
|
136
|
+
* Create a frozen instance of {@link Bip21Details}, with defaults specified
|
|
137
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
138
|
+
*/
|
|
139
|
+
new: create,
|
|
140
|
+
/**
|
|
141
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
142
|
+
*/
|
|
143
|
+
defaults: () => Object.freeze(defaults())
|
|
144
|
+
});
|
|
145
|
+
})();
|
|
146
|
+
const FfiConverterTypeBip21Details = (() => {
|
|
147
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
148
|
+
read(from) {
|
|
149
|
+
return {
|
|
150
|
+
amountSat: FfiConverterOptionalUInt64.read(from),
|
|
151
|
+
assetId: FfiConverterOptionalString.read(from),
|
|
152
|
+
uri: FfiConverterString.read(from),
|
|
153
|
+
extras: FfiConverterArrayTypeBip21Extra.read(from),
|
|
154
|
+
label: FfiConverterOptionalString.read(from),
|
|
155
|
+
message: FfiConverterOptionalString.read(from),
|
|
156
|
+
paymentMethods: FfiConverterArrayTypeInputType.read(from)
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
write(value, into) {
|
|
160
|
+
FfiConverterOptionalUInt64.write(value.amountSat, into);
|
|
161
|
+
FfiConverterOptionalString.write(value.assetId, into);
|
|
162
|
+
FfiConverterString.write(value.uri, into);
|
|
163
|
+
FfiConverterArrayTypeBip21Extra.write(value.extras, into);
|
|
164
|
+
FfiConverterOptionalString.write(value.label, into);
|
|
165
|
+
FfiConverterOptionalString.write(value.message, into);
|
|
166
|
+
FfiConverterArrayTypeInputType.write(value.paymentMethods, into);
|
|
167
|
+
}
|
|
168
|
+
allocationSize(value) {
|
|
169
|
+
return FfiConverterOptionalUInt64.allocationSize(value.amountSat) + FfiConverterOptionalString.allocationSize(value.assetId) + FfiConverterString.allocationSize(value.uri) + FfiConverterArrayTypeBip21Extra.allocationSize(value.extras) + FfiConverterOptionalString.allocationSize(value.label) + FfiConverterOptionalString.allocationSize(value.message) + FfiConverterArrayTypeInputType.allocationSize(value.paymentMethods);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return new FFIConverter();
|
|
173
|
+
})();
|
|
174
|
+
/**
|
|
175
|
+
* Generated factory for {@link Bip21Extra} record objects.
|
|
176
|
+
*/
|
|
177
|
+
const Bip21Extra = exports.Bip21Extra = (() => {
|
|
178
|
+
const defaults = () => ({});
|
|
179
|
+
const create = (() => {
|
|
180
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
181
|
+
})();
|
|
182
|
+
return Object.freeze({
|
|
183
|
+
/**
|
|
184
|
+
* Create a frozen instance of {@link Bip21Extra}, with defaults specified
|
|
185
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
186
|
+
*/
|
|
187
|
+
create,
|
|
188
|
+
/**
|
|
189
|
+
* Create a frozen instance of {@link Bip21Extra}, with defaults specified
|
|
190
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
191
|
+
*/
|
|
192
|
+
new: create,
|
|
193
|
+
/**
|
|
194
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
195
|
+
*/
|
|
196
|
+
defaults: () => Object.freeze(defaults())
|
|
197
|
+
});
|
|
198
|
+
})();
|
|
199
|
+
const FfiConverterTypeBip21Extra = (() => {
|
|
200
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
201
|
+
read(from) {
|
|
202
|
+
return {
|
|
203
|
+
key: FfiConverterString.read(from),
|
|
204
|
+
value: FfiConverterString.read(from)
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
write(value, into) {
|
|
208
|
+
FfiConverterString.write(value.key, into);
|
|
209
|
+
FfiConverterString.write(value.value, into);
|
|
210
|
+
}
|
|
211
|
+
allocationSize(value) {
|
|
212
|
+
return FfiConverterString.allocationSize(value.key) + FfiConverterString.allocationSize(value.value);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return new FFIConverter();
|
|
216
|
+
})();
|
|
217
|
+
/**
|
|
218
|
+
* Generated factory for {@link BitcoinAddressDetails} record objects.
|
|
219
|
+
*/
|
|
220
|
+
const BitcoinAddressDetails = exports.BitcoinAddressDetails = (() => {
|
|
221
|
+
const defaults = () => ({});
|
|
222
|
+
const create = (() => {
|
|
223
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
224
|
+
})();
|
|
225
|
+
return Object.freeze({
|
|
226
|
+
/**
|
|
227
|
+
* Create a frozen instance of {@link BitcoinAddressDetails}, with defaults specified
|
|
228
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
229
|
+
*/
|
|
230
|
+
create,
|
|
231
|
+
/**
|
|
232
|
+
* Create a frozen instance of {@link BitcoinAddressDetails}, with defaults specified
|
|
233
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
234
|
+
*/
|
|
235
|
+
new: create,
|
|
236
|
+
/**
|
|
237
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
238
|
+
*/
|
|
239
|
+
defaults: () => Object.freeze(defaults())
|
|
240
|
+
});
|
|
241
|
+
})();
|
|
242
|
+
const FfiConverterTypeBitcoinAddressDetails = (() => {
|
|
243
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
244
|
+
read(from) {
|
|
245
|
+
return {
|
|
246
|
+
address: FfiConverterString.read(from),
|
|
247
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
248
|
+
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
write(value, into) {
|
|
252
|
+
FfiConverterString.write(value.address, into);
|
|
253
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
254
|
+
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
255
|
+
}
|
|
256
|
+
allocationSize(value) {
|
|
257
|
+
return FfiConverterString.allocationSize(value.address) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return new FFIConverter();
|
|
261
|
+
})();
|
|
262
|
+
/**
|
|
263
|
+
* Generated factory for {@link Bolt11Invoice} record objects.
|
|
264
|
+
*/
|
|
265
|
+
const Bolt11Invoice = exports.Bolt11Invoice = (() => {
|
|
266
|
+
const defaults = () => ({});
|
|
267
|
+
const create = (() => {
|
|
268
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
269
|
+
})();
|
|
270
|
+
return Object.freeze({
|
|
271
|
+
/**
|
|
272
|
+
* Create a frozen instance of {@link Bolt11Invoice}, with defaults specified
|
|
273
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
274
|
+
*/
|
|
275
|
+
create,
|
|
276
|
+
/**
|
|
277
|
+
* Create a frozen instance of {@link Bolt11Invoice}, with defaults specified
|
|
278
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
279
|
+
*/
|
|
280
|
+
new: create,
|
|
281
|
+
/**
|
|
282
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
283
|
+
*/
|
|
284
|
+
defaults: () => Object.freeze(defaults())
|
|
285
|
+
});
|
|
286
|
+
})();
|
|
287
|
+
const FfiConverterTypeBolt11Invoice = (() => {
|
|
288
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
289
|
+
read(from) {
|
|
290
|
+
return {
|
|
291
|
+
bolt11: FfiConverterString.read(from),
|
|
292
|
+
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
write(value, into) {
|
|
296
|
+
FfiConverterString.write(value.bolt11, into);
|
|
297
|
+
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
298
|
+
}
|
|
299
|
+
allocationSize(value) {
|
|
300
|
+
return FfiConverterString.allocationSize(value.bolt11) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return new FFIConverter();
|
|
304
|
+
})();
|
|
305
|
+
/**
|
|
306
|
+
* Generated factory for {@link Bolt11InvoiceDetails} record objects.
|
|
307
|
+
*/
|
|
308
|
+
const Bolt11InvoiceDetails = exports.Bolt11InvoiceDetails = (() => {
|
|
309
|
+
const defaults = () => ({});
|
|
310
|
+
const create = (() => {
|
|
311
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
312
|
+
})();
|
|
313
|
+
return Object.freeze({
|
|
314
|
+
/**
|
|
315
|
+
* Create a frozen instance of {@link Bolt11InvoiceDetails}, with defaults specified
|
|
316
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
317
|
+
*/
|
|
318
|
+
create,
|
|
319
|
+
/**
|
|
320
|
+
* Create a frozen instance of {@link Bolt11InvoiceDetails}, with defaults specified
|
|
321
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
322
|
+
*/
|
|
323
|
+
new: create,
|
|
324
|
+
/**
|
|
325
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
326
|
+
*/
|
|
327
|
+
defaults: () => Object.freeze(defaults())
|
|
328
|
+
});
|
|
329
|
+
})();
|
|
330
|
+
const FfiConverterTypeBolt11InvoiceDetails = (() => {
|
|
331
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
332
|
+
read(from) {
|
|
333
|
+
return {
|
|
334
|
+
amountMsat: FfiConverterOptionalUInt64.read(from),
|
|
335
|
+
description: FfiConverterOptionalString.read(from),
|
|
336
|
+
descriptionHash: FfiConverterOptionalString.read(from),
|
|
337
|
+
expiry: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
338
|
+
invoice: FfiConverterTypeBolt11Invoice.read(from),
|
|
339
|
+
minFinalCltvExpiryDelta: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
340
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
341
|
+
payeePubkey: FfiConverterString.read(from),
|
|
342
|
+
paymentHash: FfiConverterString.read(from),
|
|
343
|
+
paymentSecret: FfiConverterString.read(from),
|
|
344
|
+
routingHints: FfiConverterArrayTypeBolt11RouteHint.read(from),
|
|
345
|
+
timestamp: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
write(value, into) {
|
|
349
|
+
FfiConverterOptionalUInt64.write(value.amountMsat, into);
|
|
350
|
+
FfiConverterOptionalString.write(value.description, into);
|
|
351
|
+
FfiConverterOptionalString.write(value.descriptionHash, into);
|
|
352
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.expiry, into);
|
|
353
|
+
FfiConverterTypeBolt11Invoice.write(value.invoice, into);
|
|
354
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.minFinalCltvExpiryDelta, into);
|
|
355
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
356
|
+
FfiConverterString.write(value.payeePubkey, into);
|
|
357
|
+
FfiConverterString.write(value.paymentHash, into);
|
|
358
|
+
FfiConverterString.write(value.paymentSecret, into);
|
|
359
|
+
FfiConverterArrayTypeBolt11RouteHint.write(value.routingHints, into);
|
|
360
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.timestamp, into);
|
|
361
|
+
}
|
|
362
|
+
allocationSize(value) {
|
|
363
|
+
return FfiConverterOptionalUInt64.allocationSize(value.amountMsat) + FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.descriptionHash) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.expiry) + FfiConverterTypeBolt11Invoice.allocationSize(value.invoice) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minFinalCltvExpiryDelta) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.payeePubkey) + FfiConverterString.allocationSize(value.paymentHash) + FfiConverterString.allocationSize(value.paymentSecret) + FfiConverterArrayTypeBolt11RouteHint.allocationSize(value.routingHints) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.timestamp);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return new FFIConverter();
|
|
367
|
+
})();
|
|
368
|
+
/**
|
|
369
|
+
* Generated factory for {@link Bolt11RouteHint} record objects.
|
|
370
|
+
*/
|
|
371
|
+
const Bolt11RouteHint = exports.Bolt11RouteHint = (() => {
|
|
372
|
+
const defaults = () => ({});
|
|
373
|
+
const create = (() => {
|
|
374
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
375
|
+
})();
|
|
376
|
+
return Object.freeze({
|
|
377
|
+
/**
|
|
378
|
+
* Create a frozen instance of {@link Bolt11RouteHint}, with defaults specified
|
|
379
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
380
|
+
*/
|
|
381
|
+
create,
|
|
382
|
+
/**
|
|
383
|
+
* Create a frozen instance of {@link Bolt11RouteHint}, with defaults specified
|
|
384
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
385
|
+
*/
|
|
386
|
+
new: create,
|
|
387
|
+
/**
|
|
388
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
389
|
+
*/
|
|
390
|
+
defaults: () => Object.freeze(defaults())
|
|
391
|
+
});
|
|
392
|
+
})();
|
|
393
|
+
const FfiConverterTypeBolt11RouteHint = (() => {
|
|
394
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
395
|
+
read(from) {
|
|
396
|
+
return {
|
|
397
|
+
hops: FfiConverterArrayTypeBolt11RouteHintHop.read(from)
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
write(value, into) {
|
|
401
|
+
FfiConverterArrayTypeBolt11RouteHintHop.write(value.hops, into);
|
|
402
|
+
}
|
|
403
|
+
allocationSize(value) {
|
|
404
|
+
return FfiConverterArrayTypeBolt11RouteHintHop.allocationSize(value.hops);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return new FFIConverter();
|
|
408
|
+
})();
|
|
409
|
+
/**
|
|
410
|
+
* Generated factory for {@link Bolt11RouteHintHop} record objects.
|
|
411
|
+
*/
|
|
412
|
+
const Bolt11RouteHintHop = exports.Bolt11RouteHintHop = (() => {
|
|
413
|
+
const defaults = () => ({});
|
|
414
|
+
const create = (() => {
|
|
415
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
416
|
+
})();
|
|
417
|
+
return Object.freeze({
|
|
418
|
+
/**
|
|
419
|
+
* Create a frozen instance of {@link Bolt11RouteHintHop}, with defaults specified
|
|
420
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
421
|
+
*/
|
|
422
|
+
create,
|
|
423
|
+
/**
|
|
424
|
+
* Create a frozen instance of {@link Bolt11RouteHintHop}, with defaults specified
|
|
425
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
426
|
+
*/
|
|
427
|
+
new: create,
|
|
428
|
+
/**
|
|
429
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
430
|
+
*/
|
|
431
|
+
defaults: () => Object.freeze(defaults())
|
|
432
|
+
});
|
|
433
|
+
})();
|
|
434
|
+
const FfiConverterTypeBolt11RouteHintHop = (() => {
|
|
435
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
436
|
+
read(from) {
|
|
437
|
+
return {
|
|
438
|
+
srcNodeId: FfiConverterString.read(from),
|
|
439
|
+
shortChannelId: FfiConverterString.read(from),
|
|
440
|
+
feesBaseMsat: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
441
|
+
feesProportionalMillionths: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
442
|
+
cltvExpiryDelta: _uniffiBindgenReactNative.FfiConverterUInt16.read(from),
|
|
443
|
+
htlcMinimumMsat: FfiConverterOptionalUInt64.read(from),
|
|
444
|
+
htlcMaximumMsat: FfiConverterOptionalUInt64.read(from)
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
write(value, into) {
|
|
448
|
+
FfiConverterString.write(value.srcNodeId, into);
|
|
449
|
+
FfiConverterString.write(value.shortChannelId, into);
|
|
450
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.feesBaseMsat, into);
|
|
451
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.feesProportionalMillionths, into);
|
|
452
|
+
_uniffiBindgenReactNative.FfiConverterUInt16.write(value.cltvExpiryDelta, into);
|
|
453
|
+
FfiConverterOptionalUInt64.write(value.htlcMinimumMsat, into);
|
|
454
|
+
FfiConverterOptionalUInt64.write(value.htlcMaximumMsat, into);
|
|
455
|
+
}
|
|
456
|
+
allocationSize(value) {
|
|
457
|
+
return FfiConverterString.allocationSize(value.srcNodeId) + FfiConverterString.allocationSize(value.shortChannelId) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.feesBaseMsat) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.feesProportionalMillionths) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.cltvExpiryDelta) + FfiConverterOptionalUInt64.allocationSize(value.htlcMinimumMsat) + FfiConverterOptionalUInt64.allocationSize(value.htlcMaximumMsat);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return new FFIConverter();
|
|
461
|
+
})();
|
|
462
|
+
/**
|
|
463
|
+
* Generated factory for {@link Bolt12Invoice} record objects.
|
|
464
|
+
*/
|
|
465
|
+
const Bolt12Invoice = exports.Bolt12Invoice = (() => {
|
|
466
|
+
const defaults = () => ({});
|
|
467
|
+
const create = (() => {
|
|
468
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
469
|
+
})();
|
|
470
|
+
return Object.freeze({
|
|
471
|
+
/**
|
|
472
|
+
* Create a frozen instance of {@link Bolt12Invoice}, with defaults specified
|
|
473
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
474
|
+
*/
|
|
475
|
+
create,
|
|
476
|
+
/**
|
|
477
|
+
* Create a frozen instance of {@link Bolt12Invoice}, with defaults specified
|
|
478
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
479
|
+
*/
|
|
480
|
+
new: create,
|
|
481
|
+
/**
|
|
482
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
483
|
+
*/
|
|
484
|
+
defaults: () => Object.freeze(defaults())
|
|
485
|
+
});
|
|
486
|
+
})();
|
|
487
|
+
const FfiConverterTypeBolt12Invoice = (() => {
|
|
488
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
489
|
+
read(from) {
|
|
490
|
+
return {
|
|
491
|
+
invoice: FfiConverterString.read(from),
|
|
492
|
+
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
write(value, into) {
|
|
496
|
+
FfiConverterString.write(value.invoice, into);
|
|
497
|
+
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
498
|
+
}
|
|
499
|
+
allocationSize(value) {
|
|
500
|
+
return FfiConverterString.allocationSize(value.invoice) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
return new FFIConverter();
|
|
504
|
+
})();
|
|
505
|
+
/**
|
|
506
|
+
* Generated factory for {@link Bolt12InvoiceDetails} record objects.
|
|
507
|
+
*/
|
|
508
|
+
const Bolt12InvoiceDetails = exports.Bolt12InvoiceDetails = (() => {
|
|
509
|
+
const defaults = () => ({});
|
|
510
|
+
const create = (() => {
|
|
511
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
512
|
+
})();
|
|
513
|
+
return Object.freeze({
|
|
514
|
+
/**
|
|
515
|
+
* Create a frozen instance of {@link Bolt12InvoiceDetails}, with defaults specified
|
|
516
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
517
|
+
*/
|
|
518
|
+
create,
|
|
519
|
+
/**
|
|
520
|
+
* Create a frozen instance of {@link Bolt12InvoiceDetails}, with defaults specified
|
|
521
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
522
|
+
*/
|
|
523
|
+
new: create,
|
|
524
|
+
/**
|
|
525
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
526
|
+
*/
|
|
527
|
+
defaults: () => Object.freeze(defaults())
|
|
528
|
+
});
|
|
529
|
+
})();
|
|
530
|
+
const FfiConverterTypeBolt12InvoiceDetails = (() => {
|
|
531
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
532
|
+
read(from) {
|
|
533
|
+
return {
|
|
534
|
+
amountMsat: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
535
|
+
invoice: FfiConverterTypeBolt12Invoice.read(from)
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
write(value, into) {
|
|
539
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountMsat, into);
|
|
540
|
+
FfiConverterTypeBolt12Invoice.write(value.invoice, into);
|
|
541
|
+
}
|
|
542
|
+
allocationSize(value) {
|
|
543
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountMsat) + FfiConverterTypeBolt12Invoice.allocationSize(value.invoice);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return new FFIConverter();
|
|
547
|
+
})();
|
|
548
|
+
/**
|
|
549
|
+
* Generated factory for {@link Bolt12InvoiceRequestDetails} record objects.
|
|
550
|
+
*/
|
|
551
|
+
const Bolt12InvoiceRequestDetails = exports.Bolt12InvoiceRequestDetails = (() => {
|
|
552
|
+
const defaults = () => ({});
|
|
553
|
+
const create = (() => {
|
|
554
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
555
|
+
})();
|
|
556
|
+
return Object.freeze({
|
|
557
|
+
/**
|
|
558
|
+
* Create a frozen instance of {@link Bolt12InvoiceRequestDetails}, with defaults specified
|
|
559
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
560
|
+
*/
|
|
561
|
+
create,
|
|
562
|
+
/**
|
|
563
|
+
* Create a frozen instance of {@link Bolt12InvoiceRequestDetails}, with defaults specified
|
|
564
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
565
|
+
*/
|
|
566
|
+
new: create,
|
|
567
|
+
/**
|
|
568
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
569
|
+
*/
|
|
570
|
+
defaults: () => Object.freeze(defaults())
|
|
571
|
+
});
|
|
572
|
+
})();
|
|
573
|
+
const FfiConverterTypeBolt12InvoiceRequestDetails = (() => {
|
|
574
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
575
|
+
read(from) {
|
|
576
|
+
return {};
|
|
577
|
+
}
|
|
578
|
+
write(value, into) {}
|
|
579
|
+
allocationSize(value) {
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return new FFIConverter();
|
|
584
|
+
})();
|
|
585
|
+
/**
|
|
586
|
+
* Generated factory for {@link Bolt12Offer} record objects.
|
|
587
|
+
*/
|
|
588
|
+
const Bolt12Offer = exports.Bolt12Offer = (() => {
|
|
589
|
+
const defaults = () => ({});
|
|
590
|
+
const create = (() => {
|
|
591
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
592
|
+
})();
|
|
593
|
+
return Object.freeze({
|
|
594
|
+
/**
|
|
595
|
+
* Create a frozen instance of {@link Bolt12Offer}, with defaults specified
|
|
596
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
597
|
+
*/
|
|
598
|
+
create,
|
|
599
|
+
/**
|
|
600
|
+
* Create a frozen instance of {@link Bolt12Offer}, with defaults specified
|
|
601
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
602
|
+
*/
|
|
603
|
+
new: create,
|
|
604
|
+
/**
|
|
605
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
606
|
+
*/
|
|
607
|
+
defaults: () => Object.freeze(defaults())
|
|
608
|
+
});
|
|
609
|
+
})();
|
|
610
|
+
const FfiConverterTypeBolt12Offer = (() => {
|
|
611
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
612
|
+
read(from) {
|
|
613
|
+
return {
|
|
614
|
+
offer: FfiConverterString.read(from),
|
|
615
|
+
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
write(value, into) {
|
|
619
|
+
FfiConverterString.write(value.offer, into);
|
|
620
|
+
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
621
|
+
}
|
|
622
|
+
allocationSize(value) {
|
|
623
|
+
return FfiConverterString.allocationSize(value.offer) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
return new FFIConverter();
|
|
627
|
+
})();
|
|
628
|
+
/**
|
|
629
|
+
* Generated factory for {@link Bolt12OfferBlindedPath} record objects.
|
|
630
|
+
*/
|
|
631
|
+
const Bolt12OfferBlindedPath = exports.Bolt12OfferBlindedPath = (() => {
|
|
632
|
+
const defaults = () => ({});
|
|
633
|
+
const create = (() => {
|
|
634
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
635
|
+
})();
|
|
636
|
+
return Object.freeze({
|
|
637
|
+
/**
|
|
638
|
+
* Create a frozen instance of {@link Bolt12OfferBlindedPath}, with defaults specified
|
|
639
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
640
|
+
*/
|
|
641
|
+
create,
|
|
642
|
+
/**
|
|
643
|
+
* Create a frozen instance of {@link Bolt12OfferBlindedPath}, with defaults specified
|
|
644
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
645
|
+
*/
|
|
646
|
+
new: create,
|
|
647
|
+
/**
|
|
648
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
649
|
+
*/
|
|
650
|
+
defaults: () => Object.freeze(defaults())
|
|
651
|
+
});
|
|
652
|
+
})();
|
|
653
|
+
const FfiConverterTypeBolt12OfferBlindedPath = (() => {
|
|
654
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
655
|
+
read(from) {
|
|
656
|
+
return {
|
|
657
|
+
blindedHops: FfiConverterArrayString.read(from)
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
write(value, into) {
|
|
661
|
+
FfiConverterArrayString.write(value.blindedHops, into);
|
|
662
|
+
}
|
|
663
|
+
allocationSize(value) {
|
|
664
|
+
return FfiConverterArrayString.allocationSize(value.blindedHops);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return new FFIConverter();
|
|
668
|
+
})();
|
|
669
|
+
/**
|
|
670
|
+
* Generated factory for {@link Bolt12OfferDetails} record objects.
|
|
671
|
+
*/
|
|
672
|
+
const Bolt12OfferDetails = exports.Bolt12OfferDetails = (() => {
|
|
673
|
+
const defaults = () => ({});
|
|
674
|
+
const create = (() => {
|
|
675
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
676
|
+
})();
|
|
677
|
+
return Object.freeze({
|
|
678
|
+
/**
|
|
679
|
+
* Create a frozen instance of {@link Bolt12OfferDetails}, with defaults specified
|
|
680
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
681
|
+
*/
|
|
682
|
+
create,
|
|
683
|
+
/**
|
|
684
|
+
* Create a frozen instance of {@link Bolt12OfferDetails}, with defaults specified
|
|
685
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
686
|
+
*/
|
|
687
|
+
new: create,
|
|
688
|
+
/**
|
|
689
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
690
|
+
*/
|
|
691
|
+
defaults: () => Object.freeze(defaults())
|
|
692
|
+
});
|
|
693
|
+
})();
|
|
694
|
+
const FfiConverterTypeBolt12OfferDetails = (() => {
|
|
695
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
696
|
+
read(from) {
|
|
697
|
+
return {
|
|
698
|
+
absoluteExpiry: FfiConverterOptionalUInt64.read(from),
|
|
699
|
+
chains: FfiConverterArrayString.read(from),
|
|
700
|
+
description: FfiConverterOptionalString.read(from),
|
|
701
|
+
issuer: FfiConverterOptionalString.read(from),
|
|
702
|
+
minAmount: FfiConverterOptionalTypeAmount.read(from),
|
|
703
|
+
offer: FfiConverterTypeBolt12Offer.read(from),
|
|
704
|
+
paths: FfiConverterArrayTypeBolt12OfferBlindedPath.read(from),
|
|
705
|
+
signingPubkey: FfiConverterOptionalString.read(from)
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
write(value, into) {
|
|
709
|
+
FfiConverterOptionalUInt64.write(value.absoluteExpiry, into);
|
|
710
|
+
FfiConverterArrayString.write(value.chains, into);
|
|
711
|
+
FfiConverterOptionalString.write(value.description, into);
|
|
712
|
+
FfiConverterOptionalString.write(value.issuer, into);
|
|
713
|
+
FfiConverterOptionalTypeAmount.write(value.minAmount, into);
|
|
714
|
+
FfiConverterTypeBolt12Offer.write(value.offer, into);
|
|
715
|
+
FfiConverterArrayTypeBolt12OfferBlindedPath.write(value.paths, into);
|
|
716
|
+
FfiConverterOptionalString.write(value.signingPubkey, into);
|
|
717
|
+
}
|
|
718
|
+
allocationSize(value) {
|
|
719
|
+
return FfiConverterOptionalUInt64.allocationSize(value.absoluteExpiry) + FfiConverterArrayString.allocationSize(value.chains) + FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.issuer) + FfiConverterOptionalTypeAmount.allocationSize(value.minAmount) + FfiConverterTypeBolt12Offer.allocationSize(value.offer) + FfiConverterArrayTypeBolt12OfferBlindedPath.allocationSize(value.paths) + FfiConverterOptionalString.allocationSize(value.signingPubkey);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
return new FFIConverter();
|
|
723
|
+
})();
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Details about a supported currency in the fiat rate feed
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Generated factory for {@link CurrencyInfo} record objects.
|
|
731
|
+
*/
|
|
732
|
+
const CurrencyInfo = exports.CurrencyInfo = (() => {
|
|
733
|
+
const defaults = () => ({});
|
|
734
|
+
const create = (() => {
|
|
735
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
736
|
+
})();
|
|
737
|
+
return Object.freeze({
|
|
738
|
+
/**
|
|
739
|
+
* Create a frozen instance of {@link CurrencyInfo}, with defaults specified
|
|
740
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
741
|
+
*/
|
|
742
|
+
create,
|
|
743
|
+
/**
|
|
744
|
+
* Create a frozen instance of {@link CurrencyInfo}, with defaults specified
|
|
745
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
746
|
+
*/
|
|
747
|
+
new: create,
|
|
748
|
+
/**
|
|
749
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
750
|
+
*/
|
|
751
|
+
defaults: () => Object.freeze(defaults())
|
|
752
|
+
});
|
|
753
|
+
})();
|
|
754
|
+
const FfiConverterTypeCurrencyInfo = (() => {
|
|
755
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
756
|
+
read(from) {
|
|
757
|
+
return {
|
|
758
|
+
name: FfiConverterString.read(from),
|
|
759
|
+
fractionSize: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
760
|
+
spacing: FfiConverterOptionalUInt32.read(from),
|
|
761
|
+
symbol: FfiConverterOptionalTypeSymbol.read(from),
|
|
762
|
+
uniqSymbol: FfiConverterOptionalTypeSymbol.read(from),
|
|
763
|
+
localizedName: FfiConverterArrayTypeLocalizedName.read(from),
|
|
764
|
+
localeOverrides: FfiConverterArrayTypeLocaleOverrides.read(from)
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
write(value, into) {
|
|
768
|
+
FfiConverterString.write(value.name, into);
|
|
769
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.fractionSize, into);
|
|
770
|
+
FfiConverterOptionalUInt32.write(value.spacing, into);
|
|
771
|
+
FfiConverterOptionalTypeSymbol.write(value.symbol, into);
|
|
772
|
+
FfiConverterOptionalTypeSymbol.write(value.uniqSymbol, into);
|
|
773
|
+
FfiConverterArrayTypeLocalizedName.write(value.localizedName, into);
|
|
774
|
+
FfiConverterArrayTypeLocaleOverrides.write(value.localeOverrides, into);
|
|
775
|
+
}
|
|
776
|
+
allocationSize(value) {
|
|
777
|
+
return FfiConverterString.allocationSize(value.name) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.fractionSize) + FfiConverterOptionalUInt32.allocationSize(value.spacing) + FfiConverterOptionalTypeSymbol.allocationSize(value.symbol) + FfiConverterOptionalTypeSymbol.allocationSize(value.uniqSymbol) + FfiConverterArrayTypeLocalizedName.allocationSize(value.localizedName) + FfiConverterArrayTypeLocaleOverrides.allocationSize(value.localeOverrides);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
return new FFIConverter();
|
|
781
|
+
})();
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Wrapper around the [`CurrencyInfo`] of a fiat currency
|
|
785
|
+
*/
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Generated factory for {@link FiatCurrency} record objects.
|
|
789
|
+
*/
|
|
790
|
+
const FiatCurrency = exports.FiatCurrency = (() => {
|
|
791
|
+
const defaults = () => ({});
|
|
792
|
+
const create = (() => {
|
|
793
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
794
|
+
})();
|
|
795
|
+
return Object.freeze({
|
|
796
|
+
/**
|
|
797
|
+
* Create a frozen instance of {@link FiatCurrency}, with defaults specified
|
|
798
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
799
|
+
*/
|
|
800
|
+
create,
|
|
801
|
+
/**
|
|
802
|
+
* Create a frozen instance of {@link FiatCurrency}, with defaults specified
|
|
803
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
804
|
+
*/
|
|
805
|
+
new: create,
|
|
806
|
+
/**
|
|
807
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
808
|
+
*/
|
|
809
|
+
defaults: () => Object.freeze(defaults())
|
|
810
|
+
});
|
|
811
|
+
})();
|
|
812
|
+
const FfiConverterTypeFiatCurrency = (() => {
|
|
813
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
814
|
+
read(from) {
|
|
815
|
+
return {
|
|
816
|
+
id: FfiConverterString.read(from),
|
|
817
|
+
info: FfiConverterTypeCurrencyInfo.read(from)
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
write(value, into) {
|
|
821
|
+
FfiConverterString.write(value.id, into);
|
|
822
|
+
FfiConverterTypeCurrencyInfo.write(value.info, into);
|
|
823
|
+
}
|
|
824
|
+
allocationSize(value) {
|
|
825
|
+
return FfiConverterString.allocationSize(value.id) + FfiConverterTypeCurrencyInfo.allocationSize(value.info);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return new FFIConverter();
|
|
829
|
+
})();
|
|
830
|
+
/**
|
|
831
|
+
* Generated factory for {@link LightningAddressDetails} record objects.
|
|
832
|
+
*/
|
|
833
|
+
const LightningAddressDetails = exports.LightningAddressDetails = (() => {
|
|
834
|
+
const defaults = () => ({});
|
|
835
|
+
const create = (() => {
|
|
836
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
837
|
+
})();
|
|
838
|
+
return Object.freeze({
|
|
839
|
+
/**
|
|
840
|
+
* Create a frozen instance of {@link LightningAddressDetails}, with defaults specified
|
|
841
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
842
|
+
*/
|
|
843
|
+
create,
|
|
844
|
+
/**
|
|
845
|
+
* Create a frozen instance of {@link LightningAddressDetails}, with defaults specified
|
|
846
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
847
|
+
*/
|
|
848
|
+
new: create,
|
|
849
|
+
/**
|
|
850
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
851
|
+
*/
|
|
852
|
+
defaults: () => Object.freeze(defaults())
|
|
853
|
+
});
|
|
854
|
+
})();
|
|
855
|
+
const FfiConverterTypeLightningAddressDetails = (() => {
|
|
856
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
857
|
+
read(from) {
|
|
858
|
+
return {
|
|
859
|
+
address: FfiConverterString.read(from),
|
|
860
|
+
payRequest: FfiConverterTypeLnurlPayRequestDetails.read(from)
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
write(value, into) {
|
|
864
|
+
FfiConverterString.write(value.address, into);
|
|
865
|
+
FfiConverterTypeLnurlPayRequestDetails.write(value.payRequest, into);
|
|
866
|
+
}
|
|
867
|
+
allocationSize(value) {
|
|
868
|
+
return FfiConverterString.allocationSize(value.address) + FfiConverterTypeLnurlPayRequestDetails.allocationSize(value.payRequest);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
return new FFIConverter();
|
|
872
|
+
})();
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Wrapped in a [`LnurlAuth`], this is the result of [`parse`] when given a LNURL-auth endpoint.
|
|
876
|
+
*
|
|
877
|
+
* It represents the endpoint's parameters for the LNURL workflow.
|
|
878
|
+
*
|
|
879
|
+
* See <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
880
|
+
*/
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Generated factory for {@link LnurlAuthRequestDetails} record objects.
|
|
884
|
+
*/
|
|
885
|
+
const LnurlAuthRequestDetails = exports.LnurlAuthRequestDetails = (() => {
|
|
886
|
+
const defaults = () => ({});
|
|
887
|
+
const create = (() => {
|
|
888
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
889
|
+
})();
|
|
890
|
+
return Object.freeze({
|
|
891
|
+
/**
|
|
892
|
+
* Create a frozen instance of {@link LnurlAuthRequestDetails}, with defaults specified
|
|
893
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
894
|
+
*/
|
|
895
|
+
create,
|
|
896
|
+
/**
|
|
897
|
+
* Create a frozen instance of {@link LnurlAuthRequestDetails}, with defaults specified
|
|
898
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
899
|
+
*/
|
|
900
|
+
new: create,
|
|
901
|
+
/**
|
|
902
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
903
|
+
*/
|
|
904
|
+
defaults: () => Object.freeze(defaults())
|
|
905
|
+
});
|
|
906
|
+
})();
|
|
907
|
+
const FfiConverterTypeLnurlAuthRequestDetails = (() => {
|
|
908
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
909
|
+
read(from) {
|
|
910
|
+
return {
|
|
911
|
+
k1: FfiConverterString.read(from),
|
|
912
|
+
action: FfiConverterOptionalString.read(from),
|
|
913
|
+
domain: FfiConverterString.read(from),
|
|
914
|
+
url: FfiConverterString.read(from)
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
write(value, into) {
|
|
918
|
+
FfiConverterString.write(value.k1, into);
|
|
919
|
+
FfiConverterOptionalString.write(value.action, into);
|
|
920
|
+
FfiConverterString.write(value.domain, into);
|
|
921
|
+
FfiConverterString.write(value.url, into);
|
|
922
|
+
}
|
|
923
|
+
allocationSize(value) {
|
|
924
|
+
return FfiConverterString.allocationSize(value.k1) + FfiConverterOptionalString.allocationSize(value.action) + FfiConverterString.allocationSize(value.domain) + FfiConverterString.allocationSize(value.url);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
return new FFIConverter();
|
|
928
|
+
})();
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Wrapped in a [`LnUrlError`], this represents a LNURL-endpoint error.
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Generated factory for {@link LnurlErrorDetails} record objects.
|
|
936
|
+
*/
|
|
937
|
+
const LnurlErrorDetails = exports.LnurlErrorDetails = (() => {
|
|
938
|
+
const defaults = () => ({});
|
|
939
|
+
const create = (() => {
|
|
940
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
941
|
+
})();
|
|
942
|
+
return Object.freeze({
|
|
943
|
+
/**
|
|
944
|
+
* Create a frozen instance of {@link LnurlErrorDetails}, with defaults specified
|
|
945
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
946
|
+
*/
|
|
947
|
+
create,
|
|
948
|
+
/**
|
|
949
|
+
* Create a frozen instance of {@link LnurlErrorDetails}, with defaults specified
|
|
950
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
951
|
+
*/
|
|
952
|
+
new: create,
|
|
953
|
+
/**
|
|
954
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
955
|
+
*/
|
|
956
|
+
defaults: () => Object.freeze(defaults())
|
|
957
|
+
});
|
|
958
|
+
})();
|
|
959
|
+
const FfiConverterTypeLnurlErrorDetails = (() => {
|
|
960
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
961
|
+
read(from) {
|
|
962
|
+
return {
|
|
963
|
+
reason: FfiConverterString.read(from)
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
write(value, into) {
|
|
967
|
+
FfiConverterString.write(value.reason, into);
|
|
968
|
+
}
|
|
969
|
+
allocationSize(value) {
|
|
970
|
+
return FfiConverterString.allocationSize(value.reason);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
return new FFIConverter();
|
|
974
|
+
})();
|
|
975
|
+
/**
|
|
976
|
+
* Generated factory for {@link LnurlPayRequestDetails} record objects.
|
|
977
|
+
*/
|
|
978
|
+
const LnurlPayRequestDetails = exports.LnurlPayRequestDetails = (() => {
|
|
979
|
+
const defaults = () => ({});
|
|
980
|
+
const create = (() => {
|
|
981
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
982
|
+
})();
|
|
983
|
+
return Object.freeze({
|
|
984
|
+
/**
|
|
985
|
+
* Create a frozen instance of {@link LnurlPayRequestDetails}, with defaults specified
|
|
986
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
987
|
+
*/
|
|
988
|
+
create,
|
|
989
|
+
/**
|
|
990
|
+
* Create a frozen instance of {@link LnurlPayRequestDetails}, with defaults specified
|
|
991
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
992
|
+
*/
|
|
993
|
+
new: create,
|
|
994
|
+
/**
|
|
995
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
996
|
+
*/
|
|
997
|
+
defaults: () => Object.freeze(defaults())
|
|
998
|
+
});
|
|
999
|
+
})();
|
|
1000
|
+
const FfiConverterTypeLnurlPayRequestDetails = (() => {
|
|
1001
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1002
|
+
read(from) {
|
|
1003
|
+
return {
|
|
1004
|
+
callback: FfiConverterString.read(from),
|
|
1005
|
+
minSendable: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1006
|
+
maxSendable: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1007
|
+
metadataStr: FfiConverterString.read(from),
|
|
1008
|
+
commentAllowed: _uniffiBindgenReactNative.FfiConverterUInt16.read(from),
|
|
1009
|
+
domain: FfiConverterString.read(from),
|
|
1010
|
+
url: FfiConverterString.read(from),
|
|
1011
|
+
address: FfiConverterOptionalString.read(from),
|
|
1012
|
+
allowsNostr: FfiConverterOptionalBool.read(from),
|
|
1013
|
+
nostrPubkey: FfiConverterOptionalString.read(from)
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
1016
|
+
write(value, into) {
|
|
1017
|
+
FfiConverterString.write(value.callback, into);
|
|
1018
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.minSendable, into);
|
|
1019
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.maxSendable, into);
|
|
1020
|
+
FfiConverterString.write(value.metadataStr, into);
|
|
1021
|
+
_uniffiBindgenReactNative.FfiConverterUInt16.write(value.commentAllowed, into);
|
|
1022
|
+
FfiConverterString.write(value.domain, into);
|
|
1023
|
+
FfiConverterString.write(value.url, into);
|
|
1024
|
+
FfiConverterOptionalString.write(value.address, into);
|
|
1025
|
+
FfiConverterOptionalBool.write(value.allowsNostr, into);
|
|
1026
|
+
FfiConverterOptionalString.write(value.nostrPubkey, into);
|
|
1027
|
+
}
|
|
1028
|
+
allocationSize(value) {
|
|
1029
|
+
return FfiConverterString.allocationSize(value.callback) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minSendable) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.maxSendable) + FfiConverterString.allocationSize(value.metadataStr) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.commentAllowed) + FfiConverterString.allocationSize(value.domain) + FfiConverterString.allocationSize(value.url) + FfiConverterOptionalString.allocationSize(value.address) + FfiConverterOptionalBool.allocationSize(value.allowsNostr) + FfiConverterOptionalString.allocationSize(value.nostrPubkey);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
return new FFIConverter();
|
|
1033
|
+
})();
|
|
1034
|
+
/**
|
|
1035
|
+
* Generated factory for {@link LnurlWithdrawRequestDetails} record objects.
|
|
1036
|
+
*/
|
|
1037
|
+
const LnurlWithdrawRequestDetails = exports.LnurlWithdrawRequestDetails = (() => {
|
|
1038
|
+
const defaults = () => ({});
|
|
1039
|
+
const create = (() => {
|
|
1040
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1041
|
+
})();
|
|
1042
|
+
return Object.freeze({
|
|
1043
|
+
/**
|
|
1044
|
+
* Create a frozen instance of {@link LnurlWithdrawRequestDetails}, with defaults specified
|
|
1045
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1046
|
+
*/
|
|
1047
|
+
create,
|
|
1048
|
+
/**
|
|
1049
|
+
* Create a frozen instance of {@link LnurlWithdrawRequestDetails}, with defaults specified
|
|
1050
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1051
|
+
*/
|
|
1052
|
+
new: create,
|
|
1053
|
+
/**
|
|
1054
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1055
|
+
*/
|
|
1056
|
+
defaults: () => Object.freeze(defaults())
|
|
1057
|
+
});
|
|
1058
|
+
})();
|
|
1059
|
+
const FfiConverterTypeLnurlWithdrawRequestDetails = (() => {
|
|
1060
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1061
|
+
read(from) {
|
|
1062
|
+
return {
|
|
1063
|
+
callback: FfiConverterString.read(from),
|
|
1064
|
+
k1: FfiConverterString.read(from),
|
|
1065
|
+
defaultDescription: FfiConverterString.read(from),
|
|
1066
|
+
minWithdrawable: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1067
|
+
maxWithdrawable: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
write(value, into) {
|
|
1071
|
+
FfiConverterString.write(value.callback, into);
|
|
1072
|
+
FfiConverterString.write(value.k1, into);
|
|
1073
|
+
FfiConverterString.write(value.defaultDescription, into);
|
|
1074
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.minWithdrawable, into);
|
|
1075
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.maxWithdrawable, into);
|
|
1076
|
+
}
|
|
1077
|
+
allocationSize(value) {
|
|
1078
|
+
return FfiConverterString.allocationSize(value.callback) + FfiConverterString.allocationSize(value.k1) + FfiConverterString.allocationSize(value.defaultDescription) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minWithdrawable) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.maxWithdrawable);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
return new FFIConverter();
|
|
1082
|
+
})();
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Locale-specific settings for the representation of a currency
|
|
1086
|
+
*/
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Generated factory for {@link LocaleOverrides} record objects.
|
|
1090
|
+
*/
|
|
1091
|
+
const LocaleOverrides = exports.LocaleOverrides = (() => {
|
|
1092
|
+
const defaults = () => ({});
|
|
1093
|
+
const create = (() => {
|
|
1094
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1095
|
+
})();
|
|
1096
|
+
return Object.freeze({
|
|
1097
|
+
/**
|
|
1098
|
+
* Create a frozen instance of {@link LocaleOverrides}, with defaults specified
|
|
1099
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1100
|
+
*/
|
|
1101
|
+
create,
|
|
1102
|
+
/**
|
|
1103
|
+
* Create a frozen instance of {@link LocaleOverrides}, with defaults specified
|
|
1104
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1105
|
+
*/
|
|
1106
|
+
new: create,
|
|
1107
|
+
/**
|
|
1108
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1109
|
+
*/
|
|
1110
|
+
defaults: () => Object.freeze(defaults())
|
|
1111
|
+
});
|
|
1112
|
+
})();
|
|
1113
|
+
const FfiConverterTypeLocaleOverrides = (() => {
|
|
1114
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1115
|
+
read(from) {
|
|
1116
|
+
return {
|
|
1117
|
+
locale: FfiConverterString.read(from),
|
|
1118
|
+
spacing: FfiConverterOptionalUInt32.read(from),
|
|
1119
|
+
symbol: FfiConverterTypeSymbol.read(from)
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
write(value, into) {
|
|
1123
|
+
FfiConverterString.write(value.locale, into);
|
|
1124
|
+
FfiConverterOptionalUInt32.write(value.spacing, into);
|
|
1125
|
+
FfiConverterTypeSymbol.write(value.symbol, into);
|
|
1126
|
+
}
|
|
1127
|
+
allocationSize(value) {
|
|
1128
|
+
return FfiConverterString.allocationSize(value.locale) + FfiConverterOptionalUInt32.allocationSize(value.spacing) + FfiConverterTypeSymbol.allocationSize(value.symbol);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
return new FFIConverter();
|
|
1132
|
+
})();
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Localized name of a currency
|
|
1136
|
+
*/
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Generated factory for {@link LocalizedName} record objects.
|
|
1140
|
+
*/
|
|
1141
|
+
const LocalizedName = exports.LocalizedName = (() => {
|
|
1142
|
+
const defaults = () => ({});
|
|
1143
|
+
const create = (() => {
|
|
1144
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1145
|
+
})();
|
|
1146
|
+
return Object.freeze({
|
|
1147
|
+
/**
|
|
1148
|
+
* Create a frozen instance of {@link LocalizedName}, with defaults specified
|
|
1149
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1150
|
+
*/
|
|
1151
|
+
create,
|
|
1152
|
+
/**
|
|
1153
|
+
* Create a frozen instance of {@link LocalizedName}, with defaults specified
|
|
1154
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1155
|
+
*/
|
|
1156
|
+
new: create,
|
|
1157
|
+
/**
|
|
1158
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1159
|
+
*/
|
|
1160
|
+
defaults: () => Object.freeze(defaults())
|
|
1161
|
+
});
|
|
1162
|
+
})();
|
|
1163
|
+
const FfiConverterTypeLocalizedName = (() => {
|
|
1164
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1165
|
+
read(from) {
|
|
1166
|
+
return {
|
|
1167
|
+
locale: FfiConverterString.read(from),
|
|
1168
|
+
name: FfiConverterString.read(from)
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
write(value, into) {
|
|
1172
|
+
FfiConverterString.write(value.locale, into);
|
|
1173
|
+
FfiConverterString.write(value.name, into);
|
|
1174
|
+
}
|
|
1175
|
+
allocationSize(value) {
|
|
1176
|
+
return FfiConverterString.allocationSize(value.locale) + FfiConverterString.allocationSize(value.name);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
return new FFIConverter();
|
|
1180
|
+
})();
|
|
1181
|
+
/**
|
|
1182
|
+
* Generated factory for {@link MessageSuccessActionData} record objects.
|
|
1183
|
+
*/
|
|
1184
|
+
const MessageSuccessActionData = exports.MessageSuccessActionData = (() => {
|
|
1185
|
+
const defaults = () => ({});
|
|
1186
|
+
const create = (() => {
|
|
1187
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1188
|
+
})();
|
|
1189
|
+
return Object.freeze({
|
|
1190
|
+
/**
|
|
1191
|
+
* Create a frozen instance of {@link MessageSuccessActionData}, with defaults specified
|
|
1192
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1193
|
+
*/
|
|
1194
|
+
create,
|
|
1195
|
+
/**
|
|
1196
|
+
* Create a frozen instance of {@link MessageSuccessActionData}, with defaults specified
|
|
1197
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1198
|
+
*/
|
|
1199
|
+
new: create,
|
|
1200
|
+
/**
|
|
1201
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1202
|
+
*/
|
|
1203
|
+
defaults: () => Object.freeze(defaults())
|
|
1204
|
+
});
|
|
1205
|
+
})();
|
|
1206
|
+
const FfiConverterTypeMessageSuccessActionData = (() => {
|
|
1207
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1208
|
+
read(from) {
|
|
1209
|
+
return {
|
|
1210
|
+
message: FfiConverterString.read(from)
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
write(value, into) {
|
|
1214
|
+
FfiConverterString.write(value.message, into);
|
|
1215
|
+
}
|
|
1216
|
+
allocationSize(value) {
|
|
1217
|
+
return FfiConverterString.allocationSize(value.message);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
return new FFIConverter();
|
|
1221
|
+
})();
|
|
1222
|
+
/**
|
|
1223
|
+
* Generated factory for {@link PaymentRequestSource} record objects.
|
|
1224
|
+
*/
|
|
1225
|
+
const PaymentRequestSource = exports.PaymentRequestSource = (() => {
|
|
1226
|
+
const defaults = () => ({});
|
|
1227
|
+
const create = (() => {
|
|
1228
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1229
|
+
})();
|
|
1230
|
+
return Object.freeze({
|
|
1231
|
+
/**
|
|
1232
|
+
* Create a frozen instance of {@link PaymentRequestSource}, with defaults specified
|
|
1233
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1234
|
+
*/
|
|
1235
|
+
create,
|
|
1236
|
+
/**
|
|
1237
|
+
* Create a frozen instance of {@link PaymentRequestSource}, with defaults specified
|
|
1238
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1239
|
+
*/
|
|
1240
|
+
new: create,
|
|
1241
|
+
/**
|
|
1242
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1243
|
+
*/
|
|
1244
|
+
defaults: () => Object.freeze(defaults())
|
|
1245
|
+
});
|
|
1246
|
+
})();
|
|
1247
|
+
const FfiConverterTypePaymentRequestSource = (() => {
|
|
1248
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1249
|
+
read(from) {
|
|
1250
|
+
return {
|
|
1251
|
+
bip21Uri: FfiConverterOptionalString.read(from),
|
|
1252
|
+
bip353Address: FfiConverterOptionalString.read(from)
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1255
|
+
write(value, into) {
|
|
1256
|
+
FfiConverterOptionalString.write(value.bip21Uri, into);
|
|
1257
|
+
FfiConverterOptionalString.write(value.bip353Address, into);
|
|
1258
|
+
}
|
|
1259
|
+
allocationSize(value) {
|
|
1260
|
+
return FfiConverterOptionalString.allocationSize(value.bip21Uri) + FfiConverterOptionalString.allocationSize(value.bip353Address);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
return new FFIConverter();
|
|
1264
|
+
})();
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Denominator in an exchange rate
|
|
1268
|
+
*/
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Generated factory for {@link Rate} record objects.
|
|
1272
|
+
*/
|
|
1273
|
+
const Rate = exports.Rate = (() => {
|
|
1274
|
+
const defaults = () => ({});
|
|
1275
|
+
const create = (() => {
|
|
1276
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1277
|
+
})();
|
|
1278
|
+
return Object.freeze({
|
|
1279
|
+
/**
|
|
1280
|
+
* Create a frozen instance of {@link Rate}, with defaults specified
|
|
1281
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1282
|
+
*/
|
|
1283
|
+
create,
|
|
1284
|
+
/**
|
|
1285
|
+
* Create a frozen instance of {@link Rate}, with defaults specified
|
|
1286
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1287
|
+
*/
|
|
1288
|
+
new: create,
|
|
1289
|
+
/**
|
|
1290
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1291
|
+
*/
|
|
1292
|
+
defaults: () => Object.freeze(defaults())
|
|
1293
|
+
});
|
|
1294
|
+
})();
|
|
1295
|
+
const FfiConverterTypeRate = (() => {
|
|
1296
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1297
|
+
read(from) {
|
|
1298
|
+
return {
|
|
1299
|
+
coin: FfiConverterString.read(from),
|
|
1300
|
+
value: _uniffiBindgenReactNative.FfiConverterFloat64.read(from)
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
write(value, into) {
|
|
1304
|
+
FfiConverterString.write(value.coin, into);
|
|
1305
|
+
_uniffiBindgenReactNative.FfiConverterFloat64.write(value.value, into);
|
|
1306
|
+
}
|
|
1307
|
+
allocationSize(value) {
|
|
1308
|
+
return FfiConverterString.allocationSize(value.coin) + _uniffiBindgenReactNative.FfiConverterFloat64.allocationSize(value.value);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
return new FFIConverter();
|
|
1312
|
+
})();
|
|
1313
|
+
/**
|
|
1314
|
+
* Generated factory for {@link RestResponse} record objects.
|
|
1315
|
+
*/
|
|
1316
|
+
const RestResponse = exports.RestResponse = (() => {
|
|
1317
|
+
const defaults = () => ({});
|
|
1318
|
+
const create = (() => {
|
|
1319
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1320
|
+
})();
|
|
1321
|
+
return Object.freeze({
|
|
1322
|
+
/**
|
|
1323
|
+
* Create a frozen instance of {@link RestResponse}, with defaults specified
|
|
1324
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1325
|
+
*/
|
|
1326
|
+
create,
|
|
1327
|
+
/**
|
|
1328
|
+
* Create a frozen instance of {@link RestResponse}, with defaults specified
|
|
1329
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1330
|
+
*/
|
|
1331
|
+
new: create,
|
|
1332
|
+
/**
|
|
1333
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1334
|
+
*/
|
|
1335
|
+
defaults: () => Object.freeze(defaults())
|
|
1336
|
+
});
|
|
1337
|
+
})();
|
|
1338
|
+
const FfiConverterTypeRestResponse = (() => {
|
|
1339
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1340
|
+
read(from) {
|
|
1341
|
+
return {
|
|
1342
|
+
status: _uniffiBindgenReactNative.FfiConverterUInt16.read(from),
|
|
1343
|
+
body: FfiConverterString.read(from)
|
|
1344
|
+
};
|
|
1345
|
+
}
|
|
1346
|
+
write(value, into) {
|
|
1347
|
+
_uniffiBindgenReactNative.FfiConverterUInt16.write(value.status, into);
|
|
1348
|
+
FfiConverterString.write(value.body, into);
|
|
1349
|
+
}
|
|
1350
|
+
allocationSize(value) {
|
|
1351
|
+
return _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.status) + FfiConverterString.allocationSize(value.body);
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
return new FFIConverter();
|
|
1355
|
+
})();
|
|
1356
|
+
/**
|
|
1357
|
+
* Generated factory for {@link SatsPaymentDetails} record objects.
|
|
1358
|
+
*/
|
|
1359
|
+
const SatsPaymentDetails = exports.SatsPaymentDetails = (() => {
|
|
1360
|
+
const defaults = () => ({});
|
|
1361
|
+
const create = (() => {
|
|
1362
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1363
|
+
})();
|
|
1364
|
+
return Object.freeze({
|
|
1365
|
+
/**
|
|
1366
|
+
* Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
|
|
1367
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1368
|
+
*/
|
|
1369
|
+
create,
|
|
1370
|
+
/**
|
|
1371
|
+
* Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
|
|
1372
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1373
|
+
*/
|
|
1374
|
+
new: create,
|
|
1375
|
+
/**
|
|
1376
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1377
|
+
*/
|
|
1378
|
+
defaults: () => Object.freeze(defaults())
|
|
1379
|
+
});
|
|
1380
|
+
})();
|
|
1381
|
+
const FfiConverterTypeSatsPaymentDetails = (() => {
|
|
1382
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1383
|
+
read(from) {
|
|
1384
|
+
return {
|
|
1385
|
+
amount: FfiConverterOptionalUInt64.read(from)
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
|
+
write(value, into) {
|
|
1389
|
+
FfiConverterOptionalUInt64.write(value.amount, into);
|
|
1390
|
+
}
|
|
1391
|
+
allocationSize(value) {
|
|
1392
|
+
return FfiConverterOptionalUInt64.allocationSize(value.amount);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
return new FFIConverter();
|
|
1396
|
+
})();
|
|
1397
|
+
/**
|
|
1398
|
+
* Generated factory for {@link SilentPaymentAddressDetails} record objects.
|
|
1399
|
+
*/
|
|
1400
|
+
const SilentPaymentAddressDetails = exports.SilentPaymentAddressDetails = (() => {
|
|
1401
|
+
const defaults = () => ({});
|
|
1402
|
+
const create = (() => {
|
|
1403
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1404
|
+
})();
|
|
1405
|
+
return Object.freeze({
|
|
1406
|
+
/**
|
|
1407
|
+
* Create a frozen instance of {@link SilentPaymentAddressDetails}, with defaults specified
|
|
1408
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1409
|
+
*/
|
|
1410
|
+
create,
|
|
1411
|
+
/**
|
|
1412
|
+
* Create a frozen instance of {@link SilentPaymentAddressDetails}, with defaults specified
|
|
1413
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1414
|
+
*/
|
|
1415
|
+
new: create,
|
|
1416
|
+
/**
|
|
1417
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1418
|
+
*/
|
|
1419
|
+
defaults: () => Object.freeze(defaults())
|
|
1420
|
+
});
|
|
1421
|
+
})();
|
|
1422
|
+
const FfiConverterTypeSilentPaymentAddressDetails = (() => {
|
|
1423
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1424
|
+
read(from) {
|
|
1425
|
+
return {
|
|
1426
|
+
address: FfiConverterString.read(from),
|
|
1427
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
1428
|
+
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
write(value, into) {
|
|
1432
|
+
FfiConverterString.write(value.address, into);
|
|
1433
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
1434
|
+
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
1435
|
+
}
|
|
1436
|
+
allocationSize(value) {
|
|
1437
|
+
return FfiConverterString.allocationSize(value.address) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
return new FFIConverter();
|
|
1441
|
+
})();
|
|
1442
|
+
/**
|
|
1443
|
+
* Generated factory for {@link SparkAddress} record objects.
|
|
1444
|
+
*/
|
|
1445
|
+
const SparkAddress = exports.SparkAddress = (() => {
|
|
1446
|
+
const defaults = () => ({});
|
|
1447
|
+
const create = (() => {
|
|
1448
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1449
|
+
})();
|
|
1450
|
+
return Object.freeze({
|
|
1451
|
+
/**
|
|
1452
|
+
* Create a frozen instance of {@link SparkAddress}, with defaults specified
|
|
1453
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1454
|
+
*/
|
|
1455
|
+
create,
|
|
1456
|
+
/**
|
|
1457
|
+
* Create a frozen instance of {@link SparkAddress}, with defaults specified
|
|
1458
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1459
|
+
*/
|
|
1460
|
+
new: create,
|
|
1461
|
+
/**
|
|
1462
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1463
|
+
*/
|
|
1464
|
+
defaults: () => Object.freeze(defaults())
|
|
1465
|
+
});
|
|
1466
|
+
})();
|
|
1467
|
+
const FfiConverterTypeSparkAddress = (() => {
|
|
1468
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1469
|
+
read(from) {
|
|
1470
|
+
return {
|
|
1471
|
+
identityPublicKey: FfiConverterString.read(from),
|
|
1472
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
1473
|
+
sparkInvoiceFields: FfiConverterOptionalTypeSparkInvoiceFields.read(from),
|
|
1474
|
+
signature: FfiConverterOptionalString.read(from)
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
write(value, into) {
|
|
1478
|
+
FfiConverterString.write(value.identityPublicKey, into);
|
|
1479
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
1480
|
+
FfiConverterOptionalTypeSparkInvoiceFields.write(value.sparkInvoiceFields, into);
|
|
1481
|
+
FfiConverterOptionalString.write(value.signature, into);
|
|
1482
|
+
}
|
|
1483
|
+
allocationSize(value) {
|
|
1484
|
+
return FfiConverterString.allocationSize(value.identityPublicKey) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterOptionalTypeSparkInvoiceFields.allocationSize(value.sparkInvoiceFields) + FfiConverterOptionalString.allocationSize(value.signature);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
return new FFIConverter();
|
|
1488
|
+
})();
|
|
1489
|
+
/**
|
|
1490
|
+
* Generated factory for {@link SparkAddressDetails} record objects.
|
|
1491
|
+
*/
|
|
1492
|
+
const SparkAddressDetails = exports.SparkAddressDetails = (() => {
|
|
1493
|
+
const defaults = () => ({});
|
|
1494
|
+
const create = (() => {
|
|
1495
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1496
|
+
})();
|
|
1497
|
+
return Object.freeze({
|
|
1498
|
+
/**
|
|
1499
|
+
* Create a frozen instance of {@link SparkAddressDetails}, with defaults specified
|
|
1500
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1501
|
+
*/
|
|
1502
|
+
create,
|
|
1503
|
+
/**
|
|
1504
|
+
* Create a frozen instance of {@link SparkAddressDetails}, with defaults specified
|
|
1505
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1506
|
+
*/
|
|
1507
|
+
new: create,
|
|
1508
|
+
/**
|
|
1509
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1510
|
+
*/
|
|
1511
|
+
defaults: () => Object.freeze(defaults())
|
|
1512
|
+
});
|
|
1513
|
+
})();
|
|
1514
|
+
const FfiConverterTypeSparkAddressDetails = (() => {
|
|
1515
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1516
|
+
read(from) {
|
|
1517
|
+
return {
|
|
1518
|
+
address: FfiConverterString.read(from),
|
|
1519
|
+
decodedAddress: FfiConverterTypeSparkAddress.read(from),
|
|
1520
|
+
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
write(value, into) {
|
|
1524
|
+
FfiConverterString.write(value.address, into);
|
|
1525
|
+
FfiConverterTypeSparkAddress.write(value.decodedAddress, into);
|
|
1526
|
+
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
1527
|
+
}
|
|
1528
|
+
allocationSize(value) {
|
|
1529
|
+
return FfiConverterString.allocationSize(value.address) + FfiConverterTypeSparkAddress.allocationSize(value.decodedAddress) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
return new FFIConverter();
|
|
1533
|
+
})();
|
|
1534
|
+
/**
|
|
1535
|
+
* Generated factory for {@link SparkInvoiceFields} record objects.
|
|
1536
|
+
*/
|
|
1537
|
+
const SparkInvoiceFields = exports.SparkInvoiceFields = (() => {
|
|
1538
|
+
const defaults = () => ({});
|
|
1539
|
+
const create = (() => {
|
|
1540
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1541
|
+
})();
|
|
1542
|
+
return Object.freeze({
|
|
1543
|
+
/**
|
|
1544
|
+
* Create a frozen instance of {@link SparkInvoiceFields}, with defaults specified
|
|
1545
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1546
|
+
*/
|
|
1547
|
+
create,
|
|
1548
|
+
/**
|
|
1549
|
+
* Create a frozen instance of {@link SparkInvoiceFields}, with defaults specified
|
|
1550
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1551
|
+
*/
|
|
1552
|
+
new: create,
|
|
1553
|
+
/**
|
|
1554
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1555
|
+
*/
|
|
1556
|
+
defaults: () => Object.freeze(defaults())
|
|
1557
|
+
});
|
|
1558
|
+
})();
|
|
1559
|
+
const FfiConverterTypeSparkInvoiceFields = (() => {
|
|
1560
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1561
|
+
read(from) {
|
|
1562
|
+
return {
|
|
1563
|
+
id: FfiConverterString.read(from),
|
|
1564
|
+
version: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
1565
|
+
memo: FfiConverterOptionalString.read(from),
|
|
1566
|
+
senderPublicKey: FfiConverterOptionalString.read(from),
|
|
1567
|
+
expiryTime: FfiConverterOptionalUInt64.read(from),
|
|
1568
|
+
paymentType: FfiConverterOptionalTypeSparkAddressPaymentType.read(from)
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
write(value, into) {
|
|
1572
|
+
FfiConverterString.write(value.id, into);
|
|
1573
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.version, into);
|
|
1574
|
+
FfiConverterOptionalString.write(value.memo, into);
|
|
1575
|
+
FfiConverterOptionalString.write(value.senderPublicKey, into);
|
|
1576
|
+
FfiConverterOptionalUInt64.write(value.expiryTime, into);
|
|
1577
|
+
FfiConverterOptionalTypeSparkAddressPaymentType.write(value.paymentType, into);
|
|
1578
|
+
}
|
|
1579
|
+
allocationSize(value) {
|
|
1580
|
+
return FfiConverterString.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.version) + FfiConverterOptionalString.allocationSize(value.memo) + FfiConverterOptionalString.allocationSize(value.senderPublicKey) + FfiConverterOptionalUInt64.allocationSize(value.expiryTime) + FfiConverterOptionalTypeSparkAddressPaymentType.allocationSize(value.paymentType);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
return new FFIConverter();
|
|
1584
|
+
})();
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* Settings for the symbol representation of a currency
|
|
1588
|
+
*/
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Generated factory for {@link Symbol} record objects.
|
|
1592
|
+
*/
|
|
1593
|
+
const Symbol = exports.Symbol = (() => {
|
|
1594
|
+
const defaults = () => ({});
|
|
1595
|
+
const create = (() => {
|
|
1596
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1597
|
+
})();
|
|
1598
|
+
return Object.freeze({
|
|
1599
|
+
/**
|
|
1600
|
+
* Create a frozen instance of {@link Symbol}, with defaults specified
|
|
1601
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1602
|
+
*/
|
|
1603
|
+
create,
|
|
1604
|
+
/**
|
|
1605
|
+
* Create a frozen instance of {@link Symbol}, with defaults specified
|
|
1606
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1607
|
+
*/
|
|
1608
|
+
new: create,
|
|
1609
|
+
/**
|
|
1610
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1611
|
+
*/
|
|
1612
|
+
defaults: () => Object.freeze(defaults())
|
|
1613
|
+
});
|
|
1614
|
+
})();
|
|
1615
|
+
const FfiConverterTypeSymbol = (() => {
|
|
1616
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1617
|
+
read(from) {
|
|
1618
|
+
return {
|
|
1619
|
+
grapheme: FfiConverterOptionalString.read(from),
|
|
1620
|
+
template: FfiConverterOptionalString.read(from),
|
|
1621
|
+
rtl: FfiConverterOptionalBool.read(from),
|
|
1622
|
+
position: FfiConverterOptionalUInt32.read(from)
|
|
1623
|
+
};
|
|
1624
|
+
}
|
|
1625
|
+
write(value, into) {
|
|
1626
|
+
FfiConverterOptionalString.write(value.grapheme, into);
|
|
1627
|
+
FfiConverterOptionalString.write(value.template, into);
|
|
1628
|
+
FfiConverterOptionalBool.write(value.rtl, into);
|
|
1629
|
+
FfiConverterOptionalUInt32.write(value.position, into);
|
|
1630
|
+
}
|
|
1631
|
+
allocationSize(value) {
|
|
1632
|
+
return FfiConverterOptionalString.allocationSize(value.grapheme) + FfiConverterOptionalString.allocationSize(value.template) + FfiConverterOptionalBool.allocationSize(value.rtl) + FfiConverterOptionalUInt32.allocationSize(value.position);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
return new FFIConverter();
|
|
1636
|
+
})();
|
|
1637
|
+
/**
|
|
1638
|
+
* Generated factory for {@link TokensPaymentDetails} record objects.
|
|
1639
|
+
*/
|
|
1640
|
+
const TokensPaymentDetails = exports.TokensPaymentDetails = (() => {
|
|
1641
|
+
const defaults = () => ({});
|
|
1642
|
+
const create = (() => {
|
|
1643
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1644
|
+
})();
|
|
1645
|
+
return Object.freeze({
|
|
1646
|
+
/**
|
|
1647
|
+
* Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
|
|
1648
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1649
|
+
*/
|
|
1650
|
+
create,
|
|
1651
|
+
/**
|
|
1652
|
+
* Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
|
|
1653
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1654
|
+
*/
|
|
1655
|
+
new: create,
|
|
1656
|
+
/**
|
|
1657
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1658
|
+
*/
|
|
1659
|
+
defaults: () => Object.freeze(defaults())
|
|
1660
|
+
});
|
|
1661
|
+
})();
|
|
1662
|
+
const FfiConverterTypeTokensPaymentDetails = (() => {
|
|
1663
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1664
|
+
read(from) {
|
|
1665
|
+
return {
|
|
1666
|
+
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
1667
|
+
amount: FfiConverterOptionalUInt64.read(from)
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
write(value, into) {
|
|
1671
|
+
FfiConverterOptionalString.write(value.tokenIdentifier, into);
|
|
1672
|
+
FfiConverterOptionalUInt64.write(value.amount, into);
|
|
1673
|
+
}
|
|
1674
|
+
allocationSize(value) {
|
|
1675
|
+
return FfiConverterOptionalString.allocationSize(value.tokenIdentifier) + FfiConverterOptionalUInt64.allocationSize(value.amount);
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
return new FFIConverter();
|
|
1679
|
+
})();
|
|
1680
|
+
/**
|
|
1681
|
+
* Generated factory for {@link UrlSuccessActionData} record objects.
|
|
1682
|
+
*/
|
|
1683
|
+
const UrlSuccessActionData = exports.UrlSuccessActionData = (() => {
|
|
1684
|
+
const defaults = () => ({});
|
|
1685
|
+
const create = (() => {
|
|
1686
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1687
|
+
})();
|
|
1688
|
+
return Object.freeze({
|
|
1689
|
+
/**
|
|
1690
|
+
* Create a frozen instance of {@link UrlSuccessActionData}, with defaults specified
|
|
1691
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1692
|
+
*/
|
|
1693
|
+
create,
|
|
1694
|
+
/**
|
|
1695
|
+
* Create a frozen instance of {@link UrlSuccessActionData}, with defaults specified
|
|
1696
|
+
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1697
|
+
*/
|
|
1698
|
+
new: create,
|
|
1699
|
+
/**
|
|
1700
|
+
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1701
|
+
*/
|
|
1702
|
+
defaults: () => Object.freeze(defaults())
|
|
1703
|
+
});
|
|
1704
|
+
})();
|
|
1705
|
+
const FfiConverterTypeUrlSuccessActionData = (() => {
|
|
1706
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1707
|
+
read(from) {
|
|
1708
|
+
return {
|
|
1709
|
+
description: FfiConverterString.read(from),
|
|
1710
|
+
url: FfiConverterString.read(from),
|
|
1711
|
+
matchesCallbackDomain: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
write(value, into) {
|
|
1715
|
+
FfiConverterString.write(value.description, into);
|
|
1716
|
+
FfiConverterString.write(value.url, into);
|
|
1717
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.matchesCallbackDomain, into);
|
|
1718
|
+
}
|
|
1719
|
+
allocationSize(value) {
|
|
1720
|
+
return FfiConverterString.allocationSize(value.description) + FfiConverterString.allocationSize(value.url) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.matchesCallbackDomain);
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
return new FFIConverter();
|
|
1724
|
+
})();
|
|
1725
|
+
const stringConverter = {
|
|
1726
|
+
stringToBytes: s => uniffiCaller.rustCall(status => (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
|
|
1727
|
+
bytesToString: ab => uniffiCaller.rustCall(status => (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
|
|
1728
|
+
stringByteLength: s => uniffiCaller.rustCall(status => (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, status))
|
|
1729
|
+
};
|
|
1730
|
+
const FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
|
|
1731
|
+
|
|
1732
|
+
// Enum: AesSuccessActionDataResult
|
|
1733
|
+
let AesSuccessActionDataResult_Tags = exports.AesSuccessActionDataResult_Tags = /*#__PURE__*/function (AesSuccessActionDataResult_Tags) {
|
|
1734
|
+
AesSuccessActionDataResult_Tags["Decrypted"] = "Decrypted";
|
|
1735
|
+
AesSuccessActionDataResult_Tags["ErrorStatus"] = "ErrorStatus";
|
|
1736
|
+
return AesSuccessActionDataResult_Tags;
|
|
1737
|
+
}({});
|
|
1738
|
+
/**
|
|
1739
|
+
* Result of decryption of [`AesSuccessActionData`] payload
|
|
1740
|
+
*/
|
|
1741
|
+
const AesSuccessActionDataResult = exports.AesSuccessActionDataResult = (() => {
|
|
1742
|
+
class Decrypted_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1743
|
+
/**
|
|
1744
|
+
* @private
|
|
1745
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1746
|
+
*/
|
|
1747
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'AesSuccessActionDataResult';
|
|
1748
|
+
tag = AesSuccessActionDataResult_Tags.Decrypted;
|
|
1749
|
+
constructor(inner) {
|
|
1750
|
+
super('AesSuccessActionDataResult', 'Decrypted');
|
|
1751
|
+
this.inner = Object.freeze(inner);
|
|
1752
|
+
}
|
|
1753
|
+
static new(inner) {
|
|
1754
|
+
return new Decrypted_(inner);
|
|
1755
|
+
}
|
|
1756
|
+
static instanceOf(obj) {
|
|
1757
|
+
return obj.tag === AesSuccessActionDataResult_Tags.Decrypted;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
class ErrorStatus_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1761
|
+
/**
|
|
1762
|
+
* @private
|
|
1763
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1764
|
+
*/
|
|
1765
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'AesSuccessActionDataResult';
|
|
1766
|
+
tag = AesSuccessActionDataResult_Tags.ErrorStatus;
|
|
1767
|
+
constructor(inner) {
|
|
1768
|
+
super('AesSuccessActionDataResult', 'ErrorStatus');
|
|
1769
|
+
this.inner = Object.freeze(inner);
|
|
1770
|
+
}
|
|
1771
|
+
static new(inner) {
|
|
1772
|
+
return new ErrorStatus_(inner);
|
|
1773
|
+
}
|
|
1774
|
+
static instanceOf(obj) {
|
|
1775
|
+
return obj.tag === AesSuccessActionDataResult_Tags.ErrorStatus;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
function instanceOf(obj) {
|
|
1779
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'AesSuccessActionDataResult';
|
|
1780
|
+
}
|
|
1781
|
+
return Object.freeze({
|
|
1782
|
+
instanceOf,
|
|
1783
|
+
Decrypted: Decrypted_,
|
|
1784
|
+
ErrorStatus: ErrorStatus_
|
|
1785
|
+
});
|
|
1786
|
+
})();
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Result of decryption of [`AesSuccessActionData`] payload
|
|
1790
|
+
*/
|
|
1791
|
+
|
|
1792
|
+
// FfiConverter for enum AesSuccessActionDataResult
|
|
1793
|
+
const FfiConverterTypeAesSuccessActionDataResult = (() => {
|
|
1794
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1795
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1796
|
+
read(from) {
|
|
1797
|
+
switch (ordinalConverter.read(from)) {
|
|
1798
|
+
case 1:
|
|
1799
|
+
return new AesSuccessActionDataResult.Decrypted({
|
|
1800
|
+
data: FfiConverterTypeAesSuccessActionDataDecrypted.read(from)
|
|
1801
|
+
});
|
|
1802
|
+
case 2:
|
|
1803
|
+
return new AesSuccessActionDataResult.ErrorStatus({
|
|
1804
|
+
reason: FfiConverterString.read(from)
|
|
1805
|
+
});
|
|
1806
|
+
default:
|
|
1807
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
write(value, into) {
|
|
1811
|
+
switch (value.tag) {
|
|
1812
|
+
case AesSuccessActionDataResult_Tags.Decrypted:
|
|
1813
|
+
{
|
|
1814
|
+
ordinalConverter.write(1, into);
|
|
1815
|
+
const inner = value.inner;
|
|
1816
|
+
FfiConverterTypeAesSuccessActionDataDecrypted.write(inner.data, into);
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
case AesSuccessActionDataResult_Tags.ErrorStatus:
|
|
1820
|
+
{
|
|
1821
|
+
ordinalConverter.write(2, into);
|
|
1822
|
+
const inner = value.inner;
|
|
1823
|
+
FfiConverterString.write(inner.reason, into);
|
|
1824
|
+
return;
|
|
1825
|
+
}
|
|
1826
|
+
default:
|
|
1827
|
+
// Throwing from here means that AesSuccessActionDataResult_Tags hasn't matched an ordinal.
|
|
1828
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
allocationSize(value) {
|
|
1832
|
+
switch (value.tag) {
|
|
1833
|
+
case AesSuccessActionDataResult_Tags.Decrypted:
|
|
1834
|
+
{
|
|
1835
|
+
const inner = value.inner;
|
|
1836
|
+
let size = ordinalConverter.allocationSize(1);
|
|
1837
|
+
size += FfiConverterTypeAesSuccessActionDataDecrypted.allocationSize(inner.data);
|
|
1838
|
+
return size;
|
|
1839
|
+
}
|
|
1840
|
+
case AesSuccessActionDataResult_Tags.ErrorStatus:
|
|
1841
|
+
{
|
|
1842
|
+
const inner = value.inner;
|
|
1843
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1844
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
1845
|
+
return size;
|
|
1846
|
+
}
|
|
1847
|
+
default:
|
|
1848
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
return new FFIConverter();
|
|
1853
|
+
})();
|
|
1854
|
+
|
|
1855
|
+
// Enum: Amount
|
|
1856
|
+
let Amount_Tags = exports.Amount_Tags = /*#__PURE__*/function (Amount_Tags) {
|
|
1857
|
+
Amount_Tags["Bitcoin"] = "Bitcoin";
|
|
1858
|
+
Amount_Tags["Currency"] = "Currency";
|
|
1859
|
+
return Amount_Tags;
|
|
1860
|
+
}({});
|
|
1861
|
+
const Amount = exports.Amount = (() => {
|
|
1862
|
+
class Bitcoin_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1863
|
+
/**
|
|
1864
|
+
* @private
|
|
1865
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1866
|
+
*/
|
|
1867
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'Amount';
|
|
1868
|
+
tag = Amount_Tags.Bitcoin;
|
|
1869
|
+
constructor(inner) {
|
|
1870
|
+
super('Amount', 'Bitcoin');
|
|
1871
|
+
this.inner = Object.freeze(inner);
|
|
1872
|
+
}
|
|
1873
|
+
static new(inner) {
|
|
1874
|
+
return new Bitcoin_(inner);
|
|
1875
|
+
}
|
|
1876
|
+
static instanceOf(obj) {
|
|
1877
|
+
return obj.tag === Amount_Tags.Bitcoin;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* An amount of currency specified using ISO 4712.
|
|
1882
|
+
*/
|
|
1883
|
+
class Currency_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1884
|
+
/**
|
|
1885
|
+
* @private
|
|
1886
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1887
|
+
*/
|
|
1888
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'Amount';
|
|
1889
|
+
tag = Amount_Tags.Currency;
|
|
1890
|
+
constructor(inner) {
|
|
1891
|
+
super('Amount', 'Currency');
|
|
1892
|
+
this.inner = Object.freeze(inner);
|
|
1893
|
+
}
|
|
1894
|
+
static new(inner) {
|
|
1895
|
+
return new Currency_(inner);
|
|
1896
|
+
}
|
|
1897
|
+
static instanceOf(obj) {
|
|
1898
|
+
return obj.tag === Amount_Tags.Currency;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
function instanceOf(obj) {
|
|
1902
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'Amount';
|
|
1903
|
+
}
|
|
1904
|
+
return Object.freeze({
|
|
1905
|
+
instanceOf,
|
|
1906
|
+
Bitcoin: Bitcoin_,
|
|
1907
|
+
Currency: Currency_
|
|
1908
|
+
});
|
|
1909
|
+
})();
|
|
1910
|
+
// FfiConverter for enum Amount
|
|
1911
|
+
const FfiConverterTypeAmount = (() => {
|
|
1912
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1913
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1914
|
+
read(from) {
|
|
1915
|
+
switch (ordinalConverter.read(from)) {
|
|
1916
|
+
case 1:
|
|
1917
|
+
return new Amount.Bitcoin({
|
|
1918
|
+
amountMsat: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
1919
|
+
});
|
|
1920
|
+
case 2:
|
|
1921
|
+
return new Amount.Currency({
|
|
1922
|
+
iso4217Code: FfiConverterString.read(from),
|
|
1923
|
+
fractionalAmount: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
1924
|
+
});
|
|
1925
|
+
default:
|
|
1926
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
write(value, into) {
|
|
1930
|
+
switch (value.tag) {
|
|
1931
|
+
case Amount_Tags.Bitcoin:
|
|
1932
|
+
{
|
|
1933
|
+
ordinalConverter.write(1, into);
|
|
1934
|
+
const inner = value.inner;
|
|
1935
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(inner.amountMsat, into);
|
|
1936
|
+
return;
|
|
1937
|
+
}
|
|
1938
|
+
case Amount_Tags.Currency:
|
|
1939
|
+
{
|
|
1940
|
+
ordinalConverter.write(2, into);
|
|
1941
|
+
const inner = value.inner;
|
|
1942
|
+
FfiConverterString.write(inner.iso4217Code, into);
|
|
1943
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(inner.fractionalAmount, into);
|
|
1944
|
+
return;
|
|
1945
|
+
}
|
|
1946
|
+
default:
|
|
1947
|
+
// Throwing from here means that Amount_Tags hasn't matched an ordinal.
|
|
1948
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
allocationSize(value) {
|
|
1952
|
+
switch (value.tag) {
|
|
1953
|
+
case Amount_Tags.Bitcoin:
|
|
1954
|
+
{
|
|
1955
|
+
const inner = value.inner;
|
|
1956
|
+
let size = ordinalConverter.allocationSize(1);
|
|
1957
|
+
size += _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(inner.amountMsat);
|
|
1958
|
+
return size;
|
|
1959
|
+
}
|
|
1960
|
+
case Amount_Tags.Currency:
|
|
1961
|
+
{
|
|
1962
|
+
const inner = value.inner;
|
|
1963
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1964
|
+
size += FfiConverterString.allocationSize(inner.iso4217Code);
|
|
1965
|
+
size += _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(inner.fractionalAmount);
|
|
1966
|
+
return size;
|
|
1967
|
+
}
|
|
1968
|
+
default:
|
|
1969
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
return new FFIConverter();
|
|
1974
|
+
})();
|
|
1975
|
+
let BitcoinNetwork = exports.BitcoinNetwork = /*#__PURE__*/function (BitcoinNetwork) {
|
|
1976
|
+
/**
|
|
1977
|
+
* Mainnet
|
|
1978
|
+
*/
|
|
1979
|
+
BitcoinNetwork[BitcoinNetwork["Bitcoin"] = 0] = "Bitcoin";
|
|
1980
|
+
BitcoinNetwork[BitcoinNetwork["Testnet3"] = 1] = "Testnet3";
|
|
1981
|
+
BitcoinNetwork[BitcoinNetwork["Testnet4"] = 2] = "Testnet4";
|
|
1982
|
+
BitcoinNetwork[BitcoinNetwork["Signet"] = 3] = "Signet";
|
|
1983
|
+
BitcoinNetwork[BitcoinNetwork["Regtest"] = 4] = "Regtest";
|
|
1984
|
+
return BitcoinNetwork;
|
|
1985
|
+
}({});
|
|
1986
|
+
const FfiConverterTypeBitcoinNetwork = (() => {
|
|
1987
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1988
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1989
|
+
read(from) {
|
|
1990
|
+
switch (ordinalConverter.read(from)) {
|
|
1991
|
+
case 1:
|
|
1992
|
+
return BitcoinNetwork.Bitcoin;
|
|
1993
|
+
case 2:
|
|
1994
|
+
return BitcoinNetwork.Testnet3;
|
|
1995
|
+
case 3:
|
|
1996
|
+
return BitcoinNetwork.Testnet4;
|
|
1997
|
+
case 4:
|
|
1998
|
+
return BitcoinNetwork.Signet;
|
|
1999
|
+
case 5:
|
|
2000
|
+
return BitcoinNetwork.Regtest;
|
|
2001
|
+
default:
|
|
2002
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
write(value, into) {
|
|
2006
|
+
switch (value) {
|
|
2007
|
+
case BitcoinNetwork.Bitcoin:
|
|
2008
|
+
return ordinalConverter.write(1, into);
|
|
2009
|
+
case BitcoinNetwork.Testnet3:
|
|
2010
|
+
return ordinalConverter.write(2, into);
|
|
2011
|
+
case BitcoinNetwork.Testnet4:
|
|
2012
|
+
return ordinalConverter.write(3, into);
|
|
2013
|
+
case BitcoinNetwork.Signet:
|
|
2014
|
+
return ordinalConverter.write(4, into);
|
|
2015
|
+
case BitcoinNetwork.Regtest:
|
|
2016
|
+
return ordinalConverter.write(5, into);
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
allocationSize(value) {
|
|
2020
|
+
return ordinalConverter.allocationSize(0);
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
return new FFIConverter();
|
|
2024
|
+
})();
|
|
2025
|
+
|
|
2026
|
+
// Enum: InputType
|
|
2027
|
+
let InputType_Tags = exports.InputType_Tags = /*#__PURE__*/function (InputType_Tags) {
|
|
2028
|
+
InputType_Tags["BitcoinAddress"] = "BitcoinAddress";
|
|
2029
|
+
InputType_Tags["Bolt11Invoice"] = "Bolt11Invoice";
|
|
2030
|
+
InputType_Tags["Bolt12Invoice"] = "Bolt12Invoice";
|
|
2031
|
+
InputType_Tags["Bolt12Offer"] = "Bolt12Offer";
|
|
2032
|
+
InputType_Tags["LightningAddress"] = "LightningAddress";
|
|
2033
|
+
InputType_Tags["LnurlPay"] = "LnurlPay";
|
|
2034
|
+
InputType_Tags["SilentPaymentAddress"] = "SilentPaymentAddress";
|
|
2035
|
+
InputType_Tags["LnurlAuth"] = "LnurlAuth";
|
|
2036
|
+
InputType_Tags["Url"] = "Url";
|
|
2037
|
+
InputType_Tags["Bip21"] = "Bip21";
|
|
2038
|
+
InputType_Tags["Bolt12InvoiceRequest"] = "Bolt12InvoiceRequest";
|
|
2039
|
+
InputType_Tags["LnurlWithdraw"] = "LnurlWithdraw";
|
|
2040
|
+
InputType_Tags["SparkAddress"] = "SparkAddress";
|
|
2041
|
+
return InputType_Tags;
|
|
2042
|
+
}({});
|
|
2043
|
+
const InputType = exports.InputType = (() => {
|
|
2044
|
+
class BitcoinAddress_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2045
|
+
/**
|
|
2046
|
+
* @private
|
|
2047
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2048
|
+
*/
|
|
2049
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2050
|
+
tag = InputType_Tags.BitcoinAddress;
|
|
2051
|
+
constructor(v0) {
|
|
2052
|
+
super('InputType', 'BitcoinAddress');
|
|
2053
|
+
this.inner = Object.freeze([v0]);
|
|
2054
|
+
}
|
|
2055
|
+
static new(v0) {
|
|
2056
|
+
return new BitcoinAddress_(v0);
|
|
2057
|
+
}
|
|
2058
|
+
static instanceOf(obj) {
|
|
2059
|
+
return obj.tag === InputType_Tags.BitcoinAddress;
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
class Bolt11Invoice_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2063
|
+
/**
|
|
2064
|
+
* @private
|
|
2065
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2066
|
+
*/
|
|
2067
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2068
|
+
tag = InputType_Tags.Bolt11Invoice;
|
|
2069
|
+
constructor(v0) {
|
|
2070
|
+
super('InputType', 'Bolt11Invoice');
|
|
2071
|
+
this.inner = Object.freeze([v0]);
|
|
2072
|
+
}
|
|
2073
|
+
static new(v0) {
|
|
2074
|
+
return new Bolt11Invoice_(v0);
|
|
2075
|
+
}
|
|
2076
|
+
static instanceOf(obj) {
|
|
2077
|
+
return obj.tag === InputType_Tags.Bolt11Invoice;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
class Bolt12Invoice_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2081
|
+
/**
|
|
2082
|
+
* @private
|
|
2083
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2084
|
+
*/
|
|
2085
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2086
|
+
tag = InputType_Tags.Bolt12Invoice;
|
|
2087
|
+
constructor(v0) {
|
|
2088
|
+
super('InputType', 'Bolt12Invoice');
|
|
2089
|
+
this.inner = Object.freeze([v0]);
|
|
2090
|
+
}
|
|
2091
|
+
static new(v0) {
|
|
2092
|
+
return new Bolt12Invoice_(v0);
|
|
2093
|
+
}
|
|
2094
|
+
static instanceOf(obj) {
|
|
2095
|
+
return obj.tag === InputType_Tags.Bolt12Invoice;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
class Bolt12Offer_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2099
|
+
/**
|
|
2100
|
+
* @private
|
|
2101
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2102
|
+
*/
|
|
2103
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2104
|
+
tag = InputType_Tags.Bolt12Offer;
|
|
2105
|
+
constructor(v0) {
|
|
2106
|
+
super('InputType', 'Bolt12Offer');
|
|
2107
|
+
this.inner = Object.freeze([v0]);
|
|
2108
|
+
}
|
|
2109
|
+
static new(v0) {
|
|
2110
|
+
return new Bolt12Offer_(v0);
|
|
2111
|
+
}
|
|
2112
|
+
static instanceOf(obj) {
|
|
2113
|
+
return obj.tag === InputType_Tags.Bolt12Offer;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
class LightningAddress_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2117
|
+
/**
|
|
2118
|
+
* @private
|
|
2119
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2120
|
+
*/
|
|
2121
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2122
|
+
tag = InputType_Tags.LightningAddress;
|
|
2123
|
+
constructor(v0) {
|
|
2124
|
+
super('InputType', 'LightningAddress');
|
|
2125
|
+
this.inner = Object.freeze([v0]);
|
|
2126
|
+
}
|
|
2127
|
+
static new(v0) {
|
|
2128
|
+
return new LightningAddress_(v0);
|
|
2129
|
+
}
|
|
2130
|
+
static instanceOf(obj) {
|
|
2131
|
+
return obj.tag === InputType_Tags.LightningAddress;
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
class LnurlPay_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2135
|
+
/**
|
|
2136
|
+
* @private
|
|
2137
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2138
|
+
*/
|
|
2139
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2140
|
+
tag = InputType_Tags.LnurlPay;
|
|
2141
|
+
constructor(v0) {
|
|
2142
|
+
super('InputType', 'LnurlPay');
|
|
2143
|
+
this.inner = Object.freeze([v0]);
|
|
2144
|
+
}
|
|
2145
|
+
static new(v0) {
|
|
2146
|
+
return new LnurlPay_(v0);
|
|
2147
|
+
}
|
|
2148
|
+
static instanceOf(obj) {
|
|
2149
|
+
return obj.tag === InputType_Tags.LnurlPay;
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
class SilentPaymentAddress_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2153
|
+
/**
|
|
2154
|
+
* @private
|
|
2155
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2156
|
+
*/
|
|
2157
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2158
|
+
tag = InputType_Tags.SilentPaymentAddress;
|
|
2159
|
+
constructor(v0) {
|
|
2160
|
+
super('InputType', 'SilentPaymentAddress');
|
|
2161
|
+
this.inner = Object.freeze([v0]);
|
|
2162
|
+
}
|
|
2163
|
+
static new(v0) {
|
|
2164
|
+
return new SilentPaymentAddress_(v0);
|
|
2165
|
+
}
|
|
2166
|
+
static instanceOf(obj) {
|
|
2167
|
+
return obj.tag === InputType_Tags.SilentPaymentAddress;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
class LnurlAuth_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2171
|
+
/**
|
|
2172
|
+
* @private
|
|
2173
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2174
|
+
*/
|
|
2175
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2176
|
+
tag = InputType_Tags.LnurlAuth;
|
|
2177
|
+
constructor(v0) {
|
|
2178
|
+
super('InputType', 'LnurlAuth');
|
|
2179
|
+
this.inner = Object.freeze([v0]);
|
|
2180
|
+
}
|
|
2181
|
+
static new(v0) {
|
|
2182
|
+
return new LnurlAuth_(v0);
|
|
2183
|
+
}
|
|
2184
|
+
static instanceOf(obj) {
|
|
2185
|
+
return obj.tag === InputType_Tags.LnurlAuth;
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
class Url_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2189
|
+
/**
|
|
2190
|
+
* @private
|
|
2191
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2192
|
+
*/
|
|
2193
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2194
|
+
tag = InputType_Tags.Url;
|
|
2195
|
+
constructor(v0) {
|
|
2196
|
+
super('InputType', 'Url');
|
|
2197
|
+
this.inner = Object.freeze([v0]);
|
|
2198
|
+
}
|
|
2199
|
+
static new(v0) {
|
|
2200
|
+
return new Url_(v0);
|
|
2201
|
+
}
|
|
2202
|
+
static instanceOf(obj) {
|
|
2203
|
+
return obj.tag === InputType_Tags.Url;
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
class Bip21_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2207
|
+
/**
|
|
2208
|
+
* @private
|
|
2209
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2210
|
+
*/
|
|
2211
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2212
|
+
tag = InputType_Tags.Bip21;
|
|
2213
|
+
constructor(v0) {
|
|
2214
|
+
super('InputType', 'Bip21');
|
|
2215
|
+
this.inner = Object.freeze([v0]);
|
|
2216
|
+
}
|
|
2217
|
+
static new(v0) {
|
|
2218
|
+
return new Bip21_(v0);
|
|
2219
|
+
}
|
|
2220
|
+
static instanceOf(obj) {
|
|
2221
|
+
return obj.tag === InputType_Tags.Bip21;
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
class Bolt12InvoiceRequest_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2225
|
+
/**
|
|
2226
|
+
* @private
|
|
2227
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2228
|
+
*/
|
|
2229
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2230
|
+
tag = InputType_Tags.Bolt12InvoiceRequest;
|
|
2231
|
+
constructor(v0) {
|
|
2232
|
+
super('InputType', 'Bolt12InvoiceRequest');
|
|
2233
|
+
this.inner = Object.freeze([v0]);
|
|
2234
|
+
}
|
|
2235
|
+
static new(v0) {
|
|
2236
|
+
return new Bolt12InvoiceRequest_(v0);
|
|
2237
|
+
}
|
|
2238
|
+
static instanceOf(obj) {
|
|
2239
|
+
return obj.tag === InputType_Tags.Bolt12InvoiceRequest;
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
class LnurlWithdraw_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2243
|
+
/**
|
|
2244
|
+
* @private
|
|
2245
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2246
|
+
*/
|
|
2247
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2248
|
+
tag = InputType_Tags.LnurlWithdraw;
|
|
2249
|
+
constructor(v0) {
|
|
2250
|
+
super('InputType', 'LnurlWithdraw');
|
|
2251
|
+
this.inner = Object.freeze([v0]);
|
|
2252
|
+
}
|
|
2253
|
+
static new(v0) {
|
|
2254
|
+
return new LnurlWithdraw_(v0);
|
|
2255
|
+
}
|
|
2256
|
+
static instanceOf(obj) {
|
|
2257
|
+
return obj.tag === InputType_Tags.LnurlWithdraw;
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
class SparkAddress_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2261
|
+
/**
|
|
2262
|
+
* @private
|
|
2263
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2264
|
+
*/
|
|
2265
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'InputType';
|
|
2266
|
+
tag = InputType_Tags.SparkAddress;
|
|
2267
|
+
constructor(v0) {
|
|
2268
|
+
super('InputType', 'SparkAddress');
|
|
2269
|
+
this.inner = Object.freeze([v0]);
|
|
2270
|
+
}
|
|
2271
|
+
static new(v0) {
|
|
2272
|
+
return new SparkAddress_(v0);
|
|
2273
|
+
}
|
|
2274
|
+
static instanceOf(obj) {
|
|
2275
|
+
return obj.tag === InputType_Tags.SparkAddress;
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
function instanceOf(obj) {
|
|
2279
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'InputType';
|
|
2280
|
+
}
|
|
2281
|
+
return Object.freeze({
|
|
2282
|
+
instanceOf,
|
|
2283
|
+
BitcoinAddress: BitcoinAddress_,
|
|
2284
|
+
Bolt11Invoice: Bolt11Invoice_,
|
|
2285
|
+
Bolt12Invoice: Bolt12Invoice_,
|
|
2286
|
+
Bolt12Offer: Bolt12Offer_,
|
|
2287
|
+
LightningAddress: LightningAddress_,
|
|
2288
|
+
LnurlPay: LnurlPay_,
|
|
2289
|
+
SilentPaymentAddress: SilentPaymentAddress_,
|
|
2290
|
+
LnurlAuth: LnurlAuth_,
|
|
2291
|
+
Url: Url_,
|
|
2292
|
+
Bip21: Bip21_,
|
|
2293
|
+
Bolt12InvoiceRequest: Bolt12InvoiceRequest_,
|
|
2294
|
+
LnurlWithdraw: LnurlWithdraw_,
|
|
2295
|
+
SparkAddress: SparkAddress_
|
|
2296
|
+
});
|
|
2297
|
+
})();
|
|
2298
|
+
// FfiConverter for enum InputType
|
|
2299
|
+
const FfiConverterTypeInputType = (() => {
|
|
2300
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
2301
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2302
|
+
read(from) {
|
|
2303
|
+
switch (ordinalConverter.read(from)) {
|
|
2304
|
+
case 1:
|
|
2305
|
+
return new InputType.BitcoinAddress(FfiConverterTypeBitcoinAddressDetails.read(from));
|
|
2306
|
+
case 2:
|
|
2307
|
+
return new InputType.Bolt11Invoice(FfiConverterTypeBolt11InvoiceDetails.read(from));
|
|
2308
|
+
case 3:
|
|
2309
|
+
return new InputType.Bolt12Invoice(FfiConverterTypeBolt12InvoiceDetails.read(from));
|
|
2310
|
+
case 4:
|
|
2311
|
+
return new InputType.Bolt12Offer(FfiConverterTypeBolt12OfferDetails.read(from));
|
|
2312
|
+
case 5:
|
|
2313
|
+
return new InputType.LightningAddress(FfiConverterTypeLightningAddressDetails.read(from));
|
|
2314
|
+
case 6:
|
|
2315
|
+
return new InputType.LnurlPay(FfiConverterTypeLnurlPayRequestDetails.read(from));
|
|
2316
|
+
case 7:
|
|
2317
|
+
return new InputType.SilentPaymentAddress(FfiConverterTypeSilentPaymentAddressDetails.read(from));
|
|
2318
|
+
case 8:
|
|
2319
|
+
return new InputType.LnurlAuth(FfiConverterTypeLnurlAuthRequestDetails.read(from));
|
|
2320
|
+
case 9:
|
|
2321
|
+
return new InputType.Url(FfiConverterString.read(from));
|
|
2322
|
+
case 10:
|
|
2323
|
+
return new InputType.Bip21(FfiConverterTypeBip21Details.read(from));
|
|
2324
|
+
case 11:
|
|
2325
|
+
return new InputType.Bolt12InvoiceRequest(FfiConverterTypeBolt12InvoiceRequestDetails.read(from));
|
|
2326
|
+
case 12:
|
|
2327
|
+
return new InputType.LnurlWithdraw(FfiConverterTypeLnurlWithdrawRequestDetails.read(from));
|
|
2328
|
+
case 13:
|
|
2329
|
+
return new InputType.SparkAddress(FfiConverterTypeSparkAddressDetails.read(from));
|
|
2330
|
+
default:
|
|
2331
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
write(value, into) {
|
|
2335
|
+
switch (value.tag) {
|
|
2336
|
+
case InputType_Tags.BitcoinAddress:
|
|
2337
|
+
{
|
|
2338
|
+
ordinalConverter.write(1, into);
|
|
2339
|
+
const inner = value.inner;
|
|
2340
|
+
FfiConverterTypeBitcoinAddressDetails.write(inner[0], into);
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
case InputType_Tags.Bolt11Invoice:
|
|
2344
|
+
{
|
|
2345
|
+
ordinalConverter.write(2, into);
|
|
2346
|
+
const inner = value.inner;
|
|
2347
|
+
FfiConverterTypeBolt11InvoiceDetails.write(inner[0], into);
|
|
2348
|
+
return;
|
|
2349
|
+
}
|
|
2350
|
+
case InputType_Tags.Bolt12Invoice:
|
|
2351
|
+
{
|
|
2352
|
+
ordinalConverter.write(3, into);
|
|
2353
|
+
const inner = value.inner;
|
|
2354
|
+
FfiConverterTypeBolt12InvoiceDetails.write(inner[0], into);
|
|
2355
|
+
return;
|
|
2356
|
+
}
|
|
2357
|
+
case InputType_Tags.Bolt12Offer:
|
|
2358
|
+
{
|
|
2359
|
+
ordinalConverter.write(4, into);
|
|
2360
|
+
const inner = value.inner;
|
|
2361
|
+
FfiConverterTypeBolt12OfferDetails.write(inner[0], into);
|
|
2362
|
+
return;
|
|
2363
|
+
}
|
|
2364
|
+
case InputType_Tags.LightningAddress:
|
|
2365
|
+
{
|
|
2366
|
+
ordinalConverter.write(5, into);
|
|
2367
|
+
const inner = value.inner;
|
|
2368
|
+
FfiConverterTypeLightningAddressDetails.write(inner[0], into);
|
|
2369
|
+
return;
|
|
2370
|
+
}
|
|
2371
|
+
case InputType_Tags.LnurlPay:
|
|
2372
|
+
{
|
|
2373
|
+
ordinalConverter.write(6, into);
|
|
2374
|
+
const inner = value.inner;
|
|
2375
|
+
FfiConverterTypeLnurlPayRequestDetails.write(inner[0], into);
|
|
2376
|
+
return;
|
|
2377
|
+
}
|
|
2378
|
+
case InputType_Tags.SilentPaymentAddress:
|
|
2379
|
+
{
|
|
2380
|
+
ordinalConverter.write(7, into);
|
|
2381
|
+
const inner = value.inner;
|
|
2382
|
+
FfiConverterTypeSilentPaymentAddressDetails.write(inner[0], into);
|
|
2383
|
+
return;
|
|
2384
|
+
}
|
|
2385
|
+
case InputType_Tags.LnurlAuth:
|
|
2386
|
+
{
|
|
2387
|
+
ordinalConverter.write(8, into);
|
|
2388
|
+
const inner = value.inner;
|
|
2389
|
+
FfiConverterTypeLnurlAuthRequestDetails.write(inner[0], into);
|
|
2390
|
+
return;
|
|
2391
|
+
}
|
|
2392
|
+
case InputType_Tags.Url:
|
|
2393
|
+
{
|
|
2394
|
+
ordinalConverter.write(9, into);
|
|
2395
|
+
const inner = value.inner;
|
|
2396
|
+
FfiConverterString.write(inner[0], into);
|
|
2397
|
+
return;
|
|
2398
|
+
}
|
|
2399
|
+
case InputType_Tags.Bip21:
|
|
2400
|
+
{
|
|
2401
|
+
ordinalConverter.write(10, into);
|
|
2402
|
+
const inner = value.inner;
|
|
2403
|
+
FfiConverterTypeBip21Details.write(inner[0], into);
|
|
2404
|
+
return;
|
|
2405
|
+
}
|
|
2406
|
+
case InputType_Tags.Bolt12InvoiceRequest:
|
|
2407
|
+
{
|
|
2408
|
+
ordinalConverter.write(11, into);
|
|
2409
|
+
const inner = value.inner;
|
|
2410
|
+
FfiConverterTypeBolt12InvoiceRequestDetails.write(inner[0], into);
|
|
2411
|
+
return;
|
|
2412
|
+
}
|
|
2413
|
+
case InputType_Tags.LnurlWithdraw:
|
|
2414
|
+
{
|
|
2415
|
+
ordinalConverter.write(12, into);
|
|
2416
|
+
const inner = value.inner;
|
|
2417
|
+
FfiConverterTypeLnurlWithdrawRequestDetails.write(inner[0], into);
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
case InputType_Tags.SparkAddress:
|
|
2421
|
+
{
|
|
2422
|
+
ordinalConverter.write(13, into);
|
|
2423
|
+
const inner = value.inner;
|
|
2424
|
+
FfiConverterTypeSparkAddressDetails.write(inner[0], into);
|
|
2425
|
+
return;
|
|
2426
|
+
}
|
|
2427
|
+
default:
|
|
2428
|
+
// Throwing from here means that InputType_Tags hasn't matched an ordinal.
|
|
2429
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
allocationSize(value) {
|
|
2433
|
+
switch (value.tag) {
|
|
2434
|
+
case InputType_Tags.BitcoinAddress:
|
|
2435
|
+
{
|
|
2436
|
+
const inner = value.inner;
|
|
2437
|
+
let size = ordinalConverter.allocationSize(1);
|
|
2438
|
+
size += FfiConverterTypeBitcoinAddressDetails.allocationSize(inner[0]);
|
|
2439
|
+
return size;
|
|
2440
|
+
}
|
|
2441
|
+
case InputType_Tags.Bolt11Invoice:
|
|
2442
|
+
{
|
|
2443
|
+
const inner = value.inner;
|
|
2444
|
+
let size = ordinalConverter.allocationSize(2);
|
|
2445
|
+
size += FfiConverterTypeBolt11InvoiceDetails.allocationSize(inner[0]);
|
|
2446
|
+
return size;
|
|
2447
|
+
}
|
|
2448
|
+
case InputType_Tags.Bolt12Invoice:
|
|
2449
|
+
{
|
|
2450
|
+
const inner = value.inner;
|
|
2451
|
+
let size = ordinalConverter.allocationSize(3);
|
|
2452
|
+
size += FfiConverterTypeBolt12InvoiceDetails.allocationSize(inner[0]);
|
|
2453
|
+
return size;
|
|
2454
|
+
}
|
|
2455
|
+
case InputType_Tags.Bolt12Offer:
|
|
2456
|
+
{
|
|
2457
|
+
const inner = value.inner;
|
|
2458
|
+
let size = ordinalConverter.allocationSize(4);
|
|
2459
|
+
size += FfiConverterTypeBolt12OfferDetails.allocationSize(inner[0]);
|
|
2460
|
+
return size;
|
|
2461
|
+
}
|
|
2462
|
+
case InputType_Tags.LightningAddress:
|
|
2463
|
+
{
|
|
2464
|
+
const inner = value.inner;
|
|
2465
|
+
let size = ordinalConverter.allocationSize(5);
|
|
2466
|
+
size += FfiConverterTypeLightningAddressDetails.allocationSize(inner[0]);
|
|
2467
|
+
return size;
|
|
2468
|
+
}
|
|
2469
|
+
case InputType_Tags.LnurlPay:
|
|
2470
|
+
{
|
|
2471
|
+
const inner = value.inner;
|
|
2472
|
+
let size = ordinalConverter.allocationSize(6);
|
|
2473
|
+
size += FfiConverterTypeLnurlPayRequestDetails.allocationSize(inner[0]);
|
|
2474
|
+
return size;
|
|
2475
|
+
}
|
|
2476
|
+
case InputType_Tags.SilentPaymentAddress:
|
|
2477
|
+
{
|
|
2478
|
+
const inner = value.inner;
|
|
2479
|
+
let size = ordinalConverter.allocationSize(7);
|
|
2480
|
+
size += FfiConverterTypeSilentPaymentAddressDetails.allocationSize(inner[0]);
|
|
2481
|
+
return size;
|
|
2482
|
+
}
|
|
2483
|
+
case InputType_Tags.LnurlAuth:
|
|
2484
|
+
{
|
|
2485
|
+
const inner = value.inner;
|
|
2486
|
+
let size = ordinalConverter.allocationSize(8);
|
|
2487
|
+
size += FfiConverterTypeLnurlAuthRequestDetails.allocationSize(inner[0]);
|
|
2488
|
+
return size;
|
|
2489
|
+
}
|
|
2490
|
+
case InputType_Tags.Url:
|
|
2491
|
+
{
|
|
2492
|
+
const inner = value.inner;
|
|
2493
|
+
let size = ordinalConverter.allocationSize(9);
|
|
2494
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
2495
|
+
return size;
|
|
2496
|
+
}
|
|
2497
|
+
case InputType_Tags.Bip21:
|
|
2498
|
+
{
|
|
2499
|
+
const inner = value.inner;
|
|
2500
|
+
let size = ordinalConverter.allocationSize(10);
|
|
2501
|
+
size += FfiConverterTypeBip21Details.allocationSize(inner[0]);
|
|
2502
|
+
return size;
|
|
2503
|
+
}
|
|
2504
|
+
case InputType_Tags.Bolt12InvoiceRequest:
|
|
2505
|
+
{
|
|
2506
|
+
const inner = value.inner;
|
|
2507
|
+
let size = ordinalConverter.allocationSize(11);
|
|
2508
|
+
size += FfiConverterTypeBolt12InvoiceRequestDetails.allocationSize(inner[0]);
|
|
2509
|
+
return size;
|
|
2510
|
+
}
|
|
2511
|
+
case InputType_Tags.LnurlWithdraw:
|
|
2512
|
+
{
|
|
2513
|
+
const inner = value.inner;
|
|
2514
|
+
let size = ordinalConverter.allocationSize(12);
|
|
2515
|
+
size += FfiConverterTypeLnurlWithdrawRequestDetails.allocationSize(inner[0]);
|
|
2516
|
+
return size;
|
|
2517
|
+
}
|
|
2518
|
+
case InputType_Tags.SparkAddress:
|
|
2519
|
+
{
|
|
2520
|
+
const inner = value.inner;
|
|
2521
|
+
let size = ordinalConverter.allocationSize(13);
|
|
2522
|
+
size += FfiConverterTypeSparkAddressDetails.allocationSize(inner[0]);
|
|
2523
|
+
return size;
|
|
2524
|
+
}
|
|
2525
|
+
default:
|
|
2526
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
return new FFIConverter();
|
|
2531
|
+
})();
|
|
2532
|
+
|
|
2533
|
+
// Enum: LnurlCallbackStatus
|
|
2534
|
+
let LnurlCallbackStatus_Tags = exports.LnurlCallbackStatus_Tags = /*#__PURE__*/function (LnurlCallbackStatus_Tags) {
|
|
2535
|
+
LnurlCallbackStatus_Tags["Ok"] = "Ok";
|
|
2536
|
+
LnurlCallbackStatus_Tags["ErrorStatus"] = "ErrorStatus";
|
|
2537
|
+
return LnurlCallbackStatus_Tags;
|
|
2538
|
+
}({});
|
|
2539
|
+
/**
|
|
2540
|
+
* Contains the result of the entire LNURL interaction, as reported by the LNURL endpoint.
|
|
2541
|
+
*
|
|
2542
|
+
* * `Ok` indicates the interaction with the endpoint was valid, and the endpoint
|
|
2543
|
+
* - started to pay the invoice asynchronously in the case of LNURL-withdraw,
|
|
2544
|
+
* - verified the client signature in the case of LNURL-auth
|
|
2545
|
+
* * `Error` indicates a generic issue the LNURL endpoint encountered, including a freetext
|
|
2546
|
+
* description of the reason.
|
|
2547
|
+
*
|
|
2548
|
+
* Both cases are described in LUD-03 <https://github.com/lnurl/luds/blob/luds/03.md> & LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
2549
|
+
*/
|
|
2550
|
+
const LnurlCallbackStatus = exports.LnurlCallbackStatus = (() => {
|
|
2551
|
+
/**
|
|
2552
|
+
* On-wire format is: `{"status": "OK"}`
|
|
2553
|
+
*/
|
|
2554
|
+
class Ok_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2555
|
+
/**
|
|
2556
|
+
* @private
|
|
2557
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2558
|
+
*/
|
|
2559
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'LnurlCallbackStatus';
|
|
2560
|
+
tag = LnurlCallbackStatus_Tags.Ok;
|
|
2561
|
+
constructor() {
|
|
2562
|
+
super('LnurlCallbackStatus', 'Ok');
|
|
2563
|
+
}
|
|
2564
|
+
static new() {
|
|
2565
|
+
return new Ok_();
|
|
2566
|
+
}
|
|
2567
|
+
static instanceOf(obj) {
|
|
2568
|
+
return obj.tag === LnurlCallbackStatus_Tags.Ok;
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
/**
|
|
2572
|
+
* On-wire format is: `{"status": "ERROR", "reason": "error details..."}`
|
|
2573
|
+
*/
|
|
2574
|
+
class ErrorStatus_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2575
|
+
/**
|
|
2576
|
+
* @private
|
|
2577
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2578
|
+
*/
|
|
2579
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'LnurlCallbackStatus';
|
|
2580
|
+
tag = LnurlCallbackStatus_Tags.ErrorStatus;
|
|
2581
|
+
constructor(inner) {
|
|
2582
|
+
super('LnurlCallbackStatus', 'ErrorStatus');
|
|
2583
|
+
this.inner = Object.freeze(inner);
|
|
2584
|
+
}
|
|
2585
|
+
static new(inner) {
|
|
2586
|
+
return new ErrorStatus_(inner);
|
|
2587
|
+
}
|
|
2588
|
+
static instanceOf(obj) {
|
|
2589
|
+
return obj.tag === LnurlCallbackStatus_Tags.ErrorStatus;
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
function instanceOf(obj) {
|
|
2593
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'LnurlCallbackStatus';
|
|
2594
|
+
}
|
|
2595
|
+
return Object.freeze({
|
|
2596
|
+
instanceOf,
|
|
2597
|
+
Ok: Ok_,
|
|
2598
|
+
ErrorStatus: ErrorStatus_
|
|
2599
|
+
});
|
|
2600
|
+
})();
|
|
2601
|
+
|
|
2602
|
+
/**
|
|
2603
|
+
* Contains the result of the entire LNURL interaction, as reported by the LNURL endpoint.
|
|
2604
|
+
*
|
|
2605
|
+
* * `Ok` indicates the interaction with the endpoint was valid, and the endpoint
|
|
2606
|
+
* - started to pay the invoice asynchronously in the case of LNURL-withdraw,
|
|
2607
|
+
* - verified the client signature in the case of LNURL-auth
|
|
2608
|
+
* * `Error` indicates a generic issue the LNURL endpoint encountered, including a freetext
|
|
2609
|
+
* description of the reason.
|
|
2610
|
+
*
|
|
2611
|
+
* Both cases are described in LUD-03 <https://github.com/lnurl/luds/blob/luds/03.md> & LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
2612
|
+
*/
|
|
2613
|
+
|
|
2614
|
+
// FfiConverter for enum LnurlCallbackStatus
|
|
2615
|
+
const FfiConverterTypeLnurlCallbackStatus = (() => {
|
|
2616
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
2617
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2618
|
+
read(from) {
|
|
2619
|
+
switch (ordinalConverter.read(from)) {
|
|
2620
|
+
case 1:
|
|
2621
|
+
return new LnurlCallbackStatus.Ok();
|
|
2622
|
+
case 2:
|
|
2623
|
+
return new LnurlCallbackStatus.ErrorStatus({
|
|
2624
|
+
errorDetails: FfiConverterTypeLnurlErrorDetails.read(from)
|
|
2625
|
+
});
|
|
2626
|
+
default:
|
|
2627
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
write(value, into) {
|
|
2631
|
+
switch (value.tag) {
|
|
2632
|
+
case LnurlCallbackStatus_Tags.Ok:
|
|
2633
|
+
{
|
|
2634
|
+
ordinalConverter.write(1, into);
|
|
2635
|
+
return;
|
|
2636
|
+
}
|
|
2637
|
+
case LnurlCallbackStatus_Tags.ErrorStatus:
|
|
2638
|
+
{
|
|
2639
|
+
ordinalConverter.write(2, into);
|
|
2640
|
+
const inner = value.inner;
|
|
2641
|
+
FfiConverterTypeLnurlErrorDetails.write(inner.errorDetails, into);
|
|
2642
|
+
return;
|
|
2643
|
+
}
|
|
2644
|
+
default:
|
|
2645
|
+
// Throwing from here means that LnurlCallbackStatus_Tags hasn't matched an ordinal.
|
|
2646
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
allocationSize(value) {
|
|
2650
|
+
switch (value.tag) {
|
|
2651
|
+
case LnurlCallbackStatus_Tags.Ok:
|
|
2652
|
+
{
|
|
2653
|
+
return ordinalConverter.allocationSize(1);
|
|
2654
|
+
}
|
|
2655
|
+
case LnurlCallbackStatus_Tags.ErrorStatus:
|
|
2656
|
+
{
|
|
2657
|
+
const inner = value.inner;
|
|
2658
|
+
let size = ordinalConverter.allocationSize(2);
|
|
2659
|
+
size += FfiConverterTypeLnurlErrorDetails.allocationSize(inner.errorDetails);
|
|
2660
|
+
return size;
|
|
2661
|
+
}
|
|
2662
|
+
default:
|
|
2663
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
return new FFIConverter();
|
|
2668
|
+
})();
|
|
2669
|
+
|
|
2670
|
+
// Error type: ServiceConnectivityError
|
|
2671
|
+
|
|
2672
|
+
// Enum: ServiceConnectivityError
|
|
2673
|
+
let ServiceConnectivityError_Tags = exports.ServiceConnectivityError_Tags = /*#__PURE__*/function (ServiceConnectivityError_Tags) {
|
|
2674
|
+
ServiceConnectivityError_Tags["Builder"] = "Builder";
|
|
2675
|
+
ServiceConnectivityError_Tags["Redirect"] = "Redirect";
|
|
2676
|
+
ServiceConnectivityError_Tags["Status"] = "Status";
|
|
2677
|
+
ServiceConnectivityError_Tags["Timeout"] = "Timeout";
|
|
2678
|
+
ServiceConnectivityError_Tags["Request"] = "Request";
|
|
2679
|
+
ServiceConnectivityError_Tags["Connect"] = "Connect";
|
|
2680
|
+
ServiceConnectivityError_Tags["Body"] = "Body";
|
|
2681
|
+
ServiceConnectivityError_Tags["Decode"] = "Decode";
|
|
2682
|
+
ServiceConnectivityError_Tags["Json"] = "Json";
|
|
2683
|
+
ServiceConnectivityError_Tags["Other"] = "Other";
|
|
2684
|
+
return ServiceConnectivityError_Tags;
|
|
2685
|
+
}({});
|
|
2686
|
+
const ServiceConnectivityError = exports.ServiceConnectivityError = (() => {
|
|
2687
|
+
class Builder_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2688
|
+
/**
|
|
2689
|
+
* @private
|
|
2690
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2691
|
+
*/
|
|
2692
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2693
|
+
tag = ServiceConnectivityError_Tags.Builder;
|
|
2694
|
+
constructor(v0) {
|
|
2695
|
+
super('ServiceConnectivityError', 'Builder');
|
|
2696
|
+
this.inner = Object.freeze([v0]);
|
|
2697
|
+
}
|
|
2698
|
+
static new(v0) {
|
|
2699
|
+
return new Builder_(v0);
|
|
2700
|
+
}
|
|
2701
|
+
static instanceOf(obj) {
|
|
2702
|
+
return obj.tag === ServiceConnectivityError_Tags.Builder;
|
|
2703
|
+
}
|
|
2704
|
+
static hasInner(obj) {
|
|
2705
|
+
return Builder_.instanceOf(obj);
|
|
2706
|
+
}
|
|
2707
|
+
static getInner(obj) {
|
|
2708
|
+
return obj.inner;
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
class Redirect_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2712
|
+
/**
|
|
2713
|
+
* @private
|
|
2714
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2715
|
+
*/
|
|
2716
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2717
|
+
tag = ServiceConnectivityError_Tags.Redirect;
|
|
2718
|
+
constructor(v0) {
|
|
2719
|
+
super('ServiceConnectivityError', 'Redirect');
|
|
2720
|
+
this.inner = Object.freeze([v0]);
|
|
2721
|
+
}
|
|
2722
|
+
static new(v0) {
|
|
2723
|
+
return new Redirect_(v0);
|
|
2724
|
+
}
|
|
2725
|
+
static instanceOf(obj) {
|
|
2726
|
+
return obj.tag === ServiceConnectivityError_Tags.Redirect;
|
|
2727
|
+
}
|
|
2728
|
+
static hasInner(obj) {
|
|
2729
|
+
return Redirect_.instanceOf(obj);
|
|
2730
|
+
}
|
|
2731
|
+
static getInner(obj) {
|
|
2732
|
+
return obj.inner;
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
class Status_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2736
|
+
/**
|
|
2737
|
+
* @private
|
|
2738
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2739
|
+
*/
|
|
2740
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2741
|
+
tag = ServiceConnectivityError_Tags.Status;
|
|
2742
|
+
constructor(inner) {
|
|
2743
|
+
super('ServiceConnectivityError', 'Status');
|
|
2744
|
+
this.inner = Object.freeze(inner);
|
|
2745
|
+
}
|
|
2746
|
+
static new(inner) {
|
|
2747
|
+
return new Status_(inner);
|
|
2748
|
+
}
|
|
2749
|
+
static instanceOf(obj) {
|
|
2750
|
+
return obj.tag === ServiceConnectivityError_Tags.Status;
|
|
2751
|
+
}
|
|
2752
|
+
static hasInner(obj) {
|
|
2753
|
+
return Status_.instanceOf(obj);
|
|
2754
|
+
}
|
|
2755
|
+
static getInner(obj) {
|
|
2756
|
+
return obj.inner;
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
class Timeout_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2760
|
+
/**
|
|
2761
|
+
* @private
|
|
2762
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2763
|
+
*/
|
|
2764
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2765
|
+
tag = ServiceConnectivityError_Tags.Timeout;
|
|
2766
|
+
constructor(v0) {
|
|
2767
|
+
super('ServiceConnectivityError', 'Timeout');
|
|
2768
|
+
this.inner = Object.freeze([v0]);
|
|
2769
|
+
}
|
|
2770
|
+
static new(v0) {
|
|
2771
|
+
return new Timeout_(v0);
|
|
2772
|
+
}
|
|
2773
|
+
static instanceOf(obj) {
|
|
2774
|
+
return obj.tag === ServiceConnectivityError_Tags.Timeout;
|
|
2775
|
+
}
|
|
2776
|
+
static hasInner(obj) {
|
|
2777
|
+
return Timeout_.instanceOf(obj);
|
|
2778
|
+
}
|
|
2779
|
+
static getInner(obj) {
|
|
2780
|
+
return obj.inner;
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
class Request_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2784
|
+
/**
|
|
2785
|
+
* @private
|
|
2786
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2787
|
+
*/
|
|
2788
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2789
|
+
tag = ServiceConnectivityError_Tags.Request;
|
|
2790
|
+
constructor(v0) {
|
|
2791
|
+
super('ServiceConnectivityError', 'Request');
|
|
2792
|
+
this.inner = Object.freeze([v0]);
|
|
2793
|
+
}
|
|
2794
|
+
static new(v0) {
|
|
2795
|
+
return new Request_(v0);
|
|
2796
|
+
}
|
|
2797
|
+
static instanceOf(obj) {
|
|
2798
|
+
return obj.tag === ServiceConnectivityError_Tags.Request;
|
|
2799
|
+
}
|
|
2800
|
+
static hasInner(obj) {
|
|
2801
|
+
return Request_.instanceOf(obj);
|
|
2802
|
+
}
|
|
2803
|
+
static getInner(obj) {
|
|
2804
|
+
return obj.inner;
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
class Connect_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2808
|
+
/**
|
|
2809
|
+
* @private
|
|
2810
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2811
|
+
*/
|
|
2812
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2813
|
+
tag = ServiceConnectivityError_Tags.Connect;
|
|
2814
|
+
constructor(v0) {
|
|
2815
|
+
super('ServiceConnectivityError', 'Connect');
|
|
2816
|
+
this.inner = Object.freeze([v0]);
|
|
2817
|
+
}
|
|
2818
|
+
static new(v0) {
|
|
2819
|
+
return new Connect_(v0);
|
|
2820
|
+
}
|
|
2821
|
+
static instanceOf(obj) {
|
|
2822
|
+
return obj.tag === ServiceConnectivityError_Tags.Connect;
|
|
2823
|
+
}
|
|
2824
|
+
static hasInner(obj) {
|
|
2825
|
+
return Connect_.instanceOf(obj);
|
|
2826
|
+
}
|
|
2827
|
+
static getInner(obj) {
|
|
2828
|
+
return obj.inner;
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
class Body_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2832
|
+
/**
|
|
2833
|
+
* @private
|
|
2834
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2835
|
+
*/
|
|
2836
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2837
|
+
tag = ServiceConnectivityError_Tags.Body;
|
|
2838
|
+
constructor(v0) {
|
|
2839
|
+
super('ServiceConnectivityError', 'Body');
|
|
2840
|
+
this.inner = Object.freeze([v0]);
|
|
2841
|
+
}
|
|
2842
|
+
static new(v0) {
|
|
2843
|
+
return new Body_(v0);
|
|
2844
|
+
}
|
|
2845
|
+
static instanceOf(obj) {
|
|
2846
|
+
return obj.tag === ServiceConnectivityError_Tags.Body;
|
|
2847
|
+
}
|
|
2848
|
+
static hasInner(obj) {
|
|
2849
|
+
return Body_.instanceOf(obj);
|
|
2850
|
+
}
|
|
2851
|
+
static getInner(obj) {
|
|
2852
|
+
return obj.inner;
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
class Decode_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2856
|
+
/**
|
|
2857
|
+
* @private
|
|
2858
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2859
|
+
*/
|
|
2860
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2861
|
+
tag = ServiceConnectivityError_Tags.Decode;
|
|
2862
|
+
constructor(v0) {
|
|
2863
|
+
super('ServiceConnectivityError', 'Decode');
|
|
2864
|
+
this.inner = Object.freeze([v0]);
|
|
2865
|
+
}
|
|
2866
|
+
static new(v0) {
|
|
2867
|
+
return new Decode_(v0);
|
|
2868
|
+
}
|
|
2869
|
+
static instanceOf(obj) {
|
|
2870
|
+
return obj.tag === ServiceConnectivityError_Tags.Decode;
|
|
2871
|
+
}
|
|
2872
|
+
static hasInner(obj) {
|
|
2873
|
+
return Decode_.instanceOf(obj);
|
|
2874
|
+
}
|
|
2875
|
+
static getInner(obj) {
|
|
2876
|
+
return obj.inner;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
class Json_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2880
|
+
/**
|
|
2881
|
+
* @private
|
|
2882
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2883
|
+
*/
|
|
2884
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2885
|
+
tag = ServiceConnectivityError_Tags.Json;
|
|
2886
|
+
constructor(v0) {
|
|
2887
|
+
super('ServiceConnectivityError', 'Json');
|
|
2888
|
+
this.inner = Object.freeze([v0]);
|
|
2889
|
+
}
|
|
2890
|
+
static new(v0) {
|
|
2891
|
+
return new Json_(v0);
|
|
2892
|
+
}
|
|
2893
|
+
static instanceOf(obj) {
|
|
2894
|
+
return obj.tag === ServiceConnectivityError_Tags.Json;
|
|
2895
|
+
}
|
|
2896
|
+
static hasInner(obj) {
|
|
2897
|
+
return Json_.instanceOf(obj);
|
|
2898
|
+
}
|
|
2899
|
+
static getInner(obj) {
|
|
2900
|
+
return obj.inner;
|
|
2901
|
+
}
|
|
2902
|
+
}
|
|
2903
|
+
class Other_ extends _uniffiBindgenReactNative.UniffiError {
|
|
2904
|
+
/**
|
|
2905
|
+
* @private
|
|
2906
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2907
|
+
*/
|
|
2908
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ServiceConnectivityError';
|
|
2909
|
+
tag = ServiceConnectivityError_Tags.Other;
|
|
2910
|
+
constructor(v0) {
|
|
2911
|
+
super('ServiceConnectivityError', 'Other');
|
|
2912
|
+
this.inner = Object.freeze([v0]);
|
|
2913
|
+
}
|
|
2914
|
+
static new(v0) {
|
|
2915
|
+
return new Other_(v0);
|
|
2916
|
+
}
|
|
2917
|
+
static instanceOf(obj) {
|
|
2918
|
+
return obj.tag === ServiceConnectivityError_Tags.Other;
|
|
2919
|
+
}
|
|
2920
|
+
static hasInner(obj) {
|
|
2921
|
+
return Other_.instanceOf(obj);
|
|
2922
|
+
}
|
|
2923
|
+
static getInner(obj) {
|
|
2924
|
+
return obj.inner;
|
|
2925
|
+
}
|
|
2926
|
+
}
|
|
2927
|
+
function instanceOf(obj) {
|
|
2928
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'ServiceConnectivityError';
|
|
2929
|
+
}
|
|
2930
|
+
return Object.freeze({
|
|
2931
|
+
instanceOf,
|
|
2932
|
+
Builder: Builder_,
|
|
2933
|
+
Redirect: Redirect_,
|
|
2934
|
+
Status: Status_,
|
|
2935
|
+
Timeout: Timeout_,
|
|
2936
|
+
Request: Request_,
|
|
2937
|
+
Connect: Connect_,
|
|
2938
|
+
Body: Body_,
|
|
2939
|
+
Decode: Decode_,
|
|
2940
|
+
Json: Json_,
|
|
2941
|
+
Other: Other_
|
|
2942
|
+
});
|
|
2943
|
+
})();
|
|
2944
|
+
// FfiConverter for enum ServiceConnectivityError
|
|
2945
|
+
const FfiConverterTypeServiceConnectivityError = (() => {
|
|
2946
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
2947
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2948
|
+
read(from) {
|
|
2949
|
+
switch (ordinalConverter.read(from)) {
|
|
2950
|
+
case 1:
|
|
2951
|
+
return new ServiceConnectivityError.Builder(FfiConverterString.read(from));
|
|
2952
|
+
case 2:
|
|
2953
|
+
return new ServiceConnectivityError.Redirect(FfiConverterString.read(from));
|
|
2954
|
+
case 3:
|
|
2955
|
+
return new ServiceConnectivityError.Status({
|
|
2956
|
+
status: _uniffiBindgenReactNative.FfiConverterUInt16.read(from),
|
|
2957
|
+
body: FfiConverterString.read(from)
|
|
2958
|
+
});
|
|
2959
|
+
case 4:
|
|
2960
|
+
return new ServiceConnectivityError.Timeout(FfiConverterString.read(from));
|
|
2961
|
+
case 5:
|
|
2962
|
+
return new ServiceConnectivityError.Request(FfiConverterString.read(from));
|
|
2963
|
+
case 6:
|
|
2964
|
+
return new ServiceConnectivityError.Connect(FfiConverterString.read(from));
|
|
2965
|
+
case 7:
|
|
2966
|
+
return new ServiceConnectivityError.Body(FfiConverterString.read(from));
|
|
2967
|
+
case 8:
|
|
2968
|
+
return new ServiceConnectivityError.Decode(FfiConverterString.read(from));
|
|
2969
|
+
case 9:
|
|
2970
|
+
return new ServiceConnectivityError.Json(FfiConverterString.read(from));
|
|
2971
|
+
case 10:
|
|
2972
|
+
return new ServiceConnectivityError.Other(FfiConverterString.read(from));
|
|
2973
|
+
default:
|
|
2974
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
write(value, into) {
|
|
2978
|
+
switch (value.tag) {
|
|
2979
|
+
case ServiceConnectivityError_Tags.Builder:
|
|
2980
|
+
{
|
|
2981
|
+
ordinalConverter.write(1, into);
|
|
2982
|
+
const inner = value.inner;
|
|
2983
|
+
FfiConverterString.write(inner[0], into);
|
|
2984
|
+
return;
|
|
2985
|
+
}
|
|
2986
|
+
case ServiceConnectivityError_Tags.Redirect:
|
|
2987
|
+
{
|
|
2988
|
+
ordinalConverter.write(2, into);
|
|
2989
|
+
const inner = value.inner;
|
|
2990
|
+
FfiConverterString.write(inner[0], into);
|
|
2991
|
+
return;
|
|
2992
|
+
}
|
|
2993
|
+
case ServiceConnectivityError_Tags.Status:
|
|
2994
|
+
{
|
|
2995
|
+
ordinalConverter.write(3, into);
|
|
2996
|
+
const inner = value.inner;
|
|
2997
|
+
_uniffiBindgenReactNative.FfiConverterUInt16.write(inner.status, into);
|
|
2998
|
+
FfiConverterString.write(inner.body, into);
|
|
2999
|
+
return;
|
|
3000
|
+
}
|
|
3001
|
+
case ServiceConnectivityError_Tags.Timeout:
|
|
3002
|
+
{
|
|
3003
|
+
ordinalConverter.write(4, into);
|
|
3004
|
+
const inner = value.inner;
|
|
3005
|
+
FfiConverterString.write(inner[0], into);
|
|
3006
|
+
return;
|
|
3007
|
+
}
|
|
3008
|
+
case ServiceConnectivityError_Tags.Request:
|
|
3009
|
+
{
|
|
3010
|
+
ordinalConverter.write(5, into);
|
|
3011
|
+
const inner = value.inner;
|
|
3012
|
+
FfiConverterString.write(inner[0], into);
|
|
3013
|
+
return;
|
|
3014
|
+
}
|
|
3015
|
+
case ServiceConnectivityError_Tags.Connect:
|
|
3016
|
+
{
|
|
3017
|
+
ordinalConverter.write(6, into);
|
|
3018
|
+
const inner = value.inner;
|
|
3019
|
+
FfiConverterString.write(inner[0], into);
|
|
3020
|
+
return;
|
|
3021
|
+
}
|
|
3022
|
+
case ServiceConnectivityError_Tags.Body:
|
|
3023
|
+
{
|
|
3024
|
+
ordinalConverter.write(7, into);
|
|
3025
|
+
const inner = value.inner;
|
|
3026
|
+
FfiConverterString.write(inner[0], into);
|
|
3027
|
+
return;
|
|
3028
|
+
}
|
|
3029
|
+
case ServiceConnectivityError_Tags.Decode:
|
|
3030
|
+
{
|
|
3031
|
+
ordinalConverter.write(8, into);
|
|
3032
|
+
const inner = value.inner;
|
|
3033
|
+
FfiConverterString.write(inner[0], into);
|
|
3034
|
+
return;
|
|
3035
|
+
}
|
|
3036
|
+
case ServiceConnectivityError_Tags.Json:
|
|
3037
|
+
{
|
|
3038
|
+
ordinalConverter.write(9, into);
|
|
3039
|
+
const inner = value.inner;
|
|
3040
|
+
FfiConverterString.write(inner[0], into);
|
|
3041
|
+
return;
|
|
3042
|
+
}
|
|
3043
|
+
case ServiceConnectivityError_Tags.Other:
|
|
3044
|
+
{
|
|
3045
|
+
ordinalConverter.write(10, into);
|
|
3046
|
+
const inner = value.inner;
|
|
3047
|
+
FfiConverterString.write(inner[0], into);
|
|
3048
|
+
return;
|
|
3049
|
+
}
|
|
3050
|
+
default:
|
|
3051
|
+
// Throwing from here means that ServiceConnectivityError_Tags hasn't matched an ordinal.
|
|
3052
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
allocationSize(value) {
|
|
3056
|
+
switch (value.tag) {
|
|
3057
|
+
case ServiceConnectivityError_Tags.Builder:
|
|
3058
|
+
{
|
|
3059
|
+
const inner = value.inner;
|
|
3060
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3061
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3062
|
+
return size;
|
|
3063
|
+
}
|
|
3064
|
+
case ServiceConnectivityError_Tags.Redirect:
|
|
3065
|
+
{
|
|
3066
|
+
const inner = value.inner;
|
|
3067
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3068
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3069
|
+
return size;
|
|
3070
|
+
}
|
|
3071
|
+
case ServiceConnectivityError_Tags.Status:
|
|
3072
|
+
{
|
|
3073
|
+
const inner = value.inner;
|
|
3074
|
+
let size = ordinalConverter.allocationSize(3);
|
|
3075
|
+
size += _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(inner.status);
|
|
3076
|
+
size += FfiConverterString.allocationSize(inner.body);
|
|
3077
|
+
return size;
|
|
3078
|
+
}
|
|
3079
|
+
case ServiceConnectivityError_Tags.Timeout:
|
|
3080
|
+
{
|
|
3081
|
+
const inner = value.inner;
|
|
3082
|
+
let size = ordinalConverter.allocationSize(4);
|
|
3083
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3084
|
+
return size;
|
|
3085
|
+
}
|
|
3086
|
+
case ServiceConnectivityError_Tags.Request:
|
|
3087
|
+
{
|
|
3088
|
+
const inner = value.inner;
|
|
3089
|
+
let size = ordinalConverter.allocationSize(5);
|
|
3090
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3091
|
+
return size;
|
|
3092
|
+
}
|
|
3093
|
+
case ServiceConnectivityError_Tags.Connect:
|
|
3094
|
+
{
|
|
3095
|
+
const inner = value.inner;
|
|
3096
|
+
let size = ordinalConverter.allocationSize(6);
|
|
3097
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3098
|
+
return size;
|
|
3099
|
+
}
|
|
3100
|
+
case ServiceConnectivityError_Tags.Body:
|
|
3101
|
+
{
|
|
3102
|
+
const inner = value.inner;
|
|
3103
|
+
let size = ordinalConverter.allocationSize(7);
|
|
3104
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3105
|
+
return size;
|
|
3106
|
+
}
|
|
3107
|
+
case ServiceConnectivityError_Tags.Decode:
|
|
3108
|
+
{
|
|
3109
|
+
const inner = value.inner;
|
|
3110
|
+
let size = ordinalConverter.allocationSize(8);
|
|
3111
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3112
|
+
return size;
|
|
3113
|
+
}
|
|
3114
|
+
case ServiceConnectivityError_Tags.Json:
|
|
3115
|
+
{
|
|
3116
|
+
const inner = value.inner;
|
|
3117
|
+
let size = ordinalConverter.allocationSize(9);
|
|
3118
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3119
|
+
return size;
|
|
3120
|
+
}
|
|
3121
|
+
case ServiceConnectivityError_Tags.Other:
|
|
3122
|
+
{
|
|
3123
|
+
const inner = value.inner;
|
|
3124
|
+
let size = ordinalConverter.allocationSize(10);
|
|
3125
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3126
|
+
return size;
|
|
3127
|
+
}
|
|
3128
|
+
default:
|
|
3129
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
return new FFIConverter();
|
|
3134
|
+
})();
|
|
3135
|
+
|
|
3136
|
+
// Enum: SparkAddressPaymentType
|
|
3137
|
+
let SparkAddressPaymentType_Tags = exports.SparkAddressPaymentType_Tags = /*#__PURE__*/function (SparkAddressPaymentType_Tags) {
|
|
3138
|
+
SparkAddressPaymentType_Tags["TokensPayment"] = "TokensPayment";
|
|
3139
|
+
SparkAddressPaymentType_Tags["SatsPayment"] = "SatsPayment";
|
|
3140
|
+
return SparkAddressPaymentType_Tags;
|
|
3141
|
+
}({});
|
|
3142
|
+
const SparkAddressPaymentType = exports.SparkAddressPaymentType = (() => {
|
|
3143
|
+
class TokensPayment_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3144
|
+
/**
|
|
3145
|
+
* @private
|
|
3146
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3147
|
+
*/
|
|
3148
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
|
|
3149
|
+
tag = SparkAddressPaymentType_Tags.TokensPayment;
|
|
3150
|
+
constructor(v0) {
|
|
3151
|
+
super('SparkAddressPaymentType', 'TokensPayment');
|
|
3152
|
+
this.inner = Object.freeze([v0]);
|
|
3153
|
+
}
|
|
3154
|
+
static new(v0) {
|
|
3155
|
+
return new TokensPayment_(v0);
|
|
3156
|
+
}
|
|
3157
|
+
static instanceOf(obj) {
|
|
3158
|
+
return obj.tag === SparkAddressPaymentType_Tags.TokensPayment;
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
class SatsPayment_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3162
|
+
/**
|
|
3163
|
+
* @private
|
|
3164
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3165
|
+
*/
|
|
3166
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
|
|
3167
|
+
tag = SparkAddressPaymentType_Tags.SatsPayment;
|
|
3168
|
+
constructor(v0) {
|
|
3169
|
+
super('SparkAddressPaymentType', 'SatsPayment');
|
|
3170
|
+
this.inner = Object.freeze([v0]);
|
|
3171
|
+
}
|
|
3172
|
+
static new(v0) {
|
|
3173
|
+
return new SatsPayment_(v0);
|
|
3174
|
+
}
|
|
3175
|
+
static instanceOf(obj) {
|
|
3176
|
+
return obj.tag === SparkAddressPaymentType_Tags.SatsPayment;
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
function instanceOf(obj) {
|
|
3180
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'SparkAddressPaymentType';
|
|
3181
|
+
}
|
|
3182
|
+
return Object.freeze({
|
|
3183
|
+
instanceOf,
|
|
3184
|
+
TokensPayment: TokensPayment_,
|
|
3185
|
+
SatsPayment: SatsPayment_
|
|
3186
|
+
});
|
|
3187
|
+
})();
|
|
3188
|
+
// FfiConverter for enum SparkAddressPaymentType
|
|
3189
|
+
const FfiConverterTypeSparkAddressPaymentType = (() => {
|
|
3190
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
3191
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
3192
|
+
read(from) {
|
|
3193
|
+
switch (ordinalConverter.read(from)) {
|
|
3194
|
+
case 1:
|
|
3195
|
+
return new SparkAddressPaymentType.TokensPayment(FfiConverterTypeTokensPaymentDetails.read(from));
|
|
3196
|
+
case 2:
|
|
3197
|
+
return new SparkAddressPaymentType.SatsPayment(FfiConverterTypeSatsPaymentDetails.read(from));
|
|
3198
|
+
default:
|
|
3199
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
write(value, into) {
|
|
3203
|
+
switch (value.tag) {
|
|
3204
|
+
case SparkAddressPaymentType_Tags.TokensPayment:
|
|
3205
|
+
{
|
|
3206
|
+
ordinalConverter.write(1, into);
|
|
3207
|
+
const inner = value.inner;
|
|
3208
|
+
FfiConverterTypeTokensPaymentDetails.write(inner[0], into);
|
|
3209
|
+
return;
|
|
3210
|
+
}
|
|
3211
|
+
case SparkAddressPaymentType_Tags.SatsPayment:
|
|
3212
|
+
{
|
|
3213
|
+
ordinalConverter.write(2, into);
|
|
3214
|
+
const inner = value.inner;
|
|
3215
|
+
FfiConverterTypeSatsPaymentDetails.write(inner[0], into);
|
|
3216
|
+
return;
|
|
3217
|
+
}
|
|
3218
|
+
default:
|
|
3219
|
+
// Throwing from here means that SparkAddressPaymentType_Tags hasn't matched an ordinal.
|
|
3220
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
allocationSize(value) {
|
|
3224
|
+
switch (value.tag) {
|
|
3225
|
+
case SparkAddressPaymentType_Tags.TokensPayment:
|
|
3226
|
+
{
|
|
3227
|
+
const inner = value.inner;
|
|
3228
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3229
|
+
size += FfiConverterTypeTokensPaymentDetails.allocationSize(inner[0]);
|
|
3230
|
+
return size;
|
|
3231
|
+
}
|
|
3232
|
+
case SparkAddressPaymentType_Tags.SatsPayment:
|
|
3233
|
+
{
|
|
3234
|
+
const inner = value.inner;
|
|
3235
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3236
|
+
size += FfiConverterTypeSatsPaymentDetails.allocationSize(inner[0]);
|
|
3237
|
+
return size;
|
|
3238
|
+
}
|
|
3239
|
+
default:
|
|
3240
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
return new FFIConverter();
|
|
3245
|
+
})();
|
|
3246
|
+
|
|
3247
|
+
// Enum: SuccessAction
|
|
3248
|
+
let SuccessAction_Tags = exports.SuccessAction_Tags = /*#__PURE__*/function (SuccessAction_Tags) {
|
|
3249
|
+
SuccessAction_Tags["Aes"] = "Aes";
|
|
3250
|
+
SuccessAction_Tags["Message"] = "Message";
|
|
3251
|
+
SuccessAction_Tags["Url"] = "Url";
|
|
3252
|
+
return SuccessAction_Tags;
|
|
3253
|
+
}({});
|
|
3254
|
+
/**
|
|
3255
|
+
* Supported success action types
|
|
3256
|
+
*
|
|
3257
|
+
* Receiving any other (unsupported) success action type will result in a failed parsing,
|
|
3258
|
+
* which will abort the LNURL-pay workflow, as per LUD-09.
|
|
3259
|
+
*/
|
|
3260
|
+
const SuccessAction = exports.SuccessAction = (() => {
|
|
3261
|
+
/**
|
|
3262
|
+
* AES type, described in LUD-10
|
|
3263
|
+
*/
|
|
3264
|
+
class Aes_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3265
|
+
/**
|
|
3266
|
+
* @private
|
|
3267
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3268
|
+
*/
|
|
3269
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SuccessAction';
|
|
3270
|
+
tag = SuccessAction_Tags.Aes;
|
|
3271
|
+
constructor(inner) {
|
|
3272
|
+
super('SuccessAction', 'Aes');
|
|
3273
|
+
this.inner = Object.freeze(inner);
|
|
3274
|
+
}
|
|
3275
|
+
static new(inner) {
|
|
3276
|
+
return new Aes_(inner);
|
|
3277
|
+
}
|
|
3278
|
+
static instanceOf(obj) {
|
|
3279
|
+
return obj.tag === SuccessAction_Tags.Aes;
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
/**
|
|
3283
|
+
* Message type, described in LUD-09
|
|
3284
|
+
*/
|
|
3285
|
+
class Message_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3286
|
+
/**
|
|
3287
|
+
* @private
|
|
3288
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3289
|
+
*/
|
|
3290
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SuccessAction';
|
|
3291
|
+
tag = SuccessAction_Tags.Message;
|
|
3292
|
+
constructor(inner) {
|
|
3293
|
+
super('SuccessAction', 'Message');
|
|
3294
|
+
this.inner = Object.freeze(inner);
|
|
3295
|
+
}
|
|
3296
|
+
static new(inner) {
|
|
3297
|
+
return new Message_(inner);
|
|
3298
|
+
}
|
|
3299
|
+
static instanceOf(obj) {
|
|
3300
|
+
return obj.tag === SuccessAction_Tags.Message;
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3303
|
+
/**
|
|
3304
|
+
* URL type, described in LUD-09
|
|
3305
|
+
*/
|
|
3306
|
+
class Url_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3307
|
+
/**
|
|
3308
|
+
* @private
|
|
3309
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3310
|
+
*/
|
|
3311
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SuccessAction';
|
|
3312
|
+
tag = SuccessAction_Tags.Url;
|
|
3313
|
+
constructor(inner) {
|
|
3314
|
+
super('SuccessAction', 'Url');
|
|
3315
|
+
this.inner = Object.freeze(inner);
|
|
3316
|
+
}
|
|
3317
|
+
static new(inner) {
|
|
3318
|
+
return new Url_(inner);
|
|
3319
|
+
}
|
|
3320
|
+
static instanceOf(obj) {
|
|
3321
|
+
return obj.tag === SuccessAction_Tags.Url;
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
function instanceOf(obj) {
|
|
3325
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'SuccessAction';
|
|
3326
|
+
}
|
|
3327
|
+
return Object.freeze({
|
|
3328
|
+
instanceOf,
|
|
3329
|
+
Aes: Aes_,
|
|
3330
|
+
Message: Message_,
|
|
3331
|
+
Url: Url_
|
|
3332
|
+
});
|
|
3333
|
+
})();
|
|
3334
|
+
|
|
3335
|
+
/**
|
|
3336
|
+
* Supported success action types
|
|
3337
|
+
*
|
|
3338
|
+
* Receiving any other (unsupported) success action type will result in a failed parsing,
|
|
3339
|
+
* which will abort the LNURL-pay workflow, as per LUD-09.
|
|
3340
|
+
*/
|
|
3341
|
+
|
|
3342
|
+
// FfiConverter for enum SuccessAction
|
|
3343
|
+
const FfiConverterTypeSuccessAction = (() => {
|
|
3344
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
3345
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
3346
|
+
read(from) {
|
|
3347
|
+
switch (ordinalConverter.read(from)) {
|
|
3348
|
+
case 1:
|
|
3349
|
+
return new SuccessAction.Aes({
|
|
3350
|
+
data: FfiConverterTypeAesSuccessActionData.read(from)
|
|
3351
|
+
});
|
|
3352
|
+
case 2:
|
|
3353
|
+
return new SuccessAction.Message({
|
|
3354
|
+
data: FfiConverterTypeMessageSuccessActionData.read(from)
|
|
3355
|
+
});
|
|
3356
|
+
case 3:
|
|
3357
|
+
return new SuccessAction.Url({
|
|
3358
|
+
data: FfiConverterTypeUrlSuccessActionData.read(from)
|
|
3359
|
+
});
|
|
3360
|
+
default:
|
|
3361
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3364
|
+
write(value, into) {
|
|
3365
|
+
switch (value.tag) {
|
|
3366
|
+
case SuccessAction_Tags.Aes:
|
|
3367
|
+
{
|
|
3368
|
+
ordinalConverter.write(1, into);
|
|
3369
|
+
const inner = value.inner;
|
|
3370
|
+
FfiConverterTypeAesSuccessActionData.write(inner.data, into);
|
|
3371
|
+
return;
|
|
3372
|
+
}
|
|
3373
|
+
case SuccessAction_Tags.Message:
|
|
3374
|
+
{
|
|
3375
|
+
ordinalConverter.write(2, into);
|
|
3376
|
+
const inner = value.inner;
|
|
3377
|
+
FfiConverterTypeMessageSuccessActionData.write(inner.data, into);
|
|
3378
|
+
return;
|
|
3379
|
+
}
|
|
3380
|
+
case SuccessAction_Tags.Url:
|
|
3381
|
+
{
|
|
3382
|
+
ordinalConverter.write(3, into);
|
|
3383
|
+
const inner = value.inner;
|
|
3384
|
+
FfiConverterTypeUrlSuccessActionData.write(inner.data, into);
|
|
3385
|
+
return;
|
|
3386
|
+
}
|
|
3387
|
+
default:
|
|
3388
|
+
// Throwing from here means that SuccessAction_Tags hasn't matched an ordinal.
|
|
3389
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
allocationSize(value) {
|
|
3393
|
+
switch (value.tag) {
|
|
3394
|
+
case SuccessAction_Tags.Aes:
|
|
3395
|
+
{
|
|
3396
|
+
const inner = value.inner;
|
|
3397
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3398
|
+
size += FfiConverterTypeAesSuccessActionData.allocationSize(inner.data);
|
|
3399
|
+
return size;
|
|
3400
|
+
}
|
|
3401
|
+
case SuccessAction_Tags.Message:
|
|
3402
|
+
{
|
|
3403
|
+
const inner = value.inner;
|
|
3404
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3405
|
+
size += FfiConverterTypeMessageSuccessActionData.allocationSize(inner.data);
|
|
3406
|
+
return size;
|
|
3407
|
+
}
|
|
3408
|
+
case SuccessAction_Tags.Url:
|
|
3409
|
+
{
|
|
3410
|
+
const inner = value.inner;
|
|
3411
|
+
let size = ordinalConverter.allocationSize(3);
|
|
3412
|
+
size += FfiConverterTypeUrlSuccessActionData.allocationSize(inner.data);
|
|
3413
|
+
return size;
|
|
3414
|
+
}
|
|
3415
|
+
default:
|
|
3416
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
return new FFIConverter();
|
|
3421
|
+
})();
|
|
3422
|
+
|
|
3423
|
+
// Enum: SuccessActionProcessed
|
|
3424
|
+
let SuccessActionProcessed_Tags = exports.SuccessActionProcessed_Tags = /*#__PURE__*/function (SuccessActionProcessed_Tags) {
|
|
3425
|
+
SuccessActionProcessed_Tags["Aes"] = "Aes";
|
|
3426
|
+
SuccessActionProcessed_Tags["Message"] = "Message";
|
|
3427
|
+
SuccessActionProcessed_Tags["Url"] = "Url";
|
|
3428
|
+
return SuccessActionProcessed_Tags;
|
|
3429
|
+
}({});
|
|
3430
|
+
/**
|
|
3431
|
+
* [`SuccessAction`] where contents are ready to be consumed by the caller
|
|
3432
|
+
*
|
|
3433
|
+
* Contents are identical to [`SuccessAction`], except for AES where the ciphertext is decrypted.
|
|
3434
|
+
*/
|
|
3435
|
+
const SuccessActionProcessed = exports.SuccessActionProcessed = (() => {
|
|
3436
|
+
/**
|
|
3437
|
+
* See [`SuccessAction::Aes`] for received payload
|
|
3438
|
+
*
|
|
3439
|
+
* See [`AesSuccessActionDataDecrypted`] for decrypted payload
|
|
3440
|
+
*/
|
|
3441
|
+
class Aes_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3442
|
+
/**
|
|
3443
|
+
* @private
|
|
3444
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3445
|
+
*/
|
|
3446
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SuccessActionProcessed';
|
|
3447
|
+
tag = SuccessActionProcessed_Tags.Aes;
|
|
3448
|
+
constructor(inner) {
|
|
3449
|
+
super('SuccessActionProcessed', 'Aes');
|
|
3450
|
+
this.inner = Object.freeze(inner);
|
|
3451
|
+
}
|
|
3452
|
+
static new(inner) {
|
|
3453
|
+
return new Aes_(inner);
|
|
3454
|
+
}
|
|
3455
|
+
static instanceOf(obj) {
|
|
3456
|
+
return obj.tag === SuccessActionProcessed_Tags.Aes;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
/**
|
|
3460
|
+
* See [`SuccessAction::Message`]
|
|
3461
|
+
*/
|
|
3462
|
+
class Message_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3463
|
+
/**
|
|
3464
|
+
* @private
|
|
3465
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3466
|
+
*/
|
|
3467
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SuccessActionProcessed';
|
|
3468
|
+
tag = SuccessActionProcessed_Tags.Message;
|
|
3469
|
+
constructor(inner) {
|
|
3470
|
+
super('SuccessActionProcessed', 'Message');
|
|
3471
|
+
this.inner = Object.freeze(inner);
|
|
3472
|
+
}
|
|
3473
|
+
static new(inner) {
|
|
3474
|
+
return new Message_(inner);
|
|
3475
|
+
}
|
|
3476
|
+
static instanceOf(obj) {
|
|
3477
|
+
return obj.tag === SuccessActionProcessed_Tags.Message;
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* See [`SuccessAction::Url`]
|
|
3482
|
+
*/
|
|
3483
|
+
class Url_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3484
|
+
/**
|
|
3485
|
+
* @private
|
|
3486
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3487
|
+
*/
|
|
3488
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SuccessActionProcessed';
|
|
3489
|
+
tag = SuccessActionProcessed_Tags.Url;
|
|
3490
|
+
constructor(inner) {
|
|
3491
|
+
super('SuccessActionProcessed', 'Url');
|
|
3492
|
+
this.inner = Object.freeze(inner);
|
|
3493
|
+
}
|
|
3494
|
+
static new(inner) {
|
|
3495
|
+
return new Url_(inner);
|
|
3496
|
+
}
|
|
3497
|
+
static instanceOf(obj) {
|
|
3498
|
+
return obj.tag === SuccessActionProcessed_Tags.Url;
|
|
3499
|
+
}
|
|
3500
|
+
}
|
|
3501
|
+
function instanceOf(obj) {
|
|
3502
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'SuccessActionProcessed';
|
|
3503
|
+
}
|
|
3504
|
+
return Object.freeze({
|
|
3505
|
+
instanceOf,
|
|
3506
|
+
Aes: Aes_,
|
|
3507
|
+
Message: Message_,
|
|
3508
|
+
Url: Url_
|
|
3509
|
+
});
|
|
3510
|
+
})();
|
|
3511
|
+
|
|
3512
|
+
/**
|
|
3513
|
+
* [`SuccessAction`] where contents are ready to be consumed by the caller
|
|
3514
|
+
*
|
|
3515
|
+
* Contents are identical to [`SuccessAction`], except for AES where the ciphertext is decrypted.
|
|
3516
|
+
*/
|
|
3517
|
+
|
|
3518
|
+
// FfiConverter for enum SuccessActionProcessed
|
|
3519
|
+
const FfiConverterTypeSuccessActionProcessed = (() => {
|
|
3520
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
3521
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
3522
|
+
read(from) {
|
|
3523
|
+
switch (ordinalConverter.read(from)) {
|
|
3524
|
+
case 1:
|
|
3525
|
+
return new SuccessActionProcessed.Aes({
|
|
3526
|
+
result: FfiConverterTypeAesSuccessActionDataResult.read(from)
|
|
3527
|
+
});
|
|
3528
|
+
case 2:
|
|
3529
|
+
return new SuccessActionProcessed.Message({
|
|
3530
|
+
data: FfiConverterTypeMessageSuccessActionData.read(from)
|
|
3531
|
+
});
|
|
3532
|
+
case 3:
|
|
3533
|
+
return new SuccessActionProcessed.Url({
|
|
3534
|
+
data: FfiConverterTypeUrlSuccessActionData.read(from)
|
|
3535
|
+
});
|
|
3536
|
+
default:
|
|
3537
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
write(value, into) {
|
|
3541
|
+
switch (value.tag) {
|
|
3542
|
+
case SuccessActionProcessed_Tags.Aes:
|
|
3543
|
+
{
|
|
3544
|
+
ordinalConverter.write(1, into);
|
|
3545
|
+
const inner = value.inner;
|
|
3546
|
+
FfiConverterTypeAesSuccessActionDataResult.write(inner.result, into);
|
|
3547
|
+
return;
|
|
3548
|
+
}
|
|
3549
|
+
case SuccessActionProcessed_Tags.Message:
|
|
3550
|
+
{
|
|
3551
|
+
ordinalConverter.write(2, into);
|
|
3552
|
+
const inner = value.inner;
|
|
3553
|
+
FfiConverterTypeMessageSuccessActionData.write(inner.data, into);
|
|
3554
|
+
return;
|
|
3555
|
+
}
|
|
3556
|
+
case SuccessActionProcessed_Tags.Url:
|
|
3557
|
+
{
|
|
3558
|
+
ordinalConverter.write(3, into);
|
|
3559
|
+
const inner = value.inner;
|
|
3560
|
+
FfiConverterTypeUrlSuccessActionData.write(inner.data, into);
|
|
3561
|
+
return;
|
|
3562
|
+
}
|
|
3563
|
+
default:
|
|
3564
|
+
// Throwing from here means that SuccessActionProcessed_Tags hasn't matched an ordinal.
|
|
3565
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
allocationSize(value) {
|
|
3569
|
+
switch (value.tag) {
|
|
3570
|
+
case SuccessActionProcessed_Tags.Aes:
|
|
3571
|
+
{
|
|
3572
|
+
const inner = value.inner;
|
|
3573
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3574
|
+
size += FfiConverterTypeAesSuccessActionDataResult.allocationSize(inner.result);
|
|
3575
|
+
return size;
|
|
3576
|
+
}
|
|
3577
|
+
case SuccessActionProcessed_Tags.Message:
|
|
3578
|
+
{
|
|
3579
|
+
const inner = value.inner;
|
|
3580
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3581
|
+
size += FfiConverterTypeMessageSuccessActionData.allocationSize(inner.data);
|
|
3582
|
+
return size;
|
|
3583
|
+
}
|
|
3584
|
+
case SuccessActionProcessed_Tags.Url:
|
|
3585
|
+
{
|
|
3586
|
+
const inner = value.inner;
|
|
3587
|
+
let size = ordinalConverter.allocationSize(3);
|
|
3588
|
+
size += FfiConverterTypeUrlSuccessActionData.allocationSize(inner.data);
|
|
3589
|
+
return size;
|
|
3590
|
+
}
|
|
3591
|
+
default:
|
|
3592
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3595
|
+
}
|
|
3596
|
+
return new FFIConverter();
|
|
3597
|
+
})();
|
|
3598
|
+
|
|
3599
|
+
// FfiConverter for Map<string, string>
|
|
3600
|
+
const FfiConverterMapStringString = new _uniffiBindgenReactNative.FfiConverterMap(FfiConverterString, FfiConverterString);
|
|
3601
|
+
class RestClientImpl extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
3602
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'RestClientImpl';
|
|
3603
|
+
// No primary constructor declared for this class.
|
|
3604
|
+
constructor(pointer) {
|
|
3605
|
+
super();
|
|
3606
|
+
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
3607
|
+
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeRestClientImplObjectFactory.bless(pointer);
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
/**
|
|
3611
|
+
* Makes a GET request and logs on DEBUG.
|
|
3612
|
+
* ### Arguments
|
|
3613
|
+
* - `url`: the URL on which GET will be called
|
|
3614
|
+
* - `headers`: optional headers that will be set on the request
|
|
3615
|
+
*/
|
|
3616
|
+
async get(url, headers, asyncOpts_) /*throws*/{
|
|
3617
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3618
|
+
try {
|
|
3619
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3620
|
+
return (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_fn_method_restclient_get(uniffiTypeRestClientImplObjectFactory.clonePointer(this), FfiConverterString.lower(url), FfiConverterOptionalMapStringString.lower(headers));
|
|
3621
|
+
}, /*pollFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeRestResponse.lift.bind(FfiConverterTypeRestResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeServiceConnectivityError.lift.bind(FfiConverterTypeServiceConnectivityError));
|
|
3622
|
+
} catch (__error) {
|
|
3623
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3624
|
+
__error.stack = __stack;
|
|
3625
|
+
}
|
|
3626
|
+
throw __error;
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
/**
|
|
3631
|
+
* Makes a POST request, and logs on DEBUG.
|
|
3632
|
+
* ### Arguments
|
|
3633
|
+
* - `url`: the URL on which POST will be called
|
|
3634
|
+
* - `headers`: the optional POST headers
|
|
3635
|
+
* - `body`: the optional POST body
|
|
3636
|
+
*/
|
|
3637
|
+
async post(url, headers, body, asyncOpts_) /*throws*/{
|
|
3638
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3639
|
+
try {
|
|
3640
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3641
|
+
return (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_fn_method_restclient_post(uniffiTypeRestClientImplObjectFactory.clonePointer(this), FfiConverterString.lower(url), FfiConverterOptionalMapStringString.lower(headers), FfiConverterOptionalString.lower(body));
|
|
3642
|
+
}, /*pollFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeRestResponse.lift.bind(FfiConverterTypeRestResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeServiceConnectivityError.lift.bind(FfiConverterTypeServiceConnectivityError));
|
|
3643
|
+
} catch (__error) {
|
|
3644
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3645
|
+
__error.stack = __stack;
|
|
3646
|
+
}
|
|
3647
|
+
throw __error;
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
/**
|
|
3652
|
+
* Makes a DELETE request, and logs on DEBUG.
|
|
3653
|
+
* ### Arguments
|
|
3654
|
+
* - `url`: the URL on which DELETE will be called
|
|
3655
|
+
* - `headers`: the optional DELETE headers
|
|
3656
|
+
* - `body`: the optional DELETE body
|
|
3657
|
+
*/
|
|
3658
|
+
async delete_(url, headers, body, asyncOpts_) /*throws*/{
|
|
3659
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3660
|
+
try {
|
|
3661
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3662
|
+
return (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_fn_method_restclient_delete(uniffiTypeRestClientImplObjectFactory.clonePointer(this), FfiConverterString.lower(url), FfiConverterOptionalMapStringString.lower(headers), FfiConverterOptionalString.lower(body));
|
|
3663
|
+
}, /*pollFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeRestResponse.lift.bind(FfiConverterTypeRestResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeServiceConnectivityError.lift.bind(FfiConverterTypeServiceConnectivityError));
|
|
3664
|
+
} catch (__error) {
|
|
3665
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3666
|
+
__error.stack = __stack;
|
|
3667
|
+
}
|
|
3668
|
+
throw __error;
|
|
3669
|
+
}
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
/**
|
|
3673
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
3674
|
+
*/
|
|
3675
|
+
uniffiDestroy() {
|
|
3676
|
+
const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
3677
|
+
if (ptr !== undefined) {
|
|
3678
|
+
const pointer = uniffiTypeRestClientImplObjectFactory.pointer(this);
|
|
3679
|
+
uniffiTypeRestClientImplObjectFactory.freePointer(pointer);
|
|
3680
|
+
uniffiTypeRestClientImplObjectFactory.unbless(ptr);
|
|
3681
|
+
delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
static instanceOf(obj) {
|
|
3685
|
+
return uniffiTypeRestClientImplObjectFactory.isConcreteType(obj);
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
exports.RestClientImpl = RestClientImpl;
|
|
3689
|
+
const uniffiTypeRestClientImplObjectFactory = {
|
|
3690
|
+
create(pointer) {
|
|
3691
|
+
const instance = Object.create(RestClientImpl.prototype);
|
|
3692
|
+
instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
3693
|
+
instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
|
|
3694
|
+
instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'RestClientImpl';
|
|
3695
|
+
return instance;
|
|
3696
|
+
},
|
|
3697
|
+
bless(p) {
|
|
3698
|
+
return uniffiCaller.rustCall(/*caller:*/status => (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_internal_fn_method_restclient_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
|
|
3699
|
+
},
|
|
3700
|
+
unbless(ptr) {
|
|
3701
|
+
ptr.markDestroyed();
|
|
3702
|
+
},
|
|
3703
|
+
pointer(obj) {
|
|
3704
|
+
if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
|
|
3705
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
|
|
3706
|
+
}
|
|
3707
|
+
return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
|
|
3708
|
+
},
|
|
3709
|
+
clonePointer(obj) {
|
|
3710
|
+
const pointer = this.pointer(obj);
|
|
3711
|
+
return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_fn_clone_restclient(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
3712
|
+
},
|
|
3713
|
+
freePointer(pointer) {
|
|
3714
|
+
uniffiCaller.rustCall(/*caller:*/callStatus => (0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_fn_free_restclient(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
3715
|
+
},
|
|
3716
|
+
isConcreteType(obj) {
|
|
3717
|
+
return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'RestClientImpl';
|
|
3718
|
+
}
|
|
3719
|
+
};
|
|
3720
|
+
// FfiConverter for RestClient
|
|
3721
|
+
const FfiConverterTypeRestClient = new _uniffiBindgenReactNative.FfiConverterObjectWithCallbacks(uniffiTypeRestClientImplObjectFactory);
|
|
3722
|
+
|
|
3723
|
+
// Add a vtavble for the callbacks that go in RestClient.
|
|
3724
|
+
|
|
3725
|
+
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
3726
|
+
const uniffiCallbackInterfaceRestClient = {
|
|
3727
|
+
// Create the VTable using a series of closures.
|
|
3728
|
+
// ts automatically converts these into C callback functions.
|
|
3729
|
+
vtable: {
|
|
3730
|
+
get: (uniffiHandle, url, headers, uniffiFutureCallback, uniffiCallbackData) => {
|
|
3731
|
+
const uniffiMakeCall = async signal => {
|
|
3732
|
+
const jsCallback = FfiConverterTypeRestClient.lift(uniffiHandle);
|
|
3733
|
+
return await jsCallback.get(FfiConverterString.lift(url), FfiConverterOptionalMapStringString.lift(headers), {
|
|
3734
|
+
signal
|
|
3735
|
+
});
|
|
3736
|
+
};
|
|
3737
|
+
const uniffiHandleSuccess = returnValue => {
|
|
3738
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
|
|
3739
|
+
returnValue: FfiConverterTypeRestResponse.lower(returnValue),
|
|
3740
|
+
callStatus: uniffiCaller.createCallStatus()
|
|
3741
|
+
});
|
|
3742
|
+
};
|
|
3743
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
3744
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
|
|
3745
|
+
returnValue: /*empty*/new Uint8Array(0),
|
|
3746
|
+
// TODO create callstatus with error.
|
|
3747
|
+
callStatus: {
|
|
3748
|
+
code,
|
|
3749
|
+
errorBuf
|
|
3750
|
+
}
|
|
3751
|
+
});
|
|
3752
|
+
};
|
|
3753
|
+
const uniffiForeignFuture = (0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallAsyncWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/ServiceConnectivityError.instanceOf, /*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError), /*lowerString:*/FfiConverterString.lower);
|
|
3754
|
+
return _uniffiBindgenReactNative.UniffiResult.success(uniffiForeignFuture);
|
|
3755
|
+
},
|
|
3756
|
+
post: (uniffiHandle, url, headers, body, uniffiFutureCallback, uniffiCallbackData) => {
|
|
3757
|
+
const uniffiMakeCall = async signal => {
|
|
3758
|
+
const jsCallback = FfiConverterTypeRestClient.lift(uniffiHandle);
|
|
3759
|
+
return await jsCallback.post(FfiConverterString.lift(url), FfiConverterOptionalMapStringString.lift(headers), FfiConverterOptionalString.lift(body), {
|
|
3760
|
+
signal
|
|
3761
|
+
});
|
|
3762
|
+
};
|
|
3763
|
+
const uniffiHandleSuccess = returnValue => {
|
|
3764
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
|
|
3765
|
+
returnValue: FfiConverterTypeRestResponse.lower(returnValue),
|
|
3766
|
+
callStatus: uniffiCaller.createCallStatus()
|
|
3767
|
+
});
|
|
3768
|
+
};
|
|
3769
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
3770
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
|
|
3771
|
+
returnValue: /*empty*/new Uint8Array(0),
|
|
3772
|
+
// TODO create callstatus with error.
|
|
3773
|
+
callStatus: {
|
|
3774
|
+
code,
|
|
3775
|
+
errorBuf
|
|
3776
|
+
}
|
|
3777
|
+
});
|
|
3778
|
+
};
|
|
3779
|
+
const uniffiForeignFuture = (0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallAsyncWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/ServiceConnectivityError.instanceOf, /*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError), /*lowerString:*/FfiConverterString.lower);
|
|
3780
|
+
return _uniffiBindgenReactNative.UniffiResult.success(uniffiForeignFuture);
|
|
3781
|
+
},
|
|
3782
|
+
delete_: (uniffiHandle, url, headers, body, uniffiFutureCallback, uniffiCallbackData) => {
|
|
3783
|
+
const uniffiMakeCall = async signal => {
|
|
3784
|
+
const jsCallback = FfiConverterTypeRestClient.lift(uniffiHandle);
|
|
3785
|
+
return await jsCallback.delete_(FfiConverterString.lift(url), FfiConverterOptionalMapStringString.lift(headers), FfiConverterOptionalString.lift(body), {
|
|
3786
|
+
signal
|
|
3787
|
+
});
|
|
3788
|
+
};
|
|
3789
|
+
const uniffiHandleSuccess = returnValue => {
|
|
3790
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
|
|
3791
|
+
returnValue: FfiConverterTypeRestResponse.lower(returnValue),
|
|
3792
|
+
callStatus: uniffiCaller.createCallStatus()
|
|
3793
|
+
});
|
|
3794
|
+
};
|
|
3795
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
3796
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
|
|
3797
|
+
returnValue: /*empty*/new Uint8Array(0),
|
|
3798
|
+
// TODO create callstatus with error.
|
|
3799
|
+
callStatus: {
|
|
3800
|
+
code,
|
|
3801
|
+
errorBuf
|
|
3802
|
+
}
|
|
3803
|
+
});
|
|
3804
|
+
};
|
|
3805
|
+
const uniffiForeignFuture = (0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallAsyncWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/ServiceConnectivityError.instanceOf, /*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError), /*lowerString:*/FfiConverterString.lower);
|
|
3806
|
+
return _uniffiBindgenReactNative.UniffiResult.success(uniffiForeignFuture);
|
|
3807
|
+
},
|
|
3808
|
+
uniffiFree: uniffiHandle => {
|
|
3809
|
+
// RestClient: this will throw a stale handle error if the handle isn't found.
|
|
3810
|
+
FfiConverterTypeRestClient.drop(uniffiHandle);
|
|
3811
|
+
}
|
|
3812
|
+
},
|
|
3813
|
+
register: () => {
|
|
3814
|
+
(0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_fn_init_callback_vtable_restclient(uniffiCallbackInterfaceRestClient.vtable);
|
|
3815
|
+
}
|
|
3816
|
+
};
|
|
3817
|
+
|
|
3818
|
+
// FfiConverter for boolean | undefined
|
|
3819
|
+
const FfiConverterOptionalBool = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterBool);
|
|
3820
|
+
|
|
3821
|
+
// FfiConverter for SparkInvoiceFields | undefined
|
|
3822
|
+
const FfiConverterOptionalTypeSparkInvoiceFields = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeSparkInvoiceFields);
|
|
3823
|
+
|
|
3824
|
+
// FfiConverter for Symbol | undefined
|
|
3825
|
+
const FfiConverterOptionalTypeSymbol = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeSymbol);
|
|
3826
|
+
|
|
3827
|
+
// FfiConverter for string | undefined
|
|
3828
|
+
const FfiConverterOptionalString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterString);
|
|
3829
|
+
|
|
3830
|
+
// FfiConverter for /*u32*/number | undefined
|
|
3831
|
+
const FfiConverterOptionalUInt32 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt32);
|
|
3832
|
+
|
|
3833
|
+
// FfiConverter for /*u64*/bigint | undefined
|
|
3834
|
+
const FfiConverterOptionalUInt64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt64);
|
|
3835
|
+
|
|
3836
|
+
// FfiConverter for Array<Bip21Extra>
|
|
3837
|
+
const FfiConverterArrayTypeBip21Extra = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeBip21Extra);
|
|
3838
|
+
|
|
3839
|
+
// FfiConverter for Array<Bolt11RouteHint>
|
|
3840
|
+
const FfiConverterArrayTypeBolt11RouteHint = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeBolt11RouteHint);
|
|
3841
|
+
|
|
3842
|
+
// FfiConverter for Array<Bolt11RouteHintHop>
|
|
3843
|
+
const FfiConverterArrayTypeBolt11RouteHintHop = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeBolt11RouteHintHop);
|
|
3844
|
+
|
|
3845
|
+
// FfiConverter for Array<Bolt12OfferBlindedPath>
|
|
3846
|
+
const FfiConverterArrayTypeBolt12OfferBlindedPath = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeBolt12OfferBlindedPath);
|
|
3847
|
+
|
|
3848
|
+
// FfiConverter for Array<LocaleOverrides>
|
|
3849
|
+
const FfiConverterArrayTypeLocaleOverrides = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeLocaleOverrides);
|
|
3850
|
+
|
|
3851
|
+
// FfiConverter for Array<LocalizedName>
|
|
3852
|
+
const FfiConverterArrayTypeLocalizedName = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeLocalizedName);
|
|
3853
|
+
|
|
3854
|
+
// FfiConverter for Array<string>
|
|
3855
|
+
const FfiConverterArrayString = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterString);
|
|
3856
|
+
|
|
3857
|
+
// FfiConverter for Amount | undefined
|
|
3858
|
+
const FfiConverterOptionalTypeAmount = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeAmount);
|
|
3859
|
+
|
|
3860
|
+
// FfiConverter for SparkAddressPaymentType | undefined
|
|
3861
|
+
const FfiConverterOptionalTypeSparkAddressPaymentType = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeSparkAddressPaymentType);
|
|
3862
|
+
|
|
3863
|
+
// FfiConverter for Map<string, string> | undefined
|
|
3864
|
+
const FfiConverterOptionalMapStringString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterMapStringString);
|
|
3865
|
+
|
|
3866
|
+
// FfiConverter for Array<InputType>
|
|
3867
|
+
const FfiConverterArrayTypeInputType = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeInputType);
|
|
3868
|
+
|
|
3869
|
+
/**
|
|
3870
|
+
* This should be called before anything else.
|
|
3871
|
+
*
|
|
3872
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
3873
|
+
*
|
|
3874
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
3875
|
+
* and when the bindings were generated.
|
|
3876
|
+
*
|
|
3877
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
3878
|
+
*/
|
|
3879
|
+
function uniffiEnsureInitialized() {
|
|
3880
|
+
// Get the bindings contract version from our ComponentInterface
|
|
3881
|
+
const bindingsContractVersion = 26;
|
|
3882
|
+
// Get the scaffolding contract version by calling the into the dylib
|
|
3883
|
+
const scaffoldingContractVersion = (0, _breez_sdk_commonFfi.default)().ubrn_ffi_breez_sdk_common_uniffi_contract_version();
|
|
3884
|
+
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
3885
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
3886
|
+
}
|
|
3887
|
+
if ((0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_checksum_method_restclient_get() !== 32450) {
|
|
3888
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_common_checksum_method_restclient_get');
|
|
3889
|
+
}
|
|
3890
|
+
if ((0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_checksum_method_restclient_post() !== 14213) {
|
|
3891
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_common_checksum_method_restclient_post');
|
|
3892
|
+
}
|
|
3893
|
+
if ((0, _breez_sdk_commonFfi.default)().ubrn_uniffi_breez_sdk_common_checksum_method_restclient_delete() !== 56210) {
|
|
3894
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_common_checksum_method_restclient_delete');
|
|
3895
|
+
}
|
|
3896
|
+
uniffiCallbackInterfaceRestClient.register();
|
|
3897
|
+
}
|
|
3898
|
+
var _default = exports.default = Object.freeze({
|
|
3899
|
+
initialize: uniffiEnsureInitialized,
|
|
3900
|
+
converters: {
|
|
3901
|
+
FfiConverterTypeAesSuccessActionData,
|
|
3902
|
+
FfiConverterTypeAesSuccessActionDataDecrypted,
|
|
3903
|
+
FfiConverterTypeAesSuccessActionDataResult,
|
|
3904
|
+
FfiConverterTypeAmount,
|
|
3905
|
+
FfiConverterTypeBip21Details,
|
|
3906
|
+
FfiConverterTypeBip21Extra,
|
|
3907
|
+
FfiConverterTypeBitcoinAddressDetails,
|
|
3908
|
+
FfiConverterTypeBitcoinNetwork,
|
|
3909
|
+
FfiConverterTypeBolt11Invoice,
|
|
3910
|
+
FfiConverterTypeBolt11InvoiceDetails,
|
|
3911
|
+
FfiConverterTypeBolt11RouteHint,
|
|
3912
|
+
FfiConverterTypeBolt11RouteHintHop,
|
|
3913
|
+
FfiConverterTypeBolt12Invoice,
|
|
3914
|
+
FfiConverterTypeBolt12InvoiceDetails,
|
|
3915
|
+
FfiConverterTypeBolt12InvoiceRequestDetails,
|
|
3916
|
+
FfiConverterTypeBolt12Offer,
|
|
3917
|
+
FfiConverterTypeBolt12OfferBlindedPath,
|
|
3918
|
+
FfiConverterTypeBolt12OfferDetails,
|
|
3919
|
+
FfiConverterTypeCurrencyInfo,
|
|
3920
|
+
FfiConverterTypeFiatCurrency,
|
|
3921
|
+
FfiConverterTypeInputType,
|
|
3922
|
+
FfiConverterTypeLightningAddressDetails,
|
|
3923
|
+
FfiConverterTypeLnurlAuthRequestDetails,
|
|
3924
|
+
FfiConverterTypeLnurlCallbackStatus,
|
|
3925
|
+
FfiConverterTypeLnurlErrorDetails,
|
|
3926
|
+
FfiConverterTypeLnurlPayRequestDetails,
|
|
3927
|
+
FfiConverterTypeLnurlWithdrawRequestDetails,
|
|
3928
|
+
FfiConverterTypeLocaleOverrides,
|
|
3929
|
+
FfiConverterTypeLocalizedName,
|
|
3930
|
+
FfiConverterTypeMessageSuccessActionData,
|
|
3931
|
+
FfiConverterTypePaymentRequestSource,
|
|
3932
|
+
FfiConverterTypeRate,
|
|
3933
|
+
FfiConverterTypeRestClient,
|
|
3934
|
+
FfiConverterTypeRestResponse,
|
|
3935
|
+
FfiConverterTypeSatsPaymentDetails,
|
|
3936
|
+
FfiConverterTypeSilentPaymentAddressDetails,
|
|
3937
|
+
FfiConverterTypeSparkAddress,
|
|
3938
|
+
FfiConverterTypeSparkAddressDetails,
|
|
3939
|
+
FfiConverterTypeSparkAddressPaymentType,
|
|
3940
|
+
FfiConverterTypeSparkInvoiceFields,
|
|
3941
|
+
FfiConverterTypeSuccessAction,
|
|
3942
|
+
FfiConverterTypeSuccessActionProcessed,
|
|
3943
|
+
FfiConverterTypeSymbol,
|
|
3944
|
+
FfiConverterTypeTokensPaymentDetails,
|
|
3945
|
+
FfiConverterTypeUrlSuccessActionData
|
|
3946
|
+
}
|
|
3947
|
+
});
|
|
3948
|
+
//# sourceMappingURL=breez_sdk_common.js.map
|