react-native-bdk-sdk 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/BdkSdk.podspec +44 -0
  2. package/LICENSE +19 -0
  3. package/README.md +24 -0
  4. package/android/CMakeLists.txt +79 -0
  5. package/android/build.gradle +144 -0
  6. package/android/cpp-adapter.cpp +43 -0
  7. package/android/generated/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeBdkSdkSpec.java +41 -0
  8. package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  9. package/android/generated/android/app/build/generated/source/codegen/jni/RNBdkReactNativeSpec-generated.cpp +38 -0
  10. package/android/generated/android/app/build/generated/source/codegen/jni/RNBdkReactNativeSpec.h +31 -0
  11. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/ComponentDescriptors.cpp +22 -0
  12. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/ComponentDescriptors.h +24 -0
  13. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/EventEmitters.cpp +16 -0
  14. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/EventEmitters.h +17 -0
  15. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/Props.cpp +19 -0
  16. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/Props.h +18 -0
  17. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/RNBdkReactNativeSpecJSI.h +45 -0
  18. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/ShadowNodes.cpp +17 -0
  19. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/ShadowNodes.h +23 -0
  20. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/States.cpp +16 -0
  21. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBdkReactNativeSpec/States.h +20 -0
  22. package/android/src/main/AndroidManifest.xml +5 -0
  23. package/android/src/main/java/com/reactnativebdksdk/BdkSdkModule.kt +43 -0
  24. package/android/src/main/java/com/reactnativebdksdk/BdkSdkPackage.kt +34 -0
  25. package/app.plugin.js +1 -0
  26. package/cpp/generated/bdk_ffi.cpp +6761 -0
  27. package/cpp/generated/bdk_ffi.hpp +308 -0
  28. package/cpp/react-native-bdk-sdk.cpp +16 -0
  29. package/cpp/react-native-bdk-sdk.h +15 -0
  30. package/ios/BdkSdk.h +16 -0
  31. package/ios/BdkSdk.mm +66 -0
  32. package/ios/generated/build/generated/ios/ReactCodegen/RNBdkReactNativeSpec/RNBdkReactNativeSpec-generated.mm +46 -0
  33. package/ios/generated/build/generated/ios/ReactCodegen/RNBdkReactNativeSpec/RNBdkReactNativeSpec.h +63 -0
  34. package/ios/generated/build/generated/ios/ReactCodegen/RNBdkReactNativeSpecJSI.h +45 -0
  35. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/ComponentDescriptors.cpp +22 -0
  36. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/ComponentDescriptors.h +24 -0
  37. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/EventEmitters.cpp +16 -0
  38. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/EventEmitters.h +17 -0
  39. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/Props.cpp +19 -0
  40. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/Props.h +18 -0
  41. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/RCTComponentViewHelpers.h +18 -0
  42. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/ShadowNodes.cpp +17 -0
  43. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/ShadowNodes.h +23 -0
  44. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/States.cpp +16 -0
  45. package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNBdkReactNativeSpec/States.h +20 -0
  46. package/lib/commonjs/NativeBdkSdk.js +10 -0
  47. package/lib/commonjs/NativeBdkSdk.js.map +1 -0
  48. package/lib/commonjs/generated/bdk_ffi-ffi.js +48 -0
  49. package/lib/commonjs/generated/bdk_ffi-ffi.js.map +1 -0
  50. package/lib/commonjs/generated/bdk_ffi.js +4117 -0
  51. package/lib/commonjs/generated/bdk_ffi.js.map +1 -0
  52. package/lib/commonjs/index.js +63 -0
  53. package/lib/commonjs/index.js.map +1 -0
  54. package/lib/commonjs/package.json +1 -0
  55. package/lib/module/NativeBdkSdk.js +7 -0
  56. package/lib/module/NativeBdkSdk.js.map +1 -0
  57. package/lib/module/generated/bdk_ffi-ffi.js +47 -0
  58. package/lib/module/generated/bdk_ffi-ffi.js.map +1 -0
  59. package/lib/module/generated/bdk_ffi.js +4100 -0
  60. package/lib/module/generated/bdk_ffi.js.map +1 -0
  61. package/lib/module/index.js +43 -0
  62. package/lib/module/index.js.map +1 -0
  63. package/lib/module/package.json +1 -0
  64. package/lib/typescript/commonjs/package.json +1 -0
  65. package/lib/typescript/commonjs/plugin/src/index.d.ts +7 -0
  66. package/lib/typescript/commonjs/plugin/src/index.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/plugin/src/withAndroid.d.ts +3 -0
  68. package/lib/typescript/commonjs/plugin/src/withAndroid.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/plugin/src/withIOS.d.ts +3 -0
  70. package/lib/typescript/commonjs/plugin/src/withIOS.d.ts.map +1 -0
  71. package/lib/typescript/commonjs/src/NativeBdkSdk.d.ts +8 -0
  72. package/lib/typescript/commonjs/src/NativeBdkSdk.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/src/generated/bdk_ffi-ffi.d.ts +333 -0
  74. package/lib/typescript/commonjs/src/generated/bdk_ffi-ffi.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/src/generated/bdk_ffi.d.ts +3816 -0
  76. package/lib/typescript/commonjs/src/generated/bdk_ffi.d.ts.map +1 -0
  77. package/lib/typescript/commonjs/src/index.d.ts +8 -0
  78. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  79. package/lib/typescript/module/package.json +1 -0
  80. package/lib/typescript/module/plugin/src/index.d.ts +7 -0
  81. package/lib/typescript/module/plugin/src/index.d.ts.map +1 -0
  82. package/lib/typescript/module/plugin/src/withAndroid.d.ts +3 -0
  83. package/lib/typescript/module/plugin/src/withAndroid.d.ts.map +1 -0
  84. package/lib/typescript/module/plugin/src/withIOS.d.ts +3 -0
  85. package/lib/typescript/module/plugin/src/withIOS.d.ts.map +1 -0
  86. package/lib/typescript/module/src/NativeBdkSdk.d.ts +8 -0
  87. package/lib/typescript/module/src/NativeBdkSdk.d.ts.map +1 -0
  88. package/lib/typescript/module/src/generated/bdk_ffi-ffi.d.ts +333 -0
  89. package/lib/typescript/module/src/generated/bdk_ffi-ffi.d.ts.map +1 -0
  90. package/lib/typescript/module/src/generated/bdk_ffi.d.ts +3816 -0
  91. package/lib/typescript/module/src/generated/bdk_ffi.d.ts.map +1 -0
  92. package/lib/typescript/module/src/index.d.ts +8 -0
  93. package/lib/typescript/module/src/index.d.ts.map +1 -0
  94. package/package.json +147 -0
  95. package/plugin/build/index.d.ts +6 -0
  96. package/plugin/build/index.js +14 -0
  97. package/plugin/build/withAndroid.d.ts +2 -0
  98. package/plugin/build/withAndroid.js +20 -0
  99. package/plugin/build/withIOS.d.ts +2 -0
  100. package/plugin/build/withIOS.js +8 -0
  101. package/plugin/tsconfig.json +9 -0
  102. package/plugin/tsconfig.tsbuildinfo +1 -0
  103. package/react-native.config.js +13 -0
  104. package/scripts/postinstall.js +229 -0
  105. package/src/NativeBdkSdk.ts +10 -0
  106. package/src/generated/bdk_ffi-ffi.ts +944 -0
  107. package/src/generated/bdk_ffi.ts +6864 -0
  108. package/src/index.tsx +41 -0
