@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,2963 @@
|
|
|
1
|
+
import { type UniffiByteArray, type UniffiRustArcPtr, type UnsafeMutableRawPointer, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from "uniffi-bindgen-react-native";
|
|
2
|
+
export declare function extractTxFromPsbt(psbtBase64: string): string;
|
|
3
|
+
export declare function generateMnemonic(): string;
|
|
4
|
+
export declare function validateArkAddress(address: string): boolean;
|
|
5
|
+
export declare function validateMnemonic(mnemonic: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Callback interface for custom onchain wallet implementations
|
|
8
|
+
*
|
|
9
|
+
* Implement this interface in Dart/Swift/Kotlin to provide your own wallet.
|
|
10
|
+
*/
|
|
11
|
+
export interface CustomOnchainWalletCallbacks {
|
|
12
|
+
/**
|
|
13
|
+
* Get the wallet balance in satoshis
|
|
14
|
+
*/
|
|
15
|
+
getBalance(): bigint;
|
|
16
|
+
/**
|
|
17
|
+
* Prepare a transaction to send to given destinations
|
|
18
|
+
*
|
|
19
|
+
* # Arguments
|
|
20
|
+
* * `destinations` - List of destinations with addresses and amounts
|
|
21
|
+
* * `fee_rate_sat_per_vb` - Fee rate in sats per vbyte
|
|
22
|
+
*
|
|
23
|
+
* # Returns
|
|
24
|
+
* Base64-encoded PSBT
|
|
25
|
+
*/
|
|
26
|
+
prepareTx(destinations: Array<Destination>, feeRateSatPerVb: bigint): string;
|
|
27
|
+
/**
|
|
28
|
+
* Prepare a transaction that drains the wallet to a single address
|
|
29
|
+
*
|
|
30
|
+
* # Arguments
|
|
31
|
+
* * `address` - Bitcoin address to drain to
|
|
32
|
+
* * `fee_rate_sat_per_vb` - Fee rate in sats per vbyte
|
|
33
|
+
*
|
|
34
|
+
* # Returns
|
|
35
|
+
* Base64-encoded PSBT
|
|
36
|
+
*/
|
|
37
|
+
prepareDrainTx(address: string, feeRateSatPerVb: bigint): string;
|
|
38
|
+
/**
|
|
39
|
+
* Sign and finalize a PSBT
|
|
40
|
+
*
|
|
41
|
+
* # Arguments
|
|
42
|
+
* * `psbt_base64` - Base64-encoded PSBT
|
|
43
|
+
*
|
|
44
|
+
* # Returns
|
|
45
|
+
* Hex-encoded signed transaction
|
|
46
|
+
*/
|
|
47
|
+
finishTx(psbtBase64: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Get a wallet transaction by txid
|
|
50
|
+
*
|
|
51
|
+
* # Arguments
|
|
52
|
+
* * `txid` - Transaction ID as hex string
|
|
53
|
+
*
|
|
54
|
+
* # Returns
|
|
55
|
+
* Hex-encoded transaction, or null if not found
|
|
56
|
+
*/
|
|
57
|
+
getWalletTx(txid: string): /*throws*/ string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Get the block hash where a transaction was confirmed
|
|
60
|
+
*
|
|
61
|
+
* # Arguments
|
|
62
|
+
* * `txid` - Transaction ID as hex string
|
|
63
|
+
*
|
|
64
|
+
* # Returns
|
|
65
|
+
* Block reference with height and hash, or null if unconfirmed
|
|
66
|
+
*/
|
|
67
|
+
getWalletTxConfirmedBlock(txid: string): /*throws*/ BlockRef | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Find transaction that spends a given output
|
|
70
|
+
*
|
|
71
|
+
* # Arguments
|
|
72
|
+
* * `outpoint` - Transaction outpoint to check
|
|
73
|
+
*
|
|
74
|
+
* # Returns
|
|
75
|
+
* Hex-encoded spending transaction, or null if unspent
|
|
76
|
+
*/
|
|
77
|
+
getSpendingTx(outpoint: OutPoint): /*throws*/ string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Create a signed P2A CPFP transaction
|
|
80
|
+
*
|
|
81
|
+
* # Arguments
|
|
82
|
+
* * `params` - CPFP transaction parameters
|
|
83
|
+
*
|
|
84
|
+
* # Returns
|
|
85
|
+
* Hex-encoded signed CPFP transaction
|
|
86
|
+
*/
|
|
87
|
+
makeSignedP2aCpfp(params: CpfpParams): string;
|
|
88
|
+
/**
|
|
89
|
+
* Store a signed P2A CPFP transaction in the wallet
|
|
90
|
+
*
|
|
91
|
+
* # Arguments
|
|
92
|
+
* * `tx_hex` - Hex-encoded transaction
|
|
93
|
+
*/
|
|
94
|
+
storeSignedP2aCpfp(txHex: string): void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* An Ark address with its derivation index
|
|
98
|
+
*/
|
|
99
|
+
export type AddressWithIndex = {
|
|
100
|
+
/**
|
|
101
|
+
* The Ark address string
|
|
102
|
+
*/
|
|
103
|
+
address: string;
|
|
104
|
+
/**
|
|
105
|
+
* The derivation index
|
|
106
|
+
*/
|
|
107
|
+
index: number;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Generated factory for {@link AddressWithIndex} record objects.
|
|
111
|
+
*/
|
|
112
|
+
export declare const AddressWithIndex: Readonly<{
|
|
113
|
+
/**
|
|
114
|
+
* Create a frozen instance of {@link AddressWithIndex}, with defaults specified
|
|
115
|
+
* in Rust, in the {@link bark} crate.
|
|
116
|
+
*/
|
|
117
|
+
create: (partial: Partial<AddressWithIndex> & Required<Omit<AddressWithIndex, never>>) => AddressWithIndex;
|
|
118
|
+
/**
|
|
119
|
+
* Create a frozen instance of {@link AddressWithIndex}, with defaults specified
|
|
120
|
+
* in Rust, in the {@link bark} crate.
|
|
121
|
+
*/
|
|
122
|
+
new: (partial: Partial<AddressWithIndex> & Required<Omit<AddressWithIndex, never>>) => AddressWithIndex;
|
|
123
|
+
/**
|
|
124
|
+
* Defaults specified in the {@link bark} crate.
|
|
125
|
+
*/
|
|
126
|
+
defaults: () => Partial<AddressWithIndex>;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Ark server configuration information
|
|
130
|
+
*/
|
|
131
|
+
export type ArkInfo = {
|
|
132
|
+
/**
|
|
133
|
+
* The bitcoin network the server operates on
|
|
134
|
+
*/
|
|
135
|
+
network: Network;
|
|
136
|
+
/**
|
|
137
|
+
* The Ark server pubkey as hex string
|
|
138
|
+
*/
|
|
139
|
+
serverPubkey: string;
|
|
140
|
+
/**
|
|
141
|
+
* The interval between each round in seconds
|
|
142
|
+
*/
|
|
143
|
+
roundIntervalSecs: bigint;
|
|
144
|
+
/**
|
|
145
|
+
* Number of nonces per round
|
|
146
|
+
*/
|
|
147
|
+
nbRoundNonces: number;
|
|
148
|
+
/**
|
|
149
|
+
* Delta between exit confirmation and coins becoming spendable
|
|
150
|
+
*/
|
|
151
|
+
vtxoExitDelta: number;
|
|
152
|
+
/**
|
|
153
|
+
* Expiration delta of the VTXO
|
|
154
|
+
*/
|
|
155
|
+
vtxoExpiryDelta: number;
|
|
156
|
+
/**
|
|
157
|
+
* The number of blocks after which an HTLC-send VTXO expires once granted
|
|
158
|
+
*/
|
|
159
|
+
htlcSendExpiryDelta: number;
|
|
160
|
+
/**
|
|
161
|
+
* The number of blocks to keep between Lightning and Ark HTLCs expiries
|
|
162
|
+
*/
|
|
163
|
+
htlcExpiryDelta: number;
|
|
164
|
+
/**
|
|
165
|
+
* Maximum amount of a VTXO in sats (null if no limit)
|
|
166
|
+
*/
|
|
167
|
+
maxVtxoAmountSats: /*u64*/ bigint | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* The number of confirmations required to register a board vtxo
|
|
170
|
+
*/
|
|
171
|
+
requiredBoardConfirmations: number;
|
|
172
|
+
/**
|
|
173
|
+
* Maximum CLTV delta server will allow clients to request an invoice generation with
|
|
174
|
+
*/
|
|
175
|
+
maxUserInvoiceCltvDelta: number;
|
|
176
|
+
/**
|
|
177
|
+
* Minimum amount for a board the server will cosign in sats
|
|
178
|
+
*/
|
|
179
|
+
minBoardAmountSats: bigint;
|
|
180
|
+
/**
|
|
181
|
+
* Offboard fee rate in sats per vbyte
|
|
182
|
+
*/
|
|
183
|
+
offboardFeerateSatPerVb: bigint;
|
|
184
|
+
/**
|
|
185
|
+
* Whether the Ark server requires anti-DoS measures for lightning receives
|
|
186
|
+
*/
|
|
187
|
+
lnReceiveAntiDosRequired: boolean;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Generated factory for {@link ArkInfo} record objects.
|
|
191
|
+
*/
|
|
192
|
+
export declare const ArkInfo: Readonly<{
|
|
193
|
+
/**
|
|
194
|
+
* Create a frozen instance of {@link ArkInfo}, with defaults specified
|
|
195
|
+
* in Rust, in the {@link bark} crate.
|
|
196
|
+
*/
|
|
197
|
+
create: (partial: Partial<ArkInfo> & Required<Omit<ArkInfo, never>>) => ArkInfo;
|
|
198
|
+
/**
|
|
199
|
+
* Create a frozen instance of {@link ArkInfo}, with defaults specified
|
|
200
|
+
* in Rust, in the {@link bark} crate.
|
|
201
|
+
*/
|
|
202
|
+
new: (partial: Partial<ArkInfo> & Required<Omit<ArkInfo, never>>) => ArkInfo;
|
|
203
|
+
/**
|
|
204
|
+
* Defaults specified in the {@link bark} crate.
|
|
205
|
+
*/
|
|
206
|
+
defaults: () => Partial<ArkInfo>;
|
|
207
|
+
}>;
|
|
208
|
+
/**
|
|
209
|
+
* Detailed balance breakdown of the wallet
|
|
210
|
+
*/
|
|
211
|
+
export type Balance = {
|
|
212
|
+
/**
|
|
213
|
+
* Spendable off-chain balance (Ark) in sats
|
|
214
|
+
*/
|
|
215
|
+
spendableSats: bigint;
|
|
216
|
+
/**
|
|
217
|
+
* Coins locked in a round
|
|
218
|
+
*/
|
|
219
|
+
pendingInRoundSats: bigint;
|
|
220
|
+
/**
|
|
221
|
+
* Coins being unilaterally exited
|
|
222
|
+
*/
|
|
223
|
+
pendingExitSats: bigint;
|
|
224
|
+
/**
|
|
225
|
+
* Coins pending as Lightning sends
|
|
226
|
+
*/
|
|
227
|
+
pendingLightningSendSats: bigint;
|
|
228
|
+
/**
|
|
229
|
+
* Claimable pending Lightning receives
|
|
230
|
+
* Note: Bark only tracks claimable receives, not total pending.
|
|
231
|
+
* The upstream Balance struct only provides claimable_lightning_receive.
|
|
232
|
+
*/
|
|
233
|
+
claimableLightningReceiveSats: bigint;
|
|
234
|
+
/**
|
|
235
|
+
* Coins pending board confirmations
|
|
236
|
+
*/
|
|
237
|
+
pendingBoardSats: bigint;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Generated factory for {@link Balance} record objects.
|
|
241
|
+
*/
|
|
242
|
+
export declare const Balance: Readonly<{
|
|
243
|
+
/**
|
|
244
|
+
* Create a frozen instance of {@link Balance}, with defaults specified
|
|
245
|
+
* in Rust, in the {@link bark} crate.
|
|
246
|
+
*/
|
|
247
|
+
create: (partial: Partial<Balance> & Required<Omit<Balance, never>>) => Balance;
|
|
248
|
+
/**
|
|
249
|
+
* Create a frozen instance of {@link Balance}, with defaults specified
|
|
250
|
+
* in Rust, in the {@link bark} crate.
|
|
251
|
+
*/
|
|
252
|
+
new: (partial: Partial<Balance> & Required<Omit<Balance, never>>) => Balance;
|
|
253
|
+
/**
|
|
254
|
+
* Defaults specified in the {@link bark} crate.
|
|
255
|
+
*/
|
|
256
|
+
defaults: () => Partial<Balance>;
|
|
257
|
+
}>;
|
|
258
|
+
/**
|
|
259
|
+
* Reference to a block in the blockchain
|
|
260
|
+
*/
|
|
261
|
+
export type BlockRef = {
|
|
262
|
+
height: number;
|
|
263
|
+
hash: string;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Generated factory for {@link BlockRef} record objects.
|
|
267
|
+
*/
|
|
268
|
+
export declare const BlockRef: Readonly<{
|
|
269
|
+
/**
|
|
270
|
+
* Create a frozen instance of {@link BlockRef}, with defaults specified
|
|
271
|
+
* in Rust, in the {@link bark} crate.
|
|
272
|
+
*/
|
|
273
|
+
create: (partial: Partial<BlockRef> & Required<Omit<BlockRef, never>>) => BlockRef;
|
|
274
|
+
/**
|
|
275
|
+
* Create a frozen instance of {@link BlockRef}, with defaults specified
|
|
276
|
+
* in Rust, in the {@link bark} crate.
|
|
277
|
+
*/
|
|
278
|
+
new: (partial: Partial<BlockRef> & Required<Omit<BlockRef, never>>) => BlockRef;
|
|
279
|
+
/**
|
|
280
|
+
* Defaults specified in the {@link bark} crate.
|
|
281
|
+
*/
|
|
282
|
+
defaults: () => Partial<BlockRef>;
|
|
283
|
+
}>;
|
|
284
|
+
/**
|
|
285
|
+
* Configuration for creating/opening a Bark wallet
|
|
286
|
+
*/
|
|
287
|
+
export type Config = {
|
|
288
|
+
/**
|
|
289
|
+
* Ark server address
|
|
290
|
+
*/
|
|
291
|
+
serverAddress: string;
|
|
292
|
+
/**
|
|
293
|
+
* Esplora HTTP REST server address
|
|
294
|
+
*/
|
|
295
|
+
esploraAddress: string | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* Bitcoind RPC server address
|
|
298
|
+
*/
|
|
299
|
+
bitcoindAddress: string | undefined;
|
|
300
|
+
/**
|
|
301
|
+
* Bitcoind RPC cookie file path
|
|
302
|
+
*/
|
|
303
|
+
bitcoindCookiefile: string | undefined;
|
|
304
|
+
/**
|
|
305
|
+
* Bitcoind RPC username
|
|
306
|
+
*/
|
|
307
|
+
bitcoindUser: string | undefined;
|
|
308
|
+
/**
|
|
309
|
+
* Bitcoind RPC password
|
|
310
|
+
*/
|
|
311
|
+
bitcoindPass: string | undefined;
|
|
312
|
+
/**
|
|
313
|
+
* Bitcoin network
|
|
314
|
+
*/
|
|
315
|
+
network: Network;
|
|
316
|
+
/**
|
|
317
|
+
* Number of blocks before expiration to refresh VTXOs
|
|
318
|
+
*/
|
|
319
|
+
vtxoRefreshExpiryThreshold: /*u32*/ number | undefined;
|
|
320
|
+
/**
|
|
321
|
+
* Upper limit of blocks needed to safely exit VTXOs
|
|
322
|
+
*/
|
|
323
|
+
vtxoExitMargin: /*u16*/ number | undefined;
|
|
324
|
+
/**
|
|
325
|
+
* Number of blocks to claim a HTLC-recv VTXO
|
|
326
|
+
*/
|
|
327
|
+
htlcRecvClaimDelta: /*u16*/ number | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* Fallback fee rate in sat/kWu
|
|
330
|
+
*/
|
|
331
|
+
fallbackFeeRate: /*u64*/ bigint | undefined;
|
|
332
|
+
/**
|
|
333
|
+
* Confirmations required before considering a round tx fully confirmed
|
|
334
|
+
*/
|
|
335
|
+
roundTxRequiredConfirmations: /*u32*/ number | undefined;
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Generated factory for {@link Config} record objects.
|
|
339
|
+
*/
|
|
340
|
+
export declare const Config: Readonly<{
|
|
341
|
+
/**
|
|
342
|
+
* Create a frozen instance of {@link Config}, with defaults specified
|
|
343
|
+
* in Rust, in the {@link bark} crate.
|
|
344
|
+
*/
|
|
345
|
+
create: (partial: Partial<Config> & Required<Omit<Config, never>>) => Config;
|
|
346
|
+
/**
|
|
347
|
+
* Create a frozen instance of {@link Config}, with defaults specified
|
|
348
|
+
* in Rust, in the {@link bark} crate.
|
|
349
|
+
*/
|
|
350
|
+
new: (partial: Partial<Config> & Required<Omit<Config, never>>) => Config;
|
|
351
|
+
/**
|
|
352
|
+
* Defaults specified in the {@link bark} crate.
|
|
353
|
+
*/
|
|
354
|
+
defaults: () => Partial<Config>;
|
|
355
|
+
}>;
|
|
356
|
+
/**
|
|
357
|
+
* Parameters for creating a CPFP (Child Pays For Parent) transaction
|
|
358
|
+
*/
|
|
359
|
+
export type CpfpParams = {
|
|
360
|
+
/**
|
|
361
|
+
* Parent transaction to fee-bump (hex-encoded)
|
|
362
|
+
*/
|
|
363
|
+
txHex: string;
|
|
364
|
+
/**
|
|
365
|
+
* Fee strategy: "Effective" for normal fee, "Rbf" for replace-by-fee
|
|
366
|
+
*/
|
|
367
|
+
feesType: string;
|
|
368
|
+
/**
|
|
369
|
+
* Target effective fee rate in sat/vB
|
|
370
|
+
*/
|
|
371
|
+
effectiveFeeRateSatPerVb: bigint;
|
|
372
|
+
/**
|
|
373
|
+
* Current package fee in sats (only required for RBF)
|
|
374
|
+
*/
|
|
375
|
+
currentPackageFeeSats: /*u64*/ bigint | undefined;
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* Generated factory for {@link CpfpParams} record objects.
|
|
379
|
+
*/
|
|
380
|
+
export declare const CpfpParams: Readonly<{
|
|
381
|
+
/**
|
|
382
|
+
* Create a frozen instance of {@link CpfpParams}, with defaults specified
|
|
383
|
+
* in Rust, in the {@link bark} crate.
|
|
384
|
+
*/
|
|
385
|
+
create: (partial: Partial<CpfpParams> & Required<Omit<CpfpParams, never>>) => CpfpParams;
|
|
386
|
+
/**
|
|
387
|
+
* Create a frozen instance of {@link CpfpParams}, with defaults specified
|
|
388
|
+
* in Rust, in the {@link bark} crate.
|
|
389
|
+
*/
|
|
390
|
+
new: (partial: Partial<CpfpParams> & Required<Omit<CpfpParams, never>>) => CpfpParams;
|
|
391
|
+
/**
|
|
392
|
+
* Defaults specified in the {@link bark} crate.
|
|
393
|
+
*/
|
|
394
|
+
defaults: () => Partial<CpfpParams>;
|
|
395
|
+
}>;
|
|
396
|
+
/**
|
|
397
|
+
* A Bitcoin transaction output destination
|
|
398
|
+
*/
|
|
399
|
+
export type Destination = {
|
|
400
|
+
address: string;
|
|
401
|
+
amountSats: bigint;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Generated factory for {@link Destination} record objects.
|
|
405
|
+
*/
|
|
406
|
+
export declare const Destination: Readonly<{
|
|
407
|
+
/**
|
|
408
|
+
* Create a frozen instance of {@link Destination}, with defaults specified
|
|
409
|
+
* in Rust, in the {@link bark} crate.
|
|
410
|
+
*/
|
|
411
|
+
create: (partial: Partial<Destination> & Required<Omit<Destination, never>>) => Destination;
|
|
412
|
+
/**
|
|
413
|
+
* Create a frozen instance of {@link Destination}, with defaults specified
|
|
414
|
+
* in Rust, in the {@link bark} crate.
|
|
415
|
+
*/
|
|
416
|
+
new: (partial: Partial<Destination> & Required<Omit<Destination, never>>) => Destination;
|
|
417
|
+
/**
|
|
418
|
+
* Defaults specified in the {@link bark} crate.
|
|
419
|
+
*/
|
|
420
|
+
defaults: () => Partial<Destination>;
|
|
421
|
+
}>;
|
|
422
|
+
/**
|
|
423
|
+
* Claim transaction for exited funds
|
|
424
|
+
*/
|
|
425
|
+
export type ExitClaimTransaction = {
|
|
426
|
+
/**
|
|
427
|
+
* Base64-encoded PSBT
|
|
428
|
+
*/
|
|
429
|
+
psbtBase64: string;
|
|
430
|
+
/**
|
|
431
|
+
* Transaction fee in sats
|
|
432
|
+
*/
|
|
433
|
+
feeSats: bigint;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* Generated factory for {@link ExitClaimTransaction} record objects.
|
|
437
|
+
*/
|
|
438
|
+
export declare const ExitClaimTransaction: Readonly<{
|
|
439
|
+
/**
|
|
440
|
+
* Create a frozen instance of {@link ExitClaimTransaction}, with defaults specified
|
|
441
|
+
* in Rust, in the {@link bark} crate.
|
|
442
|
+
*/
|
|
443
|
+
create: (partial: Partial<ExitClaimTransaction> & Required<Omit<ExitClaimTransaction, never>>) => ExitClaimTransaction;
|
|
444
|
+
/**
|
|
445
|
+
* Create a frozen instance of {@link ExitClaimTransaction}, with defaults specified
|
|
446
|
+
* in Rust, in the {@link bark} crate.
|
|
447
|
+
*/
|
|
448
|
+
new: (partial: Partial<ExitClaimTransaction> & Required<Omit<ExitClaimTransaction, never>>) => ExitClaimTransaction;
|
|
449
|
+
/**
|
|
450
|
+
* Defaults specified in the {@link bark} crate.
|
|
451
|
+
*/
|
|
452
|
+
defaults: () => Partial<ExitClaimTransaction>;
|
|
453
|
+
}>;
|
|
454
|
+
/**
|
|
455
|
+
* Status of an exit progression
|
|
456
|
+
*/
|
|
457
|
+
export type ExitProgressStatus = {
|
|
458
|
+
/**
|
|
459
|
+
* VTXO ID being exited
|
|
460
|
+
*/
|
|
461
|
+
vtxoId: string;
|
|
462
|
+
/**
|
|
463
|
+
* Current state
|
|
464
|
+
*/
|
|
465
|
+
state: string;
|
|
466
|
+
/**
|
|
467
|
+
* Error if any occurred
|
|
468
|
+
*/
|
|
469
|
+
error: string | undefined;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Generated factory for {@link ExitProgressStatus} record objects.
|
|
473
|
+
*/
|
|
474
|
+
export declare const ExitProgressStatus: Readonly<{
|
|
475
|
+
/**
|
|
476
|
+
* Create a frozen instance of {@link ExitProgressStatus}, with defaults specified
|
|
477
|
+
* in Rust, in the {@link bark} crate.
|
|
478
|
+
*/
|
|
479
|
+
create: (partial: Partial<ExitProgressStatus> & Required<Omit<ExitProgressStatus, never>>) => ExitProgressStatus;
|
|
480
|
+
/**
|
|
481
|
+
* Create a frozen instance of {@link ExitProgressStatus}, with defaults specified
|
|
482
|
+
* in Rust, in the {@link bark} crate.
|
|
483
|
+
*/
|
|
484
|
+
new: (partial: Partial<ExitProgressStatus> & Required<Omit<ExitProgressStatus, never>>) => ExitProgressStatus;
|
|
485
|
+
/**
|
|
486
|
+
* Defaults specified in the {@link bark} crate.
|
|
487
|
+
*/
|
|
488
|
+
defaults: () => Partial<ExitProgressStatus>;
|
|
489
|
+
}>;
|
|
490
|
+
/**
|
|
491
|
+
* Detailed status of an exit transaction
|
|
492
|
+
*/
|
|
493
|
+
export type ExitTransactionStatus = {
|
|
494
|
+
/**
|
|
495
|
+
* VTXO ID
|
|
496
|
+
*/
|
|
497
|
+
vtxoId: string;
|
|
498
|
+
/**
|
|
499
|
+
* Current state
|
|
500
|
+
*/
|
|
501
|
+
state: string;
|
|
502
|
+
/**
|
|
503
|
+
* State history (if requested)
|
|
504
|
+
*/
|
|
505
|
+
history: Array<string> | undefined;
|
|
506
|
+
/**
|
|
507
|
+
* Number of transactions
|
|
508
|
+
*/
|
|
509
|
+
transactionCount: number;
|
|
510
|
+
};
|
|
511
|
+
/**
|
|
512
|
+
* Generated factory for {@link ExitTransactionStatus} record objects.
|
|
513
|
+
*/
|
|
514
|
+
export declare const ExitTransactionStatus: Readonly<{
|
|
515
|
+
/**
|
|
516
|
+
* Create a frozen instance of {@link ExitTransactionStatus}, with defaults specified
|
|
517
|
+
* in Rust, in the {@link bark} crate.
|
|
518
|
+
*/
|
|
519
|
+
create: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, never>>) => ExitTransactionStatus;
|
|
520
|
+
/**
|
|
521
|
+
* Create a frozen instance of {@link ExitTransactionStatus}, with defaults specified
|
|
522
|
+
* in Rust, in the {@link bark} crate.
|
|
523
|
+
*/
|
|
524
|
+
new: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, never>>) => ExitTransactionStatus;
|
|
525
|
+
/**
|
|
526
|
+
* Defaults specified in the {@link bark} crate.
|
|
527
|
+
*/
|
|
528
|
+
defaults: () => Partial<ExitTransactionStatus>;
|
|
529
|
+
}>;
|
|
530
|
+
/**
|
|
531
|
+
* A VTXO in the exit process
|
|
532
|
+
*/
|
|
533
|
+
export type ExitVtxo = {
|
|
534
|
+
/**
|
|
535
|
+
* VTXO ID
|
|
536
|
+
*/
|
|
537
|
+
vtxoId: string;
|
|
538
|
+
/**
|
|
539
|
+
* Amount in sats
|
|
540
|
+
*/
|
|
541
|
+
amountSats: bigint;
|
|
542
|
+
/**
|
|
543
|
+
* Current exit state
|
|
544
|
+
*/
|
|
545
|
+
state: string;
|
|
546
|
+
/**
|
|
547
|
+
* Whether this exit is claimable
|
|
548
|
+
*/
|
|
549
|
+
isClaimable: boolean;
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* Generated factory for {@link ExitVtxo} record objects.
|
|
553
|
+
*/
|
|
554
|
+
export declare const ExitVtxo: Readonly<{
|
|
555
|
+
/**
|
|
556
|
+
* Create a frozen instance of {@link ExitVtxo}, with defaults specified
|
|
557
|
+
* in Rust, in the {@link bark} crate.
|
|
558
|
+
*/
|
|
559
|
+
create: (partial: Partial<ExitVtxo> & Required<Omit<ExitVtxo, never>>) => ExitVtxo;
|
|
560
|
+
/**
|
|
561
|
+
* Create a frozen instance of {@link ExitVtxo}, with defaults specified
|
|
562
|
+
* in Rust, in the {@link bark} crate.
|
|
563
|
+
*/
|
|
564
|
+
new: (partial: Partial<ExitVtxo> & Required<Omit<ExitVtxo, never>>) => ExitVtxo;
|
|
565
|
+
/**
|
|
566
|
+
* Defaults specified in the {@link bark} crate.
|
|
567
|
+
*/
|
|
568
|
+
defaults: () => Partial<ExitVtxo>;
|
|
569
|
+
}>;
|
|
570
|
+
/**
|
|
571
|
+
* Result of creating a BOLT11 invoice
|
|
572
|
+
*/
|
|
573
|
+
export type LightningInvoice = {
|
|
574
|
+
/**
|
|
575
|
+
* The BOLT11 invoice string
|
|
576
|
+
*/
|
|
577
|
+
invoice: string;
|
|
578
|
+
/**
|
|
579
|
+
* Amount in sats
|
|
580
|
+
*/
|
|
581
|
+
amountSats: bigint;
|
|
582
|
+
};
|
|
583
|
+
/**
|
|
584
|
+
* Generated factory for {@link LightningInvoice} record objects.
|
|
585
|
+
*/
|
|
586
|
+
export declare const LightningInvoice: Readonly<{
|
|
587
|
+
/**
|
|
588
|
+
* Create a frozen instance of {@link LightningInvoice}, with defaults specified
|
|
589
|
+
* in Rust, in the {@link bark} crate.
|
|
590
|
+
*/
|
|
591
|
+
create: (partial: Partial<LightningInvoice> & Required<Omit<LightningInvoice, never>>) => LightningInvoice;
|
|
592
|
+
/**
|
|
593
|
+
* Create a frozen instance of {@link LightningInvoice}, with defaults specified
|
|
594
|
+
* in Rust, in the {@link bark} crate.
|
|
595
|
+
*/
|
|
596
|
+
new: (partial: Partial<LightningInvoice> & Required<Omit<LightningInvoice, never>>) => LightningInvoice;
|
|
597
|
+
/**
|
|
598
|
+
* Defaults specified in the {@link bark} crate.
|
|
599
|
+
*/
|
|
600
|
+
defaults: () => Partial<LightningInvoice>;
|
|
601
|
+
}>;
|
|
602
|
+
/**
|
|
603
|
+
* Status of a pending Lightning receive
|
|
604
|
+
*/
|
|
605
|
+
export type LightningReceive = {
|
|
606
|
+
/**
|
|
607
|
+
* Payment hash
|
|
608
|
+
*/
|
|
609
|
+
paymentHash: string;
|
|
610
|
+
/**
|
|
611
|
+
* The BOLT11 invoice
|
|
612
|
+
*/
|
|
613
|
+
invoice: string;
|
|
614
|
+
/**
|
|
615
|
+
* Amount in sats
|
|
616
|
+
*/
|
|
617
|
+
amountSats: bigint;
|
|
618
|
+
/**
|
|
619
|
+
* Whether HTLC VTXOs have been received
|
|
620
|
+
*/
|
|
621
|
+
hasHtlcVtxos: boolean;
|
|
622
|
+
/**
|
|
623
|
+
* Whether preimage has been revealed
|
|
624
|
+
*/
|
|
625
|
+
preimageRevealed: boolean;
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* Generated factory for {@link LightningReceive} record objects.
|
|
629
|
+
*/
|
|
630
|
+
export declare const LightningReceive: Readonly<{
|
|
631
|
+
/**
|
|
632
|
+
* Create a frozen instance of {@link LightningReceive}, with defaults specified
|
|
633
|
+
* in Rust, in the {@link bark} crate.
|
|
634
|
+
*/
|
|
635
|
+
create: (partial: Partial<LightningReceive> & Required<Omit<LightningReceive, never>>) => LightningReceive;
|
|
636
|
+
/**
|
|
637
|
+
* Create a frozen instance of {@link LightningReceive}, with defaults specified
|
|
638
|
+
* in Rust, in the {@link bark} crate.
|
|
639
|
+
*/
|
|
640
|
+
new: (partial: Partial<LightningReceive> & Required<Omit<LightningReceive, never>>) => LightningReceive;
|
|
641
|
+
/**
|
|
642
|
+
* Defaults specified in the {@link bark} crate.
|
|
643
|
+
*/
|
|
644
|
+
defaults: () => Partial<LightningReceive>;
|
|
645
|
+
}>;
|
|
646
|
+
/**
|
|
647
|
+
* Lightning send payment information
|
|
648
|
+
*/
|
|
649
|
+
export type LightningSend = {
|
|
650
|
+
/**
|
|
651
|
+
* The invoice being paid
|
|
652
|
+
*/
|
|
653
|
+
invoice: string;
|
|
654
|
+
/**
|
|
655
|
+
* Amount in sats
|
|
656
|
+
*/
|
|
657
|
+
amountSats: bigint;
|
|
658
|
+
/**
|
|
659
|
+
* Number of HTLC VTXOs locked
|
|
660
|
+
*/
|
|
661
|
+
htlcVtxoCount: number;
|
|
662
|
+
/**
|
|
663
|
+
* Payment preimage (only present if payment completed)
|
|
664
|
+
*/
|
|
665
|
+
preimage: string | undefined;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* Generated factory for {@link LightningSend} record objects.
|
|
669
|
+
*/
|
|
670
|
+
export declare const LightningSend: Readonly<{
|
|
671
|
+
/**
|
|
672
|
+
* Create a frozen instance of {@link LightningSend}, with defaults specified
|
|
673
|
+
* in Rust, in the {@link bark} crate.
|
|
674
|
+
*/
|
|
675
|
+
create: (partial: Partial<LightningSend> & Required<Omit<LightningSend, never>>) => LightningSend;
|
|
676
|
+
/**
|
|
677
|
+
* Create a frozen instance of {@link LightningSend}, with defaults specified
|
|
678
|
+
* in Rust, in the {@link bark} crate.
|
|
679
|
+
*/
|
|
680
|
+
new: (partial: Partial<LightningSend> & Required<Omit<LightningSend, never>>) => LightningSend;
|
|
681
|
+
/**
|
|
682
|
+
* Defaults specified in the {@link bark} crate.
|
|
683
|
+
*/
|
|
684
|
+
defaults: () => Partial<LightningSend>;
|
|
685
|
+
}>;
|
|
686
|
+
/**
|
|
687
|
+
* Wallet movement/transaction record
|
|
688
|
+
*/
|
|
689
|
+
export type Movement = {
|
|
690
|
+
/**
|
|
691
|
+
* Movement ID
|
|
692
|
+
*/
|
|
693
|
+
id: number;
|
|
694
|
+
/**
|
|
695
|
+
* Status (pending, successful, failed, canceled)
|
|
696
|
+
*/
|
|
697
|
+
status: string;
|
|
698
|
+
/**
|
|
699
|
+
* Subsystem name
|
|
700
|
+
*/
|
|
701
|
+
subsystemName: string;
|
|
702
|
+
/**
|
|
703
|
+
* Subsystem kind
|
|
704
|
+
*/
|
|
705
|
+
subsystemKind: string;
|
|
706
|
+
/**
|
|
707
|
+
* Metadata as JSON string
|
|
708
|
+
*/
|
|
709
|
+
metadataJson: string;
|
|
710
|
+
/**
|
|
711
|
+
* Intended balance change in sats
|
|
712
|
+
*/
|
|
713
|
+
intendedBalanceSats: bigint;
|
|
714
|
+
/**
|
|
715
|
+
* Effective balance change in sats
|
|
716
|
+
*/
|
|
717
|
+
effectiveBalanceSats: bigint;
|
|
718
|
+
/**
|
|
719
|
+
* Offchain fee in sats
|
|
720
|
+
*/
|
|
721
|
+
offchainFeeSats: bigint;
|
|
722
|
+
/**
|
|
723
|
+
* Addresses/invoices sent to
|
|
724
|
+
*/
|
|
725
|
+
sentToAddresses: Array<string>;
|
|
726
|
+
/**
|
|
727
|
+
* Addresses/invoices received on
|
|
728
|
+
*/
|
|
729
|
+
receivedOnAddresses: Array<string>;
|
|
730
|
+
/**
|
|
731
|
+
* Input VTXO IDs
|
|
732
|
+
*/
|
|
733
|
+
inputVtxoIds: Array<string>;
|
|
734
|
+
/**
|
|
735
|
+
* Output VTXO IDs
|
|
736
|
+
*/
|
|
737
|
+
outputVtxoIds: Array<string>;
|
|
738
|
+
/**
|
|
739
|
+
* VTXOs sent to exit system
|
|
740
|
+
*/
|
|
741
|
+
exitedVtxoIds: Array<string>;
|
|
742
|
+
/**
|
|
743
|
+
* Created at timestamp
|
|
744
|
+
*/
|
|
745
|
+
createdAt: string;
|
|
746
|
+
/**
|
|
747
|
+
* Updated at timestamp
|
|
748
|
+
*/
|
|
749
|
+
updatedAt: string;
|
|
750
|
+
/**
|
|
751
|
+
* Completed at timestamp (null if not completed)
|
|
752
|
+
*/
|
|
753
|
+
completedAt: string | undefined;
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* Generated factory for {@link Movement} record objects.
|
|
757
|
+
*/
|
|
758
|
+
export declare const Movement: Readonly<{
|
|
759
|
+
/**
|
|
760
|
+
* Create a frozen instance of {@link Movement}, with defaults specified
|
|
761
|
+
* in Rust, in the {@link bark} crate.
|
|
762
|
+
*/
|
|
763
|
+
create: (partial: Partial<Movement> & Required<Omit<Movement, never>>) => Movement;
|
|
764
|
+
/**
|
|
765
|
+
* Create a frozen instance of {@link Movement}, with defaults specified
|
|
766
|
+
* in Rust, in the {@link bark} crate.
|
|
767
|
+
*/
|
|
768
|
+
new: (partial: Partial<Movement> & Required<Omit<Movement, never>>) => Movement;
|
|
769
|
+
/**
|
|
770
|
+
* Defaults specified in the {@link bark} crate.
|
|
771
|
+
*/
|
|
772
|
+
defaults: () => Partial<Movement>;
|
|
773
|
+
}>;
|
|
774
|
+
/**
|
|
775
|
+
* Result of an offboard operation
|
|
776
|
+
*/
|
|
777
|
+
export type OffboardResult = {
|
|
778
|
+
/**
|
|
779
|
+
* The round ID
|
|
780
|
+
*/
|
|
781
|
+
roundId: string;
|
|
782
|
+
};
|
|
783
|
+
/**
|
|
784
|
+
* Generated factory for {@link OffboardResult} record objects.
|
|
785
|
+
*/
|
|
786
|
+
export declare const OffboardResult: Readonly<{
|
|
787
|
+
/**
|
|
788
|
+
* Create a frozen instance of {@link OffboardResult}, with defaults specified
|
|
789
|
+
* in Rust, in the {@link bark} crate.
|
|
790
|
+
*/
|
|
791
|
+
create: (partial: Partial<OffboardResult> & Required<Omit<OffboardResult, never>>) => OffboardResult;
|
|
792
|
+
/**
|
|
793
|
+
* Create a frozen instance of {@link OffboardResult}, with defaults specified
|
|
794
|
+
* in Rust, in the {@link bark} crate.
|
|
795
|
+
*/
|
|
796
|
+
new: (partial: Partial<OffboardResult> & Required<Omit<OffboardResult, never>>) => OffboardResult;
|
|
797
|
+
/**
|
|
798
|
+
* Defaults specified in the {@link bark} crate.
|
|
799
|
+
*/
|
|
800
|
+
defaults: () => Partial<OffboardResult>;
|
|
801
|
+
}>;
|
|
802
|
+
/**
|
|
803
|
+
* Onchain Bitcoin wallet balance
|
|
804
|
+
*/
|
|
805
|
+
export type OnchainBalance = {
|
|
806
|
+
/**
|
|
807
|
+
* Confirmed balance in sats
|
|
808
|
+
*/
|
|
809
|
+
confirmedSats: bigint;
|
|
810
|
+
/**
|
|
811
|
+
* Pending balance (trusted + untrusted) in sats
|
|
812
|
+
*/
|
|
813
|
+
pendingSats: bigint;
|
|
814
|
+
/**
|
|
815
|
+
* Total balance in sats
|
|
816
|
+
*/
|
|
817
|
+
totalSats: bigint;
|
|
818
|
+
};
|
|
819
|
+
/**
|
|
820
|
+
* Generated factory for {@link OnchainBalance} record objects.
|
|
821
|
+
*/
|
|
822
|
+
export declare const OnchainBalance: Readonly<{
|
|
823
|
+
/**
|
|
824
|
+
* Create a frozen instance of {@link OnchainBalance}, with defaults specified
|
|
825
|
+
* in Rust, in the {@link bark} crate.
|
|
826
|
+
*/
|
|
827
|
+
create: (partial: Partial<OnchainBalance> & Required<Omit<OnchainBalance, never>>) => OnchainBalance;
|
|
828
|
+
/**
|
|
829
|
+
* Create a frozen instance of {@link OnchainBalance}, with defaults specified
|
|
830
|
+
* in Rust, in the {@link bark} crate.
|
|
831
|
+
*/
|
|
832
|
+
new: (partial: Partial<OnchainBalance> & Required<Omit<OnchainBalance, never>>) => OnchainBalance;
|
|
833
|
+
/**
|
|
834
|
+
* Defaults specified in the {@link bark} crate.
|
|
835
|
+
*/
|
|
836
|
+
defaults: () => Partial<OnchainBalance>;
|
|
837
|
+
}>;
|
|
838
|
+
/**
|
|
839
|
+
* A Bitcoin transaction outpoint (reference to a previous output)
|
|
840
|
+
*/
|
|
841
|
+
export type OutPoint = {
|
|
842
|
+
txid: string;
|
|
843
|
+
vout: number;
|
|
844
|
+
};
|
|
845
|
+
/**
|
|
846
|
+
* Generated factory for {@link OutPoint} record objects.
|
|
847
|
+
*/
|
|
848
|
+
export declare const OutPoint: Readonly<{
|
|
849
|
+
/**
|
|
850
|
+
* Create a frozen instance of {@link OutPoint}, with defaults specified
|
|
851
|
+
* in Rust, in the {@link bark} crate.
|
|
852
|
+
*/
|
|
853
|
+
create: (partial: Partial<OutPoint> & Required<Omit<OutPoint, never>>) => OutPoint;
|
|
854
|
+
/**
|
|
855
|
+
* Create a frozen instance of {@link OutPoint}, with defaults specified
|
|
856
|
+
* in Rust, in the {@link bark} crate.
|
|
857
|
+
*/
|
|
858
|
+
new: (partial: Partial<OutPoint> & Required<Omit<OutPoint, never>>) => OutPoint;
|
|
859
|
+
/**
|
|
860
|
+
* Defaults specified in the {@link bark} crate.
|
|
861
|
+
*/
|
|
862
|
+
defaults: () => Partial<OutPoint>;
|
|
863
|
+
}>;
|
|
864
|
+
/**
|
|
865
|
+
* Pending board transaction information
|
|
866
|
+
*/
|
|
867
|
+
export type PendingBoard = {
|
|
868
|
+
/**
|
|
869
|
+
* VTXO ID that will be created once board is registered
|
|
870
|
+
*/
|
|
871
|
+
vtxoId: string;
|
|
872
|
+
/**
|
|
873
|
+
* Amount being boarded in sats
|
|
874
|
+
*/
|
|
875
|
+
amountSats: bigint;
|
|
876
|
+
/**
|
|
877
|
+
* On-chain transaction ID
|
|
878
|
+
*/
|
|
879
|
+
txid: string;
|
|
880
|
+
};
|
|
881
|
+
/**
|
|
882
|
+
* Generated factory for {@link PendingBoard} record objects.
|
|
883
|
+
*/
|
|
884
|
+
export declare const PendingBoard: Readonly<{
|
|
885
|
+
/**
|
|
886
|
+
* Create a frozen instance of {@link PendingBoard}, with defaults specified
|
|
887
|
+
* in Rust, in the {@link bark} crate.
|
|
888
|
+
*/
|
|
889
|
+
create: (partial: Partial<PendingBoard> & Required<Omit<PendingBoard, never>>) => PendingBoard;
|
|
890
|
+
/**
|
|
891
|
+
* Create a frozen instance of {@link PendingBoard}, with defaults specified
|
|
892
|
+
* in Rust, in the {@link bark} crate.
|
|
893
|
+
*/
|
|
894
|
+
new: (partial: Partial<PendingBoard> & Required<Omit<PendingBoard, never>>) => PendingBoard;
|
|
895
|
+
/**
|
|
896
|
+
* Defaults specified in the {@link bark} crate.
|
|
897
|
+
*/
|
|
898
|
+
defaults: () => Partial<PendingBoard>;
|
|
899
|
+
}>;
|
|
900
|
+
/**
|
|
901
|
+
* A pending round state
|
|
902
|
+
*/
|
|
903
|
+
export type RoundState = {
|
|
904
|
+
/**
|
|
905
|
+
* Round ID
|
|
906
|
+
*/
|
|
907
|
+
id: number;
|
|
908
|
+
/**
|
|
909
|
+
* Whether the round is ongoing
|
|
910
|
+
*/
|
|
911
|
+
ongoing: boolean;
|
|
912
|
+
};
|
|
913
|
+
/**
|
|
914
|
+
* Generated factory for {@link RoundState} record objects.
|
|
915
|
+
*/
|
|
916
|
+
export declare const RoundState: Readonly<{
|
|
917
|
+
/**
|
|
918
|
+
* Create a frozen instance of {@link RoundState}, with defaults specified
|
|
919
|
+
* in Rust, in the {@link bark} crate.
|
|
920
|
+
*/
|
|
921
|
+
create: (partial: Partial<RoundState> & Required<Omit<RoundState, never>>) => RoundState;
|
|
922
|
+
/**
|
|
923
|
+
* Create a frozen instance of {@link RoundState}, with defaults specified
|
|
924
|
+
* in Rust, in the {@link bark} crate.
|
|
925
|
+
*/
|
|
926
|
+
new: (partial: Partial<RoundState> & Required<Omit<RoundState, never>>) => RoundState;
|
|
927
|
+
/**
|
|
928
|
+
* Defaults specified in the {@link bark} crate.
|
|
929
|
+
*/
|
|
930
|
+
defaults: () => Partial<RoundState>;
|
|
931
|
+
}>;
|
|
932
|
+
/**
|
|
933
|
+
* Simplified view of a VTXO
|
|
934
|
+
*/
|
|
935
|
+
export type Vtxo = {
|
|
936
|
+
/**
|
|
937
|
+
* VTXO id like "686...9aa:0"
|
|
938
|
+
*/
|
|
939
|
+
id: string;
|
|
940
|
+
/**
|
|
941
|
+
* Amount in sats
|
|
942
|
+
*/
|
|
943
|
+
amountSats: bigint;
|
|
944
|
+
/**
|
|
945
|
+
* Expiry height (0 if unknown)
|
|
946
|
+
*/
|
|
947
|
+
expiryHeight: number;
|
|
948
|
+
/**
|
|
949
|
+
* Type of VTXO (e.g., "board", "round", "arkoor")
|
|
950
|
+
*/
|
|
951
|
+
kind: string;
|
|
952
|
+
/**
|
|
953
|
+
* State of VTXO (e.g., "spendable", "spent", "locked")
|
|
954
|
+
*/
|
|
955
|
+
state: string;
|
|
956
|
+
};
|
|
957
|
+
/**
|
|
958
|
+
* Generated factory for {@link Vtxo} record objects.
|
|
959
|
+
*/
|
|
960
|
+
export declare const Vtxo: Readonly<{
|
|
961
|
+
/**
|
|
962
|
+
* Create a frozen instance of {@link Vtxo}, with defaults specified
|
|
963
|
+
* in Rust, in the {@link bark} crate.
|
|
964
|
+
*/
|
|
965
|
+
create: (partial: Partial<Vtxo> & Required<Omit<Vtxo, never>>) => Vtxo;
|
|
966
|
+
/**
|
|
967
|
+
* Create a frozen instance of {@link Vtxo}, with defaults specified
|
|
968
|
+
* in Rust, in the {@link bark} crate.
|
|
969
|
+
*/
|
|
970
|
+
new: (partial: Partial<Vtxo> & Required<Omit<Vtxo, never>>) => Vtxo;
|
|
971
|
+
/**
|
|
972
|
+
* Defaults specified in the {@link bark} crate.
|
|
973
|
+
*/
|
|
974
|
+
defaults: () => Partial<Vtxo>;
|
|
975
|
+
}>;
|
|
976
|
+
/**
|
|
977
|
+
* Read-only properties of the wallet
|
|
978
|
+
*/
|
|
979
|
+
export type WalletProperties = {
|
|
980
|
+
network: Network;
|
|
981
|
+
fingerprint: string;
|
|
982
|
+
};
|
|
983
|
+
/**
|
|
984
|
+
* Generated factory for {@link WalletProperties} record objects.
|
|
985
|
+
*/
|
|
986
|
+
export declare const WalletProperties: Readonly<{
|
|
987
|
+
/**
|
|
988
|
+
* Create a frozen instance of {@link WalletProperties}, with defaults specified
|
|
989
|
+
* in Rust, in the {@link bark} crate.
|
|
990
|
+
*/
|
|
991
|
+
create: (partial: Partial<WalletProperties> & Required<Omit<WalletProperties, never>>) => WalletProperties;
|
|
992
|
+
/**
|
|
993
|
+
* Create a frozen instance of {@link WalletProperties}, with defaults specified
|
|
994
|
+
* in Rust, in the {@link bark} crate.
|
|
995
|
+
*/
|
|
996
|
+
new: (partial: Partial<WalletProperties> & Required<Omit<WalletProperties, never>>) => WalletProperties;
|
|
997
|
+
/**
|
|
998
|
+
* Defaults specified in the {@link bark} crate.
|
|
999
|
+
*/
|
|
1000
|
+
defaults: () => Partial<WalletProperties>;
|
|
1001
|
+
}>;
|
|
1002
|
+
export declare enum BarkError_Tags {
|
|
1003
|
+
Network = "Network",
|
|
1004
|
+
Database = "Database",
|
|
1005
|
+
InvalidMnemonic = "InvalidMnemonic",
|
|
1006
|
+
InvalidAddress = "InvalidAddress",
|
|
1007
|
+
InvalidInvoice = "InvalidInvoice",
|
|
1008
|
+
InvalidPsbt = "InvalidPsbt",
|
|
1009
|
+
InvalidTransaction = "InvalidTransaction",
|
|
1010
|
+
InsufficientFunds = "InsufficientFunds",
|
|
1011
|
+
NotFound = "NotFound",
|
|
1012
|
+
ServerConnection = "ServerConnection",
|
|
1013
|
+
Internal = "Internal",
|
|
1014
|
+
OnchainWalletRequired = "OnchainWalletRequired"
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Error types that can occur when using the Bark wallet
|
|
1018
|
+
*/
|
|
1019
|
+
export declare const BarkError: Readonly<{
|
|
1020
|
+
instanceOf: (obj: any) => obj is BarkError;
|
|
1021
|
+
Network: {
|
|
1022
|
+
new (inner: {
|
|
1023
|
+
errorMessage: string;
|
|
1024
|
+
}): {
|
|
1025
|
+
readonly tag: BarkError_Tags.Network;
|
|
1026
|
+
readonly inner: Readonly<{
|
|
1027
|
+
errorMessage: string;
|
|
1028
|
+
}>;
|
|
1029
|
+
/**
|
|
1030
|
+
* @private
|
|
1031
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1032
|
+
*/
|
|
1033
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1034
|
+
name: string;
|
|
1035
|
+
message: string;
|
|
1036
|
+
stack?: string;
|
|
1037
|
+
cause?: unknown;
|
|
1038
|
+
};
|
|
1039
|
+
"new"(inner: {
|
|
1040
|
+
errorMessage: string;
|
|
1041
|
+
}): {
|
|
1042
|
+
readonly tag: BarkError_Tags.Network;
|
|
1043
|
+
readonly inner: Readonly<{
|
|
1044
|
+
errorMessage: string;
|
|
1045
|
+
}>;
|
|
1046
|
+
/**
|
|
1047
|
+
* @private
|
|
1048
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1049
|
+
*/
|
|
1050
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1051
|
+
name: string;
|
|
1052
|
+
message: string;
|
|
1053
|
+
stack?: string;
|
|
1054
|
+
cause?: unknown;
|
|
1055
|
+
};
|
|
1056
|
+
instanceOf(obj: any): obj is {
|
|
1057
|
+
readonly tag: BarkError_Tags.Network;
|
|
1058
|
+
readonly inner: Readonly<{
|
|
1059
|
+
errorMessage: string;
|
|
1060
|
+
}>;
|
|
1061
|
+
/**
|
|
1062
|
+
* @private
|
|
1063
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1064
|
+
*/
|
|
1065
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1066
|
+
name: string;
|
|
1067
|
+
message: string;
|
|
1068
|
+
stack?: string;
|
|
1069
|
+
cause?: unknown;
|
|
1070
|
+
};
|
|
1071
|
+
hasInner(obj: any): obj is {
|
|
1072
|
+
readonly tag: BarkError_Tags.Network;
|
|
1073
|
+
readonly inner: Readonly<{
|
|
1074
|
+
errorMessage: string;
|
|
1075
|
+
}>;
|
|
1076
|
+
/**
|
|
1077
|
+
* @private
|
|
1078
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1079
|
+
*/
|
|
1080
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1081
|
+
name: string;
|
|
1082
|
+
message: string;
|
|
1083
|
+
stack?: string;
|
|
1084
|
+
cause?: unknown;
|
|
1085
|
+
};
|
|
1086
|
+
getInner(obj: {
|
|
1087
|
+
readonly tag: BarkError_Tags.Network;
|
|
1088
|
+
readonly inner: Readonly<{
|
|
1089
|
+
errorMessage: string;
|
|
1090
|
+
}>;
|
|
1091
|
+
/**
|
|
1092
|
+
* @private
|
|
1093
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1094
|
+
*/
|
|
1095
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1096
|
+
name: string;
|
|
1097
|
+
message: string;
|
|
1098
|
+
stack?: string;
|
|
1099
|
+
cause?: unknown;
|
|
1100
|
+
}): Readonly<{
|
|
1101
|
+
errorMessage: string;
|
|
1102
|
+
}>;
|
|
1103
|
+
isError(error: unknown): error is Error;
|
|
1104
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1105
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1106
|
+
stackTraceLimit: number;
|
|
1107
|
+
};
|
|
1108
|
+
Database: {
|
|
1109
|
+
new (inner: {
|
|
1110
|
+
errorMessage: string;
|
|
1111
|
+
}): {
|
|
1112
|
+
readonly tag: BarkError_Tags.Database;
|
|
1113
|
+
readonly inner: Readonly<{
|
|
1114
|
+
errorMessage: string;
|
|
1115
|
+
}>;
|
|
1116
|
+
/**
|
|
1117
|
+
* @private
|
|
1118
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1119
|
+
*/
|
|
1120
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1121
|
+
name: string;
|
|
1122
|
+
message: string;
|
|
1123
|
+
stack?: string;
|
|
1124
|
+
cause?: unknown;
|
|
1125
|
+
};
|
|
1126
|
+
"new"(inner: {
|
|
1127
|
+
errorMessage: string;
|
|
1128
|
+
}): {
|
|
1129
|
+
readonly tag: BarkError_Tags.Database;
|
|
1130
|
+
readonly inner: Readonly<{
|
|
1131
|
+
errorMessage: string;
|
|
1132
|
+
}>;
|
|
1133
|
+
/**
|
|
1134
|
+
* @private
|
|
1135
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1136
|
+
*/
|
|
1137
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1138
|
+
name: string;
|
|
1139
|
+
message: string;
|
|
1140
|
+
stack?: string;
|
|
1141
|
+
cause?: unknown;
|
|
1142
|
+
};
|
|
1143
|
+
instanceOf(obj: any): obj is {
|
|
1144
|
+
readonly tag: BarkError_Tags.Database;
|
|
1145
|
+
readonly inner: Readonly<{
|
|
1146
|
+
errorMessage: string;
|
|
1147
|
+
}>;
|
|
1148
|
+
/**
|
|
1149
|
+
* @private
|
|
1150
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1151
|
+
*/
|
|
1152
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1153
|
+
name: string;
|
|
1154
|
+
message: string;
|
|
1155
|
+
stack?: string;
|
|
1156
|
+
cause?: unknown;
|
|
1157
|
+
};
|
|
1158
|
+
hasInner(obj: any): obj is {
|
|
1159
|
+
readonly tag: BarkError_Tags.Database;
|
|
1160
|
+
readonly inner: Readonly<{
|
|
1161
|
+
errorMessage: string;
|
|
1162
|
+
}>;
|
|
1163
|
+
/**
|
|
1164
|
+
* @private
|
|
1165
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1166
|
+
*/
|
|
1167
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1168
|
+
name: string;
|
|
1169
|
+
message: string;
|
|
1170
|
+
stack?: string;
|
|
1171
|
+
cause?: unknown;
|
|
1172
|
+
};
|
|
1173
|
+
getInner(obj: {
|
|
1174
|
+
readonly tag: BarkError_Tags.Database;
|
|
1175
|
+
readonly inner: Readonly<{
|
|
1176
|
+
errorMessage: string;
|
|
1177
|
+
}>;
|
|
1178
|
+
/**
|
|
1179
|
+
* @private
|
|
1180
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1181
|
+
*/
|
|
1182
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1183
|
+
name: string;
|
|
1184
|
+
message: string;
|
|
1185
|
+
stack?: string;
|
|
1186
|
+
cause?: unknown;
|
|
1187
|
+
}): Readonly<{
|
|
1188
|
+
errorMessage: string;
|
|
1189
|
+
}>;
|
|
1190
|
+
isError(error: unknown): error is Error;
|
|
1191
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1192
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1193
|
+
stackTraceLimit: number;
|
|
1194
|
+
};
|
|
1195
|
+
InvalidMnemonic: {
|
|
1196
|
+
new (inner: {
|
|
1197
|
+
errorMessage: string;
|
|
1198
|
+
}): {
|
|
1199
|
+
readonly tag: BarkError_Tags.InvalidMnemonic;
|
|
1200
|
+
readonly inner: Readonly<{
|
|
1201
|
+
errorMessage: string;
|
|
1202
|
+
}>;
|
|
1203
|
+
/**
|
|
1204
|
+
* @private
|
|
1205
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1206
|
+
*/
|
|
1207
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1208
|
+
name: string;
|
|
1209
|
+
message: string;
|
|
1210
|
+
stack?: string;
|
|
1211
|
+
cause?: unknown;
|
|
1212
|
+
};
|
|
1213
|
+
"new"(inner: {
|
|
1214
|
+
errorMessage: string;
|
|
1215
|
+
}): {
|
|
1216
|
+
readonly tag: BarkError_Tags.InvalidMnemonic;
|
|
1217
|
+
readonly inner: Readonly<{
|
|
1218
|
+
errorMessage: string;
|
|
1219
|
+
}>;
|
|
1220
|
+
/**
|
|
1221
|
+
* @private
|
|
1222
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1223
|
+
*/
|
|
1224
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1225
|
+
name: string;
|
|
1226
|
+
message: string;
|
|
1227
|
+
stack?: string;
|
|
1228
|
+
cause?: unknown;
|
|
1229
|
+
};
|
|
1230
|
+
instanceOf(obj: any): obj is {
|
|
1231
|
+
readonly tag: BarkError_Tags.InvalidMnemonic;
|
|
1232
|
+
readonly inner: Readonly<{
|
|
1233
|
+
errorMessage: string;
|
|
1234
|
+
}>;
|
|
1235
|
+
/**
|
|
1236
|
+
* @private
|
|
1237
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1238
|
+
*/
|
|
1239
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1240
|
+
name: string;
|
|
1241
|
+
message: string;
|
|
1242
|
+
stack?: string;
|
|
1243
|
+
cause?: unknown;
|
|
1244
|
+
};
|
|
1245
|
+
hasInner(obj: any): obj is {
|
|
1246
|
+
readonly tag: BarkError_Tags.InvalidMnemonic;
|
|
1247
|
+
readonly inner: Readonly<{
|
|
1248
|
+
errorMessage: string;
|
|
1249
|
+
}>;
|
|
1250
|
+
/**
|
|
1251
|
+
* @private
|
|
1252
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1253
|
+
*/
|
|
1254
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1255
|
+
name: string;
|
|
1256
|
+
message: string;
|
|
1257
|
+
stack?: string;
|
|
1258
|
+
cause?: unknown;
|
|
1259
|
+
};
|
|
1260
|
+
getInner(obj: {
|
|
1261
|
+
readonly tag: BarkError_Tags.InvalidMnemonic;
|
|
1262
|
+
readonly inner: Readonly<{
|
|
1263
|
+
errorMessage: string;
|
|
1264
|
+
}>;
|
|
1265
|
+
/**
|
|
1266
|
+
* @private
|
|
1267
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1268
|
+
*/
|
|
1269
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1270
|
+
name: string;
|
|
1271
|
+
message: string;
|
|
1272
|
+
stack?: string;
|
|
1273
|
+
cause?: unknown;
|
|
1274
|
+
}): Readonly<{
|
|
1275
|
+
errorMessage: string;
|
|
1276
|
+
}>;
|
|
1277
|
+
isError(error: unknown): error is Error;
|
|
1278
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1279
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1280
|
+
stackTraceLimit: number;
|
|
1281
|
+
};
|
|
1282
|
+
InvalidAddress: {
|
|
1283
|
+
new (inner: {
|
|
1284
|
+
errorMessage: string;
|
|
1285
|
+
}): {
|
|
1286
|
+
readonly tag: BarkError_Tags.InvalidAddress;
|
|
1287
|
+
readonly inner: Readonly<{
|
|
1288
|
+
errorMessage: string;
|
|
1289
|
+
}>;
|
|
1290
|
+
/**
|
|
1291
|
+
* @private
|
|
1292
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1293
|
+
*/
|
|
1294
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1295
|
+
name: string;
|
|
1296
|
+
message: string;
|
|
1297
|
+
stack?: string;
|
|
1298
|
+
cause?: unknown;
|
|
1299
|
+
};
|
|
1300
|
+
"new"(inner: {
|
|
1301
|
+
errorMessage: string;
|
|
1302
|
+
}): {
|
|
1303
|
+
readonly tag: BarkError_Tags.InvalidAddress;
|
|
1304
|
+
readonly inner: Readonly<{
|
|
1305
|
+
errorMessage: string;
|
|
1306
|
+
}>;
|
|
1307
|
+
/**
|
|
1308
|
+
* @private
|
|
1309
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1310
|
+
*/
|
|
1311
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1312
|
+
name: string;
|
|
1313
|
+
message: string;
|
|
1314
|
+
stack?: string;
|
|
1315
|
+
cause?: unknown;
|
|
1316
|
+
};
|
|
1317
|
+
instanceOf(obj: any): obj is {
|
|
1318
|
+
readonly tag: BarkError_Tags.InvalidAddress;
|
|
1319
|
+
readonly inner: Readonly<{
|
|
1320
|
+
errorMessage: string;
|
|
1321
|
+
}>;
|
|
1322
|
+
/**
|
|
1323
|
+
* @private
|
|
1324
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1325
|
+
*/
|
|
1326
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1327
|
+
name: string;
|
|
1328
|
+
message: string;
|
|
1329
|
+
stack?: string;
|
|
1330
|
+
cause?: unknown;
|
|
1331
|
+
};
|
|
1332
|
+
hasInner(obj: any): obj is {
|
|
1333
|
+
readonly tag: BarkError_Tags.InvalidAddress;
|
|
1334
|
+
readonly inner: Readonly<{
|
|
1335
|
+
errorMessage: string;
|
|
1336
|
+
}>;
|
|
1337
|
+
/**
|
|
1338
|
+
* @private
|
|
1339
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1340
|
+
*/
|
|
1341
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1342
|
+
name: string;
|
|
1343
|
+
message: string;
|
|
1344
|
+
stack?: string;
|
|
1345
|
+
cause?: unknown;
|
|
1346
|
+
};
|
|
1347
|
+
getInner(obj: {
|
|
1348
|
+
readonly tag: BarkError_Tags.InvalidAddress;
|
|
1349
|
+
readonly inner: Readonly<{
|
|
1350
|
+
errorMessage: string;
|
|
1351
|
+
}>;
|
|
1352
|
+
/**
|
|
1353
|
+
* @private
|
|
1354
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1355
|
+
*/
|
|
1356
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1357
|
+
name: string;
|
|
1358
|
+
message: string;
|
|
1359
|
+
stack?: string;
|
|
1360
|
+
cause?: unknown;
|
|
1361
|
+
}): Readonly<{
|
|
1362
|
+
errorMessage: string;
|
|
1363
|
+
}>;
|
|
1364
|
+
isError(error: unknown): error is Error;
|
|
1365
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1366
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1367
|
+
stackTraceLimit: number;
|
|
1368
|
+
};
|
|
1369
|
+
InvalidInvoice: {
|
|
1370
|
+
new (inner: {
|
|
1371
|
+
errorMessage: string;
|
|
1372
|
+
}): {
|
|
1373
|
+
readonly tag: BarkError_Tags.InvalidInvoice;
|
|
1374
|
+
readonly inner: Readonly<{
|
|
1375
|
+
errorMessage: string;
|
|
1376
|
+
}>;
|
|
1377
|
+
/**
|
|
1378
|
+
* @private
|
|
1379
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1380
|
+
*/
|
|
1381
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1382
|
+
name: string;
|
|
1383
|
+
message: string;
|
|
1384
|
+
stack?: string;
|
|
1385
|
+
cause?: unknown;
|
|
1386
|
+
};
|
|
1387
|
+
"new"(inner: {
|
|
1388
|
+
errorMessage: string;
|
|
1389
|
+
}): {
|
|
1390
|
+
readonly tag: BarkError_Tags.InvalidInvoice;
|
|
1391
|
+
readonly inner: Readonly<{
|
|
1392
|
+
errorMessage: string;
|
|
1393
|
+
}>;
|
|
1394
|
+
/**
|
|
1395
|
+
* @private
|
|
1396
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1397
|
+
*/
|
|
1398
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1399
|
+
name: string;
|
|
1400
|
+
message: string;
|
|
1401
|
+
stack?: string;
|
|
1402
|
+
cause?: unknown;
|
|
1403
|
+
};
|
|
1404
|
+
instanceOf(obj: any): obj is {
|
|
1405
|
+
readonly tag: BarkError_Tags.InvalidInvoice;
|
|
1406
|
+
readonly inner: Readonly<{
|
|
1407
|
+
errorMessage: string;
|
|
1408
|
+
}>;
|
|
1409
|
+
/**
|
|
1410
|
+
* @private
|
|
1411
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1412
|
+
*/
|
|
1413
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1414
|
+
name: string;
|
|
1415
|
+
message: string;
|
|
1416
|
+
stack?: string;
|
|
1417
|
+
cause?: unknown;
|
|
1418
|
+
};
|
|
1419
|
+
hasInner(obj: any): obj is {
|
|
1420
|
+
readonly tag: BarkError_Tags.InvalidInvoice;
|
|
1421
|
+
readonly inner: Readonly<{
|
|
1422
|
+
errorMessage: string;
|
|
1423
|
+
}>;
|
|
1424
|
+
/**
|
|
1425
|
+
* @private
|
|
1426
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1427
|
+
*/
|
|
1428
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1429
|
+
name: string;
|
|
1430
|
+
message: string;
|
|
1431
|
+
stack?: string;
|
|
1432
|
+
cause?: unknown;
|
|
1433
|
+
};
|
|
1434
|
+
getInner(obj: {
|
|
1435
|
+
readonly tag: BarkError_Tags.InvalidInvoice;
|
|
1436
|
+
readonly inner: Readonly<{
|
|
1437
|
+
errorMessage: string;
|
|
1438
|
+
}>;
|
|
1439
|
+
/**
|
|
1440
|
+
* @private
|
|
1441
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1442
|
+
*/
|
|
1443
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1444
|
+
name: string;
|
|
1445
|
+
message: string;
|
|
1446
|
+
stack?: string;
|
|
1447
|
+
cause?: unknown;
|
|
1448
|
+
}): Readonly<{
|
|
1449
|
+
errorMessage: string;
|
|
1450
|
+
}>;
|
|
1451
|
+
isError(error: unknown): error is Error;
|
|
1452
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1453
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1454
|
+
stackTraceLimit: number;
|
|
1455
|
+
};
|
|
1456
|
+
InvalidPsbt: {
|
|
1457
|
+
new (inner: {
|
|
1458
|
+
errorMessage: string;
|
|
1459
|
+
}): {
|
|
1460
|
+
readonly tag: BarkError_Tags.InvalidPsbt;
|
|
1461
|
+
readonly inner: Readonly<{
|
|
1462
|
+
errorMessage: string;
|
|
1463
|
+
}>;
|
|
1464
|
+
/**
|
|
1465
|
+
* @private
|
|
1466
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1467
|
+
*/
|
|
1468
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1469
|
+
name: string;
|
|
1470
|
+
message: string;
|
|
1471
|
+
stack?: string;
|
|
1472
|
+
cause?: unknown;
|
|
1473
|
+
};
|
|
1474
|
+
"new"(inner: {
|
|
1475
|
+
errorMessage: string;
|
|
1476
|
+
}): {
|
|
1477
|
+
readonly tag: BarkError_Tags.InvalidPsbt;
|
|
1478
|
+
readonly inner: Readonly<{
|
|
1479
|
+
errorMessage: string;
|
|
1480
|
+
}>;
|
|
1481
|
+
/**
|
|
1482
|
+
* @private
|
|
1483
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1484
|
+
*/
|
|
1485
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1486
|
+
name: string;
|
|
1487
|
+
message: string;
|
|
1488
|
+
stack?: string;
|
|
1489
|
+
cause?: unknown;
|
|
1490
|
+
};
|
|
1491
|
+
instanceOf(obj: any): obj is {
|
|
1492
|
+
readonly tag: BarkError_Tags.InvalidPsbt;
|
|
1493
|
+
readonly inner: Readonly<{
|
|
1494
|
+
errorMessage: string;
|
|
1495
|
+
}>;
|
|
1496
|
+
/**
|
|
1497
|
+
* @private
|
|
1498
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1499
|
+
*/
|
|
1500
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1501
|
+
name: string;
|
|
1502
|
+
message: string;
|
|
1503
|
+
stack?: string;
|
|
1504
|
+
cause?: unknown;
|
|
1505
|
+
};
|
|
1506
|
+
hasInner(obj: any): obj is {
|
|
1507
|
+
readonly tag: BarkError_Tags.InvalidPsbt;
|
|
1508
|
+
readonly inner: Readonly<{
|
|
1509
|
+
errorMessage: string;
|
|
1510
|
+
}>;
|
|
1511
|
+
/**
|
|
1512
|
+
* @private
|
|
1513
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1514
|
+
*/
|
|
1515
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1516
|
+
name: string;
|
|
1517
|
+
message: string;
|
|
1518
|
+
stack?: string;
|
|
1519
|
+
cause?: unknown;
|
|
1520
|
+
};
|
|
1521
|
+
getInner(obj: {
|
|
1522
|
+
readonly tag: BarkError_Tags.InvalidPsbt;
|
|
1523
|
+
readonly inner: Readonly<{
|
|
1524
|
+
errorMessage: string;
|
|
1525
|
+
}>;
|
|
1526
|
+
/**
|
|
1527
|
+
* @private
|
|
1528
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1529
|
+
*/
|
|
1530
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1531
|
+
name: string;
|
|
1532
|
+
message: string;
|
|
1533
|
+
stack?: string;
|
|
1534
|
+
cause?: unknown;
|
|
1535
|
+
}): Readonly<{
|
|
1536
|
+
errorMessage: string;
|
|
1537
|
+
}>;
|
|
1538
|
+
isError(error: unknown): error is Error;
|
|
1539
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1540
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1541
|
+
stackTraceLimit: number;
|
|
1542
|
+
};
|
|
1543
|
+
InvalidTransaction: {
|
|
1544
|
+
new (inner: {
|
|
1545
|
+
errorMessage: string;
|
|
1546
|
+
}): {
|
|
1547
|
+
readonly tag: BarkError_Tags.InvalidTransaction;
|
|
1548
|
+
readonly inner: Readonly<{
|
|
1549
|
+
errorMessage: string;
|
|
1550
|
+
}>;
|
|
1551
|
+
/**
|
|
1552
|
+
* @private
|
|
1553
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1554
|
+
*/
|
|
1555
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1556
|
+
name: string;
|
|
1557
|
+
message: string;
|
|
1558
|
+
stack?: string;
|
|
1559
|
+
cause?: unknown;
|
|
1560
|
+
};
|
|
1561
|
+
"new"(inner: {
|
|
1562
|
+
errorMessage: string;
|
|
1563
|
+
}): {
|
|
1564
|
+
readonly tag: BarkError_Tags.InvalidTransaction;
|
|
1565
|
+
readonly inner: Readonly<{
|
|
1566
|
+
errorMessage: string;
|
|
1567
|
+
}>;
|
|
1568
|
+
/**
|
|
1569
|
+
* @private
|
|
1570
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1571
|
+
*/
|
|
1572
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1573
|
+
name: string;
|
|
1574
|
+
message: string;
|
|
1575
|
+
stack?: string;
|
|
1576
|
+
cause?: unknown;
|
|
1577
|
+
};
|
|
1578
|
+
instanceOf(obj: any): obj is {
|
|
1579
|
+
readonly tag: BarkError_Tags.InvalidTransaction;
|
|
1580
|
+
readonly inner: Readonly<{
|
|
1581
|
+
errorMessage: string;
|
|
1582
|
+
}>;
|
|
1583
|
+
/**
|
|
1584
|
+
* @private
|
|
1585
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1586
|
+
*/
|
|
1587
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1588
|
+
name: string;
|
|
1589
|
+
message: string;
|
|
1590
|
+
stack?: string;
|
|
1591
|
+
cause?: unknown;
|
|
1592
|
+
};
|
|
1593
|
+
hasInner(obj: any): obj is {
|
|
1594
|
+
readonly tag: BarkError_Tags.InvalidTransaction;
|
|
1595
|
+
readonly inner: Readonly<{
|
|
1596
|
+
errorMessage: string;
|
|
1597
|
+
}>;
|
|
1598
|
+
/**
|
|
1599
|
+
* @private
|
|
1600
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1601
|
+
*/
|
|
1602
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1603
|
+
name: string;
|
|
1604
|
+
message: string;
|
|
1605
|
+
stack?: string;
|
|
1606
|
+
cause?: unknown;
|
|
1607
|
+
};
|
|
1608
|
+
getInner(obj: {
|
|
1609
|
+
readonly tag: BarkError_Tags.InvalidTransaction;
|
|
1610
|
+
readonly inner: Readonly<{
|
|
1611
|
+
errorMessage: string;
|
|
1612
|
+
}>;
|
|
1613
|
+
/**
|
|
1614
|
+
* @private
|
|
1615
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1616
|
+
*/
|
|
1617
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1618
|
+
name: string;
|
|
1619
|
+
message: string;
|
|
1620
|
+
stack?: string;
|
|
1621
|
+
cause?: unknown;
|
|
1622
|
+
}): Readonly<{
|
|
1623
|
+
errorMessage: string;
|
|
1624
|
+
}>;
|
|
1625
|
+
isError(error: unknown): error is Error;
|
|
1626
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1627
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1628
|
+
stackTraceLimit: number;
|
|
1629
|
+
};
|
|
1630
|
+
InsufficientFunds: {
|
|
1631
|
+
new (inner: {
|
|
1632
|
+
errorMessage: string;
|
|
1633
|
+
}): {
|
|
1634
|
+
readonly tag: BarkError_Tags.InsufficientFunds;
|
|
1635
|
+
readonly inner: Readonly<{
|
|
1636
|
+
errorMessage: string;
|
|
1637
|
+
}>;
|
|
1638
|
+
/**
|
|
1639
|
+
* @private
|
|
1640
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1641
|
+
*/
|
|
1642
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1643
|
+
name: string;
|
|
1644
|
+
message: string;
|
|
1645
|
+
stack?: string;
|
|
1646
|
+
cause?: unknown;
|
|
1647
|
+
};
|
|
1648
|
+
"new"(inner: {
|
|
1649
|
+
errorMessage: string;
|
|
1650
|
+
}): {
|
|
1651
|
+
readonly tag: BarkError_Tags.InsufficientFunds;
|
|
1652
|
+
readonly inner: Readonly<{
|
|
1653
|
+
errorMessage: string;
|
|
1654
|
+
}>;
|
|
1655
|
+
/**
|
|
1656
|
+
* @private
|
|
1657
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1658
|
+
*/
|
|
1659
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1660
|
+
name: string;
|
|
1661
|
+
message: string;
|
|
1662
|
+
stack?: string;
|
|
1663
|
+
cause?: unknown;
|
|
1664
|
+
};
|
|
1665
|
+
instanceOf(obj: any): obj is {
|
|
1666
|
+
readonly tag: BarkError_Tags.InsufficientFunds;
|
|
1667
|
+
readonly inner: Readonly<{
|
|
1668
|
+
errorMessage: string;
|
|
1669
|
+
}>;
|
|
1670
|
+
/**
|
|
1671
|
+
* @private
|
|
1672
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1673
|
+
*/
|
|
1674
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1675
|
+
name: string;
|
|
1676
|
+
message: string;
|
|
1677
|
+
stack?: string;
|
|
1678
|
+
cause?: unknown;
|
|
1679
|
+
};
|
|
1680
|
+
hasInner(obj: any): obj is {
|
|
1681
|
+
readonly tag: BarkError_Tags.InsufficientFunds;
|
|
1682
|
+
readonly inner: Readonly<{
|
|
1683
|
+
errorMessage: string;
|
|
1684
|
+
}>;
|
|
1685
|
+
/**
|
|
1686
|
+
* @private
|
|
1687
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1688
|
+
*/
|
|
1689
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1690
|
+
name: string;
|
|
1691
|
+
message: string;
|
|
1692
|
+
stack?: string;
|
|
1693
|
+
cause?: unknown;
|
|
1694
|
+
};
|
|
1695
|
+
getInner(obj: {
|
|
1696
|
+
readonly tag: BarkError_Tags.InsufficientFunds;
|
|
1697
|
+
readonly inner: Readonly<{
|
|
1698
|
+
errorMessage: string;
|
|
1699
|
+
}>;
|
|
1700
|
+
/**
|
|
1701
|
+
* @private
|
|
1702
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1703
|
+
*/
|
|
1704
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1705
|
+
name: string;
|
|
1706
|
+
message: string;
|
|
1707
|
+
stack?: string;
|
|
1708
|
+
cause?: unknown;
|
|
1709
|
+
}): Readonly<{
|
|
1710
|
+
errorMessage: string;
|
|
1711
|
+
}>;
|
|
1712
|
+
isError(error: unknown): error is Error;
|
|
1713
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1714
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1715
|
+
stackTraceLimit: number;
|
|
1716
|
+
};
|
|
1717
|
+
NotFound: {
|
|
1718
|
+
new (inner: {
|
|
1719
|
+
errorMessage: string;
|
|
1720
|
+
}): {
|
|
1721
|
+
readonly tag: BarkError_Tags.NotFound;
|
|
1722
|
+
readonly inner: Readonly<{
|
|
1723
|
+
errorMessage: string;
|
|
1724
|
+
}>;
|
|
1725
|
+
/**
|
|
1726
|
+
* @private
|
|
1727
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1728
|
+
*/
|
|
1729
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1730
|
+
name: string;
|
|
1731
|
+
message: string;
|
|
1732
|
+
stack?: string;
|
|
1733
|
+
cause?: unknown;
|
|
1734
|
+
};
|
|
1735
|
+
"new"(inner: {
|
|
1736
|
+
errorMessage: string;
|
|
1737
|
+
}): {
|
|
1738
|
+
readonly tag: BarkError_Tags.NotFound;
|
|
1739
|
+
readonly inner: Readonly<{
|
|
1740
|
+
errorMessage: string;
|
|
1741
|
+
}>;
|
|
1742
|
+
/**
|
|
1743
|
+
* @private
|
|
1744
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1745
|
+
*/
|
|
1746
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1747
|
+
name: string;
|
|
1748
|
+
message: string;
|
|
1749
|
+
stack?: string;
|
|
1750
|
+
cause?: unknown;
|
|
1751
|
+
};
|
|
1752
|
+
instanceOf(obj: any): obj is {
|
|
1753
|
+
readonly tag: BarkError_Tags.NotFound;
|
|
1754
|
+
readonly inner: Readonly<{
|
|
1755
|
+
errorMessage: string;
|
|
1756
|
+
}>;
|
|
1757
|
+
/**
|
|
1758
|
+
* @private
|
|
1759
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1760
|
+
*/
|
|
1761
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1762
|
+
name: string;
|
|
1763
|
+
message: string;
|
|
1764
|
+
stack?: string;
|
|
1765
|
+
cause?: unknown;
|
|
1766
|
+
};
|
|
1767
|
+
hasInner(obj: any): obj is {
|
|
1768
|
+
readonly tag: BarkError_Tags.NotFound;
|
|
1769
|
+
readonly inner: Readonly<{
|
|
1770
|
+
errorMessage: string;
|
|
1771
|
+
}>;
|
|
1772
|
+
/**
|
|
1773
|
+
* @private
|
|
1774
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1775
|
+
*/
|
|
1776
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1777
|
+
name: string;
|
|
1778
|
+
message: string;
|
|
1779
|
+
stack?: string;
|
|
1780
|
+
cause?: unknown;
|
|
1781
|
+
};
|
|
1782
|
+
getInner(obj: {
|
|
1783
|
+
readonly tag: BarkError_Tags.NotFound;
|
|
1784
|
+
readonly inner: Readonly<{
|
|
1785
|
+
errorMessage: string;
|
|
1786
|
+
}>;
|
|
1787
|
+
/**
|
|
1788
|
+
* @private
|
|
1789
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1790
|
+
*/
|
|
1791
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1792
|
+
name: string;
|
|
1793
|
+
message: string;
|
|
1794
|
+
stack?: string;
|
|
1795
|
+
cause?: unknown;
|
|
1796
|
+
}): Readonly<{
|
|
1797
|
+
errorMessage: string;
|
|
1798
|
+
}>;
|
|
1799
|
+
isError(error: unknown): error is Error;
|
|
1800
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1801
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1802
|
+
stackTraceLimit: number;
|
|
1803
|
+
};
|
|
1804
|
+
ServerConnection: {
|
|
1805
|
+
new (inner: {
|
|
1806
|
+
errorMessage: string;
|
|
1807
|
+
}): {
|
|
1808
|
+
readonly tag: BarkError_Tags.ServerConnection;
|
|
1809
|
+
readonly inner: Readonly<{
|
|
1810
|
+
errorMessage: string;
|
|
1811
|
+
}>;
|
|
1812
|
+
/**
|
|
1813
|
+
* @private
|
|
1814
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1815
|
+
*/
|
|
1816
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1817
|
+
name: string;
|
|
1818
|
+
message: string;
|
|
1819
|
+
stack?: string;
|
|
1820
|
+
cause?: unknown;
|
|
1821
|
+
};
|
|
1822
|
+
"new"(inner: {
|
|
1823
|
+
errorMessage: string;
|
|
1824
|
+
}): {
|
|
1825
|
+
readonly tag: BarkError_Tags.ServerConnection;
|
|
1826
|
+
readonly inner: Readonly<{
|
|
1827
|
+
errorMessage: string;
|
|
1828
|
+
}>;
|
|
1829
|
+
/**
|
|
1830
|
+
* @private
|
|
1831
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1832
|
+
*/
|
|
1833
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1834
|
+
name: string;
|
|
1835
|
+
message: string;
|
|
1836
|
+
stack?: string;
|
|
1837
|
+
cause?: unknown;
|
|
1838
|
+
};
|
|
1839
|
+
instanceOf(obj: any): obj is {
|
|
1840
|
+
readonly tag: BarkError_Tags.ServerConnection;
|
|
1841
|
+
readonly inner: Readonly<{
|
|
1842
|
+
errorMessage: string;
|
|
1843
|
+
}>;
|
|
1844
|
+
/**
|
|
1845
|
+
* @private
|
|
1846
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1847
|
+
*/
|
|
1848
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1849
|
+
name: string;
|
|
1850
|
+
message: string;
|
|
1851
|
+
stack?: string;
|
|
1852
|
+
cause?: unknown;
|
|
1853
|
+
};
|
|
1854
|
+
hasInner(obj: any): obj is {
|
|
1855
|
+
readonly tag: BarkError_Tags.ServerConnection;
|
|
1856
|
+
readonly inner: Readonly<{
|
|
1857
|
+
errorMessage: string;
|
|
1858
|
+
}>;
|
|
1859
|
+
/**
|
|
1860
|
+
* @private
|
|
1861
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1862
|
+
*/
|
|
1863
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1864
|
+
name: string;
|
|
1865
|
+
message: string;
|
|
1866
|
+
stack?: string;
|
|
1867
|
+
cause?: unknown;
|
|
1868
|
+
};
|
|
1869
|
+
getInner(obj: {
|
|
1870
|
+
readonly tag: BarkError_Tags.ServerConnection;
|
|
1871
|
+
readonly inner: Readonly<{
|
|
1872
|
+
errorMessage: string;
|
|
1873
|
+
}>;
|
|
1874
|
+
/**
|
|
1875
|
+
* @private
|
|
1876
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1877
|
+
*/
|
|
1878
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1879
|
+
name: string;
|
|
1880
|
+
message: string;
|
|
1881
|
+
stack?: string;
|
|
1882
|
+
cause?: unknown;
|
|
1883
|
+
}): Readonly<{
|
|
1884
|
+
errorMessage: string;
|
|
1885
|
+
}>;
|
|
1886
|
+
isError(error: unknown): error is Error;
|
|
1887
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1888
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1889
|
+
stackTraceLimit: number;
|
|
1890
|
+
};
|
|
1891
|
+
Internal: {
|
|
1892
|
+
new (inner: {
|
|
1893
|
+
errorMessage: string;
|
|
1894
|
+
}): {
|
|
1895
|
+
readonly tag: BarkError_Tags.Internal;
|
|
1896
|
+
readonly inner: Readonly<{
|
|
1897
|
+
errorMessage: string;
|
|
1898
|
+
}>;
|
|
1899
|
+
/**
|
|
1900
|
+
* @private
|
|
1901
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1902
|
+
*/
|
|
1903
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1904
|
+
name: string;
|
|
1905
|
+
message: string;
|
|
1906
|
+
stack?: string;
|
|
1907
|
+
cause?: unknown;
|
|
1908
|
+
};
|
|
1909
|
+
"new"(inner: {
|
|
1910
|
+
errorMessage: string;
|
|
1911
|
+
}): {
|
|
1912
|
+
readonly tag: BarkError_Tags.Internal;
|
|
1913
|
+
readonly inner: Readonly<{
|
|
1914
|
+
errorMessage: string;
|
|
1915
|
+
}>;
|
|
1916
|
+
/**
|
|
1917
|
+
* @private
|
|
1918
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1919
|
+
*/
|
|
1920
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1921
|
+
name: string;
|
|
1922
|
+
message: string;
|
|
1923
|
+
stack?: string;
|
|
1924
|
+
cause?: unknown;
|
|
1925
|
+
};
|
|
1926
|
+
instanceOf(obj: any): obj is {
|
|
1927
|
+
readonly tag: BarkError_Tags.Internal;
|
|
1928
|
+
readonly inner: Readonly<{
|
|
1929
|
+
errorMessage: string;
|
|
1930
|
+
}>;
|
|
1931
|
+
/**
|
|
1932
|
+
* @private
|
|
1933
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1934
|
+
*/
|
|
1935
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1936
|
+
name: string;
|
|
1937
|
+
message: string;
|
|
1938
|
+
stack?: string;
|
|
1939
|
+
cause?: unknown;
|
|
1940
|
+
};
|
|
1941
|
+
hasInner(obj: any): obj is {
|
|
1942
|
+
readonly tag: BarkError_Tags.Internal;
|
|
1943
|
+
readonly inner: Readonly<{
|
|
1944
|
+
errorMessage: string;
|
|
1945
|
+
}>;
|
|
1946
|
+
/**
|
|
1947
|
+
* @private
|
|
1948
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1949
|
+
*/
|
|
1950
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1951
|
+
name: string;
|
|
1952
|
+
message: string;
|
|
1953
|
+
stack?: string;
|
|
1954
|
+
cause?: unknown;
|
|
1955
|
+
};
|
|
1956
|
+
getInner(obj: {
|
|
1957
|
+
readonly tag: BarkError_Tags.Internal;
|
|
1958
|
+
readonly inner: Readonly<{
|
|
1959
|
+
errorMessage: string;
|
|
1960
|
+
}>;
|
|
1961
|
+
/**
|
|
1962
|
+
* @private
|
|
1963
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1964
|
+
*/
|
|
1965
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1966
|
+
name: string;
|
|
1967
|
+
message: string;
|
|
1968
|
+
stack?: string;
|
|
1969
|
+
cause?: unknown;
|
|
1970
|
+
}): Readonly<{
|
|
1971
|
+
errorMessage: string;
|
|
1972
|
+
}>;
|
|
1973
|
+
isError(error: unknown): error is Error;
|
|
1974
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1975
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1976
|
+
stackTraceLimit: number;
|
|
1977
|
+
};
|
|
1978
|
+
OnchainWalletRequired: {
|
|
1979
|
+
new (inner: {
|
|
1980
|
+
errorMessage: string;
|
|
1981
|
+
}): {
|
|
1982
|
+
readonly tag: BarkError_Tags.OnchainWalletRequired;
|
|
1983
|
+
readonly inner: Readonly<{
|
|
1984
|
+
errorMessage: string;
|
|
1985
|
+
}>;
|
|
1986
|
+
/**
|
|
1987
|
+
* @private
|
|
1988
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1989
|
+
*/
|
|
1990
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
1991
|
+
name: string;
|
|
1992
|
+
message: string;
|
|
1993
|
+
stack?: string;
|
|
1994
|
+
cause?: unknown;
|
|
1995
|
+
};
|
|
1996
|
+
"new"(inner: {
|
|
1997
|
+
errorMessage: string;
|
|
1998
|
+
}): {
|
|
1999
|
+
readonly tag: BarkError_Tags.OnchainWalletRequired;
|
|
2000
|
+
readonly inner: Readonly<{
|
|
2001
|
+
errorMessage: string;
|
|
2002
|
+
}>;
|
|
2003
|
+
/**
|
|
2004
|
+
* @private
|
|
2005
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2006
|
+
*/
|
|
2007
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
2008
|
+
name: string;
|
|
2009
|
+
message: string;
|
|
2010
|
+
stack?: string;
|
|
2011
|
+
cause?: unknown;
|
|
2012
|
+
};
|
|
2013
|
+
instanceOf(obj: any): obj is {
|
|
2014
|
+
readonly tag: BarkError_Tags.OnchainWalletRequired;
|
|
2015
|
+
readonly inner: Readonly<{
|
|
2016
|
+
errorMessage: string;
|
|
2017
|
+
}>;
|
|
2018
|
+
/**
|
|
2019
|
+
* @private
|
|
2020
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2021
|
+
*/
|
|
2022
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
2023
|
+
name: string;
|
|
2024
|
+
message: string;
|
|
2025
|
+
stack?: string;
|
|
2026
|
+
cause?: unknown;
|
|
2027
|
+
};
|
|
2028
|
+
hasInner(obj: any): obj is {
|
|
2029
|
+
readonly tag: BarkError_Tags.OnchainWalletRequired;
|
|
2030
|
+
readonly inner: Readonly<{
|
|
2031
|
+
errorMessage: string;
|
|
2032
|
+
}>;
|
|
2033
|
+
/**
|
|
2034
|
+
* @private
|
|
2035
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2036
|
+
*/
|
|
2037
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
2038
|
+
name: string;
|
|
2039
|
+
message: string;
|
|
2040
|
+
stack?: string;
|
|
2041
|
+
cause?: unknown;
|
|
2042
|
+
};
|
|
2043
|
+
getInner(obj: {
|
|
2044
|
+
readonly tag: BarkError_Tags.OnchainWalletRequired;
|
|
2045
|
+
readonly inner: Readonly<{
|
|
2046
|
+
errorMessage: string;
|
|
2047
|
+
}>;
|
|
2048
|
+
/**
|
|
2049
|
+
* @private
|
|
2050
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2051
|
+
*/
|
|
2052
|
+
readonly [uniffiTypeNameSymbol]: "BarkError";
|
|
2053
|
+
name: string;
|
|
2054
|
+
message: string;
|
|
2055
|
+
stack?: string;
|
|
2056
|
+
cause?: unknown;
|
|
2057
|
+
}): Readonly<{
|
|
2058
|
+
errorMessage: string;
|
|
2059
|
+
}>;
|
|
2060
|
+
isError(error: unknown): error is Error;
|
|
2061
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2062
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2063
|
+
stackTraceLimit: number;
|
|
2064
|
+
};
|
|
2065
|
+
}>;
|
|
2066
|
+
/**
|
|
2067
|
+
* Error types that can occur when using the Bark wallet
|
|
2068
|
+
*/
|
|
2069
|
+
export type BarkError = InstanceType<(typeof BarkError)[keyof Omit<typeof BarkError, "instanceOf">]>;
|
|
2070
|
+
/**
|
|
2071
|
+
* Bitcoin network types
|
|
2072
|
+
*/
|
|
2073
|
+
export declare enum Network {
|
|
2074
|
+
Bitcoin = 0,
|
|
2075
|
+
Testnet = 1,
|
|
2076
|
+
Signet = 2,
|
|
2077
|
+
Regtest = 3
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2080
|
+
* Onchain Bitcoin wallet for boarding and exits
|
|
2081
|
+
*
|
|
2082
|
+
* Supports two implementations:
|
|
2083
|
+
* - Default: BDK-based wallet (built-in)
|
|
2084
|
+
* - Custom: Your own wallet implementation via callbacks
|
|
2085
|
+
*/
|
|
2086
|
+
export interface OnchainWalletInterface {
|
|
2087
|
+
/**
|
|
2088
|
+
* Get the onchain wallet balance
|
|
2089
|
+
*/
|
|
2090
|
+
balance(): OnchainBalance;
|
|
2091
|
+
/**
|
|
2092
|
+
* Generate a new Bitcoin address
|
|
2093
|
+
*/
|
|
2094
|
+
newAddress(): string;
|
|
2095
|
+
/**
|
|
2096
|
+
* Send Bitcoin to an address
|
|
2097
|
+
* Returns the transaction ID
|
|
2098
|
+
*/
|
|
2099
|
+
send(address: string, amountSats: bigint, feeRateSatPerVb: bigint): string;
|
|
2100
|
+
/**
|
|
2101
|
+
* Sync the onchain wallet with the blockchain
|
|
2102
|
+
* Returns the amount synced in satoshis
|
|
2103
|
+
*/
|
|
2104
|
+
sync(): bigint;
|
|
2105
|
+
}
|
|
2106
|
+
/**
|
|
2107
|
+
* Onchain Bitcoin wallet for boarding and exits
|
|
2108
|
+
*
|
|
2109
|
+
* Supports two implementations:
|
|
2110
|
+
* - Default: BDK-based wallet (built-in)
|
|
2111
|
+
* - Custom: Your own wallet implementation via callbacks
|
|
2112
|
+
*/
|
|
2113
|
+
export declare class OnchainWallet extends UniffiAbstractObject implements OnchainWalletInterface {
|
|
2114
|
+
readonly [uniffiTypeNameSymbol] = "OnchainWallet";
|
|
2115
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
2116
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
2117
|
+
private constructor();
|
|
2118
|
+
/**
|
|
2119
|
+
* Create an onchain wallet using a custom implementation
|
|
2120
|
+
*
|
|
2121
|
+
* Use this when you have an existing wallet implementation in your language
|
|
2122
|
+
* (Dart/Swift/Kotlin) and want to integrate it with Bark for boarding and exits.
|
|
2123
|
+
* Your implementation must handle all wallet operations via the callbacks interface.
|
|
2124
|
+
*/
|
|
2125
|
+
static custom(callbacks: CustomOnchainWalletCallbacks): OnchainWalletInterface;
|
|
2126
|
+
/**
|
|
2127
|
+
* Create or load an onchain wallet using a default BDK implementation shipped with Bark
|
|
2128
|
+
*
|
|
2129
|
+
* The wallet uses BDK for onchain operations
|
|
2130
|
+
* and the same chain source configuration as the Bark wallet (esplora_address or bitcoind_*).
|
|
2131
|
+
*/
|
|
2132
|
+
static default_(mnemonic: string, config: Config, datadir: string): OnchainWalletInterface;
|
|
2133
|
+
/**
|
|
2134
|
+
* Get the onchain wallet balance
|
|
2135
|
+
*/
|
|
2136
|
+
balance(): OnchainBalance;
|
|
2137
|
+
/**
|
|
2138
|
+
* Generate a new Bitcoin address
|
|
2139
|
+
*/
|
|
2140
|
+
newAddress(): string;
|
|
2141
|
+
/**
|
|
2142
|
+
* Send Bitcoin to an address
|
|
2143
|
+
* Returns the transaction ID
|
|
2144
|
+
*/
|
|
2145
|
+
send(address: string, amountSats: bigint, feeRateSatPerVb: bigint): string;
|
|
2146
|
+
/**
|
|
2147
|
+
* Sync the onchain wallet with the blockchain
|
|
2148
|
+
* Returns the amount synced in satoshis
|
|
2149
|
+
*/
|
|
2150
|
+
sync(): bigint;
|
|
2151
|
+
/**
|
|
2152
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2153
|
+
*/
|
|
2154
|
+
uniffiDestroy(): void;
|
|
2155
|
+
static instanceOf(obj: any): obj is OnchainWallet;
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* The main Bark wallet interface for Ark operations
|
|
2159
|
+
*/
|
|
2160
|
+
export interface WalletInterface {
|
|
2161
|
+
/**
|
|
2162
|
+
* Get earliest block height when all exits will be claimable
|
|
2163
|
+
*
|
|
2164
|
+
* Returns null if no exits or any exit has undetermined claimability.
|
|
2165
|
+
*/
|
|
2166
|
+
allExitsClaimableAtHeight(): /*throws*/ /*u32*/ number | undefined;
|
|
2167
|
+
/**
|
|
2168
|
+
* Get all VTXOs (including spent)
|
|
2169
|
+
*/
|
|
2170
|
+
allVtxos(): Array<Vtxo>;
|
|
2171
|
+
/**
|
|
2172
|
+
* Get Ark server info (null if not connected)
|
|
2173
|
+
*/
|
|
2174
|
+
arkInfo(): ArkInfo | undefined;
|
|
2175
|
+
balance(): Balance;
|
|
2176
|
+
/**
|
|
2177
|
+
* Board all funds from onchain wallet into Ark
|
|
2178
|
+
*/
|
|
2179
|
+
boardAll(onchainWallet: OnchainWalletInterface): PendingBoard;
|
|
2180
|
+
/**
|
|
2181
|
+
* Board a specific amount from onchain wallet into Ark
|
|
2182
|
+
*/
|
|
2183
|
+
boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint): PendingBoard;
|
|
2184
|
+
bolt11Invoice(amountSats: bigint): LightningInvoice;
|
|
2185
|
+
/**
|
|
2186
|
+
* Broadcast a signed transaction to the Bitcoin network
|
|
2187
|
+
*
|
|
2188
|
+
* Takes a hex-encoded transaction and broadcasts it via the wallet's chain source.
|
|
2189
|
+
* This is useful after extracting a transaction from a PSBT using extract_tx_from_psbt.
|
|
2190
|
+
*
|
|
2191
|
+
* # Arguments
|
|
2192
|
+
*
|
|
2193
|
+
* * `tx_hex` - Hex-encoded signed transaction
|
|
2194
|
+
*
|
|
2195
|
+
* Returns the transaction ID (txid) of the broadcasted transaction
|
|
2196
|
+
*/
|
|
2197
|
+
broadcastTx(txHex: string): string;
|
|
2198
|
+
/**
|
|
2199
|
+
* Cancel all pending rounds
|
|
2200
|
+
*/
|
|
2201
|
+
cancelAllPendingRounds(): void;
|
|
2202
|
+
/**
|
|
2203
|
+
* Cancel a specific pending round
|
|
2204
|
+
*/
|
|
2205
|
+
cancelPendingRound(roundId: number): void;
|
|
2206
|
+
/**
|
|
2207
|
+
* Check lightning payment status by payment hash
|
|
2208
|
+
*
|
|
2209
|
+
* # Arguments
|
|
2210
|
+
*
|
|
2211
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2212
|
+
* * `wait` - Whether to wait for the payment to complete
|
|
2213
|
+
*
|
|
2214
|
+
* Returns the preimage if payment is successful, null if still pending
|
|
2215
|
+
*/
|
|
2216
|
+
checkLightningPayment(paymentHash: string, wait: boolean): /*throws*/ string | undefined;
|
|
2217
|
+
/**
|
|
2218
|
+
* Get claimable lightning receive balance
|
|
2219
|
+
*/
|
|
2220
|
+
claimableLightningReceiveBalanceSats(): bigint;
|
|
2221
|
+
/**
|
|
2222
|
+
* Get wallet config
|
|
2223
|
+
*/
|
|
2224
|
+
config(): Config;
|
|
2225
|
+
/**
|
|
2226
|
+
* Drain claimable exits to an address
|
|
2227
|
+
*
|
|
2228
|
+
* Builds a signed PSBT that claims exited funds and sends them to the address.
|
|
2229
|
+
* The PSBT can be broadcast directly or modified before broadcasting.
|
|
2230
|
+
*
|
|
2231
|
+
* # Arguments
|
|
2232
|
+
*
|
|
2233
|
+
* * `vtxo_ids` - List of claimable VTXO IDs to drain (empty = drain all)
|
|
2234
|
+
* * `address` - Bitcoin address to send claimed funds to
|
|
2235
|
+
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2236
|
+
*/
|
|
2237
|
+
drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined): ExitClaimTransaction;
|
|
2238
|
+
/**
|
|
2239
|
+
* Get detailed exit status for a specific VTXO
|
|
2240
|
+
*
|
|
2241
|
+
* Returns detailed status including current state, history, and transactions.
|
|
2242
|
+
*
|
|
2243
|
+
* # Arguments
|
|
2244
|
+
*
|
|
2245
|
+
* * `vtxo_id` - The VTXO ID to check
|
|
2246
|
+
* * `include_history` - Whether to include full state machine history
|
|
2247
|
+
* * `include_transactions` - Whether to include transaction details
|
|
2248
|
+
*/
|
|
2249
|
+
getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean): /*throws*/ ExitTransactionStatus | undefined;
|
|
2250
|
+
/**
|
|
2251
|
+
* Get all VTXOs currently in exit process
|
|
2252
|
+
*/
|
|
2253
|
+
getExitVtxos(): Array<ExitVtxo>;
|
|
2254
|
+
/**
|
|
2255
|
+
* Get VTXOs expiring within threshold blocks
|
|
2256
|
+
*/
|
|
2257
|
+
getExpiringVtxos(thresholdBlocks: number): Array<Vtxo>;
|
|
2258
|
+
/**
|
|
2259
|
+
* Get the block height of the first expiring VTXO
|
|
2260
|
+
*
|
|
2261
|
+
* Returns null if there are no spendable VTXOs.
|
|
2262
|
+
*/
|
|
2263
|
+
getFirstExpiringVtxoBlockheight(): /*throws*/ /*u32*/ number | undefined;
|
|
2264
|
+
/**
|
|
2265
|
+
* Get the next block height when a refresh should be performed
|
|
2266
|
+
*
|
|
2267
|
+
* This is calculated as the first expiring VTXO height minus the refresh threshold.
|
|
2268
|
+
* Returns null if there are no VTXOs to refresh.
|
|
2269
|
+
*/
|
|
2270
|
+
getNextRequiredRefreshBlockheight(): /*throws*/ /*u32*/ number | undefined;
|
|
2271
|
+
/**
|
|
2272
|
+
* Get a specific VTXO by ID
|
|
2273
|
+
*/
|
|
2274
|
+
getVtxoById(vtxoId: string): Vtxo;
|
|
2275
|
+
/**
|
|
2276
|
+
* Get VTXOs that should be refreshed
|
|
2277
|
+
*/
|
|
2278
|
+
getVtxosToRefresh(): Array<Vtxo>;
|
|
2279
|
+
/**
|
|
2280
|
+
* Check if any exits are pending
|
|
2281
|
+
*/
|
|
2282
|
+
hasPendingExits(): boolean;
|
|
2283
|
+
/**
|
|
2284
|
+
* Get all wallet movements (transaction history)
|
|
2285
|
+
*/
|
|
2286
|
+
history(): Array<Movement>;
|
|
2287
|
+
/**
|
|
2288
|
+
* Get lightning receive status by payment hash
|
|
2289
|
+
*
|
|
2290
|
+
* # Arguments
|
|
2291
|
+
*
|
|
2292
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2293
|
+
*/
|
|
2294
|
+
lightningReceiveStatus(paymentHash: string): /*throws*/ LightningReceive | undefined;
|
|
2295
|
+
/**
|
|
2296
|
+
* List all exits that are claimable
|
|
2297
|
+
*
|
|
2298
|
+
* Returns exits ready to be drained to onchain wallet.
|
|
2299
|
+
*/
|
|
2300
|
+
listClaimableExits(): Array<ExitVtxo>;
|
|
2301
|
+
maintenance(): void;
|
|
2302
|
+
/**
|
|
2303
|
+
* Perform maintenance refresh
|
|
2304
|
+
*/
|
|
2305
|
+
maintenanceRefresh(): /*throws*/ string | undefined;
|
|
2306
|
+
/**
|
|
2307
|
+
* Full maintenance including onchain wallet sync
|
|
2308
|
+
*
|
|
2309
|
+
* More thorough than maintenance() - also syncs onchain wallet and exits.
|
|
2310
|
+
*/
|
|
2311
|
+
maintenanceWithOnchain(onchainWallet: OnchainWalletInterface): void;
|
|
2312
|
+
/**
|
|
2313
|
+
* Schedule a maintenance refresh if VTXOs need refreshing
|
|
2314
|
+
*
|
|
2315
|
+
* Returns the round ID if a refresh was scheduled, null otherwise.
|
|
2316
|
+
*/
|
|
2317
|
+
maybeScheduleMaintenanceRefresh(): /*throws*/ /*u32*/ number | undefined;
|
|
2318
|
+
newAddress(): string;
|
|
2319
|
+
/**
|
|
2320
|
+
* Generate a new address and return it with its index
|
|
2321
|
+
*/
|
|
2322
|
+
newAddressWithIndex(): AddressWithIndex;
|
|
2323
|
+
offboardAll(bitcoinAddress: string): OffboardResult;
|
|
2324
|
+
/**
|
|
2325
|
+
* Offboard specific VTXOs to a Bitcoin address
|
|
2326
|
+
*/
|
|
2327
|
+
offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string): string;
|
|
2328
|
+
payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined): LightningSend;
|
|
2329
|
+
payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
|
|
2330
|
+
/**
|
|
2331
|
+
* Pay a BOLT12 lightning offer
|
|
2332
|
+
*
|
|
2333
|
+
* # Arguments
|
|
2334
|
+
*
|
|
2335
|
+
* * `offer` - BOLT12 offer string
|
|
2336
|
+
* * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
|
|
2337
|
+
*/
|
|
2338
|
+
payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
|
|
2339
|
+
/**
|
|
2340
|
+
* Peek at an address at a specific index
|
|
2341
|
+
*/
|
|
2342
|
+
peakAddress(index: number): string;
|
|
2343
|
+
/**
|
|
2344
|
+
* Get total amount in pending exits (sats)
|
|
2345
|
+
*/
|
|
2346
|
+
pendingExitsTotalSats(): bigint;
|
|
2347
|
+
/**
|
|
2348
|
+
* Get all pending lightning receives
|
|
2349
|
+
*/
|
|
2350
|
+
pendingLightningReceives(): Array<LightningReceive>;
|
|
2351
|
+
/**
|
|
2352
|
+
* Get all pending lightning sends
|
|
2353
|
+
*/
|
|
2354
|
+
pendingLightningSends(): Array<LightningSend>;
|
|
2355
|
+
/**
|
|
2356
|
+
* Get all pending round states
|
|
2357
|
+
*/
|
|
2358
|
+
pendingRoundStates(): Array<RoundState>;
|
|
2359
|
+
/**
|
|
2360
|
+
* Progress unilateral exits (broadcast, fee bump, advance state machine)
|
|
2361
|
+
*
|
|
2362
|
+
* This is the critical method for actually moving exits forward.
|
|
2363
|
+
* Call periodically after starting exits.
|
|
2364
|
+
*
|
|
2365
|
+
* # Arguments
|
|
2366
|
+
*
|
|
2367
|
+
* * `onchain_wallet` - Onchain wallet for building exit transactions
|
|
2368
|
+
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2369
|
+
*/
|
|
2370
|
+
progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined): Array<ExitProgressStatus>;
|
|
2371
|
+
/**
|
|
2372
|
+
* Progress pending rounds
|
|
2373
|
+
*
|
|
2374
|
+
* Advances the state of all pending rounds. Call periodically.
|
|
2375
|
+
*/
|
|
2376
|
+
progressPendingRounds(): void;
|
|
2377
|
+
properties(): WalletProperties;
|
|
2378
|
+
/**
|
|
2379
|
+
* Refresh the Ark server connection
|
|
2380
|
+
*
|
|
2381
|
+
* Re-establishes connection if it was lost.
|
|
2382
|
+
*/
|
|
2383
|
+
refreshServer(): void;
|
|
2384
|
+
/**
|
|
2385
|
+
* Refresh specific VTXOs
|
|
2386
|
+
*/
|
|
2387
|
+
refreshVtxos(vtxoIds: Array<string>): /*throws*/ string | undefined;
|
|
2388
|
+
sendArkoorPayment(arkAddress: string, amountSats: bigint): string;
|
|
2389
|
+
/**
|
|
2390
|
+
* Send an onchain payment during a round
|
|
2391
|
+
*/
|
|
2392
|
+
sendRoundOnchainPayment(address: string, amountSats: bigint): string;
|
|
2393
|
+
/**
|
|
2394
|
+
* Sign exit claim inputs in an external PSBT
|
|
2395
|
+
*
|
|
2396
|
+
* This is useful if you want to combine exit claims with other inputs
|
|
2397
|
+
* in a single transaction.
|
|
2398
|
+
*
|
|
2399
|
+
* # Arguments
|
|
2400
|
+
*
|
|
2401
|
+
* * `psbt_base64` - Base64-encoded PSBT to sign
|
|
2402
|
+
*
|
|
2403
|
+
* Returns the signed PSBT
|
|
2404
|
+
*/
|
|
2405
|
+
signExitClaimInputs(psbtBase64: string): string;
|
|
2406
|
+
/**
|
|
2407
|
+
* Get all spendable VTXOs
|
|
2408
|
+
*/
|
|
2409
|
+
spendableVtxos(): Array<Vtxo>;
|
|
2410
|
+
/**
|
|
2411
|
+
* Start unilateral exit for the entire wallet
|
|
2412
|
+
*/
|
|
2413
|
+
startExitForEntireWallet(): void;
|
|
2414
|
+
/**
|
|
2415
|
+
* Start unilateral exit for specific VTXOs
|
|
2416
|
+
*
|
|
2417
|
+
* Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
|
|
2418
|
+
*/
|
|
2419
|
+
startExitForVtxos(vtxoIds: Array<string>): void;
|
|
2420
|
+
/**
|
|
2421
|
+
* Lightweight sync with Ark server and blockchain
|
|
2422
|
+
* Note: Bark's sync() handles errors internally with logging.
|
|
2423
|
+
* The Throws annotation is for forward compatibility only.
|
|
2424
|
+
*/
|
|
2425
|
+
sync(): void;
|
|
2426
|
+
/**
|
|
2427
|
+
* Sync exit state (checks status but doesn't progress)
|
|
2428
|
+
*/
|
|
2429
|
+
syncExits(onchainWallet: OnchainWalletInterface): void;
|
|
2430
|
+
/**
|
|
2431
|
+
* Sync pending board transactions
|
|
2432
|
+
*/
|
|
2433
|
+
syncPendingBoards(): void;
|
|
2434
|
+
tryClaimAllLightningReceives(wait: boolean): void;
|
|
2435
|
+
/**
|
|
2436
|
+
* Try to claim a specific lightning receive by payment hash
|
|
2437
|
+
*
|
|
2438
|
+
* # Arguments
|
|
2439
|
+
*
|
|
2440
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2441
|
+
* * `wait` - Whether to wait for claim to complete
|
|
2442
|
+
*/
|
|
2443
|
+
tryClaimLightningReceive(paymentHash: string, wait: boolean): void;
|
|
2444
|
+
/**
|
|
2445
|
+
* Validate an Ark address against the connected server
|
|
2446
|
+
*
|
|
2447
|
+
* This performs full validation including checking if the address
|
|
2448
|
+
* belongs to the currently connected Ark server.
|
|
2449
|
+
* For basic format validation only, use validate_ark_address() instead.
|
|
2450
|
+
*/
|
|
2451
|
+
validateArkoorAddress(address: string): boolean;
|
|
2452
|
+
vtxos(): Array<Vtxo>;
|
|
2453
|
+
}
|
|
2454
|
+
/**
|
|
2455
|
+
* The main Bark wallet interface for Ark operations
|
|
2456
|
+
*/
|
|
2457
|
+
export declare class Wallet extends UniffiAbstractObject implements WalletInterface {
|
|
2458
|
+
readonly [uniffiTypeNameSymbol] = "Wallet";
|
|
2459
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
2460
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
2461
|
+
private constructor();
|
|
2462
|
+
/**
|
|
2463
|
+
* Create a new Bark wallet
|
|
2464
|
+
*/
|
|
2465
|
+
static create(mnemonic: string, config: Config, datadir: string, forceRescan: boolean): WalletInterface;
|
|
2466
|
+
/**
|
|
2467
|
+
* Create a new Bark wallet WITH onchain capabilities
|
|
2468
|
+
*/
|
|
2469
|
+
static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, forceRescan: boolean): WalletInterface;
|
|
2470
|
+
/**
|
|
2471
|
+
* Open an existing Bark wallet
|
|
2472
|
+
*/
|
|
2473
|
+
static open(mnemonic: string, config: Config, datadir: string): WalletInterface;
|
|
2474
|
+
/**
|
|
2475
|
+
* Open an existing Bark wallet WITH onchain capabilities
|
|
2476
|
+
*/
|
|
2477
|
+
static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface): WalletInterface;
|
|
2478
|
+
/**
|
|
2479
|
+
* Get earliest block height when all exits will be claimable
|
|
2480
|
+
*
|
|
2481
|
+
* Returns null if no exits or any exit has undetermined claimability.
|
|
2482
|
+
*/
|
|
2483
|
+
allExitsClaimableAtHeight(): /*u32*/ number | undefined;
|
|
2484
|
+
/**
|
|
2485
|
+
* Get all VTXOs (including spent)
|
|
2486
|
+
*/
|
|
2487
|
+
allVtxos(): Array<Vtxo>;
|
|
2488
|
+
/**
|
|
2489
|
+
* Get Ark server info (null if not connected)
|
|
2490
|
+
*/
|
|
2491
|
+
arkInfo(): ArkInfo | undefined;
|
|
2492
|
+
balance(): Balance;
|
|
2493
|
+
/**
|
|
2494
|
+
* Board all funds from onchain wallet into Ark
|
|
2495
|
+
*/
|
|
2496
|
+
boardAll(onchainWallet: OnchainWalletInterface): PendingBoard;
|
|
2497
|
+
/**
|
|
2498
|
+
* Board a specific amount from onchain wallet into Ark
|
|
2499
|
+
*/
|
|
2500
|
+
boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint): PendingBoard;
|
|
2501
|
+
bolt11Invoice(amountSats: bigint): LightningInvoice;
|
|
2502
|
+
/**
|
|
2503
|
+
* Broadcast a signed transaction to the Bitcoin network
|
|
2504
|
+
*
|
|
2505
|
+
* Takes a hex-encoded transaction and broadcasts it via the wallet's chain source.
|
|
2506
|
+
* This is useful after extracting a transaction from a PSBT using extract_tx_from_psbt.
|
|
2507
|
+
*
|
|
2508
|
+
* # Arguments
|
|
2509
|
+
*
|
|
2510
|
+
* * `tx_hex` - Hex-encoded signed transaction
|
|
2511
|
+
*
|
|
2512
|
+
* Returns the transaction ID (txid) of the broadcasted transaction
|
|
2513
|
+
*/
|
|
2514
|
+
broadcastTx(txHex: string): string;
|
|
2515
|
+
/**
|
|
2516
|
+
* Cancel all pending rounds
|
|
2517
|
+
*/
|
|
2518
|
+
cancelAllPendingRounds(): void;
|
|
2519
|
+
/**
|
|
2520
|
+
* Cancel a specific pending round
|
|
2521
|
+
*/
|
|
2522
|
+
cancelPendingRound(roundId: number): void;
|
|
2523
|
+
/**
|
|
2524
|
+
* Check lightning payment status by payment hash
|
|
2525
|
+
*
|
|
2526
|
+
* # Arguments
|
|
2527
|
+
*
|
|
2528
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2529
|
+
* * `wait` - Whether to wait for the payment to complete
|
|
2530
|
+
*
|
|
2531
|
+
* Returns the preimage if payment is successful, null if still pending
|
|
2532
|
+
*/
|
|
2533
|
+
checkLightningPayment(paymentHash: string, wait: boolean): string | undefined;
|
|
2534
|
+
/**
|
|
2535
|
+
* Get claimable lightning receive balance
|
|
2536
|
+
*/
|
|
2537
|
+
claimableLightningReceiveBalanceSats(): bigint;
|
|
2538
|
+
/**
|
|
2539
|
+
* Get wallet config
|
|
2540
|
+
*/
|
|
2541
|
+
config(): Config;
|
|
2542
|
+
/**
|
|
2543
|
+
* Drain claimable exits to an address
|
|
2544
|
+
*
|
|
2545
|
+
* Builds a signed PSBT that claims exited funds and sends them to the address.
|
|
2546
|
+
* The PSBT can be broadcast directly or modified before broadcasting.
|
|
2547
|
+
*
|
|
2548
|
+
* # Arguments
|
|
2549
|
+
*
|
|
2550
|
+
* * `vtxo_ids` - List of claimable VTXO IDs to drain (empty = drain all)
|
|
2551
|
+
* * `address` - Bitcoin address to send claimed funds to
|
|
2552
|
+
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2553
|
+
*/
|
|
2554
|
+
drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined): ExitClaimTransaction;
|
|
2555
|
+
/**
|
|
2556
|
+
* Get detailed exit status for a specific VTXO
|
|
2557
|
+
*
|
|
2558
|
+
* Returns detailed status including current state, history, and transactions.
|
|
2559
|
+
*
|
|
2560
|
+
* # Arguments
|
|
2561
|
+
*
|
|
2562
|
+
* * `vtxo_id` - The VTXO ID to check
|
|
2563
|
+
* * `include_history` - Whether to include full state machine history
|
|
2564
|
+
* * `include_transactions` - Whether to include transaction details
|
|
2565
|
+
*/
|
|
2566
|
+
getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean): ExitTransactionStatus | undefined;
|
|
2567
|
+
/**
|
|
2568
|
+
* Get all VTXOs currently in exit process
|
|
2569
|
+
*/
|
|
2570
|
+
getExitVtxos(): Array<ExitVtxo>;
|
|
2571
|
+
/**
|
|
2572
|
+
* Get VTXOs expiring within threshold blocks
|
|
2573
|
+
*/
|
|
2574
|
+
getExpiringVtxos(thresholdBlocks: number): Array<Vtxo>;
|
|
2575
|
+
/**
|
|
2576
|
+
* Get the block height of the first expiring VTXO
|
|
2577
|
+
*
|
|
2578
|
+
* Returns null if there are no spendable VTXOs.
|
|
2579
|
+
*/
|
|
2580
|
+
getFirstExpiringVtxoBlockheight(): number | undefined;
|
|
2581
|
+
/**
|
|
2582
|
+
* Get the next block height when a refresh should be performed
|
|
2583
|
+
*
|
|
2584
|
+
* This is calculated as the first expiring VTXO height minus the refresh threshold.
|
|
2585
|
+
* Returns null if there are no VTXOs to refresh.
|
|
2586
|
+
*/
|
|
2587
|
+
getNextRequiredRefreshBlockheight(): number | undefined;
|
|
2588
|
+
/**
|
|
2589
|
+
* Get a specific VTXO by ID
|
|
2590
|
+
*/
|
|
2591
|
+
getVtxoById(vtxoId: string): Vtxo;
|
|
2592
|
+
/**
|
|
2593
|
+
* Get VTXOs that should be refreshed
|
|
2594
|
+
*/
|
|
2595
|
+
getVtxosToRefresh(): Array<Vtxo>;
|
|
2596
|
+
/**
|
|
2597
|
+
* Check if any exits are pending
|
|
2598
|
+
*/
|
|
2599
|
+
hasPendingExits(): boolean;
|
|
2600
|
+
/**
|
|
2601
|
+
* Get all wallet movements (transaction history)
|
|
2602
|
+
*/
|
|
2603
|
+
history(): Array<Movement>;
|
|
2604
|
+
/**
|
|
2605
|
+
* Get lightning receive status by payment hash
|
|
2606
|
+
*
|
|
2607
|
+
* # Arguments
|
|
2608
|
+
*
|
|
2609
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2610
|
+
*/
|
|
2611
|
+
lightningReceiveStatus(paymentHash: string): LightningReceive | undefined;
|
|
2612
|
+
/**
|
|
2613
|
+
* List all exits that are claimable
|
|
2614
|
+
*
|
|
2615
|
+
* Returns exits ready to be drained to onchain wallet.
|
|
2616
|
+
*/
|
|
2617
|
+
listClaimableExits(): Array<ExitVtxo>;
|
|
2618
|
+
maintenance(): void;
|
|
2619
|
+
/**
|
|
2620
|
+
* Perform maintenance refresh
|
|
2621
|
+
*/
|
|
2622
|
+
maintenanceRefresh(): string | undefined;
|
|
2623
|
+
/**
|
|
2624
|
+
* Full maintenance including onchain wallet sync
|
|
2625
|
+
*
|
|
2626
|
+
* More thorough than maintenance() - also syncs onchain wallet and exits.
|
|
2627
|
+
*/
|
|
2628
|
+
maintenanceWithOnchain(onchainWallet: OnchainWalletInterface): void;
|
|
2629
|
+
/**
|
|
2630
|
+
* Schedule a maintenance refresh if VTXOs need refreshing
|
|
2631
|
+
*
|
|
2632
|
+
* Returns the round ID if a refresh was scheduled, null otherwise.
|
|
2633
|
+
*/
|
|
2634
|
+
maybeScheduleMaintenanceRefresh(): number | undefined;
|
|
2635
|
+
newAddress(): string;
|
|
2636
|
+
/**
|
|
2637
|
+
* Generate a new address and return it with its index
|
|
2638
|
+
*/
|
|
2639
|
+
newAddressWithIndex(): AddressWithIndex;
|
|
2640
|
+
offboardAll(bitcoinAddress: string): OffboardResult;
|
|
2641
|
+
/**
|
|
2642
|
+
* Offboard specific VTXOs to a Bitcoin address
|
|
2643
|
+
*/
|
|
2644
|
+
offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string): string;
|
|
2645
|
+
payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined): LightningSend;
|
|
2646
|
+
payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
|
|
2647
|
+
/**
|
|
2648
|
+
* Pay a BOLT12 lightning offer
|
|
2649
|
+
*
|
|
2650
|
+
* # Arguments
|
|
2651
|
+
*
|
|
2652
|
+
* * `offer` - BOLT12 offer string
|
|
2653
|
+
* * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
|
|
2654
|
+
*/
|
|
2655
|
+
payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
|
|
2656
|
+
/**
|
|
2657
|
+
* Peek at an address at a specific index
|
|
2658
|
+
*/
|
|
2659
|
+
peakAddress(index: number): string;
|
|
2660
|
+
/**
|
|
2661
|
+
* Get total amount in pending exits (sats)
|
|
2662
|
+
*/
|
|
2663
|
+
pendingExitsTotalSats(): bigint;
|
|
2664
|
+
/**
|
|
2665
|
+
* Get all pending lightning receives
|
|
2666
|
+
*/
|
|
2667
|
+
pendingLightningReceives(): Array<LightningReceive>;
|
|
2668
|
+
/**
|
|
2669
|
+
* Get all pending lightning sends
|
|
2670
|
+
*/
|
|
2671
|
+
pendingLightningSends(): Array<LightningSend>;
|
|
2672
|
+
/**
|
|
2673
|
+
* Get all pending round states
|
|
2674
|
+
*/
|
|
2675
|
+
pendingRoundStates(): Array<RoundState>;
|
|
2676
|
+
/**
|
|
2677
|
+
* Progress unilateral exits (broadcast, fee bump, advance state machine)
|
|
2678
|
+
*
|
|
2679
|
+
* This is the critical method for actually moving exits forward.
|
|
2680
|
+
* Call periodically after starting exits.
|
|
2681
|
+
*
|
|
2682
|
+
* # Arguments
|
|
2683
|
+
*
|
|
2684
|
+
* * `onchain_wallet` - Onchain wallet for building exit transactions
|
|
2685
|
+
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2686
|
+
*/
|
|
2687
|
+
progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined): Array<ExitProgressStatus>;
|
|
2688
|
+
/**
|
|
2689
|
+
* Progress pending rounds
|
|
2690
|
+
*
|
|
2691
|
+
* Advances the state of all pending rounds. Call periodically.
|
|
2692
|
+
*/
|
|
2693
|
+
progressPendingRounds(): void;
|
|
2694
|
+
properties(): WalletProperties;
|
|
2695
|
+
/**
|
|
2696
|
+
* Refresh the Ark server connection
|
|
2697
|
+
*
|
|
2698
|
+
* Re-establishes connection if it was lost.
|
|
2699
|
+
*/
|
|
2700
|
+
refreshServer(): void;
|
|
2701
|
+
/**
|
|
2702
|
+
* Refresh specific VTXOs
|
|
2703
|
+
*/
|
|
2704
|
+
refreshVtxos(vtxoIds: Array<string>): string | undefined;
|
|
2705
|
+
sendArkoorPayment(arkAddress: string, amountSats: bigint): string;
|
|
2706
|
+
/**
|
|
2707
|
+
* Send an onchain payment during a round
|
|
2708
|
+
*/
|
|
2709
|
+
sendRoundOnchainPayment(address: string, amountSats: bigint): string;
|
|
2710
|
+
/**
|
|
2711
|
+
* Sign exit claim inputs in an external PSBT
|
|
2712
|
+
*
|
|
2713
|
+
* This is useful if you want to combine exit claims with other inputs
|
|
2714
|
+
* in a single transaction.
|
|
2715
|
+
*
|
|
2716
|
+
* # Arguments
|
|
2717
|
+
*
|
|
2718
|
+
* * `psbt_base64` - Base64-encoded PSBT to sign
|
|
2719
|
+
*
|
|
2720
|
+
* Returns the signed PSBT
|
|
2721
|
+
*/
|
|
2722
|
+
signExitClaimInputs(psbtBase64: string): string;
|
|
2723
|
+
/**
|
|
2724
|
+
* Get all spendable VTXOs
|
|
2725
|
+
*/
|
|
2726
|
+
spendableVtxos(): Array<Vtxo>;
|
|
2727
|
+
/**
|
|
2728
|
+
* Start unilateral exit for the entire wallet
|
|
2729
|
+
*/
|
|
2730
|
+
startExitForEntireWallet(): void;
|
|
2731
|
+
/**
|
|
2732
|
+
* Start unilateral exit for specific VTXOs
|
|
2733
|
+
*
|
|
2734
|
+
* Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
|
|
2735
|
+
*/
|
|
2736
|
+
startExitForVtxos(vtxoIds: Array<string>): void;
|
|
2737
|
+
/**
|
|
2738
|
+
* Lightweight sync with Ark server and blockchain
|
|
2739
|
+
* Note: Bark's sync() handles errors internally with logging.
|
|
2740
|
+
* The Throws annotation is for forward compatibility only.
|
|
2741
|
+
*/
|
|
2742
|
+
sync(): void;
|
|
2743
|
+
/**
|
|
2744
|
+
* Sync exit state (checks status but doesn't progress)
|
|
2745
|
+
*/
|
|
2746
|
+
syncExits(onchainWallet: OnchainWalletInterface): void;
|
|
2747
|
+
/**
|
|
2748
|
+
* Sync pending board transactions
|
|
2749
|
+
*/
|
|
2750
|
+
syncPendingBoards(): void;
|
|
2751
|
+
tryClaimAllLightningReceives(wait: boolean): void;
|
|
2752
|
+
/**
|
|
2753
|
+
* Try to claim a specific lightning receive by payment hash
|
|
2754
|
+
*
|
|
2755
|
+
* # Arguments
|
|
2756
|
+
*
|
|
2757
|
+
* * `payment_hash` - Payment hash as hex string
|
|
2758
|
+
* * `wait` - Whether to wait for claim to complete
|
|
2759
|
+
*/
|
|
2760
|
+
tryClaimLightningReceive(paymentHash: string, wait: boolean): void;
|
|
2761
|
+
/**
|
|
2762
|
+
* Validate an Ark address against the connected server
|
|
2763
|
+
*
|
|
2764
|
+
* This performs full validation including checking if the address
|
|
2765
|
+
* belongs to the currently connected Ark server.
|
|
2766
|
+
* For basic format validation only, use validate_ark_address() instead.
|
|
2767
|
+
*/
|
|
2768
|
+
validateArkoorAddress(address: string): boolean;
|
|
2769
|
+
vtxos(): Array<Vtxo>;
|
|
2770
|
+
/**
|
|
2771
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2772
|
+
*/
|
|
2773
|
+
uniffiDestroy(): void;
|
|
2774
|
+
static instanceOf(obj: any): obj is Wallet;
|
|
2775
|
+
}
|
|
2776
|
+
/**
|
|
2777
|
+
* This should be called before anything else.
|
|
2778
|
+
*
|
|
2779
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
2780
|
+
*
|
|
2781
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
2782
|
+
* and when the bindings were generated.
|
|
2783
|
+
*
|
|
2784
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
2785
|
+
*/
|
|
2786
|
+
declare function uniffiEnsureInitialized(): void;
|
|
2787
|
+
declare const _default: Readonly<{
|
|
2788
|
+
initialize: typeof uniffiEnsureInitialized;
|
|
2789
|
+
converters: {
|
|
2790
|
+
FfiConverterTypeAddressWithIndex: {
|
|
2791
|
+
read(from: RustBuffer): AddressWithIndex;
|
|
2792
|
+
write(value: AddressWithIndex, into: RustBuffer): void;
|
|
2793
|
+
allocationSize(value: AddressWithIndex): number;
|
|
2794
|
+
lift(value: UniffiByteArray): AddressWithIndex;
|
|
2795
|
+
lower(value: AddressWithIndex): UniffiByteArray;
|
|
2796
|
+
};
|
|
2797
|
+
FfiConverterTypeArkInfo: {
|
|
2798
|
+
read(from: RustBuffer): ArkInfo;
|
|
2799
|
+
write(value: ArkInfo, into: RustBuffer): void;
|
|
2800
|
+
allocationSize(value: ArkInfo): number;
|
|
2801
|
+
lift(value: UniffiByteArray): ArkInfo;
|
|
2802
|
+
lower(value: ArkInfo): UniffiByteArray;
|
|
2803
|
+
};
|
|
2804
|
+
FfiConverterTypeBalance: {
|
|
2805
|
+
read(from: RustBuffer): Balance;
|
|
2806
|
+
write(value: Balance, into: RustBuffer): void;
|
|
2807
|
+
allocationSize(value: Balance): number;
|
|
2808
|
+
lift(value: UniffiByteArray): Balance;
|
|
2809
|
+
lower(value: Balance): UniffiByteArray;
|
|
2810
|
+
};
|
|
2811
|
+
FfiConverterTypeBarkError: {
|
|
2812
|
+
read(from: RustBuffer): BarkError;
|
|
2813
|
+
write(value: BarkError, into: RustBuffer): void;
|
|
2814
|
+
allocationSize(value: BarkError): number;
|
|
2815
|
+
lift(value: UniffiByteArray): BarkError;
|
|
2816
|
+
lower(value: BarkError): UniffiByteArray;
|
|
2817
|
+
};
|
|
2818
|
+
FfiConverterTypeBlockRef: {
|
|
2819
|
+
read(from: RustBuffer): BlockRef;
|
|
2820
|
+
write(value: BlockRef, into: RustBuffer): void;
|
|
2821
|
+
allocationSize(value: BlockRef): number;
|
|
2822
|
+
lift(value: UniffiByteArray): BlockRef;
|
|
2823
|
+
lower(value: BlockRef): UniffiByteArray;
|
|
2824
|
+
};
|
|
2825
|
+
FfiConverterTypeConfig: {
|
|
2826
|
+
read(from: RustBuffer): Config;
|
|
2827
|
+
write(value: Config, into: RustBuffer): void;
|
|
2828
|
+
allocationSize(value: Config): number;
|
|
2829
|
+
lift(value: UniffiByteArray): Config;
|
|
2830
|
+
lower(value: Config): UniffiByteArray;
|
|
2831
|
+
};
|
|
2832
|
+
FfiConverterTypeCpfpParams: {
|
|
2833
|
+
read(from: RustBuffer): CpfpParams;
|
|
2834
|
+
write(value: CpfpParams, into: RustBuffer): void;
|
|
2835
|
+
allocationSize(value: CpfpParams): number;
|
|
2836
|
+
lift(value: UniffiByteArray): CpfpParams;
|
|
2837
|
+
lower(value: CpfpParams): UniffiByteArray;
|
|
2838
|
+
};
|
|
2839
|
+
FfiConverterTypeDestination: {
|
|
2840
|
+
read(from: RustBuffer): Destination;
|
|
2841
|
+
write(value: Destination, into: RustBuffer): void;
|
|
2842
|
+
allocationSize(value: Destination): number;
|
|
2843
|
+
lift(value: UniffiByteArray): Destination;
|
|
2844
|
+
lower(value: Destination): UniffiByteArray;
|
|
2845
|
+
};
|
|
2846
|
+
FfiConverterTypeExitClaimTransaction: {
|
|
2847
|
+
read(from: RustBuffer): ExitClaimTransaction;
|
|
2848
|
+
write(value: ExitClaimTransaction, into: RustBuffer): void;
|
|
2849
|
+
allocationSize(value: ExitClaimTransaction): number;
|
|
2850
|
+
lift(value: UniffiByteArray): ExitClaimTransaction;
|
|
2851
|
+
lower(value: ExitClaimTransaction): UniffiByteArray;
|
|
2852
|
+
};
|
|
2853
|
+
FfiConverterTypeExitProgressStatus: {
|
|
2854
|
+
read(from: RustBuffer): ExitProgressStatus;
|
|
2855
|
+
write(value: ExitProgressStatus, into: RustBuffer): void;
|
|
2856
|
+
allocationSize(value: ExitProgressStatus): number;
|
|
2857
|
+
lift(value: UniffiByteArray): ExitProgressStatus;
|
|
2858
|
+
lower(value: ExitProgressStatus): UniffiByteArray;
|
|
2859
|
+
};
|
|
2860
|
+
FfiConverterTypeExitTransactionStatus: {
|
|
2861
|
+
read(from: RustBuffer): ExitTransactionStatus;
|
|
2862
|
+
write(value: ExitTransactionStatus, into: RustBuffer): void;
|
|
2863
|
+
allocationSize(value: ExitTransactionStatus): number;
|
|
2864
|
+
lift(value: UniffiByteArray): ExitTransactionStatus;
|
|
2865
|
+
lower(value: ExitTransactionStatus): UniffiByteArray;
|
|
2866
|
+
};
|
|
2867
|
+
FfiConverterTypeExitVtxo: {
|
|
2868
|
+
read(from: RustBuffer): ExitVtxo;
|
|
2869
|
+
write(value: ExitVtxo, into: RustBuffer): void;
|
|
2870
|
+
allocationSize(value: ExitVtxo): number;
|
|
2871
|
+
lift(value: UniffiByteArray): ExitVtxo;
|
|
2872
|
+
lower(value: ExitVtxo): UniffiByteArray;
|
|
2873
|
+
};
|
|
2874
|
+
FfiConverterTypeLightningInvoice: {
|
|
2875
|
+
read(from: RustBuffer): LightningInvoice;
|
|
2876
|
+
write(value: LightningInvoice, into: RustBuffer): void;
|
|
2877
|
+
allocationSize(value: LightningInvoice): number;
|
|
2878
|
+
lift(value: UniffiByteArray): LightningInvoice;
|
|
2879
|
+
lower(value: LightningInvoice): UniffiByteArray;
|
|
2880
|
+
};
|
|
2881
|
+
FfiConverterTypeLightningReceive: {
|
|
2882
|
+
read(from: RustBuffer): LightningReceive;
|
|
2883
|
+
write(value: LightningReceive, into: RustBuffer): void;
|
|
2884
|
+
allocationSize(value: LightningReceive): number;
|
|
2885
|
+
lift(value: UniffiByteArray): LightningReceive;
|
|
2886
|
+
lower(value: LightningReceive): UniffiByteArray;
|
|
2887
|
+
};
|
|
2888
|
+
FfiConverterTypeLightningSend: {
|
|
2889
|
+
read(from: RustBuffer): LightningSend;
|
|
2890
|
+
write(value: LightningSend, into: RustBuffer): void;
|
|
2891
|
+
allocationSize(value: LightningSend): number;
|
|
2892
|
+
lift(value: UniffiByteArray): LightningSend;
|
|
2893
|
+
lower(value: LightningSend): UniffiByteArray;
|
|
2894
|
+
};
|
|
2895
|
+
FfiConverterTypeMovement: {
|
|
2896
|
+
read(from: RustBuffer): Movement;
|
|
2897
|
+
write(value: Movement, into: RustBuffer): void;
|
|
2898
|
+
allocationSize(value: Movement): number;
|
|
2899
|
+
lift(value: UniffiByteArray): Movement;
|
|
2900
|
+
lower(value: Movement): UniffiByteArray;
|
|
2901
|
+
};
|
|
2902
|
+
FfiConverterTypeNetwork: {
|
|
2903
|
+
read(from: RustBuffer): Network;
|
|
2904
|
+
write(value: Network, into: RustBuffer): void;
|
|
2905
|
+
allocationSize(value: Network): number;
|
|
2906
|
+
lift(value: UniffiByteArray): Network;
|
|
2907
|
+
lower(value: Network): UniffiByteArray;
|
|
2908
|
+
};
|
|
2909
|
+
FfiConverterTypeOffboardResult: {
|
|
2910
|
+
read(from: RustBuffer): OffboardResult;
|
|
2911
|
+
write(value: OffboardResult, into: RustBuffer): void;
|
|
2912
|
+
allocationSize(value: OffboardResult): number;
|
|
2913
|
+
lift(value: UniffiByteArray): OffboardResult;
|
|
2914
|
+
lower(value: OffboardResult): UniffiByteArray;
|
|
2915
|
+
};
|
|
2916
|
+
FfiConverterTypeOnchainBalance: {
|
|
2917
|
+
read(from: RustBuffer): OnchainBalance;
|
|
2918
|
+
write(value: OnchainBalance, into: RustBuffer): void;
|
|
2919
|
+
allocationSize(value: OnchainBalance): number;
|
|
2920
|
+
lift(value: UniffiByteArray): OnchainBalance;
|
|
2921
|
+
lower(value: OnchainBalance): UniffiByteArray;
|
|
2922
|
+
};
|
|
2923
|
+
FfiConverterTypeOnchainWallet: FfiConverterObject<OnchainWalletInterface>;
|
|
2924
|
+
FfiConverterTypeOutPoint: {
|
|
2925
|
+
read(from: RustBuffer): OutPoint;
|
|
2926
|
+
write(value: OutPoint, into: RustBuffer): void;
|
|
2927
|
+
allocationSize(value: OutPoint): number;
|
|
2928
|
+
lift(value: UniffiByteArray): OutPoint;
|
|
2929
|
+
lower(value: OutPoint): UniffiByteArray;
|
|
2930
|
+
};
|
|
2931
|
+
FfiConverterTypePendingBoard: {
|
|
2932
|
+
read(from: RustBuffer): PendingBoard;
|
|
2933
|
+
write(value: PendingBoard, into: RustBuffer): void;
|
|
2934
|
+
allocationSize(value: PendingBoard): number;
|
|
2935
|
+
lift(value: UniffiByteArray): PendingBoard;
|
|
2936
|
+
lower(value: PendingBoard): UniffiByteArray;
|
|
2937
|
+
};
|
|
2938
|
+
FfiConverterTypeRoundState: {
|
|
2939
|
+
read(from: RustBuffer): RoundState;
|
|
2940
|
+
write(value: RoundState, into: RustBuffer): void;
|
|
2941
|
+
allocationSize(value: RoundState): number;
|
|
2942
|
+
lift(value: UniffiByteArray): RoundState;
|
|
2943
|
+
lower(value: RoundState): UniffiByteArray;
|
|
2944
|
+
};
|
|
2945
|
+
FfiConverterTypeVtxo: {
|
|
2946
|
+
read(from: RustBuffer): Vtxo;
|
|
2947
|
+
write(value: Vtxo, into: RustBuffer): void;
|
|
2948
|
+
allocationSize(value: Vtxo): number;
|
|
2949
|
+
lift(value: UniffiByteArray): Vtxo;
|
|
2950
|
+
lower(value: Vtxo): UniffiByteArray;
|
|
2951
|
+
};
|
|
2952
|
+
FfiConverterTypeWallet: FfiConverterObject<WalletInterface>;
|
|
2953
|
+
FfiConverterTypeWalletProperties: {
|
|
2954
|
+
read(from: RustBuffer): WalletProperties;
|
|
2955
|
+
write(value: WalletProperties, into: RustBuffer): void;
|
|
2956
|
+
allocationSize(value: WalletProperties): number;
|
|
2957
|
+
lift(value: UniffiByteArray): WalletProperties;
|
|
2958
|
+
lower(value: WalletProperties): UniffiByteArray;
|
|
2959
|
+
};
|
|
2960
|
+
};
|
|
2961
|
+
}>;
|
|
2962
|
+
export default _default;
|
|
2963
|
+
//# sourceMappingURL=bark.d.ts.map
|