@secondts/bark-react-native 0.1.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarkReactNative.podspec +44 -0
- package/README.md +46 -0
- package/android/CMakeLists.txt +76 -0
- package/android/build.gradle +144 -0
- package/android/cpp-adapter.cpp +42 -0
- package/android/generated/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeBarkReactNativeSpec.java +41 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +36 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/RNBarkReactNativeSpec-generated.cpp +38 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/RNBarkReactNativeSpec.h +31 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/ComponentDescriptors.h +24 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/EventEmitters.cpp +16 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/EventEmitters.h +17 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/Props.cpp +19 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/Props.h +18 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/RNBarkReactNativeSpecJSI-generated.cpp +32 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/RNBarkReactNativeSpecJSI.h +76 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/ShadowNodes.cpp +17 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/ShadowNodes.h +23 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/States.cpp +16 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBarkReactNativeSpec/States.h +19 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/barkreactnative/BarkReactNativeModule.kt +43 -0
- package/android/src/main/java/com/barkreactnative/BarkReactNativePackage.kt +34 -0
- package/app.plugin.js +1 -0
- package/cpp/bark-react-native.cpp +16 -0
- package/cpp/bark-react-native.h +15 -0
- package/cpp/generated/bark.cpp +6665 -0
- package/cpp/generated/bark.hpp +212 -0
- package/cpp/secondts-bark-react-native.cpp +16 -0
- package/cpp/secondts-bark-react-native.h +15 -0
- package/ios/BarkReactNative.h +16 -0
- package/ios/BarkReactNative.mm +66 -0
- package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +2321 -0
- package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +2761 -0
- package/ios/generated/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +2923 -0
- package/ios/generated/build/generated/ios/FBReactNativeSpecJSI.h +7718 -0
- package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/build/generated/ios/RNBarkReactNativeSpec/RNBarkReactNativeSpec-generated.mm +46 -0
- package/ios/generated/build/generated/ios/RNBarkReactNativeSpec/RNBarkReactNativeSpec.h +60 -0
- package/ios/generated/build/generated/ios/RNBarkReactNativeSpecJSI-generated.cpp +32 -0
- package/ios/generated/build/generated/ios/RNBarkReactNativeSpecJSI.h +76 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/EventEmitters.cpp +16 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/EventEmitters.h +17 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/Props.cpp +19 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/Props.h +18 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/RCTComponentViewHelpers.h +18 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/ShadowNodes.h +23 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/States.cpp +16 -0
- package/ios/generated/build/generated/ios/react/renderer/components/RNBarkReactNativeSpec/States.h +19 -0
- package/lib/commonjs/NativeBarkReactNative.js +10 -0
- package/lib/commonjs/NativeBarkReactNative.js.map +1 -0
- package/lib/commonjs/generated/bark-ffi.js +44 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -0
- package/lib/commonjs/generated/bark.js +3175 -0
- package/lib/commonjs/generated/bark.js.map +1 -0
- package/lib/commonjs/index.js +63 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/NativeBarkReactNative.js +7 -0
- package/lib/module/NativeBarkReactNative.js.map +1 -0
- package/lib/module/generated/bark-ffi.js +43 -0
- package/lib/module/generated/bark-ffi.js.map +1 -0
- package/lib/module/generated/bark.js +3164 -0
- package/lib/module/generated/bark.js.map +1 -0
- package/lib/module/index.js +43 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/plugin/src/index.d.ts +11 -0
- package/lib/typescript/commonjs/plugin/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/src/withAndroid.d.ts +6 -0
- package/lib/typescript/commonjs/plugin/src/withAndroid.d.ts.map +1 -0
- package/lib/typescript/commonjs/plugin/src/withIOS.d.ts +7 -0
- package/lib/typescript/commonjs/plugin/src/withIOS.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeBarkReactNative.d.ts +8 -0
- package/lib/typescript/commonjs/src/NativeBarkReactNative.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +264 -0
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/bark.d.ts +2963 -0
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/plugin/src/index.d.ts +11 -0
- package/lib/typescript/module/plugin/src/index.d.ts.map +1 -0
- package/lib/typescript/module/plugin/src/withAndroid.d.ts +6 -0
- package/lib/typescript/module/plugin/src/withAndroid.d.ts.map +1 -0
- package/lib/typescript/module/plugin/src/withIOS.d.ts +7 -0
- package/lib/typescript/module/plugin/src/withIOS.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeBarkReactNative.d.ts +8 -0
- package/lib/typescript/module/src/NativeBarkReactNative.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +264 -0
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/bark.d.ts +2963 -0
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +8 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/package.json +154 -0
- package/plugin/build/index.d.ts +10 -0
- package/plugin/build/index.js +16 -0
- package/plugin/build/withAndroid.d.ts +5 -0
- package/plugin/build/withAndroid.js +26 -0
- package/plugin/build/withIOS.d.ts +6 -0
- package/plugin/build/withIOS.js +13 -0
- package/plugin/tsconfig.json +9 -0
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/react-native.config.js +12 -0
- package/scripts/postinstall.js +233 -0
- package/src/NativeBarkReactNative.ts +10 -0
- package/src/generated/bark-ffi.ts +694 -0
- package/src/generated/bark.ts +6068 -0
- package/src/index.tsx +41 -0
|
@@ -0,0 +1,3175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.WalletProperties = exports.Wallet = exports.Vtxo = exports.RoundState = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainBalance = exports.OffboardResult = exports.Network = exports.Movement = exports.LightningSend = exports.LightningReceive = exports.LightningInvoice = exports.ExitVtxo = exports.ExitTransactionStatus = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.Destination = exports.CpfpParams = exports.Config = exports.BlockRef = exports.BarkError_Tags = exports.BarkError = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
|
|
7
|
+
exports.extractTxFromPsbt = extractTxFromPsbt;
|
|
8
|
+
exports.generateMnemonic = generateMnemonic;
|
|
9
|
+
exports.validateArkAddress = validateArkAddress;
|
|
10
|
+
exports.validateMnemonic = validateMnemonic;
|
|
11
|
+
var _barkFfi = _interopRequireDefault(require("./bark-ffi.js"));
|
|
12
|
+
var _uniffiBindgenReactNative = require("uniffi-bindgen-react-native");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
15
|
+
// Trust me, you don't want to mess with it!
|
|
16
|
+
|
|
17
|
+
// Get converters from the other files, if any.
|
|
18
|
+
const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller(() => ({
|
|
19
|
+
code: 0
|
|
20
|
+
}));
|
|
21
|
+
const uniffiIsDebug =
|
|
22
|
+
// @ts-ignore -- The process global might not be defined
|
|
23
|
+
typeof process !== "object" ||
|
|
24
|
+
// @ts-ignore -- The process global might not be defined
|
|
25
|
+
process?.env?.NODE_ENV !== "production" || false;
|
|
26
|
+
// Public interface members begin here.
|
|
27
|
+
|
|
28
|
+
function extractTxFromPsbt(psbtBase64) /*throws*/{
|
|
29
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
30
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_extract_tx_from_psbt(FfiConverterString.lower(psbtBase64), callStatus);
|
|
31
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
32
|
+
}
|
|
33
|
+
function generateMnemonic() /*throws*/{
|
|
34
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
35
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_generate_mnemonic(callStatus);
|
|
36
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
37
|
+
}
|
|
38
|
+
function validateArkAddress(address) /*throws*/{
|
|
39
|
+
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
40
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_validate_ark_address(FfiConverterString.lower(address), callStatus);
|
|
41
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
42
|
+
}
|
|
43
|
+
function validateMnemonic(mnemonic) /*throws*/{
|
|
44
|
+
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
45
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_validate_mnemonic(FfiConverterString.lower(mnemonic), callStatus);
|
|
46
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Callback interface for custom onchain wallet implementations
|
|
51
|
+
*
|
|
52
|
+
* Implement this interface in Dart/Swift/Kotlin to provide your own wallet.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
56
|
+
const uniffiCallbackInterfaceCustomOnchainWalletCallbacks = {
|
|
57
|
+
// Create the VTable using a series of closures.
|
|
58
|
+
// ts automatically converts these into C callback functions.
|
|
59
|
+
vtable: {
|
|
60
|
+
getBalance: uniffiHandle => {
|
|
61
|
+
const uniffiMakeCall = () => {
|
|
62
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
63
|
+
return jsCallback.getBalance();
|
|
64
|
+
};
|
|
65
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
66
|
+
const uniffiHandleSuccess = obj => {
|
|
67
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, _uniffiBindgenReactNative.FfiConverterUInt64.lower(obj));
|
|
68
|
+
};
|
|
69
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
70
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
71
|
+
};
|
|
72
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
73
|
+
return uniffiResult;
|
|
74
|
+
},
|
|
75
|
+
prepareTx: (uniffiHandle, destinations, feeRateSatPerVb) => {
|
|
76
|
+
const uniffiMakeCall = () => {
|
|
77
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
78
|
+
return jsCallback.prepareTx(FfiConverterArrayTypeDestination.lift(destinations), _uniffiBindgenReactNative.FfiConverterUInt64.lift(feeRateSatPerVb));
|
|
79
|
+
};
|
|
80
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
81
|
+
const uniffiHandleSuccess = obj => {
|
|
82
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterString.lower(obj));
|
|
83
|
+
};
|
|
84
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
85
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
86
|
+
};
|
|
87
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
88
|
+
return uniffiResult;
|
|
89
|
+
},
|
|
90
|
+
prepareDrainTx: (uniffiHandle, address, feeRateSatPerVb) => {
|
|
91
|
+
const uniffiMakeCall = () => {
|
|
92
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
93
|
+
return jsCallback.prepareDrainTx(FfiConverterString.lift(address), _uniffiBindgenReactNative.FfiConverterUInt64.lift(feeRateSatPerVb));
|
|
94
|
+
};
|
|
95
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
96
|
+
const uniffiHandleSuccess = obj => {
|
|
97
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterString.lower(obj));
|
|
98
|
+
};
|
|
99
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
100
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
101
|
+
};
|
|
102
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
103
|
+
return uniffiResult;
|
|
104
|
+
},
|
|
105
|
+
finishTx: (uniffiHandle, psbtBase64) => {
|
|
106
|
+
const uniffiMakeCall = () => {
|
|
107
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
108
|
+
return jsCallback.finishTx(FfiConverterString.lift(psbtBase64));
|
|
109
|
+
};
|
|
110
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
111
|
+
const uniffiHandleSuccess = obj => {
|
|
112
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterString.lower(obj));
|
|
113
|
+
};
|
|
114
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
115
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
116
|
+
};
|
|
117
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
118
|
+
return uniffiResult;
|
|
119
|
+
},
|
|
120
|
+
getWalletTx: (uniffiHandle, txid) => {
|
|
121
|
+
const uniffiMakeCall = () => {
|
|
122
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
123
|
+
return jsCallback.getWalletTx(FfiConverterString.lift(txid));
|
|
124
|
+
};
|
|
125
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
126
|
+
const uniffiHandleSuccess = obj => {
|
|
127
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterOptionalString.lower(obj));
|
|
128
|
+
};
|
|
129
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
130
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
131
|
+
};
|
|
132
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
133
|
+
return uniffiResult;
|
|
134
|
+
},
|
|
135
|
+
getWalletTxConfirmedBlock: (uniffiHandle, txid) => {
|
|
136
|
+
const uniffiMakeCall = () => {
|
|
137
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
138
|
+
return jsCallback.getWalletTxConfirmedBlock(FfiConverterString.lift(txid));
|
|
139
|
+
};
|
|
140
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
141
|
+
const uniffiHandleSuccess = obj => {
|
|
142
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterOptionalTypeBlockRef.lower(obj));
|
|
143
|
+
};
|
|
144
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
145
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
146
|
+
};
|
|
147
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
148
|
+
return uniffiResult;
|
|
149
|
+
},
|
|
150
|
+
getSpendingTx: (uniffiHandle, outpoint) => {
|
|
151
|
+
const uniffiMakeCall = () => {
|
|
152
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
153
|
+
return jsCallback.getSpendingTx(FfiConverterTypeOutPoint.lift(outpoint));
|
|
154
|
+
};
|
|
155
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
156
|
+
const uniffiHandleSuccess = obj => {
|
|
157
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterOptionalString.lower(obj));
|
|
158
|
+
};
|
|
159
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
160
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
161
|
+
};
|
|
162
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
163
|
+
return uniffiResult;
|
|
164
|
+
},
|
|
165
|
+
makeSignedP2aCpfp: (uniffiHandle, params) => {
|
|
166
|
+
const uniffiMakeCall = () => {
|
|
167
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
168
|
+
return jsCallback.makeSignedP2aCpfp(FfiConverterTypeCpfpParams.lift(params));
|
|
169
|
+
};
|
|
170
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
171
|
+
const uniffiHandleSuccess = obj => {
|
|
172
|
+
_uniffiBindgenReactNative.UniffiResult.writeSuccess(uniffiResult, FfiConverterString.lower(obj));
|
|
173
|
+
};
|
|
174
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
175
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
176
|
+
};
|
|
177
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
178
|
+
return uniffiResult;
|
|
179
|
+
},
|
|
180
|
+
storeSignedP2aCpfp: (uniffiHandle, txHex) => {
|
|
181
|
+
const uniffiMakeCall = () => {
|
|
182
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
183
|
+
return jsCallback.storeSignedP2aCpfp(FfiConverterString.lift(txHex));
|
|
184
|
+
};
|
|
185
|
+
const uniffiResult = _uniffiBindgenReactNative.UniffiResult.ready();
|
|
186
|
+
const uniffiHandleSuccess = obj => {};
|
|
187
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
188
|
+
_uniffiBindgenReactNative.UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
189
|
+
};
|
|
190
|
+
(0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/BarkError.instanceOf, /*lowerError:*/FfiConverterTypeBarkError.lower.bind(FfiConverterTypeBarkError), /*lowerString:*/FfiConverterString.lower);
|
|
191
|
+
return uniffiResult;
|
|
192
|
+
},
|
|
193
|
+
uniffiFree: uniffiHandle => {
|
|
194
|
+
// CustomOnchainWalletCallbacks: this will throw a stale handle error if the handle isn't found.
|
|
195
|
+
FfiConverterTypeCustomOnchainWalletCallbacks.drop(uniffiHandle);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
register: () => {
|
|
199
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_init_callback_vtable_customonchainwalletcallbacks(uniffiCallbackInterfaceCustomOnchainWalletCallbacks.vtable);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// FfiConverter protocol for callback interfaces
|
|
204
|
+
const FfiConverterTypeCustomOnchainWalletCallbacks = new _uniffiBindgenReactNative.FfiConverterCallback();
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* An Ark address with its derivation index
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Generated factory for {@link AddressWithIndex} record objects.
|
|
212
|
+
*/
|
|
213
|
+
const AddressWithIndex = exports.AddressWithIndex = (() => {
|
|
214
|
+
const defaults = () => ({});
|
|
215
|
+
const create = (() => {
|
|
216
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
217
|
+
})();
|
|
218
|
+
return Object.freeze({
|
|
219
|
+
/**
|
|
220
|
+
* Create a frozen instance of {@link AddressWithIndex}, with defaults specified
|
|
221
|
+
* in Rust, in the {@link bark} crate.
|
|
222
|
+
*/
|
|
223
|
+
create,
|
|
224
|
+
/**
|
|
225
|
+
* Create a frozen instance of {@link AddressWithIndex}, with defaults specified
|
|
226
|
+
* in Rust, in the {@link bark} crate.
|
|
227
|
+
*/
|
|
228
|
+
new: create,
|
|
229
|
+
/**
|
|
230
|
+
* Defaults specified in the {@link bark} crate.
|
|
231
|
+
*/
|
|
232
|
+
defaults: () => Object.freeze(defaults())
|
|
233
|
+
});
|
|
234
|
+
})();
|
|
235
|
+
const FfiConverterTypeAddressWithIndex = (() => {
|
|
236
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
237
|
+
read(from) {
|
|
238
|
+
return {
|
|
239
|
+
address: FfiConverterString.read(from),
|
|
240
|
+
index: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
write(value, into) {
|
|
244
|
+
FfiConverterString.write(value.address, into);
|
|
245
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.index, into);
|
|
246
|
+
}
|
|
247
|
+
allocationSize(value) {
|
|
248
|
+
return FfiConverterString.allocationSize(value.address) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.index);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return new FFIConverter();
|
|
252
|
+
})();
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Ark server configuration information
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Generated factory for {@link ArkInfo} record objects.
|
|
260
|
+
*/
|
|
261
|
+
const ArkInfo = exports.ArkInfo = (() => {
|
|
262
|
+
const defaults = () => ({});
|
|
263
|
+
const create = (() => {
|
|
264
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
265
|
+
})();
|
|
266
|
+
return Object.freeze({
|
|
267
|
+
/**
|
|
268
|
+
* Create a frozen instance of {@link ArkInfo}, with defaults specified
|
|
269
|
+
* in Rust, in the {@link bark} crate.
|
|
270
|
+
*/
|
|
271
|
+
create,
|
|
272
|
+
/**
|
|
273
|
+
* Create a frozen instance of {@link ArkInfo}, with defaults specified
|
|
274
|
+
* in Rust, in the {@link bark} crate.
|
|
275
|
+
*/
|
|
276
|
+
new: create,
|
|
277
|
+
/**
|
|
278
|
+
* Defaults specified in the {@link bark} crate.
|
|
279
|
+
*/
|
|
280
|
+
defaults: () => Object.freeze(defaults())
|
|
281
|
+
});
|
|
282
|
+
})();
|
|
283
|
+
const FfiConverterTypeArkInfo = (() => {
|
|
284
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
285
|
+
read(from) {
|
|
286
|
+
return {
|
|
287
|
+
network: FfiConverterTypeNetwork.read(from),
|
|
288
|
+
serverPubkey: FfiConverterString.read(from),
|
|
289
|
+
roundIntervalSecs: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
290
|
+
nbRoundNonces: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
291
|
+
vtxoExitDelta: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
292
|
+
vtxoExpiryDelta: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
293
|
+
htlcSendExpiryDelta: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
294
|
+
htlcExpiryDelta: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
295
|
+
maxVtxoAmountSats: FfiConverterOptionalUInt64.read(from),
|
|
296
|
+
requiredBoardConfirmations: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
297
|
+
maxUserInvoiceCltvDelta: _uniffiBindgenReactNative.FfiConverterUInt16.read(from),
|
|
298
|
+
minBoardAmountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
299
|
+
offboardFeerateSatPerVb: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
300
|
+
lnReceiveAntiDosRequired: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
write(value, into) {
|
|
304
|
+
FfiConverterTypeNetwork.write(value.network, into);
|
|
305
|
+
FfiConverterString.write(value.serverPubkey, into);
|
|
306
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.roundIntervalSecs, into);
|
|
307
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.nbRoundNonces, into);
|
|
308
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.vtxoExitDelta, into);
|
|
309
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.vtxoExpiryDelta, into);
|
|
310
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.htlcSendExpiryDelta, into);
|
|
311
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.htlcExpiryDelta, into);
|
|
312
|
+
FfiConverterOptionalUInt64.write(value.maxVtxoAmountSats, into);
|
|
313
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.requiredBoardConfirmations, into);
|
|
314
|
+
_uniffiBindgenReactNative.FfiConverterUInt16.write(value.maxUserInvoiceCltvDelta, into);
|
|
315
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.minBoardAmountSats, into);
|
|
316
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.offboardFeerateSatPerVb, into);
|
|
317
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.lnReceiveAntiDosRequired, into);
|
|
318
|
+
}
|
|
319
|
+
allocationSize(value) {
|
|
320
|
+
return FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.serverPubkey) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.roundIntervalSecs) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.nbRoundNonces) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vtxoExitDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcExpiryDelta) + FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minBoardAmountSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.offboardFeerateSatPerVb) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return new FFIConverter();
|
|
324
|
+
})();
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Detailed balance breakdown of the wallet
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Generated factory for {@link Balance} record objects.
|
|
332
|
+
*/
|
|
333
|
+
const Balance = exports.Balance = (() => {
|
|
334
|
+
const defaults = () => ({});
|
|
335
|
+
const create = (() => {
|
|
336
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
337
|
+
})();
|
|
338
|
+
return Object.freeze({
|
|
339
|
+
/**
|
|
340
|
+
* Create a frozen instance of {@link Balance}, with defaults specified
|
|
341
|
+
* in Rust, in the {@link bark} crate.
|
|
342
|
+
*/
|
|
343
|
+
create,
|
|
344
|
+
/**
|
|
345
|
+
* Create a frozen instance of {@link Balance}, with defaults specified
|
|
346
|
+
* in Rust, in the {@link bark} crate.
|
|
347
|
+
*/
|
|
348
|
+
new: create,
|
|
349
|
+
/**
|
|
350
|
+
* Defaults specified in the {@link bark} crate.
|
|
351
|
+
*/
|
|
352
|
+
defaults: () => Object.freeze(defaults())
|
|
353
|
+
});
|
|
354
|
+
})();
|
|
355
|
+
const FfiConverterTypeBalance = (() => {
|
|
356
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
357
|
+
read(from) {
|
|
358
|
+
return {
|
|
359
|
+
spendableSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
360
|
+
pendingInRoundSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
361
|
+
pendingExitSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
362
|
+
pendingLightningSendSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
363
|
+
claimableLightningReceiveSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
364
|
+
pendingBoardSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
write(value, into) {
|
|
368
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.spendableSats, into);
|
|
369
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.pendingInRoundSats, into);
|
|
370
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.pendingExitSats, into);
|
|
371
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.pendingLightningSendSats, into);
|
|
372
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.claimableLightningReceiveSats, into);
|
|
373
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.pendingBoardSats, into);
|
|
374
|
+
}
|
|
375
|
+
allocationSize(value) {
|
|
376
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.spendableSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.pendingInRoundSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.pendingExitSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.pendingLightningSendSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.claimableLightningReceiveSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.pendingBoardSats);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return new FFIConverter();
|
|
380
|
+
})();
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Reference to a block in the blockchain
|
|
384
|
+
*/
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Generated factory for {@link BlockRef} record objects.
|
|
388
|
+
*/
|
|
389
|
+
const BlockRef = exports.BlockRef = (() => {
|
|
390
|
+
const defaults = () => ({});
|
|
391
|
+
const create = (() => {
|
|
392
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
393
|
+
})();
|
|
394
|
+
return Object.freeze({
|
|
395
|
+
/**
|
|
396
|
+
* Create a frozen instance of {@link BlockRef}, with defaults specified
|
|
397
|
+
* in Rust, in the {@link bark} crate.
|
|
398
|
+
*/
|
|
399
|
+
create,
|
|
400
|
+
/**
|
|
401
|
+
* Create a frozen instance of {@link BlockRef}, with defaults specified
|
|
402
|
+
* in Rust, in the {@link bark} crate.
|
|
403
|
+
*/
|
|
404
|
+
new: create,
|
|
405
|
+
/**
|
|
406
|
+
* Defaults specified in the {@link bark} crate.
|
|
407
|
+
*/
|
|
408
|
+
defaults: () => Object.freeze(defaults())
|
|
409
|
+
});
|
|
410
|
+
})();
|
|
411
|
+
const FfiConverterTypeBlockRef = (() => {
|
|
412
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
413
|
+
read(from) {
|
|
414
|
+
return {
|
|
415
|
+
height: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
416
|
+
hash: FfiConverterString.read(from)
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
write(value, into) {
|
|
420
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.height, into);
|
|
421
|
+
FfiConverterString.write(value.hash, into);
|
|
422
|
+
}
|
|
423
|
+
allocationSize(value) {
|
|
424
|
+
return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.height) + FfiConverterString.allocationSize(value.hash);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return new FFIConverter();
|
|
428
|
+
})();
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Configuration for creating/opening a Bark wallet
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Generated factory for {@link Config} record objects.
|
|
436
|
+
*/
|
|
437
|
+
const Config = exports.Config = (() => {
|
|
438
|
+
const defaults = () => ({});
|
|
439
|
+
const create = (() => {
|
|
440
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
441
|
+
})();
|
|
442
|
+
return Object.freeze({
|
|
443
|
+
/**
|
|
444
|
+
* Create a frozen instance of {@link Config}, with defaults specified
|
|
445
|
+
* in Rust, in the {@link bark} crate.
|
|
446
|
+
*/
|
|
447
|
+
create,
|
|
448
|
+
/**
|
|
449
|
+
* Create a frozen instance of {@link Config}, with defaults specified
|
|
450
|
+
* in Rust, in the {@link bark} crate.
|
|
451
|
+
*/
|
|
452
|
+
new: create,
|
|
453
|
+
/**
|
|
454
|
+
* Defaults specified in the {@link bark} crate.
|
|
455
|
+
*/
|
|
456
|
+
defaults: () => Object.freeze(defaults())
|
|
457
|
+
});
|
|
458
|
+
})();
|
|
459
|
+
const FfiConverterTypeConfig = (() => {
|
|
460
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
461
|
+
read(from) {
|
|
462
|
+
return {
|
|
463
|
+
serverAddress: FfiConverterString.read(from),
|
|
464
|
+
esploraAddress: FfiConverterOptionalString.read(from),
|
|
465
|
+
bitcoindAddress: FfiConverterOptionalString.read(from),
|
|
466
|
+
bitcoindCookiefile: FfiConverterOptionalString.read(from),
|
|
467
|
+
bitcoindUser: FfiConverterOptionalString.read(from),
|
|
468
|
+
bitcoindPass: FfiConverterOptionalString.read(from),
|
|
469
|
+
network: FfiConverterTypeNetwork.read(from),
|
|
470
|
+
vtxoRefreshExpiryThreshold: FfiConverterOptionalUInt32.read(from),
|
|
471
|
+
vtxoExitMargin: FfiConverterOptionalUInt16.read(from),
|
|
472
|
+
htlcRecvClaimDelta: FfiConverterOptionalUInt16.read(from),
|
|
473
|
+
fallbackFeeRate: FfiConverterOptionalUInt64.read(from),
|
|
474
|
+
roundTxRequiredConfirmations: FfiConverterOptionalUInt32.read(from)
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
write(value, into) {
|
|
478
|
+
FfiConverterString.write(value.serverAddress, into);
|
|
479
|
+
FfiConverterOptionalString.write(value.esploraAddress, into);
|
|
480
|
+
FfiConverterOptionalString.write(value.bitcoindAddress, into);
|
|
481
|
+
FfiConverterOptionalString.write(value.bitcoindCookiefile, into);
|
|
482
|
+
FfiConverterOptionalString.write(value.bitcoindUser, into);
|
|
483
|
+
FfiConverterOptionalString.write(value.bitcoindPass, into);
|
|
484
|
+
FfiConverterTypeNetwork.write(value.network, into);
|
|
485
|
+
FfiConverterOptionalUInt32.write(value.vtxoRefreshExpiryThreshold, into);
|
|
486
|
+
FfiConverterOptionalUInt16.write(value.vtxoExitMargin, into);
|
|
487
|
+
FfiConverterOptionalUInt16.write(value.htlcRecvClaimDelta, into);
|
|
488
|
+
FfiConverterOptionalUInt64.write(value.fallbackFeeRate, into);
|
|
489
|
+
FfiConverterOptionalUInt32.write(value.roundTxRequiredConfirmations, into);
|
|
490
|
+
}
|
|
491
|
+
allocationSize(value) {
|
|
492
|
+
return FfiConverterString.allocationSize(value.serverAddress) + FfiConverterOptionalString.allocationSize(value.esploraAddress) + FfiConverterOptionalString.allocationSize(value.bitcoindAddress) + FfiConverterOptionalString.allocationSize(value.bitcoindCookiefile) + FfiConverterOptionalString.allocationSize(value.bitcoindUser) + FfiConverterOptionalString.allocationSize(value.bitcoindPass) + FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterOptionalUInt32.allocationSize(value.vtxoRefreshExpiryThreshold) + FfiConverterOptionalUInt16.allocationSize(value.vtxoExitMargin) + FfiConverterOptionalUInt16.allocationSize(value.htlcRecvClaimDelta) + FfiConverterOptionalUInt64.allocationSize(value.fallbackFeeRate) + FfiConverterOptionalUInt32.allocationSize(value.roundTxRequiredConfirmations);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return new FFIConverter();
|
|
496
|
+
})();
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Parameters for creating a CPFP (Child Pays For Parent) transaction
|
|
500
|
+
*/
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Generated factory for {@link CpfpParams} record objects.
|
|
504
|
+
*/
|
|
505
|
+
const CpfpParams = exports.CpfpParams = (() => {
|
|
506
|
+
const defaults = () => ({});
|
|
507
|
+
const create = (() => {
|
|
508
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
509
|
+
})();
|
|
510
|
+
return Object.freeze({
|
|
511
|
+
/**
|
|
512
|
+
* Create a frozen instance of {@link CpfpParams}, with defaults specified
|
|
513
|
+
* in Rust, in the {@link bark} crate.
|
|
514
|
+
*/
|
|
515
|
+
create,
|
|
516
|
+
/**
|
|
517
|
+
* Create a frozen instance of {@link CpfpParams}, with defaults specified
|
|
518
|
+
* in Rust, in the {@link bark} crate.
|
|
519
|
+
*/
|
|
520
|
+
new: create,
|
|
521
|
+
/**
|
|
522
|
+
* Defaults specified in the {@link bark} crate.
|
|
523
|
+
*/
|
|
524
|
+
defaults: () => Object.freeze(defaults())
|
|
525
|
+
});
|
|
526
|
+
})();
|
|
527
|
+
const FfiConverterTypeCpfpParams = (() => {
|
|
528
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
529
|
+
read(from) {
|
|
530
|
+
return {
|
|
531
|
+
txHex: FfiConverterString.read(from),
|
|
532
|
+
feesType: FfiConverterString.read(from),
|
|
533
|
+
effectiveFeeRateSatPerVb: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
534
|
+
currentPackageFeeSats: FfiConverterOptionalUInt64.read(from)
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
write(value, into) {
|
|
538
|
+
FfiConverterString.write(value.txHex, into);
|
|
539
|
+
FfiConverterString.write(value.feesType, into);
|
|
540
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.effectiveFeeRateSatPerVb, into);
|
|
541
|
+
FfiConverterOptionalUInt64.write(value.currentPackageFeeSats, into);
|
|
542
|
+
}
|
|
543
|
+
allocationSize(value) {
|
|
544
|
+
return FfiConverterString.allocationSize(value.txHex) + FfiConverterString.allocationSize(value.feesType) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.effectiveFeeRateSatPerVb) + FfiConverterOptionalUInt64.allocationSize(value.currentPackageFeeSats);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return new FFIConverter();
|
|
548
|
+
})();
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* A Bitcoin transaction output destination
|
|
552
|
+
*/
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Generated factory for {@link Destination} record objects.
|
|
556
|
+
*/
|
|
557
|
+
const Destination = exports.Destination = (() => {
|
|
558
|
+
const defaults = () => ({});
|
|
559
|
+
const create = (() => {
|
|
560
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
561
|
+
})();
|
|
562
|
+
return Object.freeze({
|
|
563
|
+
/**
|
|
564
|
+
* Create a frozen instance of {@link Destination}, with defaults specified
|
|
565
|
+
* in Rust, in the {@link bark} crate.
|
|
566
|
+
*/
|
|
567
|
+
create,
|
|
568
|
+
/**
|
|
569
|
+
* Create a frozen instance of {@link Destination}, with defaults specified
|
|
570
|
+
* in Rust, in the {@link bark} crate.
|
|
571
|
+
*/
|
|
572
|
+
new: create,
|
|
573
|
+
/**
|
|
574
|
+
* Defaults specified in the {@link bark} crate.
|
|
575
|
+
*/
|
|
576
|
+
defaults: () => Object.freeze(defaults())
|
|
577
|
+
});
|
|
578
|
+
})();
|
|
579
|
+
const FfiConverterTypeDestination = (() => {
|
|
580
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
581
|
+
read(from) {
|
|
582
|
+
return {
|
|
583
|
+
address: FfiConverterString.read(from),
|
|
584
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
write(value, into) {
|
|
588
|
+
FfiConverterString.write(value.address, into);
|
|
589
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
590
|
+
}
|
|
591
|
+
allocationSize(value) {
|
|
592
|
+
return FfiConverterString.allocationSize(value.address) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return new FFIConverter();
|
|
596
|
+
})();
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Claim transaction for exited funds
|
|
600
|
+
*/
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Generated factory for {@link ExitClaimTransaction} record objects.
|
|
604
|
+
*/
|
|
605
|
+
const ExitClaimTransaction = exports.ExitClaimTransaction = (() => {
|
|
606
|
+
const defaults = () => ({});
|
|
607
|
+
const create = (() => {
|
|
608
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
609
|
+
})();
|
|
610
|
+
return Object.freeze({
|
|
611
|
+
/**
|
|
612
|
+
* Create a frozen instance of {@link ExitClaimTransaction}, with defaults specified
|
|
613
|
+
* in Rust, in the {@link bark} crate.
|
|
614
|
+
*/
|
|
615
|
+
create,
|
|
616
|
+
/**
|
|
617
|
+
* Create a frozen instance of {@link ExitClaimTransaction}, with defaults specified
|
|
618
|
+
* in Rust, in the {@link bark} crate.
|
|
619
|
+
*/
|
|
620
|
+
new: create,
|
|
621
|
+
/**
|
|
622
|
+
* Defaults specified in the {@link bark} crate.
|
|
623
|
+
*/
|
|
624
|
+
defaults: () => Object.freeze(defaults())
|
|
625
|
+
});
|
|
626
|
+
})();
|
|
627
|
+
const FfiConverterTypeExitClaimTransaction = (() => {
|
|
628
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
629
|
+
read(from) {
|
|
630
|
+
return {
|
|
631
|
+
psbtBase64: FfiConverterString.read(from),
|
|
632
|
+
feeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
write(value, into) {
|
|
636
|
+
FfiConverterString.write(value.psbtBase64, into);
|
|
637
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.feeSats, into);
|
|
638
|
+
}
|
|
639
|
+
allocationSize(value) {
|
|
640
|
+
return FfiConverterString.allocationSize(value.psbtBase64) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.feeSats);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return new FFIConverter();
|
|
644
|
+
})();
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Status of an exit progression
|
|
648
|
+
*/
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Generated factory for {@link ExitProgressStatus} record objects.
|
|
652
|
+
*/
|
|
653
|
+
const ExitProgressStatus = exports.ExitProgressStatus = (() => {
|
|
654
|
+
const defaults = () => ({});
|
|
655
|
+
const create = (() => {
|
|
656
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
657
|
+
})();
|
|
658
|
+
return Object.freeze({
|
|
659
|
+
/**
|
|
660
|
+
* Create a frozen instance of {@link ExitProgressStatus}, with defaults specified
|
|
661
|
+
* in Rust, in the {@link bark} crate.
|
|
662
|
+
*/
|
|
663
|
+
create,
|
|
664
|
+
/**
|
|
665
|
+
* Create a frozen instance of {@link ExitProgressStatus}, with defaults specified
|
|
666
|
+
* in Rust, in the {@link bark} crate.
|
|
667
|
+
*/
|
|
668
|
+
new: create,
|
|
669
|
+
/**
|
|
670
|
+
* Defaults specified in the {@link bark} crate.
|
|
671
|
+
*/
|
|
672
|
+
defaults: () => Object.freeze(defaults())
|
|
673
|
+
});
|
|
674
|
+
})();
|
|
675
|
+
const FfiConverterTypeExitProgressStatus = (() => {
|
|
676
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
677
|
+
read(from) {
|
|
678
|
+
return {
|
|
679
|
+
vtxoId: FfiConverterString.read(from),
|
|
680
|
+
state: FfiConverterString.read(from),
|
|
681
|
+
error: FfiConverterOptionalString.read(from)
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
write(value, into) {
|
|
685
|
+
FfiConverterString.write(value.vtxoId, into);
|
|
686
|
+
FfiConverterString.write(value.state, into);
|
|
687
|
+
FfiConverterOptionalString.write(value.error, into);
|
|
688
|
+
}
|
|
689
|
+
allocationSize(value) {
|
|
690
|
+
return FfiConverterString.allocationSize(value.vtxoId) + FfiConverterString.allocationSize(value.state) + FfiConverterOptionalString.allocationSize(value.error);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
return new FFIConverter();
|
|
694
|
+
})();
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Detailed status of an exit transaction
|
|
698
|
+
*/
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Generated factory for {@link ExitTransactionStatus} record objects.
|
|
702
|
+
*/
|
|
703
|
+
const ExitTransactionStatus = exports.ExitTransactionStatus = (() => {
|
|
704
|
+
const defaults = () => ({});
|
|
705
|
+
const create = (() => {
|
|
706
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
707
|
+
})();
|
|
708
|
+
return Object.freeze({
|
|
709
|
+
/**
|
|
710
|
+
* Create a frozen instance of {@link ExitTransactionStatus}, with defaults specified
|
|
711
|
+
* in Rust, in the {@link bark} crate.
|
|
712
|
+
*/
|
|
713
|
+
create,
|
|
714
|
+
/**
|
|
715
|
+
* Create a frozen instance of {@link ExitTransactionStatus}, with defaults specified
|
|
716
|
+
* in Rust, in the {@link bark} crate.
|
|
717
|
+
*/
|
|
718
|
+
new: create,
|
|
719
|
+
/**
|
|
720
|
+
* Defaults specified in the {@link bark} crate.
|
|
721
|
+
*/
|
|
722
|
+
defaults: () => Object.freeze(defaults())
|
|
723
|
+
});
|
|
724
|
+
})();
|
|
725
|
+
const FfiConverterTypeExitTransactionStatus = (() => {
|
|
726
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
727
|
+
read(from) {
|
|
728
|
+
return {
|
|
729
|
+
vtxoId: FfiConverterString.read(from),
|
|
730
|
+
state: FfiConverterString.read(from),
|
|
731
|
+
history: FfiConverterOptionalArrayString.read(from),
|
|
732
|
+
transactionCount: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
write(value, into) {
|
|
736
|
+
FfiConverterString.write(value.vtxoId, into);
|
|
737
|
+
FfiConverterString.write(value.state, into);
|
|
738
|
+
FfiConverterOptionalArrayString.write(value.history, into);
|
|
739
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.transactionCount, into);
|
|
740
|
+
}
|
|
741
|
+
allocationSize(value) {
|
|
742
|
+
return FfiConverterString.allocationSize(value.vtxoId) + FfiConverterString.allocationSize(value.state) + FfiConverterOptionalArrayString.allocationSize(value.history) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.transactionCount);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
return new FFIConverter();
|
|
746
|
+
})();
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* A VTXO in the exit process
|
|
750
|
+
*/
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Generated factory for {@link ExitVtxo} record objects.
|
|
754
|
+
*/
|
|
755
|
+
const ExitVtxo = exports.ExitVtxo = (() => {
|
|
756
|
+
const defaults = () => ({});
|
|
757
|
+
const create = (() => {
|
|
758
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
759
|
+
})();
|
|
760
|
+
return Object.freeze({
|
|
761
|
+
/**
|
|
762
|
+
* Create a frozen instance of {@link ExitVtxo}, with defaults specified
|
|
763
|
+
* in Rust, in the {@link bark} crate.
|
|
764
|
+
*/
|
|
765
|
+
create,
|
|
766
|
+
/**
|
|
767
|
+
* Create a frozen instance of {@link ExitVtxo}, with defaults specified
|
|
768
|
+
* in Rust, in the {@link bark} crate.
|
|
769
|
+
*/
|
|
770
|
+
new: create,
|
|
771
|
+
/**
|
|
772
|
+
* Defaults specified in the {@link bark} crate.
|
|
773
|
+
*/
|
|
774
|
+
defaults: () => Object.freeze(defaults())
|
|
775
|
+
});
|
|
776
|
+
})();
|
|
777
|
+
const FfiConverterTypeExitVtxo = (() => {
|
|
778
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
779
|
+
read(from) {
|
|
780
|
+
return {
|
|
781
|
+
vtxoId: FfiConverterString.read(from),
|
|
782
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
783
|
+
state: FfiConverterString.read(from),
|
|
784
|
+
isClaimable: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
write(value, into) {
|
|
788
|
+
FfiConverterString.write(value.vtxoId, into);
|
|
789
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
790
|
+
FfiConverterString.write(value.state, into);
|
|
791
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.isClaimable, into);
|
|
792
|
+
}
|
|
793
|
+
allocationSize(value) {
|
|
794
|
+
return FfiConverterString.allocationSize(value.vtxoId) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterString.allocationSize(value.state) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.isClaimable);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
return new FFIConverter();
|
|
798
|
+
})();
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Result of creating a BOLT11 invoice
|
|
802
|
+
*/
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Generated factory for {@link LightningInvoice} record objects.
|
|
806
|
+
*/
|
|
807
|
+
const LightningInvoice = exports.LightningInvoice = (() => {
|
|
808
|
+
const defaults = () => ({});
|
|
809
|
+
const create = (() => {
|
|
810
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
811
|
+
})();
|
|
812
|
+
return Object.freeze({
|
|
813
|
+
/**
|
|
814
|
+
* Create a frozen instance of {@link LightningInvoice}, with defaults specified
|
|
815
|
+
* in Rust, in the {@link bark} crate.
|
|
816
|
+
*/
|
|
817
|
+
create,
|
|
818
|
+
/**
|
|
819
|
+
* Create a frozen instance of {@link LightningInvoice}, with defaults specified
|
|
820
|
+
* in Rust, in the {@link bark} crate.
|
|
821
|
+
*/
|
|
822
|
+
new: create,
|
|
823
|
+
/**
|
|
824
|
+
* Defaults specified in the {@link bark} crate.
|
|
825
|
+
*/
|
|
826
|
+
defaults: () => Object.freeze(defaults())
|
|
827
|
+
});
|
|
828
|
+
})();
|
|
829
|
+
const FfiConverterTypeLightningInvoice = (() => {
|
|
830
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
831
|
+
read(from) {
|
|
832
|
+
return {
|
|
833
|
+
invoice: FfiConverterString.read(from),
|
|
834
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
write(value, into) {
|
|
838
|
+
FfiConverterString.write(value.invoice, into);
|
|
839
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
840
|
+
}
|
|
841
|
+
allocationSize(value) {
|
|
842
|
+
return FfiConverterString.allocationSize(value.invoice) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
return new FFIConverter();
|
|
846
|
+
})();
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Status of a pending Lightning receive
|
|
850
|
+
*/
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Generated factory for {@link LightningReceive} record objects.
|
|
854
|
+
*/
|
|
855
|
+
const LightningReceive = exports.LightningReceive = (() => {
|
|
856
|
+
const defaults = () => ({});
|
|
857
|
+
const create = (() => {
|
|
858
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
859
|
+
})();
|
|
860
|
+
return Object.freeze({
|
|
861
|
+
/**
|
|
862
|
+
* Create a frozen instance of {@link LightningReceive}, with defaults specified
|
|
863
|
+
* in Rust, in the {@link bark} crate.
|
|
864
|
+
*/
|
|
865
|
+
create,
|
|
866
|
+
/**
|
|
867
|
+
* Create a frozen instance of {@link LightningReceive}, with defaults specified
|
|
868
|
+
* in Rust, in the {@link bark} crate.
|
|
869
|
+
*/
|
|
870
|
+
new: create,
|
|
871
|
+
/**
|
|
872
|
+
* Defaults specified in the {@link bark} crate.
|
|
873
|
+
*/
|
|
874
|
+
defaults: () => Object.freeze(defaults())
|
|
875
|
+
});
|
|
876
|
+
})();
|
|
877
|
+
const FfiConverterTypeLightningReceive = (() => {
|
|
878
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
879
|
+
read(from) {
|
|
880
|
+
return {
|
|
881
|
+
paymentHash: FfiConverterString.read(from),
|
|
882
|
+
invoice: FfiConverterString.read(from),
|
|
883
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
884
|
+
hasHtlcVtxos: _uniffiBindgenReactNative.FfiConverterBool.read(from),
|
|
885
|
+
preimageRevealed: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
write(value, into) {
|
|
889
|
+
FfiConverterString.write(value.paymentHash, into);
|
|
890
|
+
FfiConverterString.write(value.invoice, into);
|
|
891
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
892
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.hasHtlcVtxos, into);
|
|
893
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.preimageRevealed, into);
|
|
894
|
+
}
|
|
895
|
+
allocationSize(value) {
|
|
896
|
+
return FfiConverterString.allocationSize(value.paymentHash) + FfiConverterString.allocationSize(value.invoice) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.hasHtlcVtxos) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.preimageRevealed);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
return new FFIConverter();
|
|
900
|
+
})();
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Lightning send payment information
|
|
904
|
+
*/
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Generated factory for {@link LightningSend} record objects.
|
|
908
|
+
*/
|
|
909
|
+
const LightningSend = exports.LightningSend = (() => {
|
|
910
|
+
const defaults = () => ({});
|
|
911
|
+
const create = (() => {
|
|
912
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
913
|
+
})();
|
|
914
|
+
return Object.freeze({
|
|
915
|
+
/**
|
|
916
|
+
* Create a frozen instance of {@link LightningSend}, with defaults specified
|
|
917
|
+
* in Rust, in the {@link bark} crate.
|
|
918
|
+
*/
|
|
919
|
+
create,
|
|
920
|
+
/**
|
|
921
|
+
* Create a frozen instance of {@link LightningSend}, with defaults specified
|
|
922
|
+
* in Rust, in the {@link bark} crate.
|
|
923
|
+
*/
|
|
924
|
+
new: create,
|
|
925
|
+
/**
|
|
926
|
+
* Defaults specified in the {@link bark} crate.
|
|
927
|
+
*/
|
|
928
|
+
defaults: () => Object.freeze(defaults())
|
|
929
|
+
});
|
|
930
|
+
})();
|
|
931
|
+
const FfiConverterTypeLightningSend = (() => {
|
|
932
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
933
|
+
read(from) {
|
|
934
|
+
return {
|
|
935
|
+
invoice: FfiConverterString.read(from),
|
|
936
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
937
|
+
htlcVtxoCount: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
938
|
+
preimage: FfiConverterOptionalString.read(from)
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
write(value, into) {
|
|
942
|
+
FfiConverterString.write(value.invoice, into);
|
|
943
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
944
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.htlcVtxoCount, into);
|
|
945
|
+
FfiConverterOptionalString.write(value.preimage, into);
|
|
946
|
+
}
|
|
947
|
+
allocationSize(value) {
|
|
948
|
+
return FfiConverterString.allocationSize(value.invoice) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcVtxoCount) + FfiConverterOptionalString.allocationSize(value.preimage);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
return new FFIConverter();
|
|
952
|
+
})();
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Wallet movement/transaction record
|
|
956
|
+
*/
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* Generated factory for {@link Movement} record objects.
|
|
960
|
+
*/
|
|
961
|
+
const Movement = exports.Movement = (() => {
|
|
962
|
+
const defaults = () => ({});
|
|
963
|
+
const create = (() => {
|
|
964
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
965
|
+
})();
|
|
966
|
+
return Object.freeze({
|
|
967
|
+
/**
|
|
968
|
+
* Create a frozen instance of {@link Movement}, with defaults specified
|
|
969
|
+
* in Rust, in the {@link bark} crate.
|
|
970
|
+
*/
|
|
971
|
+
create,
|
|
972
|
+
/**
|
|
973
|
+
* Create a frozen instance of {@link Movement}, with defaults specified
|
|
974
|
+
* in Rust, in the {@link bark} crate.
|
|
975
|
+
*/
|
|
976
|
+
new: create,
|
|
977
|
+
/**
|
|
978
|
+
* Defaults specified in the {@link bark} crate.
|
|
979
|
+
*/
|
|
980
|
+
defaults: () => Object.freeze(defaults())
|
|
981
|
+
});
|
|
982
|
+
})();
|
|
983
|
+
const FfiConverterTypeMovement = (() => {
|
|
984
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
985
|
+
read(from) {
|
|
986
|
+
return {
|
|
987
|
+
id: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
988
|
+
status: FfiConverterString.read(from),
|
|
989
|
+
subsystemName: FfiConverterString.read(from),
|
|
990
|
+
subsystemKind: FfiConverterString.read(from),
|
|
991
|
+
metadataJson: FfiConverterString.read(from),
|
|
992
|
+
intendedBalanceSats: _uniffiBindgenReactNative.FfiConverterInt64.read(from),
|
|
993
|
+
effectiveBalanceSats: _uniffiBindgenReactNative.FfiConverterInt64.read(from),
|
|
994
|
+
offchainFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
995
|
+
sentToAddresses: FfiConverterArrayString.read(from),
|
|
996
|
+
receivedOnAddresses: FfiConverterArrayString.read(from),
|
|
997
|
+
inputVtxoIds: FfiConverterArrayString.read(from),
|
|
998
|
+
outputVtxoIds: FfiConverterArrayString.read(from),
|
|
999
|
+
exitedVtxoIds: FfiConverterArrayString.read(from),
|
|
1000
|
+
createdAt: FfiConverterString.read(from),
|
|
1001
|
+
updatedAt: FfiConverterString.read(from),
|
|
1002
|
+
completedAt: FfiConverterOptionalString.read(from)
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
write(value, into) {
|
|
1006
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.id, into);
|
|
1007
|
+
FfiConverterString.write(value.status, into);
|
|
1008
|
+
FfiConverterString.write(value.subsystemName, into);
|
|
1009
|
+
FfiConverterString.write(value.subsystemKind, into);
|
|
1010
|
+
FfiConverterString.write(value.metadataJson, into);
|
|
1011
|
+
_uniffiBindgenReactNative.FfiConverterInt64.write(value.intendedBalanceSats, into);
|
|
1012
|
+
_uniffiBindgenReactNative.FfiConverterInt64.write(value.effectiveBalanceSats, into);
|
|
1013
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.offchainFeeSats, into);
|
|
1014
|
+
FfiConverterArrayString.write(value.sentToAddresses, into);
|
|
1015
|
+
FfiConverterArrayString.write(value.receivedOnAddresses, into);
|
|
1016
|
+
FfiConverterArrayString.write(value.inputVtxoIds, into);
|
|
1017
|
+
FfiConverterArrayString.write(value.outputVtxoIds, into);
|
|
1018
|
+
FfiConverterArrayString.write(value.exitedVtxoIds, into);
|
|
1019
|
+
FfiConverterString.write(value.createdAt, into);
|
|
1020
|
+
FfiConverterString.write(value.updatedAt, into);
|
|
1021
|
+
FfiConverterOptionalString.write(value.completedAt, into);
|
|
1022
|
+
}
|
|
1023
|
+
allocationSize(value) {
|
|
1024
|
+
return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.id) + FfiConverterString.allocationSize(value.status) + FfiConverterString.allocationSize(value.subsystemName) + FfiConverterString.allocationSize(value.subsystemKind) + FfiConverterString.allocationSize(value.metadataJson) + _uniffiBindgenReactNative.FfiConverterInt64.allocationSize(value.intendedBalanceSats) + _uniffiBindgenReactNative.FfiConverterInt64.allocationSize(value.effectiveBalanceSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.offchainFeeSats) + FfiConverterArrayString.allocationSize(value.sentToAddresses) + FfiConverterArrayString.allocationSize(value.receivedOnAddresses) + FfiConverterArrayString.allocationSize(value.inputVtxoIds) + FfiConverterArrayString.allocationSize(value.outputVtxoIds) + FfiConverterArrayString.allocationSize(value.exitedVtxoIds) + FfiConverterString.allocationSize(value.createdAt) + FfiConverterString.allocationSize(value.updatedAt) + FfiConverterOptionalString.allocationSize(value.completedAt);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
return new FFIConverter();
|
|
1028
|
+
})();
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Result of an offboard operation
|
|
1032
|
+
*/
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* Generated factory for {@link OffboardResult} record objects.
|
|
1036
|
+
*/
|
|
1037
|
+
const OffboardResult = exports.OffboardResult = (() => {
|
|
1038
|
+
const defaults = () => ({});
|
|
1039
|
+
const create = (() => {
|
|
1040
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1041
|
+
})();
|
|
1042
|
+
return Object.freeze({
|
|
1043
|
+
/**
|
|
1044
|
+
* Create a frozen instance of {@link OffboardResult}, with defaults specified
|
|
1045
|
+
* in Rust, in the {@link bark} crate.
|
|
1046
|
+
*/
|
|
1047
|
+
create,
|
|
1048
|
+
/**
|
|
1049
|
+
* Create a frozen instance of {@link OffboardResult}, with defaults specified
|
|
1050
|
+
* in Rust, in the {@link bark} crate.
|
|
1051
|
+
*/
|
|
1052
|
+
new: create,
|
|
1053
|
+
/**
|
|
1054
|
+
* Defaults specified in the {@link bark} crate.
|
|
1055
|
+
*/
|
|
1056
|
+
defaults: () => Object.freeze(defaults())
|
|
1057
|
+
});
|
|
1058
|
+
})();
|
|
1059
|
+
const FfiConverterTypeOffboardResult = (() => {
|
|
1060
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1061
|
+
read(from) {
|
|
1062
|
+
return {
|
|
1063
|
+
roundId: FfiConverterString.read(from)
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
write(value, into) {
|
|
1067
|
+
FfiConverterString.write(value.roundId, into);
|
|
1068
|
+
}
|
|
1069
|
+
allocationSize(value) {
|
|
1070
|
+
return FfiConverterString.allocationSize(value.roundId);
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
return new FFIConverter();
|
|
1074
|
+
})();
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Onchain Bitcoin wallet balance
|
|
1078
|
+
*/
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* Generated factory for {@link OnchainBalance} record objects.
|
|
1082
|
+
*/
|
|
1083
|
+
const OnchainBalance = exports.OnchainBalance = (() => {
|
|
1084
|
+
const defaults = () => ({});
|
|
1085
|
+
const create = (() => {
|
|
1086
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1087
|
+
})();
|
|
1088
|
+
return Object.freeze({
|
|
1089
|
+
/**
|
|
1090
|
+
* Create a frozen instance of {@link OnchainBalance}, with defaults specified
|
|
1091
|
+
* in Rust, in the {@link bark} crate.
|
|
1092
|
+
*/
|
|
1093
|
+
create,
|
|
1094
|
+
/**
|
|
1095
|
+
* Create a frozen instance of {@link OnchainBalance}, with defaults specified
|
|
1096
|
+
* in Rust, in the {@link bark} crate.
|
|
1097
|
+
*/
|
|
1098
|
+
new: create,
|
|
1099
|
+
/**
|
|
1100
|
+
* Defaults specified in the {@link bark} crate.
|
|
1101
|
+
*/
|
|
1102
|
+
defaults: () => Object.freeze(defaults())
|
|
1103
|
+
});
|
|
1104
|
+
})();
|
|
1105
|
+
const FfiConverterTypeOnchainBalance = (() => {
|
|
1106
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1107
|
+
read(from) {
|
|
1108
|
+
return {
|
|
1109
|
+
confirmedSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1110
|
+
pendingSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1111
|
+
totalSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
write(value, into) {
|
|
1115
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.confirmedSats, into);
|
|
1116
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.pendingSats, into);
|
|
1117
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.totalSats, into);
|
|
1118
|
+
}
|
|
1119
|
+
allocationSize(value) {
|
|
1120
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.confirmedSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.pendingSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.totalSats);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
return new FFIConverter();
|
|
1124
|
+
})();
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* A Bitcoin transaction outpoint (reference to a previous output)
|
|
1128
|
+
*/
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Generated factory for {@link OutPoint} record objects.
|
|
1132
|
+
*/
|
|
1133
|
+
const OutPoint = exports.OutPoint = (() => {
|
|
1134
|
+
const defaults = () => ({});
|
|
1135
|
+
const create = (() => {
|
|
1136
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1137
|
+
})();
|
|
1138
|
+
return Object.freeze({
|
|
1139
|
+
/**
|
|
1140
|
+
* Create a frozen instance of {@link OutPoint}, with defaults specified
|
|
1141
|
+
* in Rust, in the {@link bark} crate.
|
|
1142
|
+
*/
|
|
1143
|
+
create,
|
|
1144
|
+
/**
|
|
1145
|
+
* Create a frozen instance of {@link OutPoint}, with defaults specified
|
|
1146
|
+
* in Rust, in the {@link bark} crate.
|
|
1147
|
+
*/
|
|
1148
|
+
new: create,
|
|
1149
|
+
/**
|
|
1150
|
+
* Defaults specified in the {@link bark} crate.
|
|
1151
|
+
*/
|
|
1152
|
+
defaults: () => Object.freeze(defaults())
|
|
1153
|
+
});
|
|
1154
|
+
})();
|
|
1155
|
+
const FfiConverterTypeOutPoint = (() => {
|
|
1156
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1157
|
+
read(from) {
|
|
1158
|
+
return {
|
|
1159
|
+
txid: FfiConverterString.read(from),
|
|
1160
|
+
vout: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
write(value, into) {
|
|
1164
|
+
FfiConverterString.write(value.txid, into);
|
|
1165
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.vout, into);
|
|
1166
|
+
}
|
|
1167
|
+
allocationSize(value) {
|
|
1168
|
+
return FfiConverterString.allocationSize(value.txid) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vout);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
return new FFIConverter();
|
|
1172
|
+
})();
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Pending board transaction information
|
|
1176
|
+
*/
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Generated factory for {@link PendingBoard} record objects.
|
|
1180
|
+
*/
|
|
1181
|
+
const PendingBoard = exports.PendingBoard = (() => {
|
|
1182
|
+
const defaults = () => ({});
|
|
1183
|
+
const create = (() => {
|
|
1184
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1185
|
+
})();
|
|
1186
|
+
return Object.freeze({
|
|
1187
|
+
/**
|
|
1188
|
+
* Create a frozen instance of {@link PendingBoard}, with defaults specified
|
|
1189
|
+
* in Rust, in the {@link bark} crate.
|
|
1190
|
+
*/
|
|
1191
|
+
create,
|
|
1192
|
+
/**
|
|
1193
|
+
* Create a frozen instance of {@link PendingBoard}, with defaults specified
|
|
1194
|
+
* in Rust, in the {@link bark} crate.
|
|
1195
|
+
*/
|
|
1196
|
+
new: create,
|
|
1197
|
+
/**
|
|
1198
|
+
* Defaults specified in the {@link bark} crate.
|
|
1199
|
+
*/
|
|
1200
|
+
defaults: () => Object.freeze(defaults())
|
|
1201
|
+
});
|
|
1202
|
+
})();
|
|
1203
|
+
const FfiConverterTypePendingBoard = (() => {
|
|
1204
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1205
|
+
read(from) {
|
|
1206
|
+
return {
|
|
1207
|
+
vtxoId: FfiConverterString.read(from),
|
|
1208
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1209
|
+
txid: FfiConverterString.read(from)
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
write(value, into) {
|
|
1213
|
+
FfiConverterString.write(value.vtxoId, into);
|
|
1214
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
1215
|
+
FfiConverterString.write(value.txid, into);
|
|
1216
|
+
}
|
|
1217
|
+
allocationSize(value) {
|
|
1218
|
+
return FfiConverterString.allocationSize(value.vtxoId) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterString.allocationSize(value.txid);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
return new FFIConverter();
|
|
1222
|
+
})();
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* A pending round state
|
|
1226
|
+
*/
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Generated factory for {@link RoundState} record objects.
|
|
1230
|
+
*/
|
|
1231
|
+
const RoundState = exports.RoundState = (() => {
|
|
1232
|
+
const defaults = () => ({});
|
|
1233
|
+
const create = (() => {
|
|
1234
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1235
|
+
})();
|
|
1236
|
+
return Object.freeze({
|
|
1237
|
+
/**
|
|
1238
|
+
* Create a frozen instance of {@link RoundState}, with defaults specified
|
|
1239
|
+
* in Rust, in the {@link bark} crate.
|
|
1240
|
+
*/
|
|
1241
|
+
create,
|
|
1242
|
+
/**
|
|
1243
|
+
* Create a frozen instance of {@link RoundState}, with defaults specified
|
|
1244
|
+
* in Rust, in the {@link bark} crate.
|
|
1245
|
+
*/
|
|
1246
|
+
new: create,
|
|
1247
|
+
/**
|
|
1248
|
+
* Defaults specified in the {@link bark} crate.
|
|
1249
|
+
*/
|
|
1250
|
+
defaults: () => Object.freeze(defaults())
|
|
1251
|
+
});
|
|
1252
|
+
})();
|
|
1253
|
+
const FfiConverterTypeRoundState = (() => {
|
|
1254
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1255
|
+
read(from) {
|
|
1256
|
+
return {
|
|
1257
|
+
id: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
1258
|
+
ongoing: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
write(value, into) {
|
|
1262
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.id, into);
|
|
1263
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.ongoing, into);
|
|
1264
|
+
}
|
|
1265
|
+
allocationSize(value) {
|
|
1266
|
+
return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.ongoing);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
return new FFIConverter();
|
|
1270
|
+
})();
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Simplified view of a VTXO
|
|
1274
|
+
*/
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Generated factory for {@link Vtxo} record objects.
|
|
1278
|
+
*/
|
|
1279
|
+
const Vtxo = exports.Vtxo = (() => {
|
|
1280
|
+
const defaults = () => ({});
|
|
1281
|
+
const create = (() => {
|
|
1282
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1283
|
+
})();
|
|
1284
|
+
return Object.freeze({
|
|
1285
|
+
/**
|
|
1286
|
+
* Create a frozen instance of {@link Vtxo}, with defaults specified
|
|
1287
|
+
* in Rust, in the {@link bark} crate.
|
|
1288
|
+
*/
|
|
1289
|
+
create,
|
|
1290
|
+
/**
|
|
1291
|
+
* Create a frozen instance of {@link Vtxo}, with defaults specified
|
|
1292
|
+
* in Rust, in the {@link bark} crate.
|
|
1293
|
+
*/
|
|
1294
|
+
new: create,
|
|
1295
|
+
/**
|
|
1296
|
+
* Defaults specified in the {@link bark} crate.
|
|
1297
|
+
*/
|
|
1298
|
+
defaults: () => Object.freeze(defaults())
|
|
1299
|
+
});
|
|
1300
|
+
})();
|
|
1301
|
+
const FfiConverterTypeVtxo = (() => {
|
|
1302
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1303
|
+
read(from) {
|
|
1304
|
+
return {
|
|
1305
|
+
id: FfiConverterString.read(from),
|
|
1306
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1307
|
+
expiryHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
1308
|
+
kind: FfiConverterString.read(from),
|
|
1309
|
+
state: FfiConverterString.read(from)
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
write(value, into) {
|
|
1313
|
+
FfiConverterString.write(value.id, into);
|
|
1314
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
1315
|
+
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.expiryHeight, into);
|
|
1316
|
+
FfiConverterString.write(value.kind, into);
|
|
1317
|
+
FfiConverterString.write(value.state, into);
|
|
1318
|
+
}
|
|
1319
|
+
allocationSize(value) {
|
|
1320
|
+
return FfiConverterString.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.expiryHeight) + FfiConverterString.allocationSize(value.kind) + FfiConverterString.allocationSize(value.state);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
return new FFIConverter();
|
|
1324
|
+
})();
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Read-only properties of the wallet
|
|
1328
|
+
*/
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Generated factory for {@link WalletProperties} record objects.
|
|
1332
|
+
*/
|
|
1333
|
+
const WalletProperties = exports.WalletProperties = (() => {
|
|
1334
|
+
const defaults = () => ({});
|
|
1335
|
+
const create = (() => {
|
|
1336
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1337
|
+
})();
|
|
1338
|
+
return Object.freeze({
|
|
1339
|
+
/**
|
|
1340
|
+
* Create a frozen instance of {@link WalletProperties}, with defaults specified
|
|
1341
|
+
* in Rust, in the {@link bark} crate.
|
|
1342
|
+
*/
|
|
1343
|
+
create,
|
|
1344
|
+
/**
|
|
1345
|
+
* Create a frozen instance of {@link WalletProperties}, with defaults specified
|
|
1346
|
+
* in Rust, in the {@link bark} crate.
|
|
1347
|
+
*/
|
|
1348
|
+
new: create,
|
|
1349
|
+
/**
|
|
1350
|
+
* Defaults specified in the {@link bark} crate.
|
|
1351
|
+
*/
|
|
1352
|
+
defaults: () => Object.freeze(defaults())
|
|
1353
|
+
});
|
|
1354
|
+
})();
|
|
1355
|
+
const FfiConverterTypeWalletProperties = (() => {
|
|
1356
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1357
|
+
read(from) {
|
|
1358
|
+
return {
|
|
1359
|
+
network: FfiConverterTypeNetwork.read(from),
|
|
1360
|
+
fingerprint: FfiConverterString.read(from)
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
write(value, into) {
|
|
1364
|
+
FfiConverterTypeNetwork.write(value.network, into);
|
|
1365
|
+
FfiConverterString.write(value.fingerprint, into);
|
|
1366
|
+
}
|
|
1367
|
+
allocationSize(value) {
|
|
1368
|
+
return FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.fingerprint);
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
return new FFIConverter();
|
|
1372
|
+
})();
|
|
1373
|
+
const stringConverter = {
|
|
1374
|
+
stringToBytes: s => uniffiCaller.rustCall(status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
|
|
1375
|
+
bytesToString: ab => uniffiCaller.rustCall(status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
|
|
1376
|
+
stringByteLength: s => uniffiCaller.rustCall(status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, status))
|
|
1377
|
+
};
|
|
1378
|
+
const FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
|
|
1379
|
+
|
|
1380
|
+
// Error type: BarkError
|
|
1381
|
+
|
|
1382
|
+
// Enum: BarkError
|
|
1383
|
+
let BarkError_Tags = exports.BarkError_Tags = /*#__PURE__*/function (BarkError_Tags) {
|
|
1384
|
+
BarkError_Tags["Network"] = "Network";
|
|
1385
|
+
BarkError_Tags["Database"] = "Database";
|
|
1386
|
+
BarkError_Tags["InvalidMnemonic"] = "InvalidMnemonic";
|
|
1387
|
+
BarkError_Tags["InvalidAddress"] = "InvalidAddress";
|
|
1388
|
+
BarkError_Tags["InvalidInvoice"] = "InvalidInvoice";
|
|
1389
|
+
BarkError_Tags["InvalidPsbt"] = "InvalidPsbt";
|
|
1390
|
+
BarkError_Tags["InvalidTransaction"] = "InvalidTransaction";
|
|
1391
|
+
BarkError_Tags["InsufficientFunds"] = "InsufficientFunds";
|
|
1392
|
+
BarkError_Tags["NotFound"] = "NotFound";
|
|
1393
|
+
BarkError_Tags["ServerConnection"] = "ServerConnection";
|
|
1394
|
+
BarkError_Tags["Internal"] = "Internal";
|
|
1395
|
+
BarkError_Tags["OnchainWalletRequired"] = "OnchainWalletRequired";
|
|
1396
|
+
return BarkError_Tags;
|
|
1397
|
+
}({});
|
|
1398
|
+
/**
|
|
1399
|
+
* Error types that can occur when using the Bark wallet
|
|
1400
|
+
*/
|
|
1401
|
+
const BarkError = exports.BarkError = (() => {
|
|
1402
|
+
class Network_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1403
|
+
/**
|
|
1404
|
+
* @private
|
|
1405
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1406
|
+
*/
|
|
1407
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1408
|
+
tag = BarkError_Tags.Network;
|
|
1409
|
+
constructor(inner) {
|
|
1410
|
+
super("BarkError", "Network");
|
|
1411
|
+
this.inner = Object.freeze(inner);
|
|
1412
|
+
}
|
|
1413
|
+
static new(inner) {
|
|
1414
|
+
return new Network_(inner);
|
|
1415
|
+
}
|
|
1416
|
+
static instanceOf(obj) {
|
|
1417
|
+
return obj.tag === BarkError_Tags.Network;
|
|
1418
|
+
}
|
|
1419
|
+
static hasInner(obj) {
|
|
1420
|
+
return Network_.instanceOf(obj);
|
|
1421
|
+
}
|
|
1422
|
+
static getInner(obj) {
|
|
1423
|
+
return obj.inner;
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
class Database_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1427
|
+
/**
|
|
1428
|
+
* @private
|
|
1429
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1430
|
+
*/
|
|
1431
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1432
|
+
tag = BarkError_Tags.Database;
|
|
1433
|
+
constructor(inner) {
|
|
1434
|
+
super("BarkError", "Database");
|
|
1435
|
+
this.inner = Object.freeze(inner);
|
|
1436
|
+
}
|
|
1437
|
+
static new(inner) {
|
|
1438
|
+
return new Database_(inner);
|
|
1439
|
+
}
|
|
1440
|
+
static instanceOf(obj) {
|
|
1441
|
+
return obj.tag === BarkError_Tags.Database;
|
|
1442
|
+
}
|
|
1443
|
+
static hasInner(obj) {
|
|
1444
|
+
return Database_.instanceOf(obj);
|
|
1445
|
+
}
|
|
1446
|
+
static getInner(obj) {
|
|
1447
|
+
return obj.inner;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
class InvalidMnemonic_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1451
|
+
/**
|
|
1452
|
+
* @private
|
|
1453
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1454
|
+
*/
|
|
1455
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1456
|
+
tag = BarkError_Tags.InvalidMnemonic;
|
|
1457
|
+
constructor(inner) {
|
|
1458
|
+
super("BarkError", "InvalidMnemonic");
|
|
1459
|
+
this.inner = Object.freeze(inner);
|
|
1460
|
+
}
|
|
1461
|
+
static new(inner) {
|
|
1462
|
+
return new InvalidMnemonic_(inner);
|
|
1463
|
+
}
|
|
1464
|
+
static instanceOf(obj) {
|
|
1465
|
+
return obj.tag === BarkError_Tags.InvalidMnemonic;
|
|
1466
|
+
}
|
|
1467
|
+
static hasInner(obj) {
|
|
1468
|
+
return InvalidMnemonic_.instanceOf(obj);
|
|
1469
|
+
}
|
|
1470
|
+
static getInner(obj) {
|
|
1471
|
+
return obj.inner;
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
class InvalidAddress_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1475
|
+
/**
|
|
1476
|
+
* @private
|
|
1477
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1478
|
+
*/
|
|
1479
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1480
|
+
tag = BarkError_Tags.InvalidAddress;
|
|
1481
|
+
constructor(inner) {
|
|
1482
|
+
super("BarkError", "InvalidAddress");
|
|
1483
|
+
this.inner = Object.freeze(inner);
|
|
1484
|
+
}
|
|
1485
|
+
static new(inner) {
|
|
1486
|
+
return new InvalidAddress_(inner);
|
|
1487
|
+
}
|
|
1488
|
+
static instanceOf(obj) {
|
|
1489
|
+
return obj.tag === BarkError_Tags.InvalidAddress;
|
|
1490
|
+
}
|
|
1491
|
+
static hasInner(obj) {
|
|
1492
|
+
return InvalidAddress_.instanceOf(obj);
|
|
1493
|
+
}
|
|
1494
|
+
static getInner(obj) {
|
|
1495
|
+
return obj.inner;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
class InvalidInvoice_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1499
|
+
/**
|
|
1500
|
+
* @private
|
|
1501
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1502
|
+
*/
|
|
1503
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1504
|
+
tag = BarkError_Tags.InvalidInvoice;
|
|
1505
|
+
constructor(inner) {
|
|
1506
|
+
super("BarkError", "InvalidInvoice");
|
|
1507
|
+
this.inner = Object.freeze(inner);
|
|
1508
|
+
}
|
|
1509
|
+
static new(inner) {
|
|
1510
|
+
return new InvalidInvoice_(inner);
|
|
1511
|
+
}
|
|
1512
|
+
static instanceOf(obj) {
|
|
1513
|
+
return obj.tag === BarkError_Tags.InvalidInvoice;
|
|
1514
|
+
}
|
|
1515
|
+
static hasInner(obj) {
|
|
1516
|
+
return InvalidInvoice_.instanceOf(obj);
|
|
1517
|
+
}
|
|
1518
|
+
static getInner(obj) {
|
|
1519
|
+
return obj.inner;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
class InvalidPsbt_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1523
|
+
/**
|
|
1524
|
+
* @private
|
|
1525
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1526
|
+
*/
|
|
1527
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1528
|
+
tag = BarkError_Tags.InvalidPsbt;
|
|
1529
|
+
constructor(inner) {
|
|
1530
|
+
super("BarkError", "InvalidPsbt");
|
|
1531
|
+
this.inner = Object.freeze(inner);
|
|
1532
|
+
}
|
|
1533
|
+
static new(inner) {
|
|
1534
|
+
return new InvalidPsbt_(inner);
|
|
1535
|
+
}
|
|
1536
|
+
static instanceOf(obj) {
|
|
1537
|
+
return obj.tag === BarkError_Tags.InvalidPsbt;
|
|
1538
|
+
}
|
|
1539
|
+
static hasInner(obj) {
|
|
1540
|
+
return InvalidPsbt_.instanceOf(obj);
|
|
1541
|
+
}
|
|
1542
|
+
static getInner(obj) {
|
|
1543
|
+
return obj.inner;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
class InvalidTransaction_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1547
|
+
/**
|
|
1548
|
+
* @private
|
|
1549
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1550
|
+
*/
|
|
1551
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1552
|
+
tag = BarkError_Tags.InvalidTransaction;
|
|
1553
|
+
constructor(inner) {
|
|
1554
|
+
super("BarkError", "InvalidTransaction");
|
|
1555
|
+
this.inner = Object.freeze(inner);
|
|
1556
|
+
}
|
|
1557
|
+
static new(inner) {
|
|
1558
|
+
return new InvalidTransaction_(inner);
|
|
1559
|
+
}
|
|
1560
|
+
static instanceOf(obj) {
|
|
1561
|
+
return obj.tag === BarkError_Tags.InvalidTransaction;
|
|
1562
|
+
}
|
|
1563
|
+
static hasInner(obj) {
|
|
1564
|
+
return InvalidTransaction_.instanceOf(obj);
|
|
1565
|
+
}
|
|
1566
|
+
static getInner(obj) {
|
|
1567
|
+
return obj.inner;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
class InsufficientFunds_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1571
|
+
/**
|
|
1572
|
+
* @private
|
|
1573
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1574
|
+
*/
|
|
1575
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1576
|
+
tag = BarkError_Tags.InsufficientFunds;
|
|
1577
|
+
constructor(inner) {
|
|
1578
|
+
super("BarkError", "InsufficientFunds");
|
|
1579
|
+
this.inner = Object.freeze(inner);
|
|
1580
|
+
}
|
|
1581
|
+
static new(inner) {
|
|
1582
|
+
return new InsufficientFunds_(inner);
|
|
1583
|
+
}
|
|
1584
|
+
static instanceOf(obj) {
|
|
1585
|
+
return obj.tag === BarkError_Tags.InsufficientFunds;
|
|
1586
|
+
}
|
|
1587
|
+
static hasInner(obj) {
|
|
1588
|
+
return InsufficientFunds_.instanceOf(obj);
|
|
1589
|
+
}
|
|
1590
|
+
static getInner(obj) {
|
|
1591
|
+
return obj.inner;
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
class NotFound_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1595
|
+
/**
|
|
1596
|
+
* @private
|
|
1597
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1598
|
+
*/
|
|
1599
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1600
|
+
tag = BarkError_Tags.NotFound;
|
|
1601
|
+
constructor(inner) {
|
|
1602
|
+
super("BarkError", "NotFound");
|
|
1603
|
+
this.inner = Object.freeze(inner);
|
|
1604
|
+
}
|
|
1605
|
+
static new(inner) {
|
|
1606
|
+
return new NotFound_(inner);
|
|
1607
|
+
}
|
|
1608
|
+
static instanceOf(obj) {
|
|
1609
|
+
return obj.tag === BarkError_Tags.NotFound;
|
|
1610
|
+
}
|
|
1611
|
+
static hasInner(obj) {
|
|
1612
|
+
return NotFound_.instanceOf(obj);
|
|
1613
|
+
}
|
|
1614
|
+
static getInner(obj) {
|
|
1615
|
+
return obj.inner;
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
class ServerConnection_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1619
|
+
/**
|
|
1620
|
+
* @private
|
|
1621
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1622
|
+
*/
|
|
1623
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1624
|
+
tag = BarkError_Tags.ServerConnection;
|
|
1625
|
+
constructor(inner) {
|
|
1626
|
+
super("BarkError", "ServerConnection");
|
|
1627
|
+
this.inner = Object.freeze(inner);
|
|
1628
|
+
}
|
|
1629
|
+
static new(inner) {
|
|
1630
|
+
return new ServerConnection_(inner);
|
|
1631
|
+
}
|
|
1632
|
+
static instanceOf(obj) {
|
|
1633
|
+
return obj.tag === BarkError_Tags.ServerConnection;
|
|
1634
|
+
}
|
|
1635
|
+
static hasInner(obj) {
|
|
1636
|
+
return ServerConnection_.instanceOf(obj);
|
|
1637
|
+
}
|
|
1638
|
+
static getInner(obj) {
|
|
1639
|
+
return obj.inner;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
class Internal_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1643
|
+
/**
|
|
1644
|
+
* @private
|
|
1645
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1646
|
+
*/
|
|
1647
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1648
|
+
tag = BarkError_Tags.Internal;
|
|
1649
|
+
constructor(inner) {
|
|
1650
|
+
super("BarkError", "Internal");
|
|
1651
|
+
this.inner = Object.freeze(inner);
|
|
1652
|
+
}
|
|
1653
|
+
static new(inner) {
|
|
1654
|
+
return new Internal_(inner);
|
|
1655
|
+
}
|
|
1656
|
+
static instanceOf(obj) {
|
|
1657
|
+
return obj.tag === BarkError_Tags.Internal;
|
|
1658
|
+
}
|
|
1659
|
+
static hasInner(obj) {
|
|
1660
|
+
return Internal_.instanceOf(obj);
|
|
1661
|
+
}
|
|
1662
|
+
static getInner(obj) {
|
|
1663
|
+
return obj.inner;
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
class OnchainWalletRequired_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1667
|
+
/**
|
|
1668
|
+
* @private
|
|
1669
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1670
|
+
*/
|
|
1671
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BarkError";
|
|
1672
|
+
tag = BarkError_Tags.OnchainWalletRequired;
|
|
1673
|
+
constructor(inner) {
|
|
1674
|
+
super("BarkError", "OnchainWalletRequired");
|
|
1675
|
+
this.inner = Object.freeze(inner);
|
|
1676
|
+
}
|
|
1677
|
+
static new(inner) {
|
|
1678
|
+
return new OnchainWalletRequired_(inner);
|
|
1679
|
+
}
|
|
1680
|
+
static instanceOf(obj) {
|
|
1681
|
+
return obj.tag === BarkError_Tags.OnchainWalletRequired;
|
|
1682
|
+
}
|
|
1683
|
+
static hasInner(obj) {
|
|
1684
|
+
return OnchainWalletRequired_.instanceOf(obj);
|
|
1685
|
+
}
|
|
1686
|
+
static getInner(obj) {
|
|
1687
|
+
return obj.inner;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
function instanceOf(obj) {
|
|
1691
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "BarkError";
|
|
1692
|
+
}
|
|
1693
|
+
return Object.freeze({
|
|
1694
|
+
instanceOf,
|
|
1695
|
+
Network: Network_,
|
|
1696
|
+
Database: Database_,
|
|
1697
|
+
InvalidMnemonic: InvalidMnemonic_,
|
|
1698
|
+
InvalidAddress: InvalidAddress_,
|
|
1699
|
+
InvalidInvoice: InvalidInvoice_,
|
|
1700
|
+
InvalidPsbt: InvalidPsbt_,
|
|
1701
|
+
InvalidTransaction: InvalidTransaction_,
|
|
1702
|
+
InsufficientFunds: InsufficientFunds_,
|
|
1703
|
+
NotFound: NotFound_,
|
|
1704
|
+
ServerConnection: ServerConnection_,
|
|
1705
|
+
Internal: Internal_,
|
|
1706
|
+
OnchainWalletRequired: OnchainWalletRequired_
|
|
1707
|
+
});
|
|
1708
|
+
})();
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Error types that can occur when using the Bark wallet
|
|
1712
|
+
*/
|
|
1713
|
+
|
|
1714
|
+
// FfiConverter for enum BarkError
|
|
1715
|
+
const FfiConverterTypeBarkError = (() => {
|
|
1716
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1717
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1718
|
+
read(from) {
|
|
1719
|
+
switch (ordinalConverter.read(from)) {
|
|
1720
|
+
case 1:
|
|
1721
|
+
return new BarkError.Network({
|
|
1722
|
+
errorMessage: FfiConverterString.read(from)
|
|
1723
|
+
});
|
|
1724
|
+
case 2:
|
|
1725
|
+
return new BarkError.Database({
|
|
1726
|
+
errorMessage: FfiConverterString.read(from)
|
|
1727
|
+
});
|
|
1728
|
+
case 3:
|
|
1729
|
+
return new BarkError.InvalidMnemonic({
|
|
1730
|
+
errorMessage: FfiConverterString.read(from)
|
|
1731
|
+
});
|
|
1732
|
+
case 4:
|
|
1733
|
+
return new BarkError.InvalidAddress({
|
|
1734
|
+
errorMessage: FfiConverterString.read(from)
|
|
1735
|
+
});
|
|
1736
|
+
case 5:
|
|
1737
|
+
return new BarkError.InvalidInvoice({
|
|
1738
|
+
errorMessage: FfiConverterString.read(from)
|
|
1739
|
+
});
|
|
1740
|
+
case 6:
|
|
1741
|
+
return new BarkError.InvalidPsbt({
|
|
1742
|
+
errorMessage: FfiConverterString.read(from)
|
|
1743
|
+
});
|
|
1744
|
+
case 7:
|
|
1745
|
+
return new BarkError.InvalidTransaction({
|
|
1746
|
+
errorMessage: FfiConverterString.read(from)
|
|
1747
|
+
});
|
|
1748
|
+
case 8:
|
|
1749
|
+
return new BarkError.InsufficientFunds({
|
|
1750
|
+
errorMessage: FfiConverterString.read(from)
|
|
1751
|
+
});
|
|
1752
|
+
case 9:
|
|
1753
|
+
return new BarkError.NotFound({
|
|
1754
|
+
errorMessage: FfiConverterString.read(from)
|
|
1755
|
+
});
|
|
1756
|
+
case 10:
|
|
1757
|
+
return new BarkError.ServerConnection({
|
|
1758
|
+
errorMessage: FfiConverterString.read(from)
|
|
1759
|
+
});
|
|
1760
|
+
case 11:
|
|
1761
|
+
return new BarkError.Internal({
|
|
1762
|
+
errorMessage: FfiConverterString.read(from)
|
|
1763
|
+
});
|
|
1764
|
+
case 12:
|
|
1765
|
+
return new BarkError.OnchainWalletRequired({
|
|
1766
|
+
errorMessage: FfiConverterString.read(from)
|
|
1767
|
+
});
|
|
1768
|
+
default:
|
|
1769
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
write(value, into) {
|
|
1773
|
+
switch (value.tag) {
|
|
1774
|
+
case BarkError_Tags.Network:
|
|
1775
|
+
{
|
|
1776
|
+
ordinalConverter.write(1, into);
|
|
1777
|
+
const inner = value.inner;
|
|
1778
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1779
|
+
return;
|
|
1780
|
+
}
|
|
1781
|
+
case BarkError_Tags.Database:
|
|
1782
|
+
{
|
|
1783
|
+
ordinalConverter.write(2, into);
|
|
1784
|
+
const inner = value.inner;
|
|
1785
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
case BarkError_Tags.InvalidMnemonic:
|
|
1789
|
+
{
|
|
1790
|
+
ordinalConverter.write(3, into);
|
|
1791
|
+
const inner = value.inner;
|
|
1792
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
case BarkError_Tags.InvalidAddress:
|
|
1796
|
+
{
|
|
1797
|
+
ordinalConverter.write(4, into);
|
|
1798
|
+
const inner = value.inner;
|
|
1799
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1802
|
+
case BarkError_Tags.InvalidInvoice:
|
|
1803
|
+
{
|
|
1804
|
+
ordinalConverter.write(5, into);
|
|
1805
|
+
const inner = value.inner;
|
|
1806
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1807
|
+
return;
|
|
1808
|
+
}
|
|
1809
|
+
case BarkError_Tags.InvalidPsbt:
|
|
1810
|
+
{
|
|
1811
|
+
ordinalConverter.write(6, into);
|
|
1812
|
+
const inner = value.inner;
|
|
1813
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
case BarkError_Tags.InvalidTransaction:
|
|
1817
|
+
{
|
|
1818
|
+
ordinalConverter.write(7, into);
|
|
1819
|
+
const inner = value.inner;
|
|
1820
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1821
|
+
return;
|
|
1822
|
+
}
|
|
1823
|
+
case BarkError_Tags.InsufficientFunds:
|
|
1824
|
+
{
|
|
1825
|
+
ordinalConverter.write(8, into);
|
|
1826
|
+
const inner = value.inner;
|
|
1827
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1828
|
+
return;
|
|
1829
|
+
}
|
|
1830
|
+
case BarkError_Tags.NotFound:
|
|
1831
|
+
{
|
|
1832
|
+
ordinalConverter.write(9, into);
|
|
1833
|
+
const inner = value.inner;
|
|
1834
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1835
|
+
return;
|
|
1836
|
+
}
|
|
1837
|
+
case BarkError_Tags.ServerConnection:
|
|
1838
|
+
{
|
|
1839
|
+
ordinalConverter.write(10, into);
|
|
1840
|
+
const inner = value.inner;
|
|
1841
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
case BarkError_Tags.Internal:
|
|
1845
|
+
{
|
|
1846
|
+
ordinalConverter.write(11, into);
|
|
1847
|
+
const inner = value.inner;
|
|
1848
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1849
|
+
return;
|
|
1850
|
+
}
|
|
1851
|
+
case BarkError_Tags.OnchainWalletRequired:
|
|
1852
|
+
{
|
|
1853
|
+
ordinalConverter.write(12, into);
|
|
1854
|
+
const inner = value.inner;
|
|
1855
|
+
FfiConverterString.write(inner.errorMessage, into);
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
default:
|
|
1859
|
+
// Throwing from here means that BarkError_Tags hasn't matched an ordinal.
|
|
1860
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
allocationSize(value) {
|
|
1864
|
+
switch (value.tag) {
|
|
1865
|
+
case BarkError_Tags.Network:
|
|
1866
|
+
{
|
|
1867
|
+
const inner = value.inner;
|
|
1868
|
+
let size = ordinalConverter.allocationSize(1);
|
|
1869
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1870
|
+
return size;
|
|
1871
|
+
}
|
|
1872
|
+
case BarkError_Tags.Database:
|
|
1873
|
+
{
|
|
1874
|
+
const inner = value.inner;
|
|
1875
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1876
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1877
|
+
return size;
|
|
1878
|
+
}
|
|
1879
|
+
case BarkError_Tags.InvalidMnemonic:
|
|
1880
|
+
{
|
|
1881
|
+
const inner = value.inner;
|
|
1882
|
+
let size = ordinalConverter.allocationSize(3);
|
|
1883
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1884
|
+
return size;
|
|
1885
|
+
}
|
|
1886
|
+
case BarkError_Tags.InvalidAddress:
|
|
1887
|
+
{
|
|
1888
|
+
const inner = value.inner;
|
|
1889
|
+
let size = ordinalConverter.allocationSize(4);
|
|
1890
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1891
|
+
return size;
|
|
1892
|
+
}
|
|
1893
|
+
case BarkError_Tags.InvalidInvoice:
|
|
1894
|
+
{
|
|
1895
|
+
const inner = value.inner;
|
|
1896
|
+
let size = ordinalConverter.allocationSize(5);
|
|
1897
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1898
|
+
return size;
|
|
1899
|
+
}
|
|
1900
|
+
case BarkError_Tags.InvalidPsbt:
|
|
1901
|
+
{
|
|
1902
|
+
const inner = value.inner;
|
|
1903
|
+
let size = ordinalConverter.allocationSize(6);
|
|
1904
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1905
|
+
return size;
|
|
1906
|
+
}
|
|
1907
|
+
case BarkError_Tags.InvalidTransaction:
|
|
1908
|
+
{
|
|
1909
|
+
const inner = value.inner;
|
|
1910
|
+
let size = ordinalConverter.allocationSize(7);
|
|
1911
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1912
|
+
return size;
|
|
1913
|
+
}
|
|
1914
|
+
case BarkError_Tags.InsufficientFunds:
|
|
1915
|
+
{
|
|
1916
|
+
const inner = value.inner;
|
|
1917
|
+
let size = ordinalConverter.allocationSize(8);
|
|
1918
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1919
|
+
return size;
|
|
1920
|
+
}
|
|
1921
|
+
case BarkError_Tags.NotFound:
|
|
1922
|
+
{
|
|
1923
|
+
const inner = value.inner;
|
|
1924
|
+
let size = ordinalConverter.allocationSize(9);
|
|
1925
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1926
|
+
return size;
|
|
1927
|
+
}
|
|
1928
|
+
case BarkError_Tags.ServerConnection:
|
|
1929
|
+
{
|
|
1930
|
+
const inner = value.inner;
|
|
1931
|
+
let size = ordinalConverter.allocationSize(10);
|
|
1932
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1933
|
+
return size;
|
|
1934
|
+
}
|
|
1935
|
+
case BarkError_Tags.Internal:
|
|
1936
|
+
{
|
|
1937
|
+
const inner = value.inner;
|
|
1938
|
+
let size = ordinalConverter.allocationSize(11);
|
|
1939
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1940
|
+
return size;
|
|
1941
|
+
}
|
|
1942
|
+
case BarkError_Tags.OnchainWalletRequired:
|
|
1943
|
+
{
|
|
1944
|
+
const inner = value.inner;
|
|
1945
|
+
let size = ordinalConverter.allocationSize(12);
|
|
1946
|
+
size += FfiConverterString.allocationSize(inner.errorMessage);
|
|
1947
|
+
return size;
|
|
1948
|
+
}
|
|
1949
|
+
default:
|
|
1950
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
return new FFIConverter();
|
|
1955
|
+
})();
|
|
1956
|
+
|
|
1957
|
+
/**
|
|
1958
|
+
* Bitcoin network types
|
|
1959
|
+
*/
|
|
1960
|
+
let Network = exports.Network = /*#__PURE__*/function (Network) {
|
|
1961
|
+
Network[Network["Bitcoin"] = 0] = "Bitcoin";
|
|
1962
|
+
Network[Network["Testnet"] = 1] = "Testnet";
|
|
1963
|
+
Network[Network["Signet"] = 2] = "Signet";
|
|
1964
|
+
Network[Network["Regtest"] = 3] = "Regtest";
|
|
1965
|
+
return Network;
|
|
1966
|
+
}({});
|
|
1967
|
+
const FfiConverterTypeNetwork = (() => {
|
|
1968
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1969
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1970
|
+
read(from) {
|
|
1971
|
+
switch (ordinalConverter.read(from)) {
|
|
1972
|
+
case 1:
|
|
1973
|
+
return Network.Bitcoin;
|
|
1974
|
+
case 2:
|
|
1975
|
+
return Network.Testnet;
|
|
1976
|
+
case 3:
|
|
1977
|
+
return Network.Signet;
|
|
1978
|
+
case 4:
|
|
1979
|
+
return Network.Regtest;
|
|
1980
|
+
default:
|
|
1981
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
write(value, into) {
|
|
1985
|
+
switch (value) {
|
|
1986
|
+
case Network.Bitcoin:
|
|
1987
|
+
return ordinalConverter.write(1, into);
|
|
1988
|
+
case Network.Testnet:
|
|
1989
|
+
return ordinalConverter.write(2, into);
|
|
1990
|
+
case Network.Signet:
|
|
1991
|
+
return ordinalConverter.write(3, into);
|
|
1992
|
+
case Network.Regtest:
|
|
1993
|
+
return ordinalConverter.write(4, into);
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
allocationSize(value) {
|
|
1997
|
+
return ordinalConverter.allocationSize(0);
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
return new FFIConverter();
|
|
2001
|
+
})();
|
|
2002
|
+
|
|
2003
|
+
/**
|
|
2004
|
+
* Onchain Bitcoin wallet for boarding and exits
|
|
2005
|
+
*
|
|
2006
|
+
* Supports two implementations:
|
|
2007
|
+
* - Default: BDK-based wallet (built-in)
|
|
2008
|
+
* - Custom: Your own wallet implementation via callbacks
|
|
2009
|
+
*/
|
|
2010
|
+
|
|
2011
|
+
/**
|
|
2012
|
+
* Onchain Bitcoin wallet for boarding and exits
|
|
2013
|
+
*
|
|
2014
|
+
* Supports two implementations:
|
|
2015
|
+
* - Default: BDK-based wallet (built-in)
|
|
2016
|
+
* - Custom: Your own wallet implementation via callbacks
|
|
2017
|
+
*/
|
|
2018
|
+
class OnchainWallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
2019
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "OnchainWallet";
|
|
2020
|
+
// No primary constructor declared for this class.
|
|
2021
|
+
constructor(pointer) {
|
|
2022
|
+
super();
|
|
2023
|
+
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2024
|
+
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeOnchainWalletObjectFactory.bless(pointer);
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Create an onchain wallet using a custom implementation
|
|
2029
|
+
*
|
|
2030
|
+
* Use this when you have an existing wallet implementation in your language
|
|
2031
|
+
* (Dart/Swift/Kotlin) and want to integrate it with Bark for boarding and exits.
|
|
2032
|
+
* Your implementation must handle all wallet operations via the callbacks interface.
|
|
2033
|
+
*/
|
|
2034
|
+
static custom(callbacks) /*throws*/{
|
|
2035
|
+
return FfiConverterTypeOnchainWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2036
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_onchainwallet_custom(FfiConverterTypeCustomOnchainWalletCallbacks.lower(callbacks), callStatus);
|
|
2037
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Create or load an onchain wallet using a default BDK implementation shipped with Bark
|
|
2042
|
+
*
|
|
2043
|
+
* The wallet uses BDK for onchain operations
|
|
2044
|
+
* and the same chain source configuration as the Bark wallet (esplora_address or bitcoind_*).
|
|
2045
|
+
*/
|
|
2046
|
+
static default_(mnemonic, config, datadir) /*throws*/{
|
|
2047
|
+
return FfiConverterTypeOnchainWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2048
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_onchainwallet_default(FfiConverterString.lower(mnemonic), FfiConverterTypeConfig.lower(config), FfiConverterString.lower(datadir), callStatus);
|
|
2049
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* Get the onchain wallet balance
|
|
2054
|
+
*/
|
|
2055
|
+
balance() /*throws*/{
|
|
2056
|
+
return FfiConverterTypeOnchainBalance.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2057
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_balance(uniffiTypeOnchainWalletObjectFactory.clonePointer(this), callStatus);
|
|
2058
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Generate a new Bitcoin address
|
|
2063
|
+
*/
|
|
2064
|
+
newAddress() /*throws*/{
|
|
2065
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2066
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_new_address(uniffiTypeOnchainWalletObjectFactory.clonePointer(this), callStatus);
|
|
2067
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* Send Bitcoin to an address
|
|
2072
|
+
* Returns the transaction ID
|
|
2073
|
+
*/
|
|
2074
|
+
send(address, amountSats, feeRateSatPerVb) /*throws*/{
|
|
2075
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2076
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_send(uniffiTypeOnchainWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), _uniffiBindgenReactNative.FfiConverterUInt64.lower(feeRateSatPerVb), callStatus);
|
|
2077
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
/**
|
|
2081
|
+
* Sync the onchain wallet with the blockchain
|
|
2082
|
+
* Returns the amount synced in satoshis
|
|
2083
|
+
*/
|
|
2084
|
+
sync() /*throws*/{
|
|
2085
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2086
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_sync(uniffiTypeOnchainWalletObjectFactory.clonePointer(this), callStatus);
|
|
2087
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2092
|
+
*/
|
|
2093
|
+
uniffiDestroy() {
|
|
2094
|
+
const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
2095
|
+
if (ptr !== undefined) {
|
|
2096
|
+
const pointer = uniffiTypeOnchainWalletObjectFactory.pointer(this);
|
|
2097
|
+
uniffiTypeOnchainWalletObjectFactory.freePointer(pointer);
|
|
2098
|
+
uniffiTypeOnchainWalletObjectFactory.unbless(ptr);
|
|
2099
|
+
delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
static instanceOf(obj) {
|
|
2103
|
+
return uniffiTypeOnchainWalletObjectFactory.isConcreteType(obj);
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
exports.OnchainWallet = OnchainWallet;
|
|
2107
|
+
const uniffiTypeOnchainWalletObjectFactory = (() => {
|
|
2108
|
+
return {
|
|
2109
|
+
create(pointer) {
|
|
2110
|
+
const instance = Object.create(OnchainWallet.prototype);
|
|
2111
|
+
instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2112
|
+
instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
|
|
2113
|
+
instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "OnchainWallet";
|
|
2114
|
+
return instance;
|
|
2115
|
+
},
|
|
2116
|
+
bless(p) {
|
|
2117
|
+
return uniffiCaller.rustCall(/*caller:*/status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_method_onchainwallet_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
|
|
2118
|
+
},
|
|
2119
|
+
unbless(ptr) {
|
|
2120
|
+
ptr.markDestroyed();
|
|
2121
|
+
},
|
|
2122
|
+
pointer(obj) {
|
|
2123
|
+
if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
|
|
2124
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
|
|
2125
|
+
}
|
|
2126
|
+
return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
|
|
2127
|
+
},
|
|
2128
|
+
clonePointer(obj) {
|
|
2129
|
+
const pointer = this.pointer(obj);
|
|
2130
|
+
return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_clone_onchainwallet(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
2131
|
+
},
|
|
2132
|
+
freePointer(pointer) {
|
|
2133
|
+
uniffiCaller.rustCall(/*caller:*/callStatus => (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_free_onchainwallet(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
2134
|
+
},
|
|
2135
|
+
isConcreteType(obj) {
|
|
2136
|
+
return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "OnchainWallet";
|
|
2137
|
+
}
|
|
2138
|
+
};
|
|
2139
|
+
})();
|
|
2140
|
+
// FfiConverter for OnchainWalletInterface
|
|
2141
|
+
const FfiConverterTypeOnchainWallet = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeOnchainWalletObjectFactory);
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* The main Bark wallet interface for Ark operations
|
|
2145
|
+
*/
|
|
2146
|
+
|
|
2147
|
+
/**
|
|
2148
|
+
* The main Bark wallet interface for Ark operations
|
|
2149
|
+
*/
|
|
2150
|
+
class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
2151
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Wallet";
|
|
2152
|
+
// No primary constructor declared for this class.
|
|
2153
|
+
constructor(pointer) {
|
|
2154
|
+
super();
|
|
2155
|
+
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2156
|
+
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeWalletObjectFactory.bless(pointer);
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* Create a new Bark wallet
|
|
2161
|
+
*/
|
|
2162
|
+
static create(mnemonic, config, datadir, forceRescan) /*throws*/{
|
|
2163
|
+
return FfiConverterTypeWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2164
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_wallet_create(FfiConverterString.lower(mnemonic), FfiConverterTypeConfig.lower(config), FfiConverterString.lower(datadir), _uniffiBindgenReactNative.FfiConverterBool.lower(forceRescan), callStatus);
|
|
2165
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* Create a new Bark wallet WITH onchain capabilities
|
|
2170
|
+
*/
|
|
2171
|
+
static createWithOnchain(mnemonic, config, datadir, onchainWallet, forceRescan) /*throws*/{
|
|
2172
|
+
return FfiConverterTypeWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2173
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_wallet_create_with_onchain(FfiConverterString.lower(mnemonic), FfiConverterTypeConfig.lower(config), FfiConverterString.lower(datadir), FfiConverterTypeOnchainWallet.lower(onchainWallet), _uniffiBindgenReactNative.FfiConverterBool.lower(forceRescan), callStatus);
|
|
2174
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* Open an existing Bark wallet
|
|
2179
|
+
*/
|
|
2180
|
+
static open(mnemonic, config, datadir) /*throws*/{
|
|
2181
|
+
return FfiConverterTypeWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2182
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_wallet_open(FfiConverterString.lower(mnemonic), FfiConverterTypeConfig.lower(config), FfiConverterString.lower(datadir), callStatus);
|
|
2183
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* Open an existing Bark wallet WITH onchain capabilities
|
|
2188
|
+
*/
|
|
2189
|
+
static openWithOnchain(mnemonic, config, datadir, onchainWallet) /*throws*/{
|
|
2190
|
+
return FfiConverterTypeWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2191
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_wallet_open_with_onchain(FfiConverterString.lower(mnemonic), FfiConverterTypeConfig.lower(config), FfiConverterString.lower(datadir), FfiConverterTypeOnchainWallet.lower(onchainWallet), callStatus);
|
|
2192
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Get earliest block height when all exits will be claimable
|
|
2197
|
+
*
|
|
2198
|
+
* Returns null if no exits or any exit has undetermined claimability.
|
|
2199
|
+
*/
|
|
2200
|
+
allExitsClaimableAtHeight() /*throws*/{
|
|
2201
|
+
return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2202
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_all_exits_claimable_at_height(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2203
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
/**
|
|
2207
|
+
* Get all VTXOs (including spent)
|
|
2208
|
+
*/
|
|
2209
|
+
allVtxos() /*throws*/{
|
|
2210
|
+
return FfiConverterArrayTypeVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2211
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_all_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2212
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* Get Ark server info (null if not connected)
|
|
2217
|
+
*/
|
|
2218
|
+
arkInfo() {
|
|
2219
|
+
return FfiConverterOptionalTypeArkInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2220
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_ark_info(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2221
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2222
|
+
}
|
|
2223
|
+
balance() /*throws*/{
|
|
2224
|
+
return FfiConverterTypeBalance.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2225
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_balance(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2226
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* Board all funds from onchain wallet into Ark
|
|
2231
|
+
*/
|
|
2232
|
+
boardAll(onchainWallet) /*throws*/{
|
|
2233
|
+
return FfiConverterTypePendingBoard.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2234
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_board_all(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), callStatus);
|
|
2235
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
/**
|
|
2239
|
+
* Board a specific amount from onchain wallet into Ark
|
|
2240
|
+
*/
|
|
2241
|
+
boardAmount(onchainWallet, amountSats) /*throws*/{
|
|
2242
|
+
return FfiConverterTypePendingBoard.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2243
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_board_amount(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
|
|
2244
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2245
|
+
}
|
|
2246
|
+
bolt11Invoice(amountSats) /*throws*/{
|
|
2247
|
+
return FfiConverterTypeLightningInvoice.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2248
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_bolt11_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
|
|
2249
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Broadcast a signed transaction to the Bitcoin network
|
|
2254
|
+
*
|
|
2255
|
+
* Takes a hex-encoded transaction and broadcasts it via the wallet's chain source.
|
|
2256
|
+
* This is useful after extracting a transaction from a PSBT using extract_tx_from_psbt.
|
|
2257
|
+
*
|
|
2258
|
+
* # Arguments
|
|
2259
|
+
*
|
|
2260
|
+
* * `tx_hex` - Hex-encoded signed transaction
|
|
2261
|
+
*
|
|
2262
|
+
* Returns the transaction ID (txid) of the broadcasted transaction
|
|
2263
|
+
*/
|
|
2264
|
+
broadcastTx(txHex) /*throws*/{
|
|
2265
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2266
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_broadcast_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
|
|
2267
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* Cancel all pending rounds
|
|
2272
|
+
*/
|
|
2273
|
+
cancelAllPendingRounds() /*throws*/{
|
|
2274
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2275
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_all_pending_rounds(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2276
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Cancel a specific pending round
|
|
2281
|
+
*/
|
|
2282
|
+
cancelPendingRound(roundId) /*throws*/{
|
|
2283
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2284
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_pending_round(uniffiTypeWalletObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(roundId), callStatus);
|
|
2285
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Check lightning payment status by payment hash
|
|
2290
|
+
*
|
|
2291
|
+
* # Arguments
|
|
2292
|
+
*
|
|
2293
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2294
|
+
* * `wait` - Whether to wait for the payment to complete
|
|
2295
|
+
*
|
|
2296
|
+
* Returns the preimage if payment is successful, null if still pending
|
|
2297
|
+
*/
|
|
2298
|
+
checkLightningPayment(paymentHash, wait) /*throws*/{
|
|
2299
|
+
return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2300
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_check_lightning_payment(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash), _uniffiBindgenReactNative.FfiConverterBool.lower(wait), callStatus);
|
|
2301
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* Get claimable lightning receive balance
|
|
2306
|
+
*/
|
|
2307
|
+
claimableLightningReceiveBalanceSats() /*throws*/{
|
|
2308
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2309
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_claimable_lightning_receive_balance_sats(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2310
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* Get wallet config
|
|
2315
|
+
*/
|
|
2316
|
+
config() {
|
|
2317
|
+
return FfiConverterTypeConfig.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2318
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_config(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2319
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* Drain claimable exits to an address
|
|
2324
|
+
*
|
|
2325
|
+
* Builds a signed PSBT that claims exited funds and sends them to the address.
|
|
2326
|
+
* The PSBT can be broadcast directly or modified before broadcasting.
|
|
2327
|
+
*
|
|
2328
|
+
* # Arguments
|
|
2329
|
+
*
|
|
2330
|
+
* * `vtxo_ids` - List of claimable VTXO IDs to drain (empty = drain all)
|
|
2331
|
+
* * `address` - Bitcoin address to send claimed funds to
|
|
2332
|
+
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2333
|
+
*/
|
|
2334
|
+
drainExits(vtxoIds, address, feeRateSatPerVb) /*throws*/{
|
|
2335
|
+
return FfiConverterTypeExitClaimTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2336
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_drain_exits(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterString.lower(address), FfiConverterOptionalUInt64.lower(feeRateSatPerVb), callStatus);
|
|
2337
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* Get detailed exit status for a specific VTXO
|
|
2342
|
+
*
|
|
2343
|
+
* Returns detailed status including current state, history, and transactions.
|
|
2344
|
+
*
|
|
2345
|
+
* # Arguments
|
|
2346
|
+
*
|
|
2347
|
+
* * `vtxo_id` - The VTXO ID to check
|
|
2348
|
+
* * `include_history` - Whether to include full state machine history
|
|
2349
|
+
* * `include_transactions` - Whether to include transaction details
|
|
2350
|
+
*/
|
|
2351
|
+
getExitStatus(vtxoId, includeHistory, includeTransactions) /*throws*/{
|
|
2352
|
+
return FfiConverterOptionalTypeExitTransactionStatus.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2353
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_exit_status(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(vtxoId), _uniffiBindgenReactNative.FfiConverterBool.lower(includeHistory), _uniffiBindgenReactNative.FfiConverterBool.lower(includeTransactions), callStatus);
|
|
2354
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Get all VTXOs currently in exit process
|
|
2359
|
+
*/
|
|
2360
|
+
getExitVtxos() /*throws*/{
|
|
2361
|
+
return FfiConverterArrayTypeExitVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2362
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_exit_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2363
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
/**
|
|
2367
|
+
* Get VTXOs expiring within threshold blocks
|
|
2368
|
+
*/
|
|
2369
|
+
getExpiringVtxos(thresholdBlocks) /*throws*/{
|
|
2370
|
+
return FfiConverterArrayTypeVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2371
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_expiring_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(thresholdBlocks), callStatus);
|
|
2372
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
/**
|
|
2376
|
+
* Get the block height of the first expiring VTXO
|
|
2377
|
+
*
|
|
2378
|
+
* Returns null if there are no spendable VTXOs.
|
|
2379
|
+
*/
|
|
2380
|
+
getFirstExpiringVtxoBlockheight() /*throws*/{
|
|
2381
|
+
return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2382
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_first_expiring_vtxo_blockheight(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2383
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* Get the next block height when a refresh should be performed
|
|
2388
|
+
*
|
|
2389
|
+
* This is calculated as the first expiring VTXO height minus the refresh threshold.
|
|
2390
|
+
* Returns null if there are no VTXOs to refresh.
|
|
2391
|
+
*/
|
|
2392
|
+
getNextRequiredRefreshBlockheight() /*throws*/{
|
|
2393
|
+
return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2394
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_next_required_refresh_blockheight(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2395
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
/**
|
|
2399
|
+
* Get a specific VTXO by ID
|
|
2400
|
+
*/
|
|
2401
|
+
getVtxoById(vtxoId) /*throws*/{
|
|
2402
|
+
return FfiConverterTypeVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2403
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_vtxo_by_id(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(vtxoId), callStatus);
|
|
2404
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
/**
|
|
2408
|
+
* Get VTXOs that should be refreshed
|
|
2409
|
+
*/
|
|
2410
|
+
getVtxosToRefresh() /*throws*/{
|
|
2411
|
+
return FfiConverterArrayTypeVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2412
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_vtxos_to_refresh(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2413
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
/**
|
|
2417
|
+
* Check if any exits are pending
|
|
2418
|
+
*/
|
|
2419
|
+
hasPendingExits() /*throws*/{
|
|
2420
|
+
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2421
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_has_pending_exits(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2422
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
/**
|
|
2426
|
+
* Get all wallet movements (transaction history)
|
|
2427
|
+
*/
|
|
2428
|
+
history() /*throws*/{
|
|
2429
|
+
return FfiConverterArrayTypeMovement.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2430
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_history(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2431
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* Get lightning receive status by payment hash
|
|
2436
|
+
*
|
|
2437
|
+
* # Arguments
|
|
2438
|
+
*
|
|
2439
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2440
|
+
*/
|
|
2441
|
+
lightningReceiveStatus(paymentHash) /*throws*/{
|
|
2442
|
+
return FfiConverterOptionalTypeLightningReceive.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2443
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_receive_status(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash), callStatus);
|
|
2444
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
/**
|
|
2448
|
+
* List all exits that are claimable
|
|
2449
|
+
*
|
|
2450
|
+
* Returns exits ready to be drained to onchain wallet.
|
|
2451
|
+
*/
|
|
2452
|
+
listClaimableExits() /*throws*/{
|
|
2453
|
+
return FfiConverterArrayTypeExitVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2454
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_list_claimable_exits(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2455
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2456
|
+
}
|
|
2457
|
+
maintenance() /*throws*/{
|
|
2458
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2459
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2460
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* Perform maintenance refresh
|
|
2465
|
+
*/
|
|
2466
|
+
maintenanceRefresh() /*throws*/{
|
|
2467
|
+
return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2468
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_refresh(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2469
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
/**
|
|
2473
|
+
* Full maintenance including onchain wallet sync
|
|
2474
|
+
*
|
|
2475
|
+
* More thorough than maintenance() - also syncs onchain wallet and exits.
|
|
2476
|
+
*/
|
|
2477
|
+
maintenanceWithOnchain(onchainWallet) /*throws*/{
|
|
2478
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2479
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_with_onchain(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), callStatus);
|
|
2480
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
/**
|
|
2484
|
+
* Schedule a maintenance refresh if VTXOs need refreshing
|
|
2485
|
+
*
|
|
2486
|
+
* Returns the round ID if a refresh was scheduled, null otherwise.
|
|
2487
|
+
*/
|
|
2488
|
+
maybeScheduleMaintenanceRefresh() /*throws*/{
|
|
2489
|
+
return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2490
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maybe_schedule_maintenance_refresh(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2491
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2492
|
+
}
|
|
2493
|
+
newAddress() /*throws*/{
|
|
2494
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2495
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_new_address(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2496
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
/**
|
|
2500
|
+
* Generate a new address and return it with its index
|
|
2501
|
+
*/
|
|
2502
|
+
newAddressWithIndex() /*throws*/{
|
|
2503
|
+
return FfiConverterTypeAddressWithIndex.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2504
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_new_address_with_index(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2505
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2506
|
+
}
|
|
2507
|
+
offboardAll(bitcoinAddress) /*throws*/{
|
|
2508
|
+
return FfiConverterTypeOffboardResult.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2509
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_offboard_all(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(bitcoinAddress), callStatus);
|
|
2510
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
/**
|
|
2514
|
+
* Offboard specific VTXOs to a Bitcoin address
|
|
2515
|
+
*/
|
|
2516
|
+
offboardVtxos(vtxoIds, bitcoinAddress) /*throws*/{
|
|
2517
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2518
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_offboard_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterString.lower(bitcoinAddress), callStatus);
|
|
2519
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2520
|
+
}
|
|
2521
|
+
payLightningAddress(lightningAddress, amountSats, comment) /*throws*/{
|
|
2522
|
+
return FfiConverterTypeLightningSend.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2523
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(lightningAddress), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(comment), callStatus);
|
|
2524
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2525
|
+
}
|
|
2526
|
+
payLightningInvoice(invoice, amountSats) /*throws*/{
|
|
2527
|
+
return FfiConverterTypeLightningSend.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2528
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(invoice), FfiConverterOptionalUInt64.lower(amountSats), callStatus);
|
|
2529
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/**
|
|
2533
|
+
* Pay a BOLT12 lightning offer
|
|
2534
|
+
*
|
|
2535
|
+
* # Arguments
|
|
2536
|
+
*
|
|
2537
|
+
* * `offer` - BOLT12 offer string
|
|
2538
|
+
* * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
|
|
2539
|
+
*/
|
|
2540
|
+
payLightningOffer(offer, amountSats) /*throws*/{
|
|
2541
|
+
return FfiConverterTypeLightningSend.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2542
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(offer), FfiConverterOptionalUInt64.lower(amountSats), callStatus);
|
|
2543
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
/**
|
|
2547
|
+
* Peek at an address at a specific index
|
|
2548
|
+
*/
|
|
2549
|
+
peakAddress(index) /*throws*/{
|
|
2550
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2551
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_peak_address(uniffiTypeWalletObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
|
|
2552
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* Get total amount in pending exits (sats)
|
|
2557
|
+
*/
|
|
2558
|
+
pendingExitsTotalSats() /*throws*/{
|
|
2559
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2560
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pending_exits_total_sats(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2561
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Get all pending lightning receives
|
|
2566
|
+
*/
|
|
2567
|
+
pendingLightningReceives() /*throws*/{
|
|
2568
|
+
return FfiConverterArrayTypeLightningReceive.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2569
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pending_lightning_receives(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2570
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* Get all pending lightning sends
|
|
2575
|
+
*/
|
|
2576
|
+
pendingLightningSends() /*throws*/{
|
|
2577
|
+
return FfiConverterArrayTypeLightningSend.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2578
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pending_lightning_sends(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2579
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* Get all pending round states
|
|
2584
|
+
*/
|
|
2585
|
+
pendingRoundStates() /*throws*/{
|
|
2586
|
+
return FfiConverterArrayTypeRoundState.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2587
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pending_round_states(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2588
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
/**
|
|
2592
|
+
* Progress unilateral exits (broadcast, fee bump, advance state machine)
|
|
2593
|
+
*
|
|
2594
|
+
* This is the critical method for actually moving exits forward.
|
|
2595
|
+
* Call periodically after starting exits.
|
|
2596
|
+
*
|
|
2597
|
+
* # Arguments
|
|
2598
|
+
*
|
|
2599
|
+
* * `onchain_wallet` - Onchain wallet for building exit transactions
|
|
2600
|
+
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2601
|
+
*/
|
|
2602
|
+
progressExits(onchainWallet, feeRateSatPerVb) /*throws*/{
|
|
2603
|
+
return FfiConverterArrayTypeExitProgressStatus.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2604
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_progress_exits(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), FfiConverterOptionalUInt64.lower(feeRateSatPerVb), callStatus);
|
|
2605
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* Progress pending rounds
|
|
2610
|
+
*
|
|
2611
|
+
* Advances the state of all pending rounds. Call periodically.
|
|
2612
|
+
*/
|
|
2613
|
+
progressPendingRounds() /*throws*/{
|
|
2614
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2615
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_progress_pending_rounds(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2616
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2617
|
+
}
|
|
2618
|
+
properties() /*throws*/{
|
|
2619
|
+
return FfiConverterTypeWalletProperties.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2620
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_properties(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2621
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Refresh the Ark server connection
|
|
2626
|
+
*
|
|
2627
|
+
* Re-establishes connection if it was lost.
|
|
2628
|
+
*/
|
|
2629
|
+
refreshServer() /*throws*/{
|
|
2630
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2631
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_server(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2632
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
/**
|
|
2636
|
+
* Refresh specific VTXOs
|
|
2637
|
+
*/
|
|
2638
|
+
refreshVtxos(vtxoIds) /*throws*/{
|
|
2639
|
+
return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2640
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), callStatus);
|
|
2641
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2642
|
+
}
|
|
2643
|
+
sendArkoorPayment(arkAddress, amountSats) /*throws*/{
|
|
2644
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2645
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_send_arkoor_payment(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(arkAddress), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
|
|
2646
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* Send an onchain payment during a round
|
|
2651
|
+
*/
|
|
2652
|
+
sendRoundOnchainPayment(address, amountSats) /*throws*/{
|
|
2653
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2654
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_send_round_onchain_payment(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
|
|
2655
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
/**
|
|
2659
|
+
* Sign exit claim inputs in an external PSBT
|
|
2660
|
+
*
|
|
2661
|
+
* This is useful if you want to combine exit claims with other inputs
|
|
2662
|
+
* in a single transaction.
|
|
2663
|
+
*
|
|
2664
|
+
* # Arguments
|
|
2665
|
+
*
|
|
2666
|
+
* * `psbt_base64` - Base64-encoded PSBT to sign
|
|
2667
|
+
*
|
|
2668
|
+
* Returns the signed PSBT
|
|
2669
|
+
*/
|
|
2670
|
+
signExitClaimInputs(psbtBase64) /*throws*/{
|
|
2671
|
+
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2672
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sign_exit_claim_inputs(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(psbtBase64), callStatus);
|
|
2673
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* Get all spendable VTXOs
|
|
2678
|
+
*/
|
|
2679
|
+
spendableVtxos() /*throws*/{
|
|
2680
|
+
return FfiConverterArrayTypeVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2681
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_spendable_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2682
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Start unilateral exit for the entire wallet
|
|
2687
|
+
*/
|
|
2688
|
+
startExitForEntireWallet() /*throws*/{
|
|
2689
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2690
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_entire_wallet(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2691
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
/**
|
|
2695
|
+
* Start unilateral exit for specific VTXOs
|
|
2696
|
+
*
|
|
2697
|
+
* Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
|
|
2698
|
+
*/
|
|
2699
|
+
startExitForVtxos(vtxoIds) /*throws*/{
|
|
2700
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2701
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), callStatus);
|
|
2702
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
/**
|
|
2706
|
+
* Lightweight sync with Ark server and blockchain
|
|
2707
|
+
* Note: Bark's sync() handles errors internally with logging.
|
|
2708
|
+
* The Throws annotation is for forward compatibility only.
|
|
2709
|
+
*/
|
|
2710
|
+
sync() /*throws*/{
|
|
2711
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2712
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2713
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
/**
|
|
2717
|
+
* Sync exit state (checks status but doesn't progress)
|
|
2718
|
+
*/
|
|
2719
|
+
syncExits(onchainWallet) /*throws*/{
|
|
2720
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2721
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_exits(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), callStatus);
|
|
2722
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* Sync pending board transactions
|
|
2727
|
+
*/
|
|
2728
|
+
syncPendingBoards() /*throws*/{
|
|
2729
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2730
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_pending_boards(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2731
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2732
|
+
}
|
|
2733
|
+
tryClaimAllLightningReceives(wait) /*throws*/{
|
|
2734
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2735
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_try_claim_all_lightning_receives(uniffiTypeWalletObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterBool.lower(wait), callStatus);
|
|
2736
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* Try to claim a specific lightning receive by payment hash
|
|
2741
|
+
*
|
|
2742
|
+
* # Arguments
|
|
2743
|
+
*
|
|
2744
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2745
|
+
* * `wait` - Whether to wait for claim to complete
|
|
2746
|
+
*/
|
|
2747
|
+
tryClaimLightningReceive(paymentHash, wait) /*throws*/{
|
|
2748
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2749
|
+
(0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_try_claim_lightning_receive(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash), _uniffiBindgenReactNative.FfiConverterBool.lower(wait), callStatus);
|
|
2750
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* Validate an Ark address against the connected server
|
|
2755
|
+
*
|
|
2756
|
+
* This performs full validation including checking if the address
|
|
2757
|
+
* belongs to the currently connected Ark server.
|
|
2758
|
+
* For basic format validation only, use validate_ark_address() instead.
|
|
2759
|
+
*/
|
|
2760
|
+
validateArkoorAddress(address) /*throws*/{
|
|
2761
|
+
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2762
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_validate_arkoor_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), callStatus);
|
|
2763
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2764
|
+
}
|
|
2765
|
+
vtxos() /*throws*/{
|
|
2766
|
+
return FfiConverterArrayTypeVtxo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2767
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
2768
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2773
|
+
*/
|
|
2774
|
+
uniffiDestroy() {
|
|
2775
|
+
const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
2776
|
+
if (ptr !== undefined) {
|
|
2777
|
+
const pointer = uniffiTypeWalletObjectFactory.pointer(this);
|
|
2778
|
+
uniffiTypeWalletObjectFactory.freePointer(pointer);
|
|
2779
|
+
uniffiTypeWalletObjectFactory.unbless(ptr);
|
|
2780
|
+
delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
static instanceOf(obj) {
|
|
2784
|
+
return uniffiTypeWalletObjectFactory.isConcreteType(obj);
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
exports.Wallet = Wallet;
|
|
2788
|
+
const uniffiTypeWalletObjectFactory = (() => {
|
|
2789
|
+
return {
|
|
2790
|
+
create(pointer) {
|
|
2791
|
+
const instance = Object.create(Wallet.prototype);
|
|
2792
|
+
instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2793
|
+
instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
|
|
2794
|
+
instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Wallet";
|
|
2795
|
+
return instance;
|
|
2796
|
+
},
|
|
2797
|
+
bless(p) {
|
|
2798
|
+
return uniffiCaller.rustCall(/*caller:*/status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_method_wallet_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
|
|
2799
|
+
},
|
|
2800
|
+
unbless(ptr) {
|
|
2801
|
+
ptr.markDestroyed();
|
|
2802
|
+
},
|
|
2803
|
+
pointer(obj) {
|
|
2804
|
+
if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
|
|
2805
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
|
|
2806
|
+
}
|
|
2807
|
+
return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
|
|
2808
|
+
},
|
|
2809
|
+
clonePointer(obj) {
|
|
2810
|
+
const pointer = this.pointer(obj);
|
|
2811
|
+
return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_clone_wallet(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
2812
|
+
},
|
|
2813
|
+
freePointer(pointer) {
|
|
2814
|
+
uniffiCaller.rustCall(/*caller:*/callStatus => (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_free_wallet(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
2815
|
+
},
|
|
2816
|
+
isConcreteType(obj) {
|
|
2817
|
+
return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "Wallet";
|
|
2818
|
+
}
|
|
2819
|
+
};
|
|
2820
|
+
})();
|
|
2821
|
+
// FfiConverter for WalletInterface
|
|
2822
|
+
const FfiConverterTypeWallet = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeWalletObjectFactory);
|
|
2823
|
+
|
|
2824
|
+
// FfiConverter for ArkInfo | undefined
|
|
2825
|
+
const FfiConverterOptionalTypeArkInfo = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeArkInfo);
|
|
2826
|
+
|
|
2827
|
+
// FfiConverter for BlockRef | undefined
|
|
2828
|
+
const FfiConverterOptionalTypeBlockRef = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeBlockRef);
|
|
2829
|
+
|
|
2830
|
+
// FfiConverter for ExitTransactionStatus | undefined
|
|
2831
|
+
const FfiConverterOptionalTypeExitTransactionStatus = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeExitTransactionStatus);
|
|
2832
|
+
|
|
2833
|
+
// FfiConverter for LightningReceive | undefined
|
|
2834
|
+
const FfiConverterOptionalTypeLightningReceive = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeLightningReceive);
|
|
2835
|
+
|
|
2836
|
+
// FfiConverter for string | undefined
|
|
2837
|
+
const FfiConverterOptionalString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterString);
|
|
2838
|
+
|
|
2839
|
+
// FfiConverter for /*u16*/number | undefined
|
|
2840
|
+
const FfiConverterOptionalUInt16 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt16);
|
|
2841
|
+
|
|
2842
|
+
// FfiConverter for /*u32*/number | undefined
|
|
2843
|
+
const FfiConverterOptionalUInt32 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt32);
|
|
2844
|
+
|
|
2845
|
+
// FfiConverter for /*u64*/bigint | undefined
|
|
2846
|
+
const FfiConverterOptionalUInt64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt64);
|
|
2847
|
+
|
|
2848
|
+
// FfiConverter for Array<Destination>
|
|
2849
|
+
const FfiConverterArrayTypeDestination = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeDestination);
|
|
2850
|
+
|
|
2851
|
+
// FfiConverter for Array<ExitProgressStatus>
|
|
2852
|
+
const FfiConverterArrayTypeExitProgressStatus = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExitProgressStatus);
|
|
2853
|
+
|
|
2854
|
+
// FfiConverter for Array<ExitVtxo>
|
|
2855
|
+
const FfiConverterArrayTypeExitVtxo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExitVtxo);
|
|
2856
|
+
|
|
2857
|
+
// FfiConverter for Array<LightningReceive>
|
|
2858
|
+
const FfiConverterArrayTypeLightningReceive = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeLightningReceive);
|
|
2859
|
+
|
|
2860
|
+
// FfiConverter for Array<LightningSend>
|
|
2861
|
+
const FfiConverterArrayTypeLightningSend = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeLightningSend);
|
|
2862
|
+
|
|
2863
|
+
// FfiConverter for Array<Movement>
|
|
2864
|
+
const FfiConverterArrayTypeMovement = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeMovement);
|
|
2865
|
+
|
|
2866
|
+
// FfiConverter for Array<RoundState>
|
|
2867
|
+
const FfiConverterArrayTypeRoundState = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeRoundState);
|
|
2868
|
+
|
|
2869
|
+
// FfiConverter for Array<Vtxo>
|
|
2870
|
+
const FfiConverterArrayTypeVtxo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeVtxo);
|
|
2871
|
+
|
|
2872
|
+
// FfiConverter for Array<string>
|
|
2873
|
+
const FfiConverterArrayString = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterString);
|
|
2874
|
+
|
|
2875
|
+
// FfiConverter for Array<string> | undefined
|
|
2876
|
+
const FfiConverterOptionalArrayString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterArrayString);
|
|
2877
|
+
|
|
2878
|
+
/**
|
|
2879
|
+
* This should be called before anything else.
|
|
2880
|
+
*
|
|
2881
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
2882
|
+
*
|
|
2883
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
2884
|
+
* and when the bindings were generated.
|
|
2885
|
+
*
|
|
2886
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
2887
|
+
*/
|
|
2888
|
+
function uniffiEnsureInitialized() {
|
|
2889
|
+
// Get the bindings contract version from our ComponentInterface
|
|
2890
|
+
const bindingsContractVersion = 29;
|
|
2891
|
+
// Get the scaffolding contract version by calling the into the dylib
|
|
2892
|
+
const scaffoldingContractVersion = (0, _barkFfi.default)().ubrn_ffi_bark_ffi_uniffi_contract_version();
|
|
2893
|
+
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
2894
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
2895
|
+
}
|
|
2896
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt() !== 6799) {
|
|
2897
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_extract_tx_from_psbt");
|
|
2898
|
+
}
|
|
2899
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_generate_mnemonic() !== 49933) {
|
|
2900
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_generate_mnemonic");
|
|
2901
|
+
}
|
|
2902
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address() !== 49932) {
|
|
2903
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_ark_address");
|
|
2904
|
+
}
|
|
2905
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_mnemonic() !== 2707) {
|
|
2906
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_mnemonic");
|
|
2907
|
+
}
|
|
2908
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance() !== 43979) {
|
|
2909
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");
|
|
2910
|
+
}
|
|
2911
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address() !== 25417) {
|
|
2912
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");
|
|
2913
|
+
}
|
|
2914
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_send() !== 10499) {
|
|
2915
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_send");
|
|
2916
|
+
}
|
|
2917
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_sync() !== 16855) {
|
|
2918
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_sync");
|
|
2919
|
+
}
|
|
2920
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height() !== 30496) {
|
|
2921
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height");
|
|
2922
|
+
}
|
|
2923
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos() !== 36339) {
|
|
2924
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");
|
|
2925
|
+
}
|
|
2926
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info() !== 6789) {
|
|
2927
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");
|
|
2928
|
+
}
|
|
2929
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance() !== 50185) {
|
|
2930
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");
|
|
2931
|
+
}
|
|
2932
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all() !== 9249) {
|
|
2933
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_all");
|
|
2934
|
+
}
|
|
2935
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount() !== 6984) {
|
|
2936
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");
|
|
2937
|
+
}
|
|
2938
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice() !== 50261) {
|
|
2939
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");
|
|
2940
|
+
}
|
|
2941
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_broadcast_tx() !== 14471) {
|
|
2942
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_broadcast_tx");
|
|
2943
|
+
}
|
|
2944
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds() !== 18107) {
|
|
2945
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds");
|
|
2946
|
+
}
|
|
2947
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round() !== 4859) {
|
|
2948
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");
|
|
2949
|
+
}
|
|
2950
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment() !== 8903) {
|
|
2951
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");
|
|
2952
|
+
}
|
|
2953
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats() !== 47596) {
|
|
2954
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats");
|
|
2955
|
+
}
|
|
2956
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_config() !== 63421) {
|
|
2957
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_config");
|
|
2958
|
+
}
|
|
2959
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_drain_exits() !== 63428) {
|
|
2960
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_drain_exits");
|
|
2961
|
+
}
|
|
2962
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_status() !== 13877) {
|
|
2963
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_status");
|
|
2964
|
+
}
|
|
2965
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos() !== 55034) {
|
|
2966
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos");
|
|
2967
|
+
}
|
|
2968
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos() !== 151) {
|
|
2969
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos");
|
|
2970
|
+
}
|
|
2971
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight() !== 58234) {
|
|
2972
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight");
|
|
2973
|
+
}
|
|
2974
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight() !== 59124) {
|
|
2975
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight");
|
|
2976
|
+
}
|
|
2977
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id() !== 45689) {
|
|
2978
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id");
|
|
2979
|
+
}
|
|
2980
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh() !== 24989) {
|
|
2981
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh");
|
|
2982
|
+
}
|
|
2983
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_has_pending_exits() !== 60454) {
|
|
2984
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_has_pending_exits");
|
|
2985
|
+
}
|
|
2986
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history() !== 4822) {
|
|
2987
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history");
|
|
2988
|
+
}
|
|
2989
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status() !== 14282) {
|
|
2990
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status");
|
|
2991
|
+
}
|
|
2992
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits() !== 51047) {
|
|
2993
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");
|
|
2994
|
+
}
|
|
2995
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance() !== 21349) {
|
|
2996
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance");
|
|
2997
|
+
}
|
|
2998
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh() !== 17108) {
|
|
2999
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh");
|
|
3000
|
+
}
|
|
3001
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_with_onchain() !== 13241) {
|
|
3002
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_with_onchain");
|
|
3003
|
+
}
|
|
3004
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maybe_schedule_maintenance_refresh() !== 30042) {
|
|
3005
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maybe_schedule_maintenance_refresh");
|
|
3006
|
+
}
|
|
3007
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address() !== 23909) {
|
|
3008
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address");
|
|
3009
|
+
}
|
|
3010
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address_with_index() !== 42180) {
|
|
3011
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address_with_index");
|
|
3012
|
+
}
|
|
3013
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_all() !== 9225) {
|
|
3014
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_all");
|
|
3015
|
+
}
|
|
3016
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos() !== 53819) {
|
|
3017
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");
|
|
3018
|
+
}
|
|
3019
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 14966) {
|
|
3020
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");
|
|
3021
|
+
}
|
|
3022
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !== 10704) {
|
|
3023
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");
|
|
3024
|
+
}
|
|
3025
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !== 32875) {
|
|
3026
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");
|
|
3027
|
+
}
|
|
3028
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_peak_address() !== 9176) {
|
|
3029
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_peak_address");
|
|
3030
|
+
}
|
|
3031
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats() !== 50026) {
|
|
3032
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats");
|
|
3033
|
+
}
|
|
3034
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives() !== 22341) {
|
|
3035
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives");
|
|
3036
|
+
}
|
|
3037
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends() !== 363) {
|
|
3038
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends");
|
|
3039
|
+
}
|
|
3040
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_states() !== 20536) {
|
|
3041
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_states");
|
|
3042
|
+
}
|
|
3043
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits() !== 4371) {
|
|
3044
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_exits");
|
|
3045
|
+
}
|
|
3046
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds() !== 13446) {
|
|
3047
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds");
|
|
3048
|
+
}
|
|
3049
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_properties() !== 49722) {
|
|
3050
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_properties");
|
|
3051
|
+
}
|
|
3052
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server() !== 25816) {
|
|
3053
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");
|
|
3054
|
+
}
|
|
3055
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos() !== 19664) {
|
|
3056
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos");
|
|
3057
|
+
}
|
|
3058
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment() !== 56067) {
|
|
3059
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment");
|
|
3060
|
+
}
|
|
3061
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_round_onchain_payment() !== 47652) {
|
|
3062
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_round_onchain_payment");
|
|
3063
|
+
}
|
|
3064
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs() !== 19527) {
|
|
3065
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs");
|
|
3066
|
+
}
|
|
3067
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos() !== 44569) {
|
|
3068
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos");
|
|
3069
|
+
}
|
|
3070
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet() !== 56070) {
|
|
3071
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet");
|
|
3072
|
+
}
|
|
3073
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos() !== 34429) {
|
|
3074
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos");
|
|
3075
|
+
}
|
|
3076
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync() !== 44981) {
|
|
3077
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");
|
|
3078
|
+
}
|
|
3079
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits() !== 40932) {
|
|
3080
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_exits");
|
|
3081
|
+
}
|
|
3082
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards() !== 23775) {
|
|
3083
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards");
|
|
3084
|
+
}
|
|
3085
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives() !== 44879) {
|
|
3086
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives");
|
|
3087
|
+
}
|
|
3088
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive() !== 57107) {
|
|
3089
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");
|
|
3090
|
+
}
|
|
3091
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 45893) {
|
|
3092
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");
|
|
3093
|
+
}
|
|
3094
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos() !== 21445) {
|
|
3095
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxos");
|
|
3096
|
+
}
|
|
3097
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_custom() !== 33851) {
|
|
3098
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_custom");
|
|
3099
|
+
}
|
|
3100
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_default() !== 27781) {
|
|
3101
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_default");
|
|
3102
|
+
}
|
|
3103
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_create() !== 28953) {
|
|
3104
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_create");
|
|
3105
|
+
}
|
|
3106
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_create_with_onchain() !== 8743) {
|
|
3107
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_create_with_onchain");
|
|
3108
|
+
}
|
|
3109
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_open() !== 34910) {
|
|
3110
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_open");
|
|
3111
|
+
}
|
|
3112
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_open_with_onchain() !== 2455) {
|
|
3113
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_open_with_onchain");
|
|
3114
|
+
}
|
|
3115
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance() !== 59833) {
|
|
3116
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance");
|
|
3117
|
+
}
|
|
3118
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx() !== 7923) {
|
|
3119
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx");
|
|
3120
|
+
}
|
|
3121
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx() !== 35049) {
|
|
3122
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx");
|
|
3123
|
+
}
|
|
3124
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_finish_tx() !== 13359) {
|
|
3125
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_finish_tx");
|
|
3126
|
+
}
|
|
3127
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx() !== 30315) {
|
|
3128
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx");
|
|
3129
|
+
}
|
|
3130
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx_confirmed_block() !== 45270) {
|
|
3131
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx_confirmed_block");
|
|
3132
|
+
}
|
|
3133
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_spending_tx() !== 32028) {
|
|
3134
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_spending_tx");
|
|
3135
|
+
}
|
|
3136
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp() !== 48670) {
|
|
3137
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");
|
|
3138
|
+
}
|
|
3139
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !== 57492) {
|
|
3140
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");
|
|
3141
|
+
}
|
|
3142
|
+
uniffiCallbackInterfaceCustomOnchainWalletCallbacks.register();
|
|
3143
|
+
}
|
|
3144
|
+
var _default = exports.default = Object.freeze({
|
|
3145
|
+
initialize: uniffiEnsureInitialized,
|
|
3146
|
+
converters: {
|
|
3147
|
+
FfiConverterTypeAddressWithIndex,
|
|
3148
|
+
FfiConverterTypeArkInfo,
|
|
3149
|
+
FfiConverterTypeBalance,
|
|
3150
|
+
FfiConverterTypeBarkError,
|
|
3151
|
+
FfiConverterTypeBlockRef,
|
|
3152
|
+
FfiConverterTypeConfig,
|
|
3153
|
+
FfiConverterTypeCpfpParams,
|
|
3154
|
+
FfiConverterTypeDestination,
|
|
3155
|
+
FfiConverterTypeExitClaimTransaction,
|
|
3156
|
+
FfiConverterTypeExitProgressStatus,
|
|
3157
|
+
FfiConverterTypeExitTransactionStatus,
|
|
3158
|
+
FfiConverterTypeExitVtxo,
|
|
3159
|
+
FfiConverterTypeLightningInvoice,
|
|
3160
|
+
FfiConverterTypeLightningReceive,
|
|
3161
|
+
FfiConverterTypeLightningSend,
|
|
3162
|
+
FfiConverterTypeMovement,
|
|
3163
|
+
FfiConverterTypeNetwork,
|
|
3164
|
+
FfiConverterTypeOffboardResult,
|
|
3165
|
+
FfiConverterTypeOnchainBalance,
|
|
3166
|
+
FfiConverterTypeOnchainWallet,
|
|
3167
|
+
FfiConverterTypeOutPoint,
|
|
3168
|
+
FfiConverterTypePendingBoard,
|
|
3169
|
+
FfiConverterTypeRoundState,
|
|
3170
|
+
FfiConverterTypeVtxo,
|
|
3171
|
+
FfiConverterTypeWallet,
|
|
3172
|
+
FfiConverterTypeWalletProperties
|
|
3173
|
+
}
|
|
3174
|
+
});
|
|
3175
|
+
//# sourceMappingURL=bark.js.map
|