@@ -0,0 +1,4117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.WordCount = exports.WalletEvent_Tags = exports.WalletEvent = exports.Wallet = exports.TxOut = exports.TxOrdering = exports.TxDetails = exports.TxBuilder = exports.SingleKeyDescriptorTemplate = exports.SentAndReceived = exports.Recipient = exports.Psbt = exports.OutPoint = exports.Network = exports.Mnemonic = exports.LocalOutput = exports.Language = exports.KeychainKind = exports.KeychainInfo = exports.DescriptorTemplate = exports.DerivationInfo = exports.ConfirmationBlockTime = exports.ChangeSpendPolicy = exports.BlockId = exports.BdkError_Tags = exports.BdkError = exports.Balance = exports.AddressInfo = void 0;
7
+ exports.createDescriptor = createDescriptor;
8
+ exports.createPublicDescriptor = createPublicDescriptor;
9
+ exports.createSingleKeyDescriptor = createSingleKeyDescriptor;
10
+ exports.default = void 0;
11
+ exports.exportWallet = exportWallet;
12
+ exports.isValidAddress = isValidAddress;
13
+ exports.version = version;
14
+ exports.walletNameFromDescriptor = walletNameFromDescriptor;
15
+ var _bdk_ffiFfi = _interopRequireDefault(require("./bdk_ffi-ffi.js"));
16
+ var _uniffiBindgenReactNative = require("uniffi-bindgen-react-native");
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
19
+ // Trust me, you don't want to mess with it!
20
+
21
+ /* tslint:disable */
22
+ /* eslint-disable */
23
+ // @ts-nocheck
24
+
25
+ // Get converters from the other files, if any.
26
+ const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller(() => ({
27
+ code: 0
28
+ }));
29
+ const uniffiIsDebug =
30
+ // @ts-ignore -- The process global might not be defined
31
+ typeof process !== "object" ||
32
+ // @ts-ignore -- The process global might not be defined
33
+ process?.env?.NODE_ENV !== "production" || false;
34
+ // Public interface members begin here.
35
+
36
+ /**
37
+ * Generate an output descriptor string from a mnemonic using a standard BIP template.
38
+ * Returns a descriptor like "wpkh([fingerprint/84'/0'/0']xprv.../0/*)" for BIP84.
39
+ * Uses Bip44/49/84/86 descriptor templates.
40
+ */
41
+ function createDescriptor(mnemonic, template, keychain, network) /*throws*/{
42
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
43
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_create_descriptor(FfiConverterTypeMnemonic.lower(mnemonic), FfiConverterTypeDescriptorTemplate.lower(template), FfiConverterTypeKeychainKind.lower(keychain), FfiConverterTypeNetwork.lower(network), callStatus);
44
+ }, /*liftString:*/FfiConverterString.lift));
45
+ }
46
+ /**
47
+ * Generate a public (watch-only) descriptor from an xpub string using a standard BIP template.
48
+ * Returns a descriptor like "wpkh([fingerprint/84'/0'/0']xpub.../0/*)" for BIP84.
49
+ * Uses Bip44Public/49Public/84Public/86Public descriptor templates.
50
+ */
51
+ function createPublicDescriptor(xpub, template, keychain, network) /*throws*/{
52
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
53
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_create_public_descriptor(FfiConverterString.lower(xpub), FfiConverterTypeDescriptorTemplate.lower(template), FfiConverterTypeKeychainKind.lower(keychain), FfiConverterTypeNetwork.lower(network), callStatus);
54
+ }, /*liftString:*/FfiConverterString.lift));
55
+ }
56
+ /**
57
+ * Generate a single-key descriptor from a key string.
58
+ * Uses P2Pkh, P2Wpkh, P2Wpkh_P2Sh, or P2TR templates.
59
+ */
60
+ function createSingleKeyDescriptor(key, template, network) /*throws*/{
61
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
62
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_create_single_key_descriptor(FfiConverterString.lower(key), FfiConverterTypeSingleKeyDescriptorTemplate.lower(template), FfiConverterTypeNetwork.lower(network), callStatus);
63
+ }, /*liftString:*/FfiConverterString.lift));
64
+ }
65
+ /**
66
+ * Export a wallet in FullyNoded-compatible JSON format for backup.
67
+ * Mirrors bdk_wallet::export::FullyNodedExport.
68
+ */
69
+ function exportWallet(wallet, label, includeBlockHeight) /*throws*/{
70
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
71
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_export_wallet(FfiConverterTypeWallet.lower(wallet), FfiConverterString.lower(label), _uniffiBindgenReactNative.FfiConverterBool.lower(includeBlockHeight), callStatus);
72
+ }, /*liftString:*/FfiConverterString.lift));
73
+ }
74
+ /**
75
+ * Returns true if the address string is valid for the given network.
76
+ */
77
+ function isValidAddress(address, network) {
78
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
79
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_is_valid_address(FfiConverterString.lower(address), FfiConverterTypeNetwork.lower(network), callStatus);
80
+ }, /*liftString:*/FfiConverterString.lift));
81
+ }
82
+ /**
83
+ * Runtime version of the bdk_wallet crate.
84
+ */
85
+ function version() {
86
+ return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
87
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_version(callStatus);
88
+ }, /*liftString:*/FfiConverterString.lift));
89
+ }
90
+ /**
91
+ * Compute a deterministic wallet name from its descriptors (useful for DB naming).
92
+ * Mirrors bdk_wallet::wallet_name_from_descriptor().
93
+ */
94
+ function walletNameFromDescriptor(descriptor, changeDescriptor, network) /*throws*/{
95
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
96
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_wallet_name_from_descriptor(FfiConverterString.lower(descriptor), FfiConverterOptionalString.lower(changeDescriptor), FfiConverterTypeNetwork.lower(network), callStatus);
97
+ }, /*liftString:*/FfiConverterString.lift));
98
+ }
99
+
100
+ /**
101
+ * A derived address with its derivation index. Mirrors bdk_wallet::AddressInfo.
102
+ */
103
+
104
+ /**
105
+ * Generated factory for {@link AddressInfo} record objects.
106
+ */
107
+ const AddressInfo = exports.AddressInfo = (() => {
108
+ const defaults = () => ({});
109
+ const create = (() => {
110
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
111
+ })();
112
+ return Object.freeze({
113
+ /**
114
+ * Create a frozen instance of {@link AddressInfo}, with defaults specified
115
+ * in Rust, in the {@link bdk_ffi} crate.
116
+ */
117
+ create,
118
+ /**
119
+ * Create a frozen instance of {@link AddressInfo}, with defaults specified
120
+ * in Rust, in the {@link bdk_ffi} crate.
121
+ */
122
+ new: create,
123
+ /**
124
+ * Defaults specified in the {@link bdk_ffi} crate.
125
+ */
126
+ defaults: () => Object.freeze(defaults())
127
+ });
128
+ })();
129
+ const FfiConverterTypeAddressInfo = (() => {
130
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
131
+ read(from) {
132
+ return {
133
+ index: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
134
+ address: FfiConverterString.read(from),
135
+ keychain: FfiConverterTypeKeychainKind.read(from)
136
+ };
137
+ }
138
+ write(value, into) {
139
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.index, into);
140
+ FfiConverterString.write(value.address, into);
141
+ FfiConverterTypeKeychainKind.write(value.keychain, into);
142
+ }
143
+ allocationSize(value) {
144
+ return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.index) + FfiConverterString.allocationSize(value.address) + FfiConverterTypeKeychainKind.allocationSize(value.keychain);
145
+ }
146
+ }
147
+ return new FFIConverter();
148
+ })();
149
+
150
+ /**
151
+ * Wallet balance split into categories. All values in satoshis.
152
+ * Mirrors bdk_wallet::Balance (re-exported from bdk_chain).
153
+ */
154
+
155
+ /**
156
+ * Generated factory for {@link Balance} record objects.
157
+ */
158
+ const Balance = exports.Balance = (() => {
159
+ const defaults = () => ({});
160
+ const create = (() => {
161
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
162
+ })();
163
+ return Object.freeze({
164
+ /**
165
+ * Create a frozen instance of {@link Balance}, with defaults specified
166
+ * in Rust, in the {@link bdk_ffi} crate.
167
+ */
168
+ create,
169
+ /**
170
+ * Create a frozen instance of {@link Balance}, with defaults specified
171
+ * in Rust, in the {@link bdk_ffi} crate.
172
+ */
173
+ new: create,
174
+ /**
175
+ * Defaults specified in the {@link bdk_ffi} crate.
176
+ */
177
+ defaults: () => Object.freeze(defaults())
178
+ });
179
+ })();
180
+ const FfiConverterTypeBalance = (() => {
181
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
182
+ read(from) {
183
+ return {
184
+ immature: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
185
+ trustedPending: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
186
+ untrustedPending: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
187
+ confirmed: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
188
+ trustedSpendable: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
189
+ total: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
190
+ };
191
+ }
192
+ write(value, into) {
193
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.immature, into);
194
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.trustedPending, into);
195
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.untrustedPending, into);
196
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.confirmed, into);
197
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.trustedSpendable, into);
198
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.total, into);
199
+ }
200
+ allocationSize(value) {
201
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.immature) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.trustedPending) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.untrustedPending) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.confirmed) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.trustedSpendable) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.total);
202
+ }
203
+ }
204
+ return new FFIConverter();
205
+ })();
206
+
207
+ /**
208
+ * A block identifier (height + hash). Mirrors bdk_chain::BlockId.
209
+ */
210
+
211
+ /**
212
+ * Generated factory for {@link BlockId} record objects.
213
+ */
214
+ const BlockId = exports.BlockId = (() => {
215
+ const defaults = () => ({});
216
+ const create = (() => {
217
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
218
+ })();
219
+ return Object.freeze({
220
+ /**
221
+ * Create a frozen instance of {@link BlockId}, with defaults specified
222
+ * in Rust, in the {@link bdk_ffi} crate.
223
+ */
224
+ create,
225
+ /**
226
+ * Create a frozen instance of {@link BlockId}, with defaults specified
227
+ * in Rust, in the {@link bdk_ffi} crate.
228
+ */
229
+ new: create,
230
+ /**
231
+ * Defaults specified in the {@link bdk_ffi} crate.
232
+ */
233
+ defaults: () => Object.freeze(defaults())
234
+ });
235
+ })();
236
+ const FfiConverterTypeBlockId = (() => {
237
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
238
+ read(from) {
239
+ return {
240
+ height: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
241
+ hash: FfiConverterString.read(from)
242
+ };
243
+ }
244
+ write(value, into) {
245
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.height, into);
246
+ FfiConverterString.write(value.hash, into);
247
+ }
248
+ allocationSize(value) {
249
+ return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.height) + FfiConverterString.allocationSize(value.hash);
250
+ }
251
+ }
252
+ return new FFIConverter();
253
+ })();
254
+
255
+ /**
256
+ * Block position for a confirmed transaction/output.
257
+ * Mirrors bdk_chain::ConfirmationBlockTime.
258
+ */
259
+
260
+ /**
261
+ * Generated factory for {@link ConfirmationBlockTime} record objects.
262
+ */
263
+ const ConfirmationBlockTime = exports.ConfirmationBlockTime = (() => {
264
+ const defaults = () => ({});
265
+ const create = (() => {
266
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
267
+ })();
268
+ return Object.freeze({
269
+ /**
270
+ * Create a frozen instance of {@link ConfirmationBlockTime}, with defaults specified
271
+ * in Rust, in the {@link bdk_ffi} crate.
272
+ */
273
+ create,
274
+ /**
275
+ * Create a frozen instance of {@link ConfirmationBlockTime}, with defaults specified
276
+ * in Rust, in the {@link bdk_ffi} crate.
277
+ */
278
+ new: create,
279
+ /**
280
+ * Defaults specified in the {@link bdk_ffi} crate.
281
+ */
282
+ defaults: () => Object.freeze(defaults())
283
+ });
284
+ })();
285
+ const FfiConverterTypeConfirmationBlockTime = (() => {
286
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
287
+ read(from) {
288
+ return {
289
+ height: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
290
+ blockHash: FfiConverterString.read(from),
291
+ timestamp: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
292
+ };
293
+ }
294
+ write(value, into) {
295
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.height, into);
296
+ FfiConverterString.write(value.blockHash, into);
297
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.timestamp, into);
298
+ }
299
+ allocationSize(value) {
300
+ return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.height) + FfiConverterString.allocationSize(value.blockHash) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.timestamp);
301
+ }
302
+ }
303
+ return new FFIConverter();
304
+ })();
305
+
306
+ /**
307
+ * Derivation info for a scriptPubKey belonging to the wallet.
308
+ */
309
+
310
+ /**
311
+ * Generated factory for {@link DerivationInfo} record objects.
312
+ */
313
+ const DerivationInfo = exports.DerivationInfo = (() => {
314
+ const defaults = () => ({});
315
+ const create = (() => {
316
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
317
+ })();
318
+ return Object.freeze({
319
+ /**
320
+ * Create a frozen instance of {@link DerivationInfo}, with defaults specified
321
+ * in Rust, in the {@link bdk_ffi} crate.
322
+ */
323
+ create,
324
+ /**
325
+ * Create a frozen instance of {@link DerivationInfo}, with defaults specified
326
+ * in Rust, in the {@link bdk_ffi} crate.
327
+ */
328
+ new: create,
329
+ /**
330
+ * Defaults specified in the {@link bdk_ffi} crate.
331
+ */
332
+ defaults: () => Object.freeze(defaults())
333
+ });
334
+ })();
335
+ const FfiConverterTypeDerivationInfo = (() => {
336
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
337
+ read(from) {
338
+ return {
339
+ keychain: FfiConverterTypeKeychainKind.read(from),
340
+ index: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
341
+ };
342
+ }
343
+ write(value, into) {
344
+ FfiConverterTypeKeychainKind.write(value.keychain, into);
345
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.index, into);
346
+ }
347
+ allocationSize(value) {
348
+ return FfiConverterTypeKeychainKind.allocationSize(value.keychain) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.index);
349
+ }
350
+ }
351
+ return new FFIConverter();
352
+ })();
353
+
354
+ /**
355
+ * Info about a keychain and its associated descriptor.
356
+ */
357
+
358
+ /**
359
+ * Generated factory for {@link KeychainInfo} record objects.
360
+ */
361
+ const KeychainInfo = exports.KeychainInfo = (() => {
362
+ const defaults = () => ({});
363
+ const create = (() => {
364
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
365
+ })();
366
+ return Object.freeze({
367
+ /**
368
+ * Create a frozen instance of {@link KeychainInfo}, with defaults specified
369
+ * in Rust, in the {@link bdk_ffi} crate.
370
+ */
371
+ create,
372
+ /**
373
+ * Create a frozen instance of {@link KeychainInfo}, with defaults specified
374
+ * in Rust, in the {@link bdk_ffi} crate.
375
+ */
376
+ new: create,
377
+ /**
378
+ * Defaults specified in the {@link bdk_ffi} crate.
379
+ */
380
+ defaults: () => Object.freeze(defaults())
381
+ });
382
+ })();
383
+ const FfiConverterTypeKeychainInfo = (() => {
384
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
385
+ read(from) {
386
+ return {
387
+ keychain: FfiConverterTypeKeychainKind.read(from),
388
+ descriptor: FfiConverterString.read(from)
389
+ };
390
+ }
391
+ write(value, into) {
392
+ FfiConverterTypeKeychainKind.write(value.keychain, into);
393
+ FfiConverterString.write(value.descriptor, into);
394
+ }
395
+ allocationSize(value) {
396
+ return FfiConverterTypeKeychainKind.allocationSize(value.keychain) + FfiConverterString.allocationSize(value.descriptor);
397
+ }
398
+ }
399
+ return new FFIConverter();
400
+ })();
401
+
402
+ /**
403
+ * A wallet-owned output (spent or unspent). Mirrors bdk_wallet::LocalOutput.
404
+ */
405
+
406
+ /**
407
+ * Generated factory for {@link LocalOutput} record objects.
408
+ */
409
+ const LocalOutput = exports.LocalOutput = (() => {
410
+ const defaults = () => ({});
411
+ const create = (() => {
412
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
413
+ })();
414
+ return Object.freeze({
415
+ /**
416
+ * Create a frozen instance of {@link LocalOutput}, with defaults specified
417
+ * in Rust, in the {@link bdk_ffi} crate.
418
+ */
419
+ create,
420
+ /**
421
+ * Create a frozen instance of {@link LocalOutput}, with defaults specified
422
+ * in Rust, in the {@link bdk_ffi} crate.
423
+ */
424
+ new: create,
425
+ /**
426
+ * Defaults specified in the {@link bdk_ffi} crate.
427
+ */
428
+ defaults: () => Object.freeze(defaults())
429
+ });
430
+ })();
431
+ const FfiConverterTypeLocalOutput = (() => {
432
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
433
+ read(from) {
434
+ return {
435
+ outpoint: FfiConverterTypeOutPoint.read(from),
436
+ txout: FfiConverterTypeTxOut.read(from),
437
+ keychain: FfiConverterTypeKeychainKind.read(from),
438
+ isSpent: _uniffiBindgenReactNative.FfiConverterBool.read(from),
439
+ derivationIndex: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
440
+ confirmationBlockTime: FfiConverterOptionalTypeConfirmationBlockTime.read(from)
441
+ };
442
+ }
443
+ write(value, into) {
444
+ FfiConverterTypeOutPoint.write(value.outpoint, into);
445
+ FfiConverterTypeTxOut.write(value.txout, into);
446
+ FfiConverterTypeKeychainKind.write(value.keychain, into);
447
+ _uniffiBindgenReactNative.FfiConverterBool.write(value.isSpent, into);
448
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.derivationIndex, into);
449
+ FfiConverterOptionalTypeConfirmationBlockTime.write(value.confirmationBlockTime, into);
450
+ }
451
+ allocationSize(value) {
452
+ return FfiConverterTypeOutPoint.allocationSize(value.outpoint) + FfiConverterTypeTxOut.allocationSize(value.txout) + FfiConverterTypeKeychainKind.allocationSize(value.keychain) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.isSpent) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.derivationIndex) + FfiConverterOptionalTypeConfirmationBlockTime.allocationSize(value.confirmationBlockTime);
453
+ }
454
+ }
455
+ return new FFIConverter();
456
+ })();
457
+
458
+ /**
459
+ * Reference to a specific transaction output. Mirrors bitcoin::OutPoint.
460
+ */
461
+
462
+ /**
463
+ * Generated factory for {@link OutPoint} record objects.
464
+ */
465
+ const OutPoint = exports.OutPoint = (() => {
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 OutPoint}, with defaults specified
473
+ * in Rust, in the {@link bdk_ffi} crate.
474
+ */
475
+ create,
476
+ /**
477
+ * Create a frozen instance of {@link OutPoint}, with defaults specified
478
+ * in Rust, in the {@link bdk_ffi} crate.
479
+ */
480
+ new: create,
481
+ /**
482
+ * Defaults specified in the {@link bdk_ffi} crate.
483
+ */
484
+ defaults: () => Object.freeze(defaults())
485
+ });
486
+ })();
487
+ const FfiConverterTypeOutPoint = (() => {
488
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
489
+ read(from) {
490
+ return {
491
+ txid: FfiConverterString.read(from),
492
+ vout: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
493
+ };
494
+ }
495
+ write(value, into) {
496
+ FfiConverterString.write(value.txid, into);
497
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.vout, into);
498
+ }
499
+ allocationSize(value) {
500
+ return FfiConverterString.allocationSize(value.txid) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vout);
501
+ }
502
+ }
503
+ return new FFIConverter();
504
+ })();
505
+
506
+ /**
507
+ * A single payment recipient.
508
+ */
509
+
510
+ /**
511
+ * Generated factory for {@link Recipient} record objects.
512
+ */
513
+ const Recipient = exports.Recipient = (() => {
514
+ const defaults = () => ({});
515
+ const create = (() => {
516
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
517
+ })();
518
+ return Object.freeze({
519
+ /**
520
+ * Create a frozen instance of {@link Recipient}, with defaults specified
521
+ * in Rust, in the {@link bdk_ffi} crate.
522
+ */
523
+ create,
524
+ /**
525
+ * Create a frozen instance of {@link Recipient}, with defaults specified
526
+ * in Rust, in the {@link bdk_ffi} crate.
527
+ */
528
+ new: create,
529
+ /**
530
+ * Defaults specified in the {@link bdk_ffi} crate.
531
+ */
532
+ defaults: () => Object.freeze(defaults())
533
+ });
534
+ })();
535
+ const FfiConverterTypeRecipient = (() => {
536
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
537
+ read(from) {
538
+ return {
539
+ address: FfiConverterString.read(from),
540
+ amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
541
+ };
542
+ }
543
+ write(value, into) {
544
+ FfiConverterString.write(value.address, into);
545
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
546
+ }
547
+ allocationSize(value) {
548
+ return FfiConverterString.allocationSize(value.address) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats);
549
+ }
550
+ }
551
+ return new FFIConverter();
552
+ })();
553
+
554
+ /**
555
+ * How much was sent from / received into the wallet for a given transaction.
556
+ */
557
+
558
+ /**
559
+ * Generated factory for {@link SentAndReceived} record objects.
560
+ */
561
+ const SentAndReceived = exports.SentAndReceived = (() => {
562
+ const defaults = () => ({});
563
+ const create = (() => {
564
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
565
+ })();
566
+ return Object.freeze({
567
+ /**
568
+ * Create a frozen instance of {@link SentAndReceived}, with defaults specified
569
+ * in Rust, in the {@link bdk_ffi} crate.
570
+ */
571
+ create,
572
+ /**
573
+ * Create a frozen instance of {@link SentAndReceived}, with defaults specified
574
+ * in Rust, in the {@link bdk_ffi} crate.
575
+ */
576
+ new: create,
577
+ /**
578
+ * Defaults specified in the {@link bdk_ffi} crate.
579
+ */
580
+ defaults: () => Object.freeze(defaults())
581
+ });
582
+ })();
583
+ const FfiConverterTypeSentAndReceived = (() => {
584
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
585
+ read(from) {
586
+ return {
587
+ sent: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
588
+ received: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
589
+ };
590
+ }
591
+ write(value, into) {
592
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.sent, into);
593
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.received, into);
594
+ }
595
+ allocationSize(value) {
596
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.sent) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.received);
597
+ }
598
+ }
599
+ return new FFIConverter();
600
+ })();
601
+
602
+ /**
603
+ * Full details of a wallet-relevant transaction. Mirrors bdk_wallet::TxDetails.
604
+ */
605
+
606
+ /**
607
+ * Generated factory for {@link TxDetails} record objects.
608
+ */
609
+ const TxDetails = exports.TxDetails = (() => {
610
+ const defaults = () => ({});
611
+ const create = (() => {
612
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
613
+ })();
614
+ return Object.freeze({
615
+ /**
616
+ * Create a frozen instance of {@link TxDetails}, with defaults specified
617
+ * in Rust, in the {@link bdk_ffi} crate.
618
+ */
619
+ create,
620
+ /**
621
+ * Create a frozen instance of {@link TxDetails}, with defaults specified
622
+ * in Rust, in the {@link bdk_ffi} crate.
623
+ */
624
+ new: create,
625
+ /**
626
+ * Defaults specified in the {@link bdk_ffi} crate.
627
+ */
628
+ defaults: () => Object.freeze(defaults())
629
+ });
630
+ })();
631
+ const FfiConverterTypeTxDetails = (() => {
632
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
633
+ read(from) {
634
+ return {
635
+ txid: FfiConverterString.read(from),
636
+ sent: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
637
+ received: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
638
+ fee: FfiConverterOptionalUInt64.read(from),
639
+ feeRate: FfiConverterOptionalFloat64.read(from),
640
+ balanceDelta: _uniffiBindgenReactNative.FfiConverterInt64.read(from),
641
+ confirmationBlockTime: FfiConverterOptionalTypeConfirmationBlockTime.read(from),
642
+ txHex: FfiConverterString.read(from)
643
+ };
644
+ }
645
+ write(value, into) {
646
+ FfiConverterString.write(value.txid, into);
647
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.sent, into);
648
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.received, into);
649
+ FfiConverterOptionalUInt64.write(value.fee, into);
650
+ FfiConverterOptionalFloat64.write(value.feeRate, into);
651
+ _uniffiBindgenReactNative.FfiConverterInt64.write(value.balanceDelta, into);
652
+ FfiConverterOptionalTypeConfirmationBlockTime.write(value.confirmationBlockTime, into);
653
+ FfiConverterString.write(value.txHex, into);
654
+ }
655
+ allocationSize(value) {
656
+ return FfiConverterString.allocationSize(value.txid) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.sent) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.received) + FfiConverterOptionalUInt64.allocationSize(value.fee) + FfiConverterOptionalFloat64.allocationSize(value.feeRate) + _uniffiBindgenReactNative.FfiConverterInt64.allocationSize(value.balanceDelta) + FfiConverterOptionalTypeConfirmationBlockTime.allocationSize(value.confirmationBlockTime) + FfiConverterString.allocationSize(value.txHex);
657
+ }
658
+ }
659
+ return new FFIConverter();
660
+ })();
661
+
662
+ /**
663
+ * A transaction output (value + locking script). Mirrors bitcoin::TxOut.
664
+ */
665
+
666
+ /**
667
+ * Generated factory for {@link TxOut} record objects.
668
+ */
669
+ const TxOut = exports.TxOut = (() => {
670
+ const defaults = () => ({});
671
+ const create = (() => {
672
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
673
+ })();
674
+ return Object.freeze({
675
+ /**
676
+ * Create a frozen instance of {@link TxOut}, with defaults specified
677
+ * in Rust, in the {@link bdk_ffi} crate.
678
+ */
679
+ create,
680
+ /**
681
+ * Create a frozen instance of {@link TxOut}, with defaults specified
682
+ * in Rust, in the {@link bdk_ffi} crate.
683
+ */
684
+ new: create,
685
+ /**
686
+ * Defaults specified in the {@link bdk_ffi} crate.
687
+ */
688
+ defaults: () => Object.freeze(defaults())
689
+ });
690
+ })();
691
+ const FfiConverterTypeTxOut = (() => {
692
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
693
+ read(from) {
694
+ return {
695
+ value: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
696
+ scriptPubkeyHex: FfiConverterString.read(from)
697
+ };
698
+ }
699
+ write(value, into) {
700
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.value, into);
701
+ FfiConverterString.write(value.scriptPubkeyHex, into);
702
+ }
703
+ allocationSize(value) {
704
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.value) + FfiConverterString.allocationSize(value.scriptPubkeyHex);
705
+ }
706
+ }
707
+ return new FFIConverter();
708
+ })();
709
+ const stringConverter = {
710
+ stringToBytes: s => uniffiCaller.rustCall(status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
711
+ bytesToString: ab => uniffiCaller.rustCall(status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
712
+ stringByteLength: s => uniffiCaller.rustCall(status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, status))
713
+ };
714
+ const FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
715
+
716
+ // Flat error type: BdkError
717
+ let BdkError_Tags = exports.BdkError_Tags = /*#__PURE__*/function (BdkError_Tags) {
718
+ BdkError_Tags["InvalidDescriptor"] = "InvalidDescriptor";
719
+ BdkError_Tags["WalletCreationFailed"] = "WalletCreationFailed";
720
+ BdkError_Tags["WalletLoadFailed"] = "WalletLoadFailed";
721
+ BdkError_Tags["WalletLoadMismatch"] = "WalletLoadMismatch";
722
+ BdkError_Tags["PersistError"] = "PersistError";
723
+ BdkError_Tags["InvalidAddress"] = "InvalidAddress";
724
+ BdkError_Tags["InvalidScript"] = "InvalidScript";
725
+ BdkError_Tags["TransactionBuildFailed"] = "TransactionBuildFailed";
726
+ BdkError_Tags["NoRecipients"] = "NoRecipients";
727
+ BdkError_Tags["NoUtxosSelected"] = "NoUtxosSelected";
728
+ BdkError_Tags["OutputBelowDustLimit"] = "OutputBelowDustLimit";
729
+ BdkError_Tags["InsufficientFunds"] = "InsufficientFunds";
730
+ BdkError_Tags["FeeRateTooLow"] = "FeeRateTooLow";
731
+ BdkError_Tags["FeeTooLow"] = "FeeTooLow";
732
+ BdkError_Tags["LockTimeConflict"] = "LockTimeConflict";
733
+ BdkError_Tags["RbfSequenceConflict"] = "RbfSequenceConflict";
734
+ BdkError_Tags["VersionZero"] = "VersionZero";
735
+ BdkError_Tags["VersionOneCsv"] = "VersionOneCsv";
736
+ BdkError_Tags["SpendingPolicyRequired"] = "SpendingPolicyRequired";
737
+ BdkError_Tags["MissingKeyOrigin"] = "MissingKeyOrigin";
738
+ BdkError_Tags["MissingNonWitnessUtxo"] = "MissingNonWitnessUtxo";
739
+ BdkError_Tags["OutpointNotFound"] = "OutpointNotFound";
740
+ BdkError_Tags["FeeBumpTargetNotFound"] = "FeeBumpTargetNotFound";
741
+ BdkError_Tags["FeeBumpAlreadyConfirmed"] = "FeeBumpAlreadyConfirmed";
742
+ BdkError_Tags["FeeBumpIrreplaceable"] = "FeeBumpIrreplaceable";
743
+ BdkError_Tags["FeeBumpFeeRateUnavailable"] = "FeeBumpFeeRateUnavailable";
744
+ BdkError_Tags["FeeBumpInvalidOutputIndex"] = "FeeBumpInvalidOutputIndex";
745
+ BdkError_Tags["InvalidPsbt"] = "InvalidPsbt";
746
+ BdkError_Tags["SignFailed"] = "SignFailed";
747
+ BdkError_Tags["SignerMissingKey"] = "SignerMissingKey";
748
+ BdkError_Tags["SignerInvalidKey"] = "SignerInvalidKey";
749
+ BdkError_Tags["SignerUserCanceled"] = "SignerUserCanceled";
750
+ BdkError_Tags["SignerInputIndexOutOfRange"] = "SignerInputIndexOutOfRange";
751
+ BdkError_Tags["SignerMissingNonWitnessUtxo"] = "SignerMissingNonWitnessUtxo";
752
+ BdkError_Tags["SignerMissingWitnessUtxo"] = "SignerMissingWitnessUtxo";
753
+ BdkError_Tags["SignerMissingWitnessScript"] = "SignerMissingWitnessScript";
754
+ BdkError_Tags["SignerNonStandardSighash"] = "SignerNonStandardSighash";
755
+ BdkError_Tags["SignerInvalidSighash"] = "SignerInvalidSighash";
756
+ BdkError_Tags["SyncFailed"] = "SyncFailed";
757
+ BdkError_Tags["BroadcastFailed"] = "BroadcastFailed";
758
+ BdkError_Tags["InvalidTransaction"] = "InvalidTransaction";
759
+ BdkError_Tags["TransactionNotFound"] = "TransactionNotFound";
760
+ BdkError_Tags["CannotConnect"] = "CannotConnect";
761
+ BdkError_Tags["CalculateFeeError"] = "CalculateFeeError";
762
+ BdkError_Tags["InvalidMnemonic"] = "InvalidMnemonic";
763
+ BdkError_Tags["InvalidEntropy"] = "InvalidEntropy";
764
+ BdkError_Tags["KeyError"] = "KeyError";
765
+ BdkError_Tags["Generic"] = "Generic";
766
+ return BdkError_Tags;
767
+ }({});
768
+ const BdkError = exports.BdkError = (() => {
769
+ class InvalidDescriptor extends _uniffiBindgenReactNative.UniffiError {
770
+ /**
771
+ * @private
772
+ * This field is private and should not be used.
773
+ */
774
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
775
+ /**
776
+ * @private
777
+ * This field is private and should not be used.
778
+ */
779
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 1;
780
+ tag = BdkError_Tags.InvalidDescriptor;
781
+ constructor(message) {
782
+ super("BdkError", "InvalidDescriptor", message);
783
+ }
784
+ static instanceOf(e) {
785
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 1;
786
+ }
787
+ }
788
+ class WalletCreationFailed extends _uniffiBindgenReactNative.UniffiError {
789
+ /**
790
+ * @private
791
+ * This field is private and should not be used.
792
+ */
793
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
794
+ /**
795
+ * @private
796
+ * This field is private and should not be used.
797
+ */
798
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 2;
799
+ tag = BdkError_Tags.WalletCreationFailed;
800
+ constructor(message) {
801
+ super("BdkError", "WalletCreationFailed", message);
802
+ }
803
+ static instanceOf(e) {
804
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 2;
805
+ }
806
+ }
807
+ class WalletLoadFailed extends _uniffiBindgenReactNative.UniffiError {
808
+ /**
809
+ * @private
810
+ * This field is private and should not be used.
811
+ */
812
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
813
+ /**
814
+ * @private
815
+ * This field is private and should not be used.
816
+ */
817
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 3;
818
+ tag = BdkError_Tags.WalletLoadFailed;
819
+ constructor(message) {
820
+ super("BdkError", "WalletLoadFailed", message);
821
+ }
822
+ static instanceOf(e) {
823
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 3;
824
+ }
825
+ }
826
+ class WalletLoadMismatch extends _uniffiBindgenReactNative.UniffiError {
827
+ /**
828
+ * @private
829
+ * This field is private and should not be used.
830
+ */
831
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
832
+ /**
833
+ * @private
834
+ * This field is private and should not be used.
835
+ */
836
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 4;
837
+ tag = BdkError_Tags.WalletLoadMismatch;
838
+ constructor(message) {
839
+ super("BdkError", "WalletLoadMismatch", message);
840
+ }
841
+ static instanceOf(e) {
842
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 4;
843
+ }
844
+ }
845
+ class PersistError extends _uniffiBindgenReactNative.UniffiError {
846
+ /**
847
+ * @private
848
+ * This field is private and should not be used.
849
+ */
850
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
851
+ /**
852
+ * @private
853
+ * This field is private and should not be used.
854
+ */
855
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 5;
856
+ tag = BdkError_Tags.PersistError;
857
+ constructor(message) {
858
+ super("BdkError", "PersistError", message);
859
+ }
860
+ static instanceOf(e) {
861
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 5;
862
+ }
863
+ }
864
+ class InvalidAddress extends _uniffiBindgenReactNative.UniffiError {
865
+ /**
866
+ * @private
867
+ * This field is private and should not be used.
868
+ */
869
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
870
+ /**
871
+ * @private
872
+ * This field is private and should not be used.
873
+ */
874
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 6;
875
+ tag = BdkError_Tags.InvalidAddress;
876
+ constructor(message) {
877
+ super("BdkError", "InvalidAddress", message);
878
+ }
879
+ static instanceOf(e) {
880
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 6;
881
+ }
882
+ }
883
+ class InvalidScript extends _uniffiBindgenReactNative.UniffiError {
884
+ /**
885
+ * @private
886
+ * This field is private and should not be used.
887
+ */
888
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
889
+ /**
890
+ * @private
891
+ * This field is private and should not be used.
892
+ */
893
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 7;
894
+ tag = BdkError_Tags.InvalidScript;
895
+ constructor(message) {
896
+ super("BdkError", "InvalidScript", message);
897
+ }
898
+ static instanceOf(e) {
899
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 7;
900
+ }
901
+ }
902
+ class TransactionBuildFailed extends _uniffiBindgenReactNative.UniffiError {
903
+ /**
904
+ * @private
905
+ * This field is private and should not be used.
906
+ */
907
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
908
+ /**
909
+ * @private
910
+ * This field is private and should not be used.
911
+ */
912
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 8;
913
+ tag = BdkError_Tags.TransactionBuildFailed;
914
+ constructor(message) {
915
+ super("BdkError", "TransactionBuildFailed", message);
916
+ }
917
+ static instanceOf(e) {
918
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 8;
919
+ }
920
+ }
921
+ class NoRecipients extends _uniffiBindgenReactNative.UniffiError {
922
+ /**
923
+ * @private
924
+ * This field is private and should not be used.
925
+ */
926
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
927
+ /**
928
+ * @private
929
+ * This field is private and should not be used.
930
+ */
931
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 9;
932
+ tag = BdkError_Tags.NoRecipients;
933
+ constructor(message) {
934
+ super("BdkError", "NoRecipients", message);
935
+ }
936
+ static instanceOf(e) {
937
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 9;
938
+ }
939
+ }
940
+ class NoUtxosSelected extends _uniffiBindgenReactNative.UniffiError {
941
+ /**
942
+ * @private
943
+ * This field is private and should not be used.
944
+ */
945
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
946
+ /**
947
+ * @private
948
+ * This field is private and should not be used.
949
+ */
950
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 10;
951
+ tag = BdkError_Tags.NoUtxosSelected;
952
+ constructor(message) {
953
+ super("BdkError", "NoUtxosSelected", message);
954
+ }
955
+ static instanceOf(e) {
956
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 10;
957
+ }
958
+ }
959
+ class OutputBelowDustLimit extends _uniffiBindgenReactNative.UniffiError {
960
+ /**
961
+ * @private
962
+ * This field is private and should not be used.
963
+ */
964
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
965
+ /**
966
+ * @private
967
+ * This field is private and should not be used.
968
+ */
969
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 11;
970
+ tag = BdkError_Tags.OutputBelowDustLimit;
971
+ constructor(message) {
972
+ super("BdkError", "OutputBelowDustLimit", message);
973
+ }
974
+ static instanceOf(e) {
975
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 11;
976
+ }
977
+ }
978
+ class InsufficientFunds extends _uniffiBindgenReactNative.UniffiError {
979
+ /**
980
+ * @private
981
+ * This field is private and should not be used.
982
+ */
983
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
984
+ /**
985
+ * @private
986
+ * This field is private and should not be used.
987
+ */
988
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 12;
989
+ tag = BdkError_Tags.InsufficientFunds;
990
+ constructor(message) {
991
+ super("BdkError", "InsufficientFunds", message);
992
+ }
993
+ static instanceOf(e) {
994
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 12;
995
+ }
996
+ }
997
+ class FeeRateTooLow extends _uniffiBindgenReactNative.UniffiError {
998
+ /**
999
+ * @private
1000
+ * This field is private and should not be used.
1001
+ */
1002
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1003
+ /**
1004
+ * @private
1005
+ * This field is private and should not be used.
1006
+ */
1007
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 13;
1008
+ tag = BdkError_Tags.FeeRateTooLow;
1009
+ constructor(message) {
1010
+ super("BdkError", "FeeRateTooLow", message);
1011
+ }
1012
+ static instanceOf(e) {
1013
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 13;
1014
+ }
1015
+ }
1016
+ class FeeTooLow extends _uniffiBindgenReactNative.UniffiError {
1017
+ /**
1018
+ * @private
1019
+ * This field is private and should not be used.
1020
+ */
1021
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1022
+ /**
1023
+ * @private
1024
+ * This field is private and should not be used.
1025
+ */
1026
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 14;
1027
+ tag = BdkError_Tags.FeeTooLow;
1028
+ constructor(message) {
1029
+ super("BdkError", "FeeTooLow", message);
1030
+ }
1031
+ static instanceOf(e) {
1032
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 14;
1033
+ }
1034
+ }
1035
+ class LockTimeConflict extends _uniffiBindgenReactNative.UniffiError {
1036
+ /**
1037
+ * @private
1038
+ * This field is private and should not be used.
1039
+ */
1040
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1041
+ /**
1042
+ * @private
1043
+ * This field is private and should not be used.
1044
+ */
1045
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 15;
1046
+ tag = BdkError_Tags.LockTimeConflict;
1047
+ constructor(message) {
1048
+ super("BdkError", "LockTimeConflict", message);
1049
+ }
1050
+ static instanceOf(e) {
1051
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 15;
1052
+ }
1053
+ }
1054
+ class RbfSequenceConflict extends _uniffiBindgenReactNative.UniffiError {
1055
+ /**
1056
+ * @private
1057
+ * This field is private and should not be used.
1058
+ */
1059
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1060
+ /**
1061
+ * @private
1062
+ * This field is private and should not be used.
1063
+ */
1064
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 16;
1065
+ tag = BdkError_Tags.RbfSequenceConflict;
1066
+ constructor(message) {
1067
+ super("BdkError", "RbfSequenceConflict", message);
1068
+ }
1069
+ static instanceOf(e) {
1070
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 16;
1071
+ }
1072
+ }
1073
+ class VersionZero extends _uniffiBindgenReactNative.UniffiError {
1074
+ /**
1075
+ * @private
1076
+ * This field is private and should not be used.
1077
+ */
1078
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1079
+ /**
1080
+ * @private
1081
+ * This field is private and should not be used.
1082
+ */
1083
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 17;
1084
+ tag = BdkError_Tags.VersionZero;
1085
+ constructor(message) {
1086
+ super("BdkError", "VersionZero", message);
1087
+ }
1088
+ static instanceOf(e) {
1089
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 17;
1090
+ }
1091
+ }
1092
+ class VersionOneCsv extends _uniffiBindgenReactNative.UniffiError {
1093
+ /**
1094
+ * @private
1095
+ * This field is private and should not be used.
1096
+ */
1097
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1098
+ /**
1099
+ * @private
1100
+ * This field is private and should not be used.
1101
+ */
1102
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 18;
1103
+ tag = BdkError_Tags.VersionOneCsv;
1104
+ constructor(message) {
1105
+ super("BdkError", "VersionOneCsv", message);
1106
+ }
1107
+ static instanceOf(e) {
1108
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 18;
1109
+ }
1110
+ }
1111
+ class SpendingPolicyRequired extends _uniffiBindgenReactNative.UniffiError {
1112
+ /**
1113
+ * @private
1114
+ * This field is private and should not be used.
1115
+ */
1116
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1117
+ /**
1118
+ * @private
1119
+ * This field is private and should not be used.
1120
+ */
1121
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 19;
1122
+ tag = BdkError_Tags.SpendingPolicyRequired;
1123
+ constructor(message) {
1124
+ super("BdkError", "SpendingPolicyRequired", message);
1125
+ }
1126
+ static instanceOf(e) {
1127
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 19;
1128
+ }
1129
+ }
1130
+ class MissingKeyOrigin extends _uniffiBindgenReactNative.UniffiError {
1131
+ /**
1132
+ * @private
1133
+ * This field is private and should not be used.
1134
+ */
1135
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1136
+ /**
1137
+ * @private
1138
+ * This field is private and should not be used.
1139
+ */
1140
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 20;
1141
+ tag = BdkError_Tags.MissingKeyOrigin;
1142
+ constructor(message) {
1143
+ super("BdkError", "MissingKeyOrigin", message);
1144
+ }
1145
+ static instanceOf(e) {
1146
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 20;
1147
+ }
1148
+ }
1149
+ class MissingNonWitnessUtxo extends _uniffiBindgenReactNative.UniffiError {
1150
+ /**
1151
+ * @private
1152
+ * This field is private and should not be used.
1153
+ */
1154
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1155
+ /**
1156
+ * @private
1157
+ * This field is private and should not be used.
1158
+ */
1159
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 21;
1160
+ tag = BdkError_Tags.MissingNonWitnessUtxo;
1161
+ constructor(message) {
1162
+ super("BdkError", "MissingNonWitnessUtxo", message);
1163
+ }
1164
+ static instanceOf(e) {
1165
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 21;
1166
+ }
1167
+ }
1168
+ class OutpointNotFound extends _uniffiBindgenReactNative.UniffiError {
1169
+ /**
1170
+ * @private
1171
+ * This field is private and should not be used.
1172
+ */
1173
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1174
+ /**
1175
+ * @private
1176
+ * This field is private and should not be used.
1177
+ */
1178
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 22;
1179
+ tag = BdkError_Tags.OutpointNotFound;
1180
+ constructor(message) {
1181
+ super("BdkError", "OutpointNotFound", message);
1182
+ }
1183
+ static instanceOf(e) {
1184
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 22;
1185
+ }
1186
+ }
1187
+ class FeeBumpTargetNotFound extends _uniffiBindgenReactNative.UniffiError {
1188
+ /**
1189
+ * @private
1190
+ * This field is private and should not be used.
1191
+ */
1192
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1193
+ /**
1194
+ * @private
1195
+ * This field is private and should not be used.
1196
+ */
1197
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 23;
1198
+ tag = BdkError_Tags.FeeBumpTargetNotFound;
1199
+ constructor(message) {
1200
+ super("BdkError", "FeeBumpTargetNotFound", message);
1201
+ }
1202
+ static instanceOf(e) {
1203
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 23;
1204
+ }
1205
+ }
1206
+ class FeeBumpAlreadyConfirmed extends _uniffiBindgenReactNative.UniffiError {
1207
+ /**
1208
+ * @private
1209
+ * This field is private and should not be used.
1210
+ */
1211
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1212
+ /**
1213
+ * @private
1214
+ * This field is private and should not be used.
1215
+ */
1216
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 24;
1217
+ tag = BdkError_Tags.FeeBumpAlreadyConfirmed;
1218
+ constructor(message) {
1219
+ super("BdkError", "FeeBumpAlreadyConfirmed", message);
1220
+ }
1221
+ static instanceOf(e) {
1222
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 24;
1223
+ }
1224
+ }
1225
+ class FeeBumpIrreplaceable extends _uniffiBindgenReactNative.UniffiError {
1226
+ /**
1227
+ * @private
1228
+ * This field is private and should not be used.
1229
+ */
1230
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1231
+ /**
1232
+ * @private
1233
+ * This field is private and should not be used.
1234
+ */
1235
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 25;
1236
+ tag = BdkError_Tags.FeeBumpIrreplaceable;
1237
+ constructor(message) {
1238
+ super("BdkError", "FeeBumpIrreplaceable", message);
1239
+ }
1240
+ static instanceOf(e) {
1241
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 25;
1242
+ }
1243
+ }
1244
+ class FeeBumpFeeRateUnavailable extends _uniffiBindgenReactNative.UniffiError {
1245
+ /**
1246
+ * @private
1247
+ * This field is private and should not be used.
1248
+ */
1249
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1250
+ /**
1251
+ * @private
1252
+ * This field is private and should not be used.
1253
+ */
1254
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 26;
1255
+ tag = BdkError_Tags.FeeBumpFeeRateUnavailable;
1256
+ constructor(message) {
1257
+ super("BdkError", "FeeBumpFeeRateUnavailable", message);
1258
+ }
1259
+ static instanceOf(e) {
1260
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 26;
1261
+ }
1262
+ }
1263
+ class FeeBumpInvalidOutputIndex extends _uniffiBindgenReactNative.UniffiError {
1264
+ /**
1265
+ * @private
1266
+ * This field is private and should not be used.
1267
+ */
1268
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1269
+ /**
1270
+ * @private
1271
+ * This field is private and should not be used.
1272
+ */
1273
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 27;
1274
+ tag = BdkError_Tags.FeeBumpInvalidOutputIndex;
1275
+ constructor(message) {
1276
+ super("BdkError", "FeeBumpInvalidOutputIndex", message);
1277
+ }
1278
+ static instanceOf(e) {
1279
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 27;
1280
+ }
1281
+ }
1282
+ class InvalidPsbt extends _uniffiBindgenReactNative.UniffiError {
1283
+ /**
1284
+ * @private
1285
+ * This field is private and should not be used.
1286
+ */
1287
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1288
+ /**
1289
+ * @private
1290
+ * This field is private and should not be used.
1291
+ */
1292
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 28;
1293
+ tag = BdkError_Tags.InvalidPsbt;
1294
+ constructor(message) {
1295
+ super("BdkError", "InvalidPsbt", message);
1296
+ }
1297
+ static instanceOf(e) {
1298
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 28;
1299
+ }
1300
+ }
1301
+ class SignFailed extends _uniffiBindgenReactNative.UniffiError {
1302
+ /**
1303
+ * @private
1304
+ * This field is private and should not be used.
1305
+ */
1306
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1307
+ /**
1308
+ * @private
1309
+ * This field is private and should not be used.
1310
+ */
1311
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 29;
1312
+ tag = BdkError_Tags.SignFailed;
1313
+ constructor(message) {
1314
+ super("BdkError", "SignFailed", message);
1315
+ }
1316
+ static instanceOf(e) {
1317
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 29;
1318
+ }
1319
+ }
1320
+ class SignerMissingKey extends _uniffiBindgenReactNative.UniffiError {
1321
+ /**
1322
+ * @private
1323
+ * This field is private and should not be used.
1324
+ */
1325
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1326
+ /**
1327
+ * @private
1328
+ * This field is private and should not be used.
1329
+ */
1330
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 30;
1331
+ tag = BdkError_Tags.SignerMissingKey;
1332
+ constructor(message) {
1333
+ super("BdkError", "SignerMissingKey", message);
1334
+ }
1335
+ static instanceOf(e) {
1336
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 30;
1337
+ }
1338
+ }
1339
+ class SignerInvalidKey extends _uniffiBindgenReactNative.UniffiError {
1340
+ /**
1341
+ * @private
1342
+ * This field is private and should not be used.
1343
+ */
1344
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1345
+ /**
1346
+ * @private
1347
+ * This field is private and should not be used.
1348
+ */
1349
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 31;
1350
+ tag = BdkError_Tags.SignerInvalidKey;
1351
+ constructor(message) {
1352
+ super("BdkError", "SignerInvalidKey", message);
1353
+ }
1354
+ static instanceOf(e) {
1355
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 31;
1356
+ }
1357
+ }
1358
+ class SignerUserCanceled extends _uniffiBindgenReactNative.UniffiError {
1359
+ /**
1360
+ * @private
1361
+ * This field is private and should not be used.
1362
+ */
1363
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1364
+ /**
1365
+ * @private
1366
+ * This field is private and should not be used.
1367
+ */
1368
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 32;
1369
+ tag = BdkError_Tags.SignerUserCanceled;
1370
+ constructor(message) {
1371
+ super("BdkError", "SignerUserCanceled", message);
1372
+ }
1373
+ static instanceOf(e) {
1374
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 32;
1375
+ }
1376
+ }
1377
+ class SignerInputIndexOutOfRange extends _uniffiBindgenReactNative.UniffiError {
1378
+ /**
1379
+ * @private
1380
+ * This field is private and should not be used.
1381
+ */
1382
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1383
+ /**
1384
+ * @private
1385
+ * This field is private and should not be used.
1386
+ */
1387
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 33;
1388
+ tag = BdkError_Tags.SignerInputIndexOutOfRange;
1389
+ constructor(message) {
1390
+ super("BdkError", "SignerInputIndexOutOfRange", message);
1391
+ }
1392
+ static instanceOf(e) {
1393
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 33;
1394
+ }
1395
+ }
1396
+ class SignerMissingNonWitnessUtxo extends _uniffiBindgenReactNative.UniffiError {
1397
+ /**
1398
+ * @private
1399
+ * This field is private and should not be used.
1400
+ */
1401
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1402
+ /**
1403
+ * @private
1404
+ * This field is private and should not be used.
1405
+ */
1406
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 34;
1407
+ tag = BdkError_Tags.SignerMissingNonWitnessUtxo;
1408
+ constructor(message) {
1409
+ super("BdkError", "SignerMissingNonWitnessUtxo", message);
1410
+ }
1411
+ static instanceOf(e) {
1412
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 34;
1413
+ }
1414
+ }
1415
+ class SignerMissingWitnessUtxo extends _uniffiBindgenReactNative.UniffiError {
1416
+ /**
1417
+ * @private
1418
+ * This field is private and should not be used.
1419
+ */
1420
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1421
+ /**
1422
+ * @private
1423
+ * This field is private and should not be used.
1424
+ */
1425
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 35;
1426
+ tag = BdkError_Tags.SignerMissingWitnessUtxo;
1427
+ constructor(message) {
1428
+ super("BdkError", "SignerMissingWitnessUtxo", message);
1429
+ }
1430
+ static instanceOf(e) {
1431
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 35;
1432
+ }
1433
+ }
1434
+ class SignerMissingWitnessScript extends _uniffiBindgenReactNative.UniffiError {
1435
+ /**
1436
+ * @private
1437
+ * This field is private and should not be used.
1438
+ */
1439
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1440
+ /**
1441
+ * @private
1442
+ * This field is private and should not be used.
1443
+ */
1444
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 36;
1445
+ tag = BdkError_Tags.SignerMissingWitnessScript;
1446
+ constructor(message) {
1447
+ super("BdkError", "SignerMissingWitnessScript", message);
1448
+ }
1449
+ static instanceOf(e) {
1450
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 36;
1451
+ }
1452
+ }
1453
+ class SignerNonStandardSighash extends _uniffiBindgenReactNative.UniffiError {
1454
+ /**
1455
+ * @private
1456
+ * This field is private and should not be used.
1457
+ */
1458
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1459
+ /**
1460
+ * @private
1461
+ * This field is private and should not be used.
1462
+ */
1463
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 37;
1464
+ tag = BdkError_Tags.SignerNonStandardSighash;
1465
+ constructor(message) {
1466
+ super("BdkError", "SignerNonStandardSighash", message);
1467
+ }
1468
+ static instanceOf(e) {
1469
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 37;
1470
+ }
1471
+ }
1472
+ class SignerInvalidSighash extends _uniffiBindgenReactNative.UniffiError {
1473
+ /**
1474
+ * @private
1475
+ * This field is private and should not be used.
1476
+ */
1477
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1478
+ /**
1479
+ * @private
1480
+ * This field is private and should not be used.
1481
+ */
1482
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 38;
1483
+ tag = BdkError_Tags.SignerInvalidSighash;
1484
+ constructor(message) {
1485
+ super("BdkError", "SignerInvalidSighash", message);
1486
+ }
1487
+ static instanceOf(e) {
1488
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 38;
1489
+ }
1490
+ }
1491
+ class SyncFailed extends _uniffiBindgenReactNative.UniffiError {
1492
+ /**
1493
+ * @private
1494
+ * This field is private and should not be used.
1495
+ */
1496
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1497
+ /**
1498
+ * @private
1499
+ * This field is private and should not be used.
1500
+ */
1501
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 39;
1502
+ tag = BdkError_Tags.SyncFailed;
1503
+ constructor(message) {
1504
+ super("BdkError", "SyncFailed", message);
1505
+ }
1506
+ static instanceOf(e) {
1507
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 39;
1508
+ }
1509
+ }
1510
+ class BroadcastFailed extends _uniffiBindgenReactNative.UniffiError {
1511
+ /**
1512
+ * @private
1513
+ * This field is private and should not be used.
1514
+ */
1515
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1516
+ /**
1517
+ * @private
1518
+ * This field is private and should not be used.
1519
+ */
1520
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 40;
1521
+ tag = BdkError_Tags.BroadcastFailed;
1522
+ constructor(message) {
1523
+ super("BdkError", "BroadcastFailed", message);
1524
+ }
1525
+ static instanceOf(e) {
1526
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 40;
1527
+ }
1528
+ }
1529
+ class InvalidTransaction extends _uniffiBindgenReactNative.UniffiError {
1530
+ /**
1531
+ * @private
1532
+ * This field is private and should not be used.
1533
+ */
1534
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1535
+ /**
1536
+ * @private
1537
+ * This field is private and should not be used.
1538
+ */
1539
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 41;
1540
+ tag = BdkError_Tags.InvalidTransaction;
1541
+ constructor(message) {
1542
+ super("BdkError", "InvalidTransaction", message);
1543
+ }
1544
+ static instanceOf(e) {
1545
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 41;
1546
+ }
1547
+ }
1548
+ class TransactionNotFound extends _uniffiBindgenReactNative.UniffiError {
1549
+ /**
1550
+ * @private
1551
+ * This field is private and should not be used.
1552
+ */
1553
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1554
+ /**
1555
+ * @private
1556
+ * This field is private and should not be used.
1557
+ */
1558
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 42;
1559
+ tag = BdkError_Tags.TransactionNotFound;
1560
+ constructor(message) {
1561
+ super("BdkError", "TransactionNotFound", message);
1562
+ }
1563
+ static instanceOf(e) {
1564
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 42;
1565
+ }
1566
+ }
1567
+ class CannotConnect extends _uniffiBindgenReactNative.UniffiError {
1568
+ /**
1569
+ * @private
1570
+ * This field is private and should not be used.
1571
+ */
1572
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1573
+ /**
1574
+ * @private
1575
+ * This field is private and should not be used.
1576
+ */
1577
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 43;
1578
+ tag = BdkError_Tags.CannotConnect;
1579
+ constructor(message) {
1580
+ super("BdkError", "CannotConnect", message);
1581
+ }
1582
+ static instanceOf(e) {
1583
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 43;
1584
+ }
1585
+ }
1586
+ class CalculateFeeError extends _uniffiBindgenReactNative.UniffiError {
1587
+ /**
1588
+ * @private
1589
+ * This field is private and should not be used.
1590
+ */
1591
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1592
+ /**
1593
+ * @private
1594
+ * This field is private and should not be used.
1595
+ */
1596
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 44;
1597
+ tag = BdkError_Tags.CalculateFeeError;
1598
+ constructor(message) {
1599
+ super("BdkError", "CalculateFeeError", message);
1600
+ }
1601
+ static instanceOf(e) {
1602
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 44;
1603
+ }
1604
+ }
1605
+ class InvalidMnemonic extends _uniffiBindgenReactNative.UniffiError {
1606
+ /**
1607
+ * @private
1608
+ * This field is private and should not be used.
1609
+ */
1610
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1611
+ /**
1612
+ * @private
1613
+ * This field is private and should not be used.
1614
+ */
1615
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 45;
1616
+ tag = BdkError_Tags.InvalidMnemonic;
1617
+ constructor(message) {
1618
+ super("BdkError", "InvalidMnemonic", message);
1619
+ }
1620
+ static instanceOf(e) {
1621
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 45;
1622
+ }
1623
+ }
1624
+ class InvalidEntropy extends _uniffiBindgenReactNative.UniffiError {
1625
+ /**
1626
+ * @private
1627
+ * This field is private and should not be used.
1628
+ */
1629
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1630
+ /**
1631
+ * @private
1632
+ * This field is private and should not be used.
1633
+ */
1634
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 46;
1635
+ tag = BdkError_Tags.InvalidEntropy;
1636
+ constructor(message) {
1637
+ super("BdkError", "InvalidEntropy", message);
1638
+ }
1639
+ static instanceOf(e) {
1640
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 46;
1641
+ }
1642
+ }
1643
+ class KeyError extends _uniffiBindgenReactNative.UniffiError {
1644
+ /**
1645
+ * @private
1646
+ * This field is private and should not be used.
1647
+ */
1648
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1649
+ /**
1650
+ * @private
1651
+ * This field is private and should not be used.
1652
+ */
1653
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 47;
1654
+ tag = BdkError_Tags.KeyError;
1655
+ constructor(message) {
1656
+ super("BdkError", "KeyError", message);
1657
+ }
1658
+ static instanceOf(e) {
1659
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 47;
1660
+ }
1661
+ }
1662
+ class Generic extends _uniffiBindgenReactNative.UniffiError {
1663
+ /**
1664
+ * @private
1665
+ * This field is private and should not be used.
1666
+ */
1667
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1668
+ /**
1669
+ * @private
1670
+ * This field is private and should not be used.
1671
+ */
1672
+ [_uniffiBindgenReactNative.variantOrdinalSymbol] = 48;
1673
+ tag = BdkError_Tags.Generic;
1674
+ constructor(message) {
1675
+ super("BdkError", "Generic", message);
1676
+ }
1677
+ static instanceOf(e) {
1678
+ return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 48;
1679
+ }
1680
+ }
1681
+
1682
+ // Utility function which does not rely on instanceof.
1683
+ function instanceOf(e) {
1684
+ return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "BdkError";
1685
+ }
1686
+ return {
1687
+ InvalidDescriptor,
1688
+ WalletCreationFailed,
1689
+ WalletLoadFailed,
1690
+ WalletLoadMismatch,
1691
+ PersistError,
1692
+ InvalidAddress,
1693
+ InvalidScript,
1694
+ TransactionBuildFailed,
1695
+ NoRecipients,
1696
+ NoUtxosSelected,
1697
+ OutputBelowDustLimit,
1698
+ InsufficientFunds,
1699
+ FeeRateTooLow,
1700
+ FeeTooLow,
1701
+ LockTimeConflict,
1702
+ RbfSequenceConflict,
1703
+ VersionZero,
1704
+ VersionOneCsv,
1705
+ SpendingPolicyRequired,
1706
+ MissingKeyOrigin,
1707
+ MissingNonWitnessUtxo,
1708
+ OutpointNotFound,
1709
+ FeeBumpTargetNotFound,
1710
+ FeeBumpAlreadyConfirmed,
1711
+ FeeBumpIrreplaceable,
1712
+ FeeBumpFeeRateUnavailable,
1713
+ FeeBumpInvalidOutputIndex,
1714
+ InvalidPsbt,
1715
+ SignFailed,
1716
+ SignerMissingKey,
1717
+ SignerInvalidKey,
1718
+ SignerUserCanceled,
1719
+ SignerInputIndexOutOfRange,
1720
+ SignerMissingNonWitnessUtxo,
1721
+ SignerMissingWitnessUtxo,
1722
+ SignerMissingWitnessScript,
1723
+ SignerNonStandardSighash,
1724
+ SignerInvalidSighash,
1725
+ SyncFailed,
1726
+ BroadcastFailed,
1727
+ InvalidTransaction,
1728
+ TransactionNotFound,
1729
+ CannotConnect,
1730
+ CalculateFeeError,
1731
+ InvalidMnemonic,
1732
+ InvalidEntropy,
1733
+ KeyError,
1734
+ Generic,
1735
+ instanceOf
1736
+ };
1737
+ })();
1738
+
1739
+ // Union type for BdkError error type.
1740
+
1741
+ const FfiConverterTypeBdkError = (() => {
1742
+ const intConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1743
+ class FfiConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1744
+ read(from) {
1745
+ switch (intConverter.read(from)) {
1746
+ case 1:
1747
+ return new BdkError.InvalidDescriptor(FfiConverterString.read(from));
1748
+ case 2:
1749
+ return new BdkError.WalletCreationFailed(FfiConverterString.read(from));
1750
+ case 3:
1751
+ return new BdkError.WalletLoadFailed(FfiConverterString.read(from));
1752
+ case 4:
1753
+ return new BdkError.WalletLoadMismatch(FfiConverterString.read(from));
1754
+ case 5:
1755
+ return new BdkError.PersistError(FfiConverterString.read(from));
1756
+ case 6:
1757
+ return new BdkError.InvalidAddress(FfiConverterString.read(from));
1758
+ case 7:
1759
+ return new BdkError.InvalidScript(FfiConverterString.read(from));
1760
+ case 8:
1761
+ return new BdkError.TransactionBuildFailed(FfiConverterString.read(from));
1762
+ case 9:
1763
+ return new BdkError.NoRecipients(FfiConverterString.read(from));
1764
+ case 10:
1765
+ return new BdkError.NoUtxosSelected(FfiConverterString.read(from));
1766
+ case 11:
1767
+ return new BdkError.OutputBelowDustLimit(FfiConverterString.read(from));
1768
+ case 12:
1769
+ return new BdkError.InsufficientFunds(FfiConverterString.read(from));
1770
+ case 13:
1771
+ return new BdkError.FeeRateTooLow(FfiConverterString.read(from));
1772
+ case 14:
1773
+ return new BdkError.FeeTooLow(FfiConverterString.read(from));
1774
+ case 15:
1775
+ return new BdkError.LockTimeConflict(FfiConverterString.read(from));
1776
+ case 16:
1777
+ return new BdkError.RbfSequenceConflict(FfiConverterString.read(from));
1778
+ case 17:
1779
+ return new BdkError.VersionZero(FfiConverterString.read(from));
1780
+ case 18:
1781
+ return new BdkError.VersionOneCsv(FfiConverterString.read(from));
1782
+ case 19:
1783
+ return new BdkError.SpendingPolicyRequired(FfiConverterString.read(from));
1784
+ case 20:
1785
+ return new BdkError.MissingKeyOrigin(FfiConverterString.read(from));
1786
+ case 21:
1787
+ return new BdkError.MissingNonWitnessUtxo(FfiConverterString.read(from));
1788
+ case 22:
1789
+ return new BdkError.OutpointNotFound(FfiConverterString.read(from));
1790
+ case 23:
1791
+ return new BdkError.FeeBumpTargetNotFound(FfiConverterString.read(from));
1792
+ case 24:
1793
+ return new BdkError.FeeBumpAlreadyConfirmed(FfiConverterString.read(from));
1794
+ case 25:
1795
+ return new BdkError.FeeBumpIrreplaceable(FfiConverterString.read(from));
1796
+ case 26:
1797
+ return new BdkError.FeeBumpFeeRateUnavailable(FfiConverterString.read(from));
1798
+ case 27:
1799
+ return new BdkError.FeeBumpInvalidOutputIndex(FfiConverterString.read(from));
1800
+ case 28:
1801
+ return new BdkError.InvalidPsbt(FfiConverterString.read(from));
1802
+ case 29:
1803
+ return new BdkError.SignFailed(FfiConverterString.read(from));
1804
+ case 30:
1805
+ return new BdkError.SignerMissingKey(FfiConverterString.read(from));
1806
+ case 31:
1807
+ return new BdkError.SignerInvalidKey(FfiConverterString.read(from));
1808
+ case 32:
1809
+ return new BdkError.SignerUserCanceled(FfiConverterString.read(from));
1810
+ case 33:
1811
+ return new BdkError.SignerInputIndexOutOfRange(FfiConverterString.read(from));
1812
+ case 34:
1813
+ return new BdkError.SignerMissingNonWitnessUtxo(FfiConverterString.read(from));
1814
+ case 35:
1815
+ return new BdkError.SignerMissingWitnessUtxo(FfiConverterString.read(from));
1816
+ case 36:
1817
+ return new BdkError.SignerMissingWitnessScript(FfiConverterString.read(from));
1818
+ case 37:
1819
+ return new BdkError.SignerNonStandardSighash(FfiConverterString.read(from));
1820
+ case 38:
1821
+ return new BdkError.SignerInvalidSighash(FfiConverterString.read(from));
1822
+ case 39:
1823
+ return new BdkError.SyncFailed(FfiConverterString.read(from));
1824
+ case 40:
1825
+ return new BdkError.BroadcastFailed(FfiConverterString.read(from));
1826
+ case 41:
1827
+ return new BdkError.InvalidTransaction(FfiConverterString.read(from));
1828
+ case 42:
1829
+ return new BdkError.TransactionNotFound(FfiConverterString.read(from));
1830
+ case 43:
1831
+ return new BdkError.CannotConnect(FfiConverterString.read(from));
1832
+ case 44:
1833
+ return new BdkError.CalculateFeeError(FfiConverterString.read(from));
1834
+ case 45:
1835
+ return new BdkError.InvalidMnemonic(FfiConverterString.read(from));
1836
+ case 46:
1837
+ return new BdkError.InvalidEntropy(FfiConverterString.read(from));
1838
+ case 47:
1839
+ return new BdkError.KeyError(FfiConverterString.read(from));
1840
+ case 48:
1841
+ return new BdkError.Generic(FfiConverterString.read(from));
1842
+ default:
1843
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1844
+ }
1845
+ }
1846
+ write(value, into) {
1847
+ const obj = value;
1848
+ const index = obj[_uniffiBindgenReactNative.variantOrdinalSymbol];
1849
+ intConverter.write(index, into);
1850
+ }
1851
+ allocationSize(value) {
1852
+ return intConverter.allocationSize(0);
1853
+ }
1854
+ }
1855
+ return new FfiConverter();
1856
+ })();
1857
+
1858
+ /**
1859
+ * Controls which UTXOs the wallet may spend as change inputs.
1860
+ */
1861
+ let ChangeSpendPolicy = exports.ChangeSpendPolicy = /*#__PURE__*/function (ChangeSpendPolicy) {
1862
+ /**
1863
+ * Both change and non-change outputs may be spent (default).
1864
+ */
1865
+ ChangeSpendPolicy[ChangeSpendPolicy["ChangeAllowed"] = 0] = "ChangeAllowed";
1866
+ /**
1867
+ * Only change outputs may be spent as inputs.
1868
+ */
1869
+ ChangeSpendPolicy[ChangeSpendPolicy["OnlyChange"] = 1] = "OnlyChange";
1870
+ /**
1871
+ * Only non-change outputs may be spent as inputs.
1872
+ */
1873
+ ChangeSpendPolicy[ChangeSpendPolicy["ChangeForbidden"] = 2] = "ChangeForbidden";
1874
+ return ChangeSpendPolicy;
1875
+ }({});
1876
+ const FfiConverterTypeChangeSpendPolicy = (() => {
1877
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1878
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1879
+ read(from) {
1880
+ switch (ordinalConverter.read(from)) {
1881
+ case 1:
1882
+ return ChangeSpendPolicy.ChangeAllowed;
1883
+ case 2:
1884
+ return ChangeSpendPolicy.OnlyChange;
1885
+ case 3:
1886
+ return ChangeSpendPolicy.ChangeForbidden;
1887
+ default:
1888
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1889
+ }
1890
+ }
1891
+ write(value, into) {
1892
+ switch (value) {
1893
+ case ChangeSpendPolicy.ChangeAllowed:
1894
+ return ordinalConverter.write(1, into);
1895
+ case ChangeSpendPolicy.OnlyChange:
1896
+ return ordinalConverter.write(2, into);
1897
+ case ChangeSpendPolicy.ChangeForbidden:
1898
+ return ordinalConverter.write(3, into);
1899
+ }
1900
+ }
1901
+ allocationSize(value) {
1902
+ return ordinalConverter.allocationSize(0);
1903
+ }
1904
+ }
1905
+ return new FFIConverter();
1906
+ })();
1907
+
1908
+ /**
1909
+ * Standard BIP descriptor templates for generating wallet descriptors
1910
+ * from a mnemonic/xprv (also usable for xpub via create_public_descriptor).
1911
+ * Mirrors descriptor::template::{Bip44, Bip49, Bip84, Bip86}.
1912
+ */
1913
+ let DescriptorTemplate = exports.DescriptorTemplate = /*#__PURE__*/function (DescriptorTemplate) {
1914
+ /**
1915
+ * BIP44 — Legacy P2PKH (1…)
1916
+ */
1917
+ DescriptorTemplate[DescriptorTemplate["Bip44"] = 0] = "Bip44";
1918
+ /**
1919
+ * BIP49 — Nested SegWit P2SH-P2WPKH (3…)
1920
+ */
1921
+ DescriptorTemplate[DescriptorTemplate["Bip49"] = 1] = "Bip49";
1922
+ /**
1923
+ * BIP84 — Native SegWit P2WPKH (bc1q…)
1924
+ */
1925
+ DescriptorTemplate[DescriptorTemplate["Bip84"] = 2] = "Bip84";
1926
+ /**
1927
+ * BIP86 — Taproot P2TR (bc1p…)
1928
+ */
1929
+ DescriptorTemplate[DescriptorTemplate["Bip86"] = 3] = "Bip86";
1930
+ return DescriptorTemplate;
1931
+ }({});
1932
+ const FfiConverterTypeDescriptorTemplate = (() => {
1933
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1934
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1935
+ read(from) {
1936
+ switch (ordinalConverter.read(from)) {
1937
+ case 1:
1938
+ return DescriptorTemplate.Bip44;
1939
+ case 2:
1940
+ return DescriptorTemplate.Bip49;
1941
+ case 3:
1942
+ return DescriptorTemplate.Bip84;
1943
+ case 4:
1944
+ return DescriptorTemplate.Bip86;
1945
+ default:
1946
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1947
+ }
1948
+ }
1949
+ write(value, into) {
1950
+ switch (value) {
1951
+ case DescriptorTemplate.Bip44:
1952
+ return ordinalConverter.write(1, into);
1953
+ case DescriptorTemplate.Bip49:
1954
+ return ordinalConverter.write(2, into);
1955
+ case DescriptorTemplate.Bip84:
1956
+ return ordinalConverter.write(3, into);
1957
+ case DescriptorTemplate.Bip86:
1958
+ return ordinalConverter.write(4, into);
1959
+ }
1960
+ }
1961
+ allocationSize(value) {
1962
+ return ordinalConverter.allocationSize(0);
1963
+ }
1964
+ }
1965
+ return new FFIConverter();
1966
+ })();
1967
+ let KeychainKind = exports.KeychainKind = /*#__PURE__*/function (KeychainKind) {
1968
+ /**
1969
+ * External keychain — used for deriving recipient addresses.
1970
+ */
1971
+ KeychainKind[KeychainKind["External"] = 0] = "External";
1972
+ /**
1973
+ * Internal keychain — used for deriving change addresses.
1974
+ */
1975
+ KeychainKind[KeychainKind["Internal"] = 1] = "Internal";
1976
+ return KeychainKind;
1977
+ }({});
1978
+ const FfiConverterTypeKeychainKind = (() => {
1979
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1980
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1981
+ read(from) {
1982
+ switch (ordinalConverter.read(from)) {
1983
+ case 1:
1984
+ return KeychainKind.External;
1985
+ case 2:
1986
+ return KeychainKind.Internal;
1987
+ default:
1988
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1989
+ }
1990
+ }
1991
+ write(value, into) {
1992
+ switch (value) {
1993
+ case KeychainKind.External:
1994
+ return ordinalConverter.write(1, into);
1995
+ case KeychainKind.Internal:
1996
+ return ordinalConverter.write(2, into);
1997
+ }
1998
+ }
1999
+ allocationSize(value) {
2000
+ return ordinalConverter.allocationSize(0);
2001
+ }
2002
+ }
2003
+ return new FFIConverter();
2004
+ })();
2005
+
2006
+ /**
2007
+ * BIP-39 mnemonic language. Mirrors bip39::Language.
2008
+ * Requires `all-languages` feature on the bip39 crate.
2009
+ */
2010
+ let Language = exports.Language = /*#__PURE__*/function (Language) {
2011
+ Language[Language["English"] = 0] = "English";
2012
+ Language[Language["SimplifiedChinese"] = 1] = "SimplifiedChinese";
2013
+ Language[Language["TraditionalChinese"] = 2] = "TraditionalChinese";
2014
+ Language[Language["Czech"] = 3] = "Czech";
2015
+ Language[Language["French"] = 4] = "French";
2016
+ Language[Language["Italian"] = 5] = "Italian";
2017
+ Language[Language["Japanese"] = 6] = "Japanese";
2018
+ Language[Language["Korean"] = 7] = "Korean";
2019
+ Language[Language["Portuguese"] = 8] = "Portuguese";
2020
+ Language[Language["Spanish"] = 9] = "Spanish";
2021
+ return Language;
2022
+ }({});
2023
+ const FfiConverterTypeLanguage = (() => {
2024
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2025
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2026
+ read(from) {
2027
+ switch (ordinalConverter.read(from)) {
2028
+ case 1:
2029
+ return Language.English;
2030
+ case 2:
2031
+ return Language.SimplifiedChinese;
2032
+ case 3:
2033
+ return Language.TraditionalChinese;
2034
+ case 4:
2035
+ return Language.Czech;
2036
+ case 5:
2037
+ return Language.French;
2038
+ case 6:
2039
+ return Language.Italian;
2040
+ case 7:
2041
+ return Language.Japanese;
2042
+ case 8:
2043
+ return Language.Korean;
2044
+ case 9:
2045
+ return Language.Portuguese;
2046
+ case 10:
2047
+ return Language.Spanish;
2048
+ default:
2049
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2050
+ }
2051
+ }
2052
+ write(value, into) {
2053
+ switch (value) {
2054
+ case Language.English:
2055
+ return ordinalConverter.write(1, into);
2056
+ case Language.SimplifiedChinese:
2057
+ return ordinalConverter.write(2, into);
2058
+ case Language.TraditionalChinese:
2059
+ return ordinalConverter.write(3, into);
2060
+ case Language.Czech:
2061
+ return ordinalConverter.write(4, into);
2062
+ case Language.French:
2063
+ return ordinalConverter.write(5, into);
2064
+ case Language.Italian:
2065
+ return ordinalConverter.write(6, into);
2066
+ case Language.Japanese:
2067
+ return ordinalConverter.write(7, into);
2068
+ case Language.Korean:
2069
+ return ordinalConverter.write(8, into);
2070
+ case Language.Portuguese:
2071
+ return ordinalConverter.write(9, into);
2072
+ case Language.Spanish:
2073
+ return ordinalConverter.write(10, into);
2074
+ }
2075
+ }
2076
+ allocationSize(value) {
2077
+ return ordinalConverter.allocationSize(0);
2078
+ }
2079
+ }
2080
+ return new FFIConverter();
2081
+ })();
2082
+ let Network = exports.Network = /*#__PURE__*/function (Network) {
2083
+ Network[Network["Bitcoin"] = 0] = "Bitcoin";
2084
+ Network[Network["Testnet"] = 1] = "Testnet";
2085
+ Network[Network["Signet"] = 2] = "Signet";
2086
+ Network[Network["Regtest"] = 3] = "Regtest";
2087
+ return Network;
2088
+ }({});
2089
+ const FfiConverterTypeNetwork = (() => {
2090
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2091
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2092
+ read(from) {
2093
+ switch (ordinalConverter.read(from)) {
2094
+ case 1:
2095
+ return Network.Bitcoin;
2096
+ case 2:
2097
+ return Network.Testnet;
2098
+ case 3:
2099
+ return Network.Signet;
2100
+ case 4:
2101
+ return Network.Regtest;
2102
+ default:
2103
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2104
+ }
2105
+ }
2106
+ write(value, into) {
2107
+ switch (value) {
2108
+ case Network.Bitcoin:
2109
+ return ordinalConverter.write(1, into);
2110
+ case Network.Testnet:
2111
+ return ordinalConverter.write(2, into);
2112
+ case Network.Signet:
2113
+ return ordinalConverter.write(3, into);
2114
+ case Network.Regtest:
2115
+ return ordinalConverter.write(4, into);
2116
+ }
2117
+ }
2118
+ allocationSize(value) {
2119
+ return ordinalConverter.allocationSize(0);
2120
+ }
2121
+ }
2122
+ return new FFIConverter();
2123
+ })();
2124
+
2125
+ /**
2126
+ * Single-key descriptor templates.
2127
+ * Mirrors descriptor::template::{P2Pkh, P2Wpkh, P2Wpkh_P2Sh, P2TR}.
2128
+ */
2129
+ let SingleKeyDescriptorTemplate = exports.SingleKeyDescriptorTemplate = /*#__PURE__*/function (SingleKeyDescriptorTemplate) {
2130
+ /**
2131
+ * Pay-to-PubKey-Hash — Legacy (1…)
2132
+ */
2133
+ SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2Pkh"] = 0] = "P2Pkh";
2134
+ /**
2135
+ * Pay-to-Witness-PubKey-Hash — Native SegWit (bc1q…)
2136
+ */
2137
+ SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2Wpkh"] = 1] = "P2Wpkh";
2138
+ /**
2139
+ * P2Wpkh wrapped in P2SH — Nested SegWit (3…)
2140
+ */
2141
+ SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2WpkhP2Sh"] = 2] = "P2WpkhP2Sh";
2142
+ /**
2143
+ * Pay-to-Taproot (bc1p…)
2144
+ */
2145
+ SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2tr"] = 3] = "P2tr";
2146
+ return SingleKeyDescriptorTemplate;
2147
+ }({});
2148
+ const FfiConverterTypeSingleKeyDescriptorTemplate = (() => {
2149
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2150
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2151
+ read(from) {
2152
+ switch (ordinalConverter.read(from)) {
2153
+ case 1:
2154
+ return SingleKeyDescriptorTemplate.P2Pkh;
2155
+ case 2:
2156
+ return SingleKeyDescriptorTemplate.P2Wpkh;
2157
+ case 3:
2158
+ return SingleKeyDescriptorTemplate.P2WpkhP2Sh;
2159
+ case 4:
2160
+ return SingleKeyDescriptorTemplate.P2tr;
2161
+ default:
2162
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2163
+ }
2164
+ }
2165
+ write(value, into) {
2166
+ switch (value) {
2167
+ case SingleKeyDescriptorTemplate.P2Pkh:
2168
+ return ordinalConverter.write(1, into);
2169
+ case SingleKeyDescriptorTemplate.P2Wpkh:
2170
+ return ordinalConverter.write(2, into);
2171
+ case SingleKeyDescriptorTemplate.P2WpkhP2Sh:
2172
+ return ordinalConverter.write(3, into);
2173
+ case SingleKeyDescriptorTemplate.P2tr:
2174
+ return ordinalConverter.write(4, into);
2175
+ }
2176
+ }
2177
+ allocationSize(value) {
2178
+ return ordinalConverter.allocationSize(0);
2179
+ }
2180
+ }
2181
+ return new FFIConverter();
2182
+ })();
2183
+
2184
+ /**
2185
+ * Ordering applied to inputs and outputs when building a transaction.
2186
+ * Note: bdk_wallet also has a Custom variant (with closures) that cannot cross FFI.
2187
+ */
2188
+ let TxOrdering = exports.TxOrdering = /*#__PURE__*/function (TxOrdering) {
2189
+ /**
2190
+ * Randomise input and output order (default, good for privacy).
2191
+ */
2192
+ TxOrdering[TxOrdering["Shuffle"] = 0] = "Shuffle";
2193
+ /**
2194
+ * Preserve insertion order of recipients and manually added UTXOs.
2195
+ */
2196
+ TxOrdering[TxOrdering["Untouched"] = 1] = "Untouched";
2197
+ return TxOrdering;
2198
+ }({});
2199
+ const FfiConverterTypeTxOrdering = (() => {
2200
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2201
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2202
+ read(from) {
2203
+ switch (ordinalConverter.read(from)) {
2204
+ case 1:
2205
+ return TxOrdering.Shuffle;
2206
+ case 2:
2207
+ return TxOrdering.Untouched;
2208
+ default:
2209
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2210
+ }
2211
+ }
2212
+ write(value, into) {
2213
+ switch (value) {
2214
+ case TxOrdering.Shuffle:
2215
+ return ordinalConverter.write(1, into);
2216
+ case TxOrdering.Untouched:
2217
+ return ordinalConverter.write(2, into);
2218
+ }
2219
+ }
2220
+ allocationSize(value) {
2221
+ return ordinalConverter.allocationSize(0);
2222
+ }
2223
+ }
2224
+ return new FFIConverter();
2225
+ })();
2226
+
2227
+ // Enum: WalletEvent
2228
+ let WalletEvent_Tags = exports.WalletEvent_Tags = /*#__PURE__*/function (WalletEvent_Tags) {
2229
+ WalletEvent_Tags["ChainTipChanged"] = "ChainTipChanged";
2230
+ WalletEvent_Tags["TxConfirmed"] = "TxConfirmed";
2231
+ WalletEvent_Tags["TxUnconfirmed"] = "TxUnconfirmed";
2232
+ WalletEvent_Tags["TxReplaced"] = "TxReplaced";
2233
+ WalletEvent_Tags["TxDropped"] = "TxDropped";
2234
+ return WalletEvent_Tags;
2235
+ }({});
2236
+ /**
2237
+ * Events emitted when applying chain updates to the wallet.
2238
+ * Mirrors bdk_wallet::event::WalletEvent (non-exhaustive in upstream).
2239
+ */
2240
+ const WalletEvent = exports.WalletEvent = (() => {
2241
+ /**
2242
+ * The local chain tip has changed.
2243
+ */
2244
+ class ChainTipChanged_ extends _uniffiBindgenReactNative.UniffiEnum {
2245
+ /**
2246
+ * @private
2247
+ * This field is private and should not be used, use `tag` instead.
2248
+ */
2249
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "WalletEvent";
2250
+ tag = WalletEvent_Tags.ChainTipChanged;
2251
+ constructor(inner) {
2252
+ super("WalletEvent", "ChainTipChanged");
2253
+ this.inner = Object.freeze(inner);
2254
+ }
2255
+ static new(inner) {
2256
+ return new ChainTipChanged_(inner);
2257
+ }
2258
+ static instanceOf(obj) {
2259
+ return obj.tag === WalletEvent_Tags.ChainTipChanged;
2260
+ }
2261
+ }
2262
+ /**
2263
+ * A transaction has been confirmed.
2264
+ */
2265
+ class TxConfirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
2266
+ /**
2267
+ * @private
2268
+ * This field is private and should not be used, use `tag` instead.
2269
+ */
2270
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "WalletEvent";
2271
+ tag = WalletEvent_Tags.TxConfirmed;
2272
+ constructor(inner) {
2273
+ super("WalletEvent", "TxConfirmed");
2274
+ this.inner = Object.freeze(inner);
2275
+ }
2276
+ static new(inner) {
2277
+ return new TxConfirmed_(inner);
2278
+ }
2279
+ static instanceOf(obj) {
2280
+ return obj.tag === WalletEvent_Tags.TxConfirmed;
2281
+ }
2282
+ }
2283
+ /**
2284
+ * A previously confirmed transaction has been unconfirmed (reorg).
2285
+ */
2286
+ class TxUnconfirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
2287
+ /**
2288
+ * @private
2289
+ * This field is private and should not be used, use `tag` instead.
2290
+ */
2291
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "WalletEvent";
2292
+ tag = WalletEvent_Tags.TxUnconfirmed;
2293
+ constructor(inner) {
2294
+ super("WalletEvent", "TxUnconfirmed");
2295
+ this.inner = Object.freeze(inner);
2296
+ }
2297
+ static new(inner) {
2298
+ return new TxUnconfirmed_(inner);
2299
+ }
2300
+ static instanceOf(obj) {
2301
+ return obj.tag === WalletEvent_Tags.TxUnconfirmed;
2302
+ }
2303
+ }
2304
+ /**
2305
+ * A transaction has been replaced (RBF or conflict).
2306
+ */
2307
+ class TxReplaced_ extends _uniffiBindgenReactNative.UniffiEnum {
2308
+ /**
2309
+ * @private
2310
+ * This field is private and should not be used, use `tag` instead.
2311
+ */
2312
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "WalletEvent";
2313
+ tag = WalletEvent_Tags.TxReplaced;
2314
+ constructor(inner) {
2315
+ super("WalletEvent", "TxReplaced");
2316
+ this.inner = Object.freeze(inner);
2317
+ }
2318
+ static new(inner) {
2319
+ return new TxReplaced_(inner);
2320
+ }
2321
+ static instanceOf(obj) {
2322
+ return obj.tag === WalletEvent_Tags.TxReplaced;
2323
+ }
2324
+ }
2325
+ /**
2326
+ * A transaction has been dropped from the mempool / evicted.
2327
+ */
2328
+ class TxDropped_ extends _uniffiBindgenReactNative.UniffiEnum {
2329
+ /**
2330
+ * @private
2331
+ * This field is private and should not be used, use `tag` instead.
2332
+ */
2333
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "WalletEvent";
2334
+ tag = WalletEvent_Tags.TxDropped;
2335
+ constructor(inner) {
2336
+ super("WalletEvent", "TxDropped");
2337
+ this.inner = Object.freeze(inner);
2338
+ }
2339
+ static new(inner) {
2340
+ return new TxDropped_(inner);
2341
+ }
2342
+ static instanceOf(obj) {
2343
+ return obj.tag === WalletEvent_Tags.TxDropped;
2344
+ }
2345
+ }
2346
+ function instanceOf(obj) {
2347
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "WalletEvent";
2348
+ }
2349
+ return Object.freeze({
2350
+ instanceOf,
2351
+ ChainTipChanged: ChainTipChanged_,
2352
+ TxConfirmed: TxConfirmed_,
2353
+ TxUnconfirmed: TxUnconfirmed_,
2354
+ TxReplaced: TxReplaced_,
2355
+ TxDropped: TxDropped_
2356
+ });
2357
+ })();
2358
+
2359
+ /**
2360
+ * Events emitted when applying chain updates to the wallet.
2361
+ * Mirrors bdk_wallet::event::WalletEvent (non-exhaustive in upstream).
2362
+ */
2363
+
2364
+ // FfiConverter for enum WalletEvent
2365
+ const FfiConverterTypeWalletEvent = (() => {
2366
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2367
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2368
+ read(from) {
2369
+ switch (ordinalConverter.read(from)) {
2370
+ case 1:
2371
+ return new WalletEvent.ChainTipChanged({
2372
+ oldTip: FfiConverterTypeBlockId.read(from),
2373
+ newTip: FfiConverterTypeBlockId.read(from)
2374
+ });
2375
+ case 2:
2376
+ return new WalletEvent.TxConfirmed({
2377
+ txid: FfiConverterString.read(from),
2378
+ blockTime: FfiConverterTypeConfirmationBlockTime.read(from)
2379
+ });
2380
+ case 3:
2381
+ return new WalletEvent.TxUnconfirmed({
2382
+ txid: FfiConverterString.read(from)
2383
+ });
2384
+ case 4:
2385
+ return new WalletEvent.TxReplaced({
2386
+ txid: FfiConverterString.read(from),
2387
+ conflictingTxids: FfiConverterArrayString.read(from)
2388
+ });
2389
+ case 5:
2390
+ return new WalletEvent.TxDropped({
2391
+ txid: FfiConverterString.read(from)
2392
+ });
2393
+ default:
2394
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2395
+ }
2396
+ }
2397
+ write(value, into) {
2398
+ switch (value.tag) {
2399
+ case WalletEvent_Tags.ChainTipChanged:
2400
+ {
2401
+ ordinalConverter.write(1, into);
2402
+ const inner = value.inner;
2403
+ FfiConverterTypeBlockId.write(inner.oldTip, into);
2404
+ FfiConverterTypeBlockId.write(inner.newTip, into);
2405
+ return;
2406
+ }
2407
+ case WalletEvent_Tags.TxConfirmed:
2408
+ {
2409
+ ordinalConverter.write(2, into);
2410
+ const inner = value.inner;
2411
+ FfiConverterString.write(inner.txid, into);
2412
+ FfiConverterTypeConfirmationBlockTime.write(inner.blockTime, into);
2413
+ return;
2414
+ }
2415
+ case WalletEvent_Tags.TxUnconfirmed:
2416
+ {
2417
+ ordinalConverter.write(3, into);
2418
+ const inner = value.inner;
2419
+ FfiConverterString.write(inner.txid, into);
2420
+ return;
2421
+ }
2422
+ case WalletEvent_Tags.TxReplaced:
2423
+ {
2424
+ ordinalConverter.write(4, into);
2425
+ const inner = value.inner;
2426
+ FfiConverterString.write(inner.txid, into);
2427
+ FfiConverterArrayString.write(inner.conflictingTxids, into);
2428
+ return;
2429
+ }
2430
+ case WalletEvent_Tags.TxDropped:
2431
+ {
2432
+ ordinalConverter.write(5, into);
2433
+ const inner = value.inner;
2434
+ FfiConverterString.write(inner.txid, into);
2435
+ return;
2436
+ }
2437
+ default:
2438
+ // Throwing from here means that WalletEvent_Tags hasn't matched an ordinal.
2439
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2440
+ }
2441
+ }
2442
+ allocationSize(value) {
2443
+ switch (value.tag) {
2444
+ case WalletEvent_Tags.ChainTipChanged:
2445
+ {
2446
+ const inner = value.inner;
2447
+ let size = ordinalConverter.allocationSize(1);
2448
+ size += FfiConverterTypeBlockId.allocationSize(inner.oldTip);
2449
+ size += FfiConverterTypeBlockId.allocationSize(inner.newTip);
2450
+ return size;
2451
+ }
2452
+ case WalletEvent_Tags.TxConfirmed:
2453
+ {
2454
+ const inner = value.inner;
2455
+ let size = ordinalConverter.allocationSize(2);
2456
+ size += FfiConverterString.allocationSize(inner.txid);
2457
+ size += FfiConverterTypeConfirmationBlockTime.allocationSize(inner.blockTime);
2458
+ return size;
2459
+ }
2460
+ case WalletEvent_Tags.TxUnconfirmed:
2461
+ {
2462
+ const inner = value.inner;
2463
+ let size = ordinalConverter.allocationSize(3);
2464
+ size += FfiConverterString.allocationSize(inner.txid);
2465
+ return size;
2466
+ }
2467
+ case WalletEvent_Tags.TxReplaced:
2468
+ {
2469
+ const inner = value.inner;
2470
+ let size = ordinalConverter.allocationSize(4);
2471
+ size += FfiConverterString.allocationSize(inner.txid);
2472
+ size += FfiConverterArrayString.allocationSize(inner.conflictingTxids);
2473
+ return size;
2474
+ }
2475
+ case WalletEvent_Tags.TxDropped:
2476
+ {
2477
+ const inner = value.inner;
2478
+ let size = ordinalConverter.allocationSize(5);
2479
+ size += FfiConverterString.allocationSize(inner.txid);
2480
+ return size;
2481
+ }
2482
+ default:
2483
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2484
+ }
2485
+ }
2486
+ }
2487
+ return new FFIConverter();
2488
+ })();
2489
+
2490
+ /**
2491
+ * BIP-39 mnemonic word count (determines entropy length).
2492
+ */
2493
+ let WordCount = exports.WordCount = /*#__PURE__*/function (WordCount) {
2494
+ WordCount[WordCount["Words12"] = 0] = "Words12";
2495
+ WordCount[WordCount["Words15"] = 1] = "Words15";
2496
+ WordCount[WordCount["Words18"] = 2] = "Words18";
2497
+ WordCount[WordCount["Words21"] = 3] = "Words21";
2498
+ WordCount[WordCount["Words24"] = 4] = "Words24";
2499
+ return WordCount;
2500
+ }({});
2501
+ const FfiConverterTypeWordCount = (() => {
2502
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2503
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2504
+ read(from) {
2505
+ switch (ordinalConverter.read(from)) {
2506
+ case 1:
2507
+ return WordCount.Words12;
2508
+ case 2:
2509
+ return WordCount.Words15;
2510
+ case 3:
2511
+ return WordCount.Words18;
2512
+ case 4:
2513
+ return WordCount.Words21;
2514
+ case 5:
2515
+ return WordCount.Words24;
2516
+ default:
2517
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2518
+ }
2519
+ }
2520
+ write(value, into) {
2521
+ switch (value) {
2522
+ case WordCount.Words12:
2523
+ return ordinalConverter.write(1, into);
2524
+ case WordCount.Words15:
2525
+ return ordinalConverter.write(2, into);
2526
+ case WordCount.Words18:
2527
+ return ordinalConverter.write(3, into);
2528
+ case WordCount.Words21:
2529
+ return ordinalConverter.write(4, into);
2530
+ case WordCount.Words24:
2531
+ return ordinalConverter.write(5, into);
2532
+ }
2533
+ }
2534
+ allocationSize(value) {
2535
+ return ordinalConverter.allocationSize(0);
2536
+ }
2537
+ }
2538
+ return new FFIConverter();
2539
+ })();
2540
+
2541
+ /**
2542
+ * BIP-39 mnemonic phrase for key generation.
2543
+ * Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
2544
+ */
2545
+
2546
+ /**
2547
+ * BIP-39 mnemonic phrase for key generation.
2548
+ * Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
2549
+ */
2550
+ class Mnemonic extends _uniffiBindgenReactNative.UniffiAbstractObject {
2551
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Mnemonic";
2552
+ /**
2553
+ * Generate a new random mnemonic with the given word count (English).
2554
+ */
2555
+ constructor(wordCount) /*throws*/{
2556
+ super();
2557
+ const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2558
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_new(FfiConverterTypeWordCount.lower(wordCount), callStatus);
2559
+ }, /*liftString:*/FfiConverterString.lift);
2560
+ this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2561
+ this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeMnemonicObjectFactory.bless(pointer);
2562
+ }
2563
+
2564
+ /**
2565
+ * Create a mnemonic from raw entropy bytes (16–32 bytes).
2566
+ */
2567
+ static fromEntropy(entropy) /*throws*/{
2568
+ return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2569
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_entropy(FfiConverterArrayUInt8.lower(entropy), callStatus);
2570
+ }, /*liftString:*/FfiConverterString.lift));
2571
+ }
2572
+
2573
+ /**
2574
+ * Create a mnemonic from raw entropy bytes in a specific language.
2575
+ */
2576
+ static fromEntropyIn(entropy, language) /*throws*/{
2577
+ return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2578
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_entropy_in(FfiConverterArrayUInt8.lower(entropy), FfiConverterTypeLanguage.lower(language), callStatus);
2579
+ }, /*liftString:*/FfiConverterString.lift));
2580
+ }
2581
+
2582
+ /**
2583
+ * Parse an existing mnemonic string (auto-detects language).
2584
+ */
2585
+ static fromString(mnemonic) /*throws*/{
2586
+ return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2587
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_string(FfiConverterString.lower(mnemonic), callStatus);
2588
+ }, /*liftString:*/FfiConverterString.lift));
2589
+ }
2590
+
2591
+ /**
2592
+ * Parse a mnemonic string in a specific language.
2593
+ */
2594
+ static fromStringIn(mnemonic, language) /*throws*/{
2595
+ return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2596
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_string_in(FfiConverterString.lower(mnemonic), FfiConverterTypeLanguage.lower(language), callStatus);
2597
+ }, /*liftString:*/FfiConverterString.lift));
2598
+ }
2599
+
2600
+ /**
2601
+ * The language of this mnemonic.
2602
+ */
2603
+ language() {
2604
+ return FfiConverterTypeLanguage.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2605
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_language(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2606
+ }, /*liftString:*/FfiConverterString.lift));
2607
+ }
2608
+
2609
+ /**
2610
+ * Derive the 64-byte seed as hex. Pass an empty string for no passphrase.
2611
+ */
2612
+ toSeedHex(passphrase) {
2613
+ return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2614
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_to_seed_hex(uniffiTypeMnemonicObjectFactory.clonePointer(this), FfiConverterString.lower(passphrase), callStatus);
2615
+ }, /*liftString:*/FfiConverterString.lift));
2616
+ }
2617
+
2618
+ /**
2619
+ * The mnemonic as a space-separated word string.
2620
+ */
2621
+ toString() {
2622
+ return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2623
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_to_string(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2624
+ }, /*liftString:*/FfiConverterString.lift));
2625
+ }
2626
+
2627
+ /**
2628
+ * Number of words (12, 15, 18, 21, or 24).
2629
+ */
2630
+ wordCount() {
2631
+ return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2632
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_word_count(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2633
+ }, /*liftString:*/FfiConverterString.lift));
2634
+ }
2635
+
2636
+ /**
2637
+ * List the individual words.
2638
+ */
2639
+ words() {
2640
+ return FfiConverterArrayString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2641
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_words(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2642
+ }, /*liftString:*/FfiConverterString.lift));
2643
+ }
2644
+
2645
+ /**
2646
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2647
+ */
2648
+ uniffiDestroy() {
2649
+ const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
2650
+ if (ptr !== undefined) {
2651
+ const pointer = uniffiTypeMnemonicObjectFactory.pointer(this);
2652
+ uniffiTypeMnemonicObjectFactory.freePointer(pointer);
2653
+ uniffiTypeMnemonicObjectFactory.unbless(ptr);
2654
+ delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
2655
+ }
2656
+ }
2657
+ static instanceOf(obj) {
2658
+ return uniffiTypeMnemonicObjectFactory.isConcreteType(obj);
2659
+ }
2660
+ }
2661
+ exports.Mnemonic = Mnemonic;
2662
+ const uniffiTypeMnemonicObjectFactory = (() => {
2663
+ return {
2664
+ create(pointer) {
2665
+ const instance = Object.create(Mnemonic.prototype);
2666
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2667
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
2668
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Mnemonic";
2669
+ return instance;
2670
+ },
2671
+ bless(p) {
2672
+ return uniffiCaller.rustCall(/*caller:*/status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_method_mnemonic_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
2673
+ },
2674
+ unbless(ptr) {
2675
+ ptr.markDestroyed();
2676
+ },
2677
+ pointer(obj) {
2678
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
2679
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
2680
+ }
2681
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
2682
+ },
2683
+ clonePointer(obj) {
2684
+ const pointer = this.pointer(obj);
2685
+ return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_clone_mnemonic(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
2686
+ },
2687
+ freePointer(pointer) {
2688
+ uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_free_mnemonic(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
2689
+ },
2690
+ isConcreteType(obj) {
2691
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "Mnemonic";
2692
+ }
2693
+ };
2694
+ })();
2695
+ // FfiConverter for MnemonicInterface
2696
+ const FfiConverterTypeMnemonic = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeMnemonicObjectFactory);
2697
+
2698
+ /**
2699
+ * A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
2700
+ * Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
2701
+ */
2702
+
2703
+ /**
2704
+ * A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
2705
+ * Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
2706
+ */
2707
+ class Psbt extends _uniffiBindgenReactNative.UniffiAbstractObject {
2708
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Psbt";
2709
+ /**
2710
+ * Deserialize from a base64-encoded string.
2711
+ */
2712
+ constructor(psbtBase64) /*throws*/{
2713
+ super();
2714
+ const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2715
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_psbt_new(FfiConverterString.lower(psbtBase64), callStatus);
2716
+ }, /*liftString:*/FfiConverterString.lift);
2717
+ this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2718
+ this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypePsbtObjectFactory.bless(pointer);
2719
+ }
2720
+
2721
+ /**
2722
+ * Extract the fully-signed transaction as raw hex.
2723
+ * Only valid after all inputs are finalized.
2724
+ */
2725
+ extractTxHex() /*throws*/{
2726
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2727
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_extract_tx_hex(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2728
+ }, /*liftString:*/FfiConverterString.lift));
2729
+ }
2730
+
2731
+ /**
2732
+ * Total fee in satoshis. None if any input UTXO value is unknown.
2733
+ * From PsbtUtils::fee_amount().
2734
+ */
2735
+ feeAmount() {
2736
+ return FfiConverterOptionalUInt64.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2737
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_fee_amount(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2738
+ }, /*liftString:*/FfiConverterString.lift));
2739
+ }
2740
+
2741
+ /**
2742
+ * Fee rate in sat/vbyte. None if any input UTXO value is unknown.
2743
+ * From PsbtUtils::fee_rate().
2744
+ */
2745
+ feeRate() {
2746
+ return FfiConverterOptionalFloat64.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2747
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_fee_rate(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2748
+ }, /*liftString:*/FfiConverterString.lift));
2749
+ }
2750
+
2751
+ /**
2752
+ * Retrieve the UTXO for a given input index. Returns None if unavailable.
2753
+ * From PsbtUtils::get_utxo_for().
2754
+ */
2755
+ getUtxoFor(inputIndex) {
2756
+ return FfiConverterOptionalTypeTxOut.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2757
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_get_utxo_for(uniffiTypePsbtObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(inputIndex), callStatus);
2758
+ }, /*liftString:*/FfiConverterString.lift));
2759
+ }
2760
+
2761
+ /**
2762
+ * Serialize to a base64-encoded string.
2763
+ */
2764
+ toBase64() {
2765
+ return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2766
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_to_base64(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2767
+ }, /*liftString:*/FfiConverterString.lift));
2768
+ }
2769
+
2770
+ /**
2771
+ * The unsigned txid (available before finalization).
2772
+ */
2773
+ txid() /*throws*/{
2774
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2775
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_txid(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2776
+ }, /*liftString:*/FfiConverterString.lift));
2777
+ }
2778
+
2779
+ /**
2780
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2781
+ */
2782
+ uniffiDestroy() {
2783
+ const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
2784
+ if (ptr !== undefined) {
2785
+ const pointer = uniffiTypePsbtObjectFactory.pointer(this);
2786
+ uniffiTypePsbtObjectFactory.freePointer(pointer);
2787
+ uniffiTypePsbtObjectFactory.unbless(ptr);
2788
+ delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
2789
+ }
2790
+ }
2791
+ static instanceOf(obj) {
2792
+ return uniffiTypePsbtObjectFactory.isConcreteType(obj);
2793
+ }
2794
+ }
2795
+ exports.Psbt = Psbt;
2796
+ const uniffiTypePsbtObjectFactory = (() => {
2797
+ return {
2798
+ create(pointer) {
2799
+ const instance = Object.create(Psbt.prototype);
2800
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2801
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
2802
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Psbt";
2803
+ return instance;
2804
+ },
2805
+ bless(p) {
2806
+ return uniffiCaller.rustCall(/*caller:*/status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_method_psbt_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
2807
+ },
2808
+ unbless(ptr) {
2809
+ ptr.markDestroyed();
2810
+ },
2811
+ pointer(obj) {
2812
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
2813
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
2814
+ }
2815
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
2816
+ },
2817
+ clonePointer(obj) {
2818
+ const pointer = this.pointer(obj);
2819
+ return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_clone_psbt(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
2820
+ },
2821
+ freePointer(pointer) {
2822
+ uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_free_psbt(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
2823
+ },
2824
+ isConcreteType(obj) {
2825
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "Psbt";
2826
+ }
2827
+ };
2828
+ })();
2829
+ // FfiConverter for PsbtInterface
2830
+ const FfiConverterTypePsbt = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypePsbtObjectFactory);
2831
+
2832
+ /**
2833
+ * Fluent builder for constructing Bitcoin transactions.
2834
+ * Create one, configure it, then call finish(wallet) to produce a PSBT.
2835
+ * Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
2836
+ */
2837
+
2838
+ /**
2839
+ * Fluent builder for constructing Bitcoin transactions.
2840
+ * Create one, configure it, then call finish(wallet) to produce a PSBT.
2841
+ * Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
2842
+ */
2843
+ class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
2844
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "TxBuilder";
2845
+ constructor() {
2846
+ super();
2847
+ const pointer = uniffiCaller.rustCall(/*caller:*/callStatus => {
2848
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_txbuilder_new(callStatus);
2849
+ }, /*liftString:*/FfiConverterString.lift);
2850
+ this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2851
+ this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeTxBuilderObjectFactory.bless(pointer);
2852
+ }
2853
+
2854
+ /**
2855
+ * Attach OP_RETURN data to the transaction.
2856
+ */
2857
+ addData(data) {
2858
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2859
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_data(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayUInt8.lower(data), callStatus);
2860
+ }, /*liftString:*/FfiConverterString.lift);
2861
+ }
2862
+
2863
+ /**
2864
+ * Include BIP-32 global xpubs in the PSBT.
2865
+ */
2866
+ addGlobalXpubs() {
2867
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2868
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_global_xpubs(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2869
+ }, /*liftString:*/FfiConverterString.lift);
2870
+ }
2871
+
2872
+ /**
2873
+ * Add a single recipient (address + amount).
2874
+ */
2875
+ addRecipient(address, amountSats) {
2876
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2877
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_recipient(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
2878
+ }, /*liftString:*/FfiConverterString.lift);
2879
+ }
2880
+
2881
+ /**
2882
+ * Mark a single UTXO as unspendable.
2883
+ */
2884
+ addUnspendable(outpoint) {
2885
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2886
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_unspendable(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
2887
+ }, /*liftString:*/FfiConverterString.lift);
2888
+ }
2889
+
2890
+ /**
2891
+ * Add a specific UTXO to spend.
2892
+ */
2893
+ addUtxo(outpoint) /*throws*/{
2894
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2895
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_utxo(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
2896
+ }, /*liftString:*/FfiConverterString.lift);
2897
+ }
2898
+
2899
+ /**
2900
+ * Add multiple specific UTXOs to spend.
2901
+ */
2902
+ addUtxos(outpoints) /*throws*/{
2903
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2904
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_utxos(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeOutPoint.lower(outpoints), callStatus);
2905
+ }, /*liftString:*/FfiConverterString.lift);
2906
+ }
2907
+
2908
+ /**
2909
+ * Allow outputs below the dust threshold.
2910
+ */
2911
+ allowDust(allow) {
2912
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2913
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_allow_dust(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterBool.lower(allow), callStatus);
2914
+ }, /*liftString:*/FfiConverterString.lift);
2915
+ }
2916
+
2917
+ /**
2918
+ * Set the change spend policy explicitly.
2919
+ */
2920
+ changePolicy(policy) {
2921
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2922
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_change_policy(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeChangeSpendPolicy.lower(policy), callStatus);
2923
+ }, /*liftString:*/FfiConverterString.lift);
2924
+ }
2925
+
2926
+ /**
2927
+ * Set the assumed current block height (for relative timelock evaluation).
2928
+ */
2929
+ currentHeight(height) {
2930
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2931
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_current_height(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(height), callStatus);
2932
+ }, /*liftString:*/FfiConverterString.lift);
2933
+ }
2934
+
2935
+ /**
2936
+ * Forbid spending from change outputs.
2937
+ */
2938
+ doNotSpendChange() {
2939
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2940
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_do_not_spend_change(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2941
+ }, /*liftString:*/FfiConverterString.lift);
2942
+ }
2943
+
2944
+ /**
2945
+ * Set the script to receive the remaining change (use with drain_wallet).
2946
+ */
2947
+ drainTo(address) /*throws*/{
2948
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2949
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_drain_to(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(address), callStatus);
2950
+ }, /*liftString:*/FfiConverterString.lift);
2951
+ }
2952
+
2953
+ /**
2954
+ * Spend all spendable UTXOs (send remaining to the drain_to address).
2955
+ */
2956
+ drainWallet() {
2957
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2958
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_drain_wallet(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2959
+ }, /*liftString:*/FfiConverterString.lift);
2960
+ }
2961
+
2962
+ /**
2963
+ * Enable RBF signalling with the default nSequence (0xFFFFFFFD).
2964
+ */
2965
+ enableRbf() {
2966
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2967
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_enable_rbf(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2968
+ }, /*liftString:*/FfiConverterString.lift);
2969
+ }
2970
+
2971
+ /**
2972
+ * Enable RBF signalling with a specific nSequence value (must be < 0xFFFFFFFE).
2973
+ */
2974
+ enableRbfWithSequence(nsequence) {
2975
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2976
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_enable_rbf_with_sequence(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(nsequence), callStatus);
2977
+ }, /*liftString:*/FfiConverterString.lift);
2978
+ }
2979
+
2980
+ /**
2981
+ * Exclude UTXOs with fewer than min_confirms confirmations.
2982
+ */
2983
+ excludeBelowConfirmations(minConfirms) {
2984
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2985
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_exclude_below_confirmations(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(minConfirms), callStatus);
2986
+ }, /*liftString:*/FfiConverterString.lift);
2987
+ }
2988
+
2989
+ /**
2990
+ * Exclude all unconfirmed UTXOs.
2991
+ */
2992
+ excludeUnconfirmed() {
2993
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
2994
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_exclude_unconfirmed(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2995
+ }, /*liftString:*/FfiConverterString.lift);
2996
+ }
2997
+
2998
+ /**
2999
+ * Set an absolute fee in satoshis (overrides fee_rate).
3000
+ */
3001
+ feeAbsolute(feeSats) {
3002
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3003
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_fee_absolute(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(feeSats), callStatus);
3004
+ }, /*liftString:*/FfiConverterString.lift);
3005
+ }
3006
+
3007
+ /**
3008
+ * Set a fee rate target in sat/vbyte.
3009
+ */
3010
+ feeRate(satPerVbyte) {
3011
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3012
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_fee_rate(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterFloat64.lower(satPerVbyte), callStatus);
3013
+ }, /*liftString:*/FfiConverterString.lift);
3014
+ }
3015
+
3016
+ /**
3017
+ * Build the transaction into a PSBT. The wallet is used for coin
3018
+ * selection and script resolution — the PSBT is NOT signed here.
3019
+ */
3020
+ finish(wallet) /*throws*/{
3021
+ return FfiConverterTypePsbt.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3022
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_finish(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeWallet.lower(wallet), callStatus);
3023
+ }, /*liftString:*/FfiConverterString.lift));
3024
+ }
3025
+
3026
+ /**
3027
+ * Include the redeemScript / witnessScript in PSBT outputs.
3028
+ */
3029
+ includeOutputRedeemWitnessScript() {
3030
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3031
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_include_output_redeem_witness_script(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3032
+ }, /*liftString:*/FfiConverterString.lift);
3033
+ }
3034
+
3035
+ /**
3036
+ * Only use the UTXOs explicitly added with add_utxo / add_utxos.
3037
+ */
3038
+ manuallySelectedOnly() {
3039
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3040
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_manually_selected_only(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3041
+ }, /*liftString:*/FfiConverterString.lift);
3042
+ }
3043
+
3044
+ /**
3045
+ * Set an explicit nLockTime (as a block height).
3046
+ */
3047
+ nlocktime(lockHeight) {
3048
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3049
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_nlocktime(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(lockHeight), callStatus);
3050
+ }, /*liftString:*/FfiConverterString.lift);
3051
+ }
3052
+
3053
+ /**
3054
+ * Only spend from change outputs.
3055
+ */
3056
+ onlySpendChange() {
3057
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3058
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_only_spend_change(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3059
+ }, /*liftString:*/FfiConverterString.lift);
3060
+ }
3061
+
3062
+ /**
3063
+ * Include only witness UTXO in PSBT inputs (reduced size, less validation).
3064
+ */
3065
+ onlyWitnessUtxo() {
3066
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3067
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_only_witness_utxo(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3068
+ }, /*liftString:*/FfiConverterString.lift);
3069
+ }
3070
+
3071
+ /**
3072
+ * Set the input/output ordering strategy.
3073
+ */
3074
+ ordering(ordering) {
3075
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3076
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_ordering(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeTxOrdering.lower(ordering), callStatus);
3077
+ }, /*liftString:*/FfiConverterString.lift);
3078
+ }
3079
+
3080
+ /**
3081
+ * Supply a policy path for complex descriptors (multisig, timelocks).
3082
+ * path_map is a JSON-encoded BTreeMap<String, Vec<usize>>.
3083
+ */
3084
+ policyPath(pathMapJson, keychain) {
3085
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3086
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_policy_path(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(pathMapJson), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3087
+ }, /*liftString:*/FfiConverterString.lift);
3088
+ }
3089
+
3090
+ /**
3091
+ * Set an exact nSequence value for all inputs.
3092
+ */
3093
+ setExactSequence(nsequence) {
3094
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3095
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_set_exact_sequence(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(nsequence), callStatus);
3096
+ }, /*liftString:*/FfiConverterString.lift);
3097
+ }
3098
+
3099
+ /**
3100
+ * Replace the entire recipient list.
3101
+ */
3102
+ setRecipients(recipients) {
3103
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3104
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_set_recipients(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeRecipient.lower(recipients), callStatus);
3105
+ }, /*liftString:*/FfiConverterString.lift);
3106
+ }
3107
+
3108
+ /**
3109
+ * Set the sighash type for all inputs.
3110
+ */
3111
+ sighash(sighashType) {
3112
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3113
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_sighash(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(sighashType), callStatus);
3114
+ }, /*liftString:*/FfiConverterString.lift);
3115
+ }
3116
+
3117
+ /**
3118
+ * Set the transaction version (1 or 2).
3119
+ */
3120
+ txVersion(version) {
3121
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3122
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_tx_version(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterInt32.lower(version), callStatus);
3123
+ }, /*liftString:*/FfiConverterString.lift);
3124
+ }
3125
+
3126
+ /**
3127
+ * Mark UTXOs as unspendable (excluded from coin selection).
3128
+ */
3129
+ unspendable(outpoints) {
3130
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3131
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_unspendable(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeOutPoint.lower(outpoints), callStatus);
3132
+ }, /*liftString:*/FfiConverterString.lift);
3133
+ }
3134
+
3135
+ /**
3136
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3137
+ */
3138
+ uniffiDestroy() {
3139
+ const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
3140
+ if (ptr !== undefined) {
3141
+ const pointer = uniffiTypeTxBuilderObjectFactory.pointer(this);
3142
+ uniffiTypeTxBuilderObjectFactory.freePointer(pointer);
3143
+ uniffiTypeTxBuilderObjectFactory.unbless(ptr);
3144
+ delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
3145
+ }
3146
+ }
3147
+ static instanceOf(obj) {
3148
+ return uniffiTypeTxBuilderObjectFactory.isConcreteType(obj);
3149
+ }
3150
+ }
3151
+ exports.TxBuilder = TxBuilder;
3152
+ const uniffiTypeTxBuilderObjectFactory = (() => {
3153
+ return {
3154
+ create(pointer) {
3155
+ const instance = Object.create(TxBuilder.prototype);
3156
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3157
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
3158
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "TxBuilder";
3159
+ return instance;
3160
+ },
3161
+ bless(p) {
3162
+ return uniffiCaller.rustCall(/*caller:*/status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_method_txbuilder_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
3163
+ },
3164
+ unbless(ptr) {
3165
+ ptr.markDestroyed();
3166
+ },
3167
+ pointer(obj) {
3168
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
3169
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
3170
+ }
3171
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
3172
+ },
3173
+ clonePointer(obj) {
3174
+ const pointer = this.pointer(obj);
3175
+ return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_clone_txbuilder(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3176
+ },
3177
+ freePointer(pointer) {
3178
+ uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_free_txbuilder(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3179
+ },
3180
+ isConcreteType(obj) {
3181
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "TxBuilder";
3182
+ }
3183
+ };
3184
+ })();
3185
+ // FfiConverter for TxBuilderInterface
3186
+ const FfiConverterTypeTxBuilder = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeTxBuilderObjectFactory);
3187
+ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3188
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Wallet";
3189
+ /**
3190
+ * Create or load a persisted wallet.
3191
+ * descriptor / change_descriptor: output descriptor strings (e.g. "wpkh(tprv…/84'/1'/0'/0/*)")
3192
+ * db_path: file path for the SQLite persistence database.
3193
+ */
3194
+ constructor(descriptor, changeDescriptor, network, dbPath) /*throws*/{
3195
+ super();
3196
+ const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3197
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_wallet_new(FfiConverterString.lower(descriptor), FfiConverterString.lower(changeDescriptor), FfiConverterTypeNetwork.lower(network), FfiConverterString.lower(dbPath), callStatus);
3198
+ }, /*liftString:*/FfiConverterString.lift);
3199
+ this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3200
+ this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeWalletObjectFactory.bless(pointer);
3201
+ }
3202
+
3203
+ /**
3204
+ * Broadcast a finalized PSBT via Electrum. Returns the txid.
3205
+ */
3206
+ broadcastWithElectrum(url, psbt) /*throws*/{
3207
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3208
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_broadcast_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), FfiConverterTypePsbt.lower(psbt), callStatus);
3209
+ }, /*liftString:*/FfiConverterString.lift));
3210
+ }
3211
+
3212
+ /**
3213
+ * Broadcast a finalized PSBT via Esplora. Returns the txid.
3214
+ */
3215
+ async broadcastWithEsplora(url, psbt, asyncOpts_) /*throws*/{
3216
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3217
+ try {
3218
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3219
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_broadcast_with_esplora(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), FfiConverterTypePsbt.lower(psbt));
3220
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3221
+ } catch (__error) {
3222
+ if (uniffiIsDebug && __error instanceof Error) {
3223
+ __error.stack = __stack;
3224
+ }
3225
+ throw __error;
3226
+ }
3227
+ }
3228
+
3229
+ /**
3230
+ * Build an RBF fee-bump PSBT for an unconfirmed transaction.
3231
+ * Mirrors Wallet::build_fee_bump().
3232
+ */
3233
+ buildFeeBump(txid, newFeeRate) /*throws*/{
3234
+ return FfiConverterTypePsbt.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3235
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_build_fee_bump(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), _uniffiBindgenReactNative.FfiConverterFloat64.lower(newFeeRate), callStatus);
3236
+ }, /*liftString:*/FfiConverterString.lift));
3237
+ }
3238
+
3239
+ /**
3240
+ * Calculate the fee paid by a raw transaction (hex). Returns satoshis.
3241
+ * Mirrors Wallet::calculate_fee().
3242
+ */
3243
+ calculateFee(txHex) /*throws*/{
3244
+ return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3245
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_calculate_fee(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3246
+ }, /*liftString:*/FfiConverterString.lift));
3247
+ }
3248
+
3249
+ /**
3250
+ * Calculate the fee rate for a raw transaction (hex). Returns sat/vbyte.
3251
+ * Mirrors Wallet::calculate_fee_rate().
3252
+ */
3253
+ calculateFeeRate(txHex) /*throws*/{
3254
+ return _uniffiBindgenReactNative.FfiConverterFloat64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3255
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_calculate_fee_rate(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3256
+ }, /*liftString:*/FfiConverterString.lift));
3257
+ }
3258
+
3259
+ /**
3260
+ * Cancel (evict) a transaction from the wallet's view.
3261
+ * Mirrors Wallet::cancel_tx().
3262
+ */
3263
+ cancelTx(txHex) /*throws*/{
3264
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3265
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_cancel_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3266
+ }, /*liftString:*/FfiConverterString.lift);
3267
+ }
3268
+
3269
+ /**
3270
+ * All checkpoints in the local chain, ordered by height descending.
3271
+ * Mirrors Wallet::checkpoints().
3272
+ */
3273
+ checkpoints() {
3274
+ return FfiConverterArrayTypeBlockId.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3275
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_checkpoints(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3276
+ }, /*liftString:*/FfiConverterString.lift));
3277
+ }
3278
+
3279
+ /**
3280
+ * The highest derivation index that has been revealed, or null if none.
3281
+ * Mirrors Wallet::derivation_index().
3282
+ */
3283
+ derivationIndex(keychain) {
3284
+ return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3285
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_derivation_index(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3286
+ }, /*liftString:*/FfiConverterString.lift));
3287
+ }
3288
+
3289
+ /**
3290
+ * Find the keychain and derivation index for a scriptPubKey (hex).
3291
+ * Returns null if the script does not belong to this wallet.
3292
+ * Mirrors Wallet::derivation_of_spk().
3293
+ */
3294
+ derivationOfSpk(scriptHex) {
3295
+ return FfiConverterOptionalTypeDerivationInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3296
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_derivation_of_spk(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(scriptHex), callStatus);
3297
+ }, /*liftString:*/FfiConverterString.lift));
3298
+ }
3299
+
3300
+ /**
3301
+ * The descriptor checksum for the given keychain.
3302
+ * Mirrors Wallet::descriptor_checksum().
3303
+ */
3304
+ descriptorChecksum(keychain) /*throws*/{
3305
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3306
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_descriptor_checksum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3307
+ }, /*liftString:*/FfiConverterString.lift));
3308
+ }
3309
+
3310
+ /**
3311
+ * Drain the entire wallet to an address. Returns txid.
3312
+ */
3313
+ async drain(address, feeRate, esploraUrl, asyncOpts_) /*throws*/{
3314
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3315
+ try {
3316
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3317
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_drain(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterFloat64.lower(feeRate), FfiConverterString.lower(esploraUrl));
3318
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3319
+ } catch (__error) {
3320
+ if (uniffiIsDebug && __error instanceof Error) {
3321
+ __error.stack = __stack;
3322
+ }
3323
+ throw __error;
3324
+ }
3325
+ }
3326
+
3327
+ /**
3328
+ * Sign and attempt to finalize all inputs.
3329
+ * Returns true if fully finalized.
3330
+ * Mirrors Wallet::finalize_psbt() with default SignOptions.
3331
+ */
3332
+ finalizePsbt(psbt) /*throws*/{
3333
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3334
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_finalize_psbt(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypePsbt.lower(psbt), callStatus);
3335
+ }, /*liftString:*/FfiConverterString.lift));
3336
+ }
3337
+
3338
+ /**
3339
+ * Full scan via an Electrum TCP/TLS server.
3340
+ */
3341
+ fullScanWithElectrum(url, stopGap) /*throws*/{
3342
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3343
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_full_scan_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap), callStatus);
3344
+ }, /*liftString:*/FfiConverterString.lift);
3345
+ }
3346
+
3347
+ /**
3348
+ * Full scan via an Esplora HTTP server (discovers all used addresses).
3349
+ * Uses Wallet::start_full_scan() + bdk_esplora client internally.
3350
+ * stop_gap: how many consecutive unused addresses to scan before stopping.
3351
+ */
3352
+ async fullScanWithEsplora(url, stopGap, asyncOpts_) /*throws*/{
3353
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3354
+ try {
3355
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3356
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_full_scan_with_esplora(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap));
3357
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_void, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3358
+ } catch (__error) {
3359
+ if (uniffiIsDebug && __error instanceof Error) {
3360
+ __error.stack = __stack;
3361
+ }
3362
+ throw __error;
3363
+ }
3364
+ }
3365
+
3366
+ /**
3367
+ * Get the wallet balance. Mirrors Wallet::balance().
3368
+ */
3369
+ getBalance() /*throws*/{
3370
+ return FfiConverterTypeBalance.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3371
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_balance(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3372
+ }, /*liftString:*/FfiConverterString.lift));
3373
+ }
3374
+
3375
+ /**
3376
+ * Returns the raw transaction hex for a given txid. Null if not found.
3377
+ * Mirrors Wallet::get_tx().
3378
+ */
3379
+ getTx(txid) /*throws*/{
3380
+ return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3381
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
3382
+ }, /*liftString:*/FfiConverterString.lift));
3383
+ }
3384
+
3385
+ /**
3386
+ * Get a specific UTXO. Returns null if not found. Mirrors Wallet::get_utxo().
3387
+ */
3388
+ getUtxo(outpoint) /*throws*/{
3389
+ return FfiConverterOptionalTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3390
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_utxo(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
3391
+ }, /*liftString:*/FfiConverterString.lift));
3392
+ }
3393
+
3394
+ /**
3395
+ * Manually insert a TxOut (e.g. for tracking external outputs).
3396
+ * Mirrors Wallet::insert_txout().
3397
+ */
3398
+ insertTxout(outpoint, txout) {
3399
+ uniffiCaller.rustCall(/*caller:*/callStatus => {
3400
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_insert_txout(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), FfiConverterTypeTxOut.lower(txout), callStatus);
3401
+ }, /*liftString:*/FfiConverterString.lift);
3402
+ }
3403
+
3404
+ /**
3405
+ * Return true if the given scriptPubKey (hex) belongs to this wallet.
3406
+ * Mirrors Wallet::is_mine().
3407
+ */
3408
+ isMine(scriptHex) {
3409
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3410
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_is_mine(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(scriptHex), callStatus);
3411
+ }, /*liftString:*/FfiConverterString.lift));
3412
+ }
3413
+
3414
+ /**
3415
+ * List all keychains and their public descriptors.
3416
+ * Mirrors Wallet::keychains().
3417
+ */
3418
+ keychains() {
3419
+ return FfiConverterArrayTypeKeychainInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3420
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_keychains(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3421
+ }, /*liftString:*/FfiConverterString.lift));
3422
+ }
3423
+
3424
+ /**
3425
+ * The latest checkpoint (tip of the local chain). Null if no blocks applied yet.
3426
+ * Mirrors Wallet::latest_checkpoint().
3427
+ */
3428
+ latestCheckpoint() {
3429
+ return FfiConverterOptionalTypeBlockId.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3430
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_latest_checkpoint(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3431
+ }, /*liftString:*/FfiConverterString.lift));
3432
+ }
3433
+
3434
+ /**
3435
+ * List all wallet outputs (spent and unspent). Mirrors Wallet::list_output().
3436
+ */
3437
+ listOutput() /*throws*/{
3438
+ return FfiConverterArrayTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3439
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_output(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3440
+ }, /*liftString:*/FfiConverterString.lift));
3441
+ }
3442
+
3443
+ /**
3444
+ * List all unspent wallet outputs. Mirrors Wallet::list_unspent().
3445
+ */
3446
+ listUnspent() /*throws*/{
3447
+ return FfiConverterArrayTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3448
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_unspent(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3449
+ }, /*liftString:*/FfiConverterString.lift));
3450
+ }
3451
+
3452
+ /**
3453
+ * List all addresses that have been revealed but not yet received funds.
3454
+ * Mirrors Wallet::list_unused_addresses().
3455
+ */
3456
+ listUnusedAddresses(keychain) /*throws*/{
3457
+ return FfiConverterArrayTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3458
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_unused_addresses(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3459
+ }, /*liftString:*/FfiConverterString.lift));
3460
+ }
3461
+
3462
+ /**
3463
+ * Mark an address index as used (returns true if previously unused).
3464
+ * Mirrors Wallet::mark_used().
3465
+ */
3466
+ markUsed(keychain, index) {
3467
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3468
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_mark_used(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3469
+ }, /*liftString:*/FfiConverterString.lift));
3470
+ }
3471
+
3472
+ /**
3473
+ * The network this wallet is configured for.
3474
+ * Mirrors Wallet::network().
3475
+ */
3476
+ network() {
3477
+ return FfiConverterTypeNetwork.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3478
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_network(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3479
+ }, /*liftString:*/FfiConverterString.lift));
3480
+ }
3481
+
3482
+ /**
3483
+ * The next derivation index that will be revealed.
3484
+ * Mirrors Wallet::next_derivation_index().
3485
+ */
3486
+ nextDerivationIndex(keychain) {
3487
+ return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3488
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_next_derivation_index(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3489
+ }, /*liftString:*/FfiConverterString.lift));
3490
+ }
3491
+
3492
+ /**
3493
+ * Return the next address that has not yet received funds.
3494
+ * Mirrors Wallet::next_unused_address().
3495
+ */
3496
+ nextUnusedAddress(keychain) /*throws*/{
3497
+ return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3498
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_next_unused_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3499
+ }, /*liftString:*/FfiConverterString.lift));
3500
+ }
3501
+
3502
+ /**
3503
+ * Peek at a specific derivation index without advancing the counter.
3504
+ * Mirrors Wallet::peek_address().
3505
+ */
3506
+ peekAddress(keychain, index) /*throws*/{
3507
+ return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3508
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_peek_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3509
+ }, /*liftString:*/FfiConverterString.lift));
3510
+ }
3511
+
3512
+ /**
3513
+ * Persist any staged changes to the database.
3514
+ * Our FFI wraps PersistedWallet; this calls persist() internally.
3515
+ */
3516
+ persist() /*throws*/{
3517
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3518
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_persist(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3519
+ }, /*liftString:*/FfiConverterString.lift));
3520
+ }
3521
+
3522
+ /**
3523
+ * Spending policies for a given keychain, returned as a JSON string.
3524
+ * Returns null if the descriptor has no policy.
3525
+ * Mirrors Wallet::policies() — serialized because the Policy tree is complex.
3526
+ */
3527
+ policies(keychain) /*throws*/{
3528
+ return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3529
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_policies(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3530
+ }, /*liftString:*/FfiConverterString.lift));
3531
+ }
3532
+
3533
+ /**
3534
+ * The public-only descriptor for the given keychain as a string.
3535
+ * Mirrors Wallet::public_descriptor().
3536
+ */
3537
+ publicDescriptor(keychain) /*throws*/{
3538
+ return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3539
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_public_descriptor(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3540
+ }, /*liftString:*/FfiConverterString.lift));
3541
+ }
3542
+
3543
+ /**
3544
+ * Reveal all addresses up to and including the given derivation index.
3545
+ * Mirrors Wallet::reveal_addresses_to().
3546
+ */
3547
+ revealAddressesTo(keychain, index) /*throws*/{
3548
+ return FfiConverterArrayTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3549
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_reveal_addresses_to(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3550
+ }, /*liftString:*/FfiConverterString.lift));
3551
+ }
3552
+
3553
+ /**
3554
+ * Reveal and return the next address at the next derivation index,
3555
+ * incrementing the index even if previous addresses are unused.
3556
+ * Mirrors Wallet::reveal_next_address().
3557
+ */
3558
+ revealNextAddress(keychain) /*throws*/{
3559
+ return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3560
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_reveal_next_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3561
+ }, /*liftString:*/FfiConverterString.lift));
3562
+ }
3563
+
3564
+ /**
3565
+ * Build, sign, and broadcast a simple payment in one call. Returns txid.
3566
+ * Combines build_tx → sign → broadcast via Esplora.
3567
+ */
3568
+ async send(address, amountSats, feeRate, esploraUrl, asyncOpts_) /*throws*/{
3569
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3570
+ try {
3571
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3572
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_send(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), _uniffiBindgenReactNative.FfiConverterFloat64.lower(feeRate), FfiConverterString.lower(esploraUrl));
3573
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3574
+ } catch (__error) {
3575
+ if (uniffiIsDebug && __error instanceof Error) {
3576
+ __error.stack = __stack;
3577
+ }
3578
+ throw __error;
3579
+ }
3580
+ }
3581
+
3582
+ /**
3583
+ * How much was sent from / received into the wallet for a raw tx (hex).
3584
+ * Mirrors Wallet::sent_and_received().
3585
+ */
3586
+ sentAndReceived(txHex) /*throws*/{
3587
+ return FfiConverterTypeSentAndReceived.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3588
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sent_and_received(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3589
+ }, /*liftString:*/FfiConverterString.lift));
3590
+ }
3591
+
3592
+ /**
3593
+ * Sign all inputs in the PSBT that this wallet can sign.
3594
+ * Returns true if the PSBT is fully finalized after signing.
3595
+ * Mirrors Wallet::sign() with default SignOptions.
3596
+ */
3597
+ sign(psbt) /*throws*/{
3598
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3599
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sign(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypePsbt.lower(psbt), callStatus);
3600
+ }, /*liftString:*/FfiConverterString.lift));
3601
+ }
3602
+
3603
+ /**
3604
+ * Incremental sync via Electrum.
3605
+ */
3606
+ syncWithElectrum(url, stopGap) /*throws*/{
3607
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3608
+ (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sync_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap), callStatus);
3609
+ }, /*liftString:*/FfiConverterString.lift);
3610
+ }
3611
+
3612
+ /**
3613
+ * Incremental sync via Esplora (only checks revealed SPKs + UTXOs + unconfirmed).
3614
+ * Uses Wallet::start_sync_with_revealed_spks() + bdk_esplora client internally.
3615
+ */
3616
+ async syncWithEsplora(url, stopGap, asyncOpts_) /*throws*/{
3617
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3618
+ try {
3619
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3620
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sync_with_esplora(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap));
3621
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_void, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3622
+ } catch (__error) {
3623
+ if (uniffiIsDebug && __error instanceof Error) {
3624
+ __error.stack = __stack;
3625
+ }
3626
+ throw __error;
3627
+ }
3628
+ }
3629
+
3630
+ /**
3631
+ * All wallet-relevant canonical transactions.
3632
+ * Mirrors Wallet::transactions() → mapped to TxDetails.
3633
+ */
3634
+ transactions() /*throws*/{
3635
+ return FfiConverterArrayTypeTxDetails.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3636
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_transactions(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3637
+ }, /*liftString:*/FfiConverterString.lift));
3638
+ }
3639
+
3640
+ /**
3641
+ * Details for a single transaction. Returns null if not found.
3642
+ * Mirrors Wallet::tx_details().
3643
+ */
3644
+ txDetails(txid) /*throws*/{
3645
+ return FfiConverterOptionalTypeTxDetails.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3646
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_tx_details(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
3647
+ }, /*liftString:*/FfiConverterString.lift));
3648
+ }
3649
+
3650
+ /**
3651
+ * Mark an address index as unused (returns true if previously used).
3652
+ * Mirrors Wallet::unmark_used().
3653
+ */
3654
+ unmarkUsed(keychain, index) {
3655
+ return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3656
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_unmark_used(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3657
+ }, /*liftString:*/FfiConverterString.lift));
3658
+ }
3659
+
3660
+ /**
3661
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3662
+ */
3663
+ uniffiDestroy() {
3664
+ const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
3665
+ if (ptr !== undefined) {
3666
+ const pointer = uniffiTypeWalletObjectFactory.pointer(this);
3667
+ uniffiTypeWalletObjectFactory.freePointer(pointer);
3668
+ uniffiTypeWalletObjectFactory.unbless(ptr);
3669
+ delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
3670
+ }
3671
+ }
3672
+ static instanceOf(obj) {
3673
+ return uniffiTypeWalletObjectFactory.isConcreteType(obj);
3674
+ }
3675
+ }
3676
+ exports.Wallet = Wallet;
3677
+ const uniffiTypeWalletObjectFactory = (() => {
3678
+ return {
3679
+ create(pointer) {
3680
+ const instance = Object.create(Wallet.prototype);
3681
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3682
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
3683
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Wallet";
3684
+ return instance;
3685
+ },
3686
+ bless(p) {
3687
+ return uniffiCaller.rustCall(/*caller:*/status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_method_wallet_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
3688
+ },
3689
+ unbless(ptr) {
3690
+ ptr.markDestroyed();
3691
+ },
3692
+ pointer(obj) {
3693
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
3694
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
3695
+ }
3696
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
3697
+ },
3698
+ clonePointer(obj) {
3699
+ const pointer = this.pointer(obj);
3700
+ return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_clone_wallet(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3701
+ },
3702
+ freePointer(pointer) {
3703
+ uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_free_wallet(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3704
+ },
3705
+ isConcreteType(obj) {
3706
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "Wallet";
3707
+ }
3708
+ };
3709
+ })();
3710
+ // FfiConverter for WalletInterface
3711
+ const FfiConverterTypeWallet = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeWalletObjectFactory);
3712
+
3713
+ // FfiConverter for /*f64*/number | undefined
3714
+ const FfiConverterOptionalFloat64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterFloat64);
3715
+
3716
+ // FfiConverter for BlockId | undefined
3717
+ const FfiConverterOptionalTypeBlockId = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeBlockId);
3718
+
3719
+ // FfiConverter for ConfirmationBlockTime | undefined
3720
+ const FfiConverterOptionalTypeConfirmationBlockTime = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeConfirmationBlockTime);
3721
+
3722
+ // FfiConverter for DerivationInfo | undefined
3723
+ const FfiConverterOptionalTypeDerivationInfo = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeDerivationInfo);
3724
+
3725
+ // FfiConverter for LocalOutput | undefined
3726
+ const FfiConverterOptionalTypeLocalOutput = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeLocalOutput);
3727
+
3728
+ // FfiConverter for TxDetails | undefined
3729
+ const FfiConverterOptionalTypeTxDetails = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeTxDetails);
3730
+
3731
+ // FfiConverter for TxOut | undefined
3732
+ const FfiConverterOptionalTypeTxOut = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeTxOut);
3733
+
3734
+ // FfiConverter for string | undefined
3735
+ const FfiConverterOptionalString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterString);
3736
+
3737
+ // FfiConverter for /*u32*/number | undefined
3738
+ const FfiConverterOptionalUInt32 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt32);
3739
+
3740
+ // FfiConverter for /*u64*/bigint | undefined
3741
+ const FfiConverterOptionalUInt64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt64);
3742
+
3743
+ // FfiConverter for Array<AddressInfo>
3744
+ const FfiConverterArrayTypeAddressInfo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeAddressInfo);
3745
+
3746
+ // FfiConverter for Array<BlockId>
3747
+ const FfiConverterArrayTypeBlockId = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeBlockId);
3748
+
3749
+ // FfiConverter for Array<KeychainInfo>
3750
+ const FfiConverterArrayTypeKeychainInfo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeKeychainInfo);
3751
+
3752
+ // FfiConverter for Array<LocalOutput>
3753
+ const FfiConverterArrayTypeLocalOutput = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeLocalOutput);
3754
+
3755
+ // FfiConverter for Array<OutPoint>
3756
+ const FfiConverterArrayTypeOutPoint = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeOutPoint);
3757
+
3758
+ // FfiConverter for Array<Recipient>
3759
+ const FfiConverterArrayTypeRecipient = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeRecipient);
3760
+
3761
+ // FfiConverter for Array<TxDetails>
3762
+ const FfiConverterArrayTypeTxDetails = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeTxDetails);
3763
+
3764
+ // FfiConverter for Array<string>
3765
+ const FfiConverterArrayString = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterString);
3766
+
3767
+ // FfiConverter for Array</*u8*/number>
3768
+ const FfiConverterArrayUInt8 = new _uniffiBindgenReactNative.FfiConverterArray(_uniffiBindgenReactNative.FfiConverterUInt8);
3769
+
3770
+ /**
3771
+ * This should be called before anything else.
3772
+ *
3773
+ * It is likely that this is being done for you by the library's `index.ts`.
3774
+ *
3775
+ * It checks versions of uniffi between when the Rust scaffolding was generated
3776
+ * and when the bindings were generated.
3777
+ *
3778
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
3779
+ */
3780
+ function uniffiEnsureInitialized() {
3781
+ // Get the bindings contract version from our ComponentInterface
3782
+ const bindingsContractVersion = 30;
3783
+ // Get the scaffolding contract version by calling the into the dylib
3784
+ const scaffoldingContractVersion = (0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_uniffi_contract_version();
3785
+ if (bindingsContractVersion !== scaffoldingContractVersion) {
3786
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
3787
+ }
3788
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_create_descriptor() !== 166) {
3789
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_create_descriptor");
3790
+ }
3791
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_create_public_descriptor() !== 10610) {
3792
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_create_public_descriptor");
3793
+ }
3794
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_create_single_key_descriptor() !== 56046) {
3795
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_create_single_key_descriptor");
3796
+ }
3797
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_export_wallet() !== 53701) {
3798
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_export_wallet");
3799
+ }
3800
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_is_valid_address() !== 14593) {
3801
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_is_valid_address");
3802
+ }
3803
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_version() !== 5205) {
3804
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_version");
3805
+ }
3806
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_wallet_name_from_descriptor() !== 14974) {
3807
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_wallet_name_from_descriptor");
3808
+ }
3809
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_language() !== 21218) {
3810
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_language");
3811
+ }
3812
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_to_seed_hex() !== 4827) {
3813
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_to_seed_hex");
3814
+ }
3815
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_to_string() !== 9706) {
3816
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_to_string");
3817
+ }
3818
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_word_count() !== 43660) {
3819
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_word_count");
3820
+ }
3821
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_words() !== 43060) {
3822
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_words");
3823
+ }
3824
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_extract_tx_hex() !== 55644) {
3825
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_extract_tx_hex");
3826
+ }
3827
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_fee_amount() !== 56607) {
3828
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_fee_amount");
3829
+ }
3830
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_fee_rate() !== 60372) {
3831
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_fee_rate");
3832
+ }
3833
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_get_utxo_for() !== 21092) {
3834
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_get_utxo_for");
3835
+ }
3836
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_to_base64() !== 51389) {
3837
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_to_base64");
3838
+ }
3839
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_txid() !== 48234) {
3840
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_txid");
3841
+ }
3842
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_data() !== 24171) {
3843
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_data");
3844
+ }
3845
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_global_xpubs() !== 49750) {
3846
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_global_xpubs");
3847
+ }
3848
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_recipient() !== 4691) {
3849
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_recipient");
3850
+ }
3851
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_unspendable() !== 34998) {
3852
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_unspendable");
3853
+ }
3854
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_utxo() !== 20705) {
3855
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_utxo");
3856
+ }
3857
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_utxos() !== 35571) {
3858
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_utxos");
3859
+ }
3860
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_allow_dust() !== 56022) {
3861
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_allow_dust");
3862
+ }
3863
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_change_policy() !== 46342) {
3864
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_change_policy");
3865
+ }
3866
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_current_height() !== 46986) {
3867
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_current_height");
3868
+ }
3869
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_do_not_spend_change() !== 50138) {
3870
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_do_not_spend_change");
3871
+ }
3872
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_drain_to() !== 33757) {
3873
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_drain_to");
3874
+ }
3875
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_drain_wallet() !== 46414) {
3876
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_drain_wallet");
3877
+ }
3878
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf() !== 16464) {
3879
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf");
3880
+ }
3881
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf_with_sequence() !== 21779) {
3882
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf_with_sequence");
3883
+ }
3884
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_exclude_below_confirmations() !== 8223) {
3885
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_exclude_below_confirmations");
3886
+ }
3887
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_exclude_unconfirmed() !== 63153) {
3888
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_exclude_unconfirmed");
3889
+ }
3890
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_absolute() !== 18715) {
3891
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_fee_absolute");
3892
+ }
3893
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate() !== 61803) {
3894
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate");
3895
+ }
3896
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_finish() !== 34471) {
3897
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_finish");
3898
+ }
3899
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_include_output_redeem_witness_script() !== 41756) {
3900
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_include_output_redeem_witness_script");
3901
+ }
3902
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_manually_selected_only() !== 61274) {
3903
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_manually_selected_only");
3904
+ }
3905
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_nlocktime() !== 33063) {
3906
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_nlocktime");
3907
+ }
3908
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_only_spend_change() !== 4190) {
3909
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_only_spend_change");
3910
+ }
3911
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_only_witness_utxo() !== 16994) {
3912
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_only_witness_utxo");
3913
+ }
3914
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_ordering() !== 46942) {
3915
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_ordering");
3916
+ }
3917
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_policy_path() !== 3595) {
3918
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_policy_path");
3919
+ }
3920
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_set_exact_sequence() !== 63261) {
3921
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_set_exact_sequence");
3922
+ }
3923
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_set_recipients() !== 28721) {
3924
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_set_recipients");
3925
+ }
3926
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_sighash() !== 22878) {
3927
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_sighash");
3928
+ }
3929
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_tx_version() !== 13770) {
3930
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_tx_version");
3931
+ }
3932
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_unspendable() !== 28900) {
3933
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_unspendable");
3934
+ }
3935
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum() !== 14979) {
3936
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum");
3937
+ }
3938
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_esplora() !== 28791) {
3939
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_esplora");
3940
+ }
3941
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_build_fee_bump() !== 47809) {
3942
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_build_fee_bump");
3943
+ }
3944
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_calculate_fee() !== 46069) {
3945
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_calculate_fee");
3946
+ }
3947
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_calculate_fee_rate() !== 23249) {
3948
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_calculate_fee_rate");
3949
+ }
3950
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_cancel_tx() !== 58967) {
3951
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_cancel_tx");
3952
+ }
3953
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_checkpoints() !== 55082) {
3954
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_checkpoints");
3955
+ }
3956
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_derivation_index() !== 63256) {
3957
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_derivation_index");
3958
+ }
3959
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_derivation_of_spk() !== 22939) {
3960
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_derivation_of_spk");
3961
+ }
3962
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_descriptor_checksum() !== 64735) {
3963
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_descriptor_checksum");
3964
+ }
3965
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_drain() !== 24840) {
3966
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_drain");
3967
+ }
3968
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt() !== 22273) {
3969
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt");
3970
+ }
3971
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum() !== 15611) {
3972
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum");
3973
+ }
3974
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_esplora() !== 43655) {
3975
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_esplora");
3976
+ }
3977
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_balance() !== 18605) {
3978
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_get_balance");
3979
+ }
3980
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_tx() !== 58042) {
3981
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_get_tx");
3982
+ }
3983
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_utxo() !== 47916) {
3984
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_get_utxo");
3985
+ }
3986
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_insert_txout() !== 33605) {
3987
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_insert_txout");
3988
+ }
3989
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_is_mine() !== 27949) {
3990
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_is_mine");
3991
+ }
3992
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_keychains() !== 1009) {
3993
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_keychains");
3994
+ }
3995
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_latest_checkpoint() !== 5951) {
3996
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_latest_checkpoint");
3997
+ }
3998
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_output() !== 35186) {
3999
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_list_output");
4000
+ }
4001
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_unspent() !== 590) {
4002
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_list_unspent");
4003
+ }
4004
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_unused_addresses() !== 63031) {
4005
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_list_unused_addresses");
4006
+ }
4007
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_mark_used() !== 53427) {
4008
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_mark_used");
4009
+ }
4010
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_network() !== 18889) {
4011
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_network");
4012
+ }
4013
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_next_derivation_index() !== 28145) {
4014
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_next_derivation_index");
4015
+ }
4016
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_next_unused_address() !== 58812) {
4017
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_next_unused_address");
4018
+ }
4019
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_peek_address() !== 56579) {
4020
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_peek_address");
4021
+ }
4022
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_persist() !== 18685) {
4023
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_persist");
4024
+ }
4025
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_policies() !== 64896) {
4026
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_policies");
4027
+ }
4028
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_public_descriptor() !== 19031) {
4029
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_public_descriptor");
4030
+ }
4031
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_reveal_addresses_to() !== 55968) {
4032
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_reveal_addresses_to");
4033
+ }
4034
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_reveal_next_address() !== 61535) {
4035
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_reveal_next_address");
4036
+ }
4037
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_send() !== 51484) {
4038
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_send");
4039
+ }
4040
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sent_and_received() !== 31024) {
4041
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sent_and_received");
4042
+ }
4043
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sign() !== 49926) {
4044
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sign");
4045
+ }
4046
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum() !== 58815) {
4047
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum");
4048
+ }
4049
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_esplora() !== 55793) {
4050
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sync_with_esplora");
4051
+ }
4052
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_transactions() !== 13072) {
4053
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_transactions");
4054
+ }
4055
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_tx_details() !== 60609) {
4056
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_tx_details");
4057
+ }
4058
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_unmark_used() !== 25591) {
4059
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_unmark_used");
4060
+ }
4061
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy() !== 37039) {
4062
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy");
4063
+ }
4064
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy_in() !== 31703) {
4065
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy_in");
4066
+ }
4067
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_from_string() !== 55849) {
4068
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_from_string");
4069
+ }
4070
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_from_string_in() !== 62725) {
4071
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_from_string_in");
4072
+ }
4073
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_new() !== 48608) {
4074
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_new");
4075
+ }
4076
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_psbt_new() !== 53610) {
4077
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_psbt_new");
4078
+ }
4079
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_txbuilder_new() !== 16691) {
4080
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_txbuilder_new");
4081
+ }
4082
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_wallet_new() !== 38801) {
4083
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_wallet_new");
4084
+ }
4085
+ }
4086
+ var _default = exports.default = Object.freeze({
4087
+ initialize: uniffiEnsureInitialized,
4088
+ converters: {
4089
+ FfiConverterTypeAddressInfo,
4090
+ FfiConverterTypeBalance,
4091
+ FfiConverterTypeBdkError,
4092
+ FfiConverterTypeBlockId,
4093
+ FfiConverterTypeChangeSpendPolicy,
4094
+ FfiConverterTypeConfirmationBlockTime,
4095
+ FfiConverterTypeDerivationInfo,
4096
+ FfiConverterTypeDescriptorTemplate,
4097
+ FfiConverterTypeKeychainInfo,
4098
+ FfiConverterTypeKeychainKind,
4099
+ FfiConverterTypeLanguage,
4100
+ FfiConverterTypeLocalOutput,
4101
+ FfiConverterTypeMnemonic,
4102
+ FfiConverterTypeNetwork,
4103
+ FfiConverterTypeOutPoint,
4104
+ FfiConverterTypePsbt,
4105
+ FfiConverterTypeRecipient,
4106
+ FfiConverterTypeSentAndReceived,
4107
+ FfiConverterTypeSingleKeyDescriptorTemplate,
4108
+ FfiConverterTypeTxBuilder,
4109
+ FfiConverterTypeTxDetails,
4110
+ FfiConverterTypeTxOrdering,
4111
+ FfiConverterTypeTxOut,
4112
+ FfiConverterTypeWallet,
4113
+ FfiConverterTypeWalletEvent,
4114
+ FfiConverterTypeWordCount
4115
+ }
4116
+ });
4117
+ //# sourceMappingURL=bdk_ffi.js.map