@secondts/bark-react-native 0.25.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -12
- package/android/CMakeLists.txt +1 -1
- package/android/build.gradle +1 -1
- package/android/proguard-rules.pro +16 -0
- package/app.plugin.js +5 -1
- package/cpp/generated/bark.cpp +519 -31
- package/cpp/generated/bark.hpp +28 -2
- package/lib/commonjs/WalletNotifications.js +7 -2
- package/lib/commonjs/WalletNotifications.js.map +1 -1
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +948 -573
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/module/WalletNotifications.js +7 -2
- package/lib/module/WalletNotifications.js.map +1 -1
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +948 -573
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/WalletNotifications.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +35 -9
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +1595 -168
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/WalletNotifications.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +35 -9
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +1595 -168
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +5 -10
- package/scripts/postinstall.js +127 -40
- package/src/WalletNotifications.ts +7 -2
- package/src/generated/bark-ffi.ts +397 -950
- package/src/generated/bark.ts +13380 -13461
- package/lib/typescript/commonjs/plugin/src/index.d.ts +0 -11
- package/lib/typescript/commonjs/plugin/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/plugin/src/withAndroid.d.ts +0 -6
- package/lib/typescript/commonjs/plugin/src/withAndroid.d.ts.map +0 -1
- package/lib/typescript/commonjs/plugin/src/withIOS.d.ts +0 -7
- package/lib/typescript/commonjs/plugin/src/withIOS.d.ts.map +0 -1
- package/lib/typescript/module/plugin/src/index.d.ts +0 -11
- package/lib/typescript/module/plugin/src/index.d.ts.map +0 -1
- package/lib/typescript/module/plugin/src/withAndroid.d.ts +0 -6
- package/lib/typescript/module/plugin/src/withAndroid.d.ts.map +0 -1
- package/lib/typescript/module/plugin/src/withIOS.d.ts +0 -7
- package/lib/typescript/module/plugin/src/withIOS.d.ts.map +0 -1
- package/plugin/build/index.d.ts +0 -10
- package/plugin/build/index.js +0 -16
- package/plugin/build/withAndroid.d.ts +0 -5
- package/plugin/build/withAndroid.js +0 -26
- package/plugin/build/withIOS.d.ts +0 -6
- package/plugin/build/withIOS.js +0 -13
- package/plugin/tsconfig.json +0 -9
- package/plugin/tsconfig.tsbuildinfo +0 -1
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.WalletTransaction=exports.WalletProperties=exports.WalletOpenArgs=exports.WalletNotification_Tags=exports.WalletNotification=exports.Wallet=exports.VtxoState_Tags=exports.VtxoState=exports.VtxoLockHolder_Tags=exports.VtxoLockHolder=exports.Vtxo=exports.RoundState=exports.RoundFlowKind=exports.RefreshFees=exports.RecoveryStatus_Tags=exports.RecoveryStatus=exports.RecoveryReport=exports.RecoveryBucket=exports.PpmExpiryFeeEntry=exports.PendingBoard=exports.PaymentResult_Tags=exports.PaymentResult=exports.PaymentRequest=exports.PaymentMethod_Tags=exports.PaymentMethodParsingError_Tags=exports.PaymentMethodParsingError=exports.PaymentMethod=exports.OutPoint=exports.OnchainWallet=exports.OnchainUtxo_Tags=exports.OnchainUtxo=exports.OnchainBalance=exports.OffboardResult=exports.OffboardFees=exports.NotificationHolder=exports.Network=exports.Movement=exports.LogLevel=exports.LightningSendStatus_Tags=exports.LightningSendStatus=exports.LightningSendFees=exports.LightningSend=exports.LightningReceiveFees=exports.LightningReceive=exports.LightningInvoice=exports.ImportVtxoArgs=exports.FeeSchedule=exports.FeeRates=exports.FeeEstimate=exports.ExitVtxo=exports.ExitTxStatus_Tags=exports.ExitTxStatus=exports.ExitTxOrigin_Tags=exports.ExitTxOrigin=exports.ExitTx=exports.ExitTransactionStatus=exports.ExitTransactionPackage=exports.ExitState_Tags=exports.ExitStateKind=exports.ExitState=exports.ExitProgressStatus=exports.ExitClaimTransaction=exports.ExitChildTransaction=exports.ExitCancelResult=exports.ExitCancelFailure_Tags=exports.ExitCancelFailure=exports.Exception_Tags=exports.Exception=exports.EmergencyExitFeeEstimate=exports.Destination=exports.DebugInfo=exports.DatadirInfo=exports.CustomOnchainWalletCallbacksImpl=exports.CpfpParams=exports.Config=exports.Bolt11InvoiceDetails=exports.BoardFundingInfo=exports.BoardFees=exports.BlockRef=exports.Bip321UriOptions=exports.Bip321Uri=exports.BarkLoggerImpl=exports.BalanceSummary=exports.Balance=exports.AvailablePaymentMethod=exports.ArkInfo=exports.AddressWithIndex=void 0;exports.clearLogger=clearLogger;exports.decodeBolt11Invoice=decodeBolt11Invoice;exports.default=void 0;exports.defaultVtxoKeyGapLimit=defaultVtxoKeyGapLimit;exports.extractTxFromPsbt=extractTxFromPsbt;exports.generateMnemonic=generateMnemonic;exports.initWallet=initWallet;exports.maxVtxoKeyGapLimit=maxVtxoKeyGapLimit;exports.readDatadirInfo=readDatadirInfo;exports.setLogger=setLogger;exports.validateArkAddress=validateArkAddress;exports.validateMnemonic=validateMnemonic;exports.walletExists=walletExists;var _barkFfi=_interopRequireDefault(require("./bark-ffi.js"));var _core=require("@ubjs/core");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e};}// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
2
|
// Trust me, you don't want to mess with it!
|
|
3
3
|
/* tslint:disable *//* eslint-disable */// @ts-nocheck
|
|
4
4
|
const uniffiCaller=new _core.UniffiRustCaller(()=>({code:0}));const uniffiIsDebug=// @ts-ignore -- The process global might not be defined
|
|
5
5
|
typeof process!=="object"||// @ts-ignore -- The process global might not be defined
|
|
6
6
|
process?.env?.NODE_ENV!=="production"||false;// Public interface members begin here.
|
|
7
7
|
/**
|
|
8
|
+
* Turn logging off and detach the current logger, which is never released.
|
|
9
|
+
*
|
|
10
|
+
* React Native calls this when its JS runtime starts, so a logger left by a
|
|
11
|
+
* runtime that was reloaded is never called.
|
|
12
|
+
*/function clearLogger(){uniffiCaller.rustCall(/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_clear_logger(callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
13
|
+
* Decode a BOLT11 invoice, for example to show its amount, description,
|
|
14
|
+
* payee and expiry before paying it.
|
|
15
|
+
*
|
|
16
|
+
* Only decodes: it does not check the invoice's network or whether it has
|
|
17
|
+
* expired. `Wallet::parse_payment_request` checks the network.
|
|
18
|
+
*/function decodeBolt11Invoice(invoice)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_decode_bolt11_invoice(FfiConverterString.lower(invoice,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterTypeBolt11InvoiceDetails.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
8
19
|
* Default for `Config.vtxo_key_gap_limit`: the run of consecutive unused
|
|
9
20
|
* seed-derived VTXO key indices a scan crosses before concluding a VTXO
|
|
10
21
|
* isn't ours.
|
|
@@ -32,10 +43,20 @@ process?.env?.NODE_ENV!=="production"||false;// Public interface members begin h
|
|
|
32
43
|
* `gap_limit` override) accepts. A scan that matches nothing runs the limit
|
|
33
44
|
* to its end, so an unbounded limit is unbounded work.
|
|
34
45
|
*/function maxVtxoKeyGapLimit(){return _core.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
35
|
-
*
|
|
46
|
+
* Network and seed fingerprint of the wallet in `datadir`, or `None` when no
|
|
47
|
+
* wallet is initialized there. Same side-effect guarantees as
|
|
48
|
+
* [`wallet_exists`].
|
|
49
|
+
*
|
|
50
|
+
* Not named `datadir_info`: the Go bindings would export it as `DatadirInfo`,
|
|
51
|
+
* which collides with the record of the same name.
|
|
52
|
+
*/function readDatadirInfo(datadir)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_read_datadir_info(FfiConverterString.lower(datadir,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterOptionalTypeDatadirInfo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
53
|
+
* Send bark's log records at or above `max_level` to `logger`.
|
|
36
54
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
55
|
+
* Calling this again replaces the current logger and level. The replaced
|
|
56
|
+
* logger is never released. `clear_logger` turns logging off.
|
|
57
|
+
*
|
|
58
|
+
* Errors if another logger for Rust's `log` crate was installed in this
|
|
59
|
+
* process before the first call.
|
|
39
60
|
*/function setLogger(logger,maxLevel)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_set_logger(FfiConverterTypeBarkLogger.lower(logger,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterTypeLogLevel.lower(maxLevel,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
40
61
|
* Validate an Ark address (basic format check only)
|
|
41
62
|
*
|
|
@@ -44,7 +65,16 @@ process?.env?.NODE_ENV!=="production"||false;// Public interface members begin h
|
|
|
44
65
|
* use Wallet::validate_arkoor_address() instead.
|
|
45
66
|
*/function validateArkAddress(address)/*throws*/{return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_validate_ark_address(FfiConverterString.lower(address,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
46
67
|
* Validate a BIP39 mnemonic phrase
|
|
47
|
-
*/function validateMnemonic(mnemonic)/*throws*/{return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_validate_mnemonic(FfiConverterString.lower(mnemonic,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}
|
|
68
|
+
*/function validateMnemonic(mnemonic)/*throws*/{return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_validate_mnemonic(FfiConverterString.lower(mnemonic,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
69
|
+
* Whether `datadir` holds an initialized bark wallet.
|
|
70
|
+
*
|
|
71
|
+
* Answers without side effects: the database is opened read-only, no
|
|
72
|
+
* migration runs and no file or directory is created. Returns `false` for a
|
|
73
|
+
* missing or empty directory and for a database that never got its wallet
|
|
74
|
+
* properties (for example after a crash during creation). Returns an error
|
|
75
|
+
* when a database exists but cannot be read, so a corrupt wallet is never
|
|
76
|
+
* mistaken for an absent one.
|
|
77
|
+
*/function walletExists(datadir)/*throws*/{return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_wallet_exists(FfiConverterString.lower(datadir,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}// Hermes (React Native ≥ 0.74) ships TextEncoder and encodeInto, but not
|
|
48
78
|
// TextDecoder. For single-string decode (bytesToString), we polyfill via the
|
|
49
79
|
// C++ string_from_buffer helper using a duck-typed object matching the
|
|
50
80
|
// standard TextDecoder.decode signature. Once Hermes ships a real
|
|
@@ -66,11 +96,11 @@ writeStringIntoBuffer:(s,buf,offset)=>{const view=new Uint8Array(buf.arrayBuffer
|
|
|
66
96
|
// the double property-lookup in string_from_buffer.
|
|
67
97
|
readStringFromBuffer:(buf,offset,length)=>(0,_barkFfi.default)().ubrn_uniffi_internal_fn_func_ffi__read_string_from_buffer(buf,offset,length)};})();const FfiConverterString=(0,_core.uniffiCreateFfiConverterString)(stringConverter);/**
|
|
68
98
|
* Generated factory for {@link AddressWithIndex} record objects.
|
|
69
|
-
*/const AddressWithIndex=exports.AddressWithIndex=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAddressWithIndex=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),index:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);_core.FfiConverterUInt32.writeIntoCursor(value.index,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+_core.FfiConverterUInt32.allocationSize(value.index);}}return new FFIConverter();})();let Network=exports.Network=/*#__PURE__*/function(Network){Network[Network["Bitcoin"]=0]="Bitcoin";Network[Network["Testnet"]=1]="Testnet";Network[Network["Signet"]=2]="Signet";Network[Network["Regtest"]=3]="Regtest";return Network;}({});const FfiConverterTypeNetwork=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return Network.Bitcoin;case 2:return Network.Testnet;case 3:return Network.Signet;case 4:return Network.Regtest;default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value){case Network.Bitcoin:return c.writeI32(1);case Network.Testnet:return c.writeI32(2);case Network.Signet:return c.writeI32(3);case Network.Regtest:return c.writeI32(4);}}allocationSize(value){return 4;}}return new FFIConverter();})();/**
|
|
99
|
+
*/const AddressWithIndex=exports.AddressWithIndex=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAddressWithIndex=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),index:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);_core.FfiConverterUInt32.writeIntoCursor(value.index,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+_core.FfiConverterUInt32.allocationSize(value.index);}};return new FFIConverter();})();let Network=exports.Network=/*#__PURE__*/function(Network){Network[Network["Bitcoin"]=0]="Bitcoin";Network[Network["Testnet"]=1]="Testnet";Network[Network["Signet"]=2]="Signet";Network[Network["Regtest"]=3]="Regtest";return Network;}({});const FfiConverterTypeNetwork=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return Network.Bitcoin;case 2:return Network.Testnet;case 3:return Network.Signet;case 4:return Network.Regtest;default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value){case Network.Bitcoin:return c.writeI32(1);case Network.Testnet:return c.writeI32(2);case Network.Signet:return c.writeI32(3);case Network.Regtest:return c.writeI32(4);}}allocationSize(value){return 4;}}return new FFIConverter();})();/**
|
|
70
100
|
* Fees for boarding onchain funds into the Ark.
|
|
71
101
|
*//**
|
|
72
102
|
* Generated factory for {@link BoardFees} record objects.
|
|
73
|
-
*/const BoardFees=exports.BoardFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:_core.FfiConverterUInt64.readFromCursor(c),baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppm:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.minFeeSats)+_core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+_core.FfiConverterUInt64.allocationSize(value.ppm);}}return new FFIConverter();})();/**
|
|
103
|
+
*/const BoardFees=exports.BoardFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:_core.FfiConverterUInt64.readFromCursor(c),baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppm:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.minFeeSats)+_core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+_core.FfiConverterUInt64.allocationSize(value.ppm);}};return new FFIConverter();})();/**
|
|
74
104
|
* One tier of a PPM-by-expiry fee table.
|
|
75
105
|
*
|
|
76
106
|
* The entry applies when a VTXO expires in at most `expiry_blocks_threshold`
|
|
@@ -78,35 +108,159 @@ readStringFromBuffer:(buf,offset,length)=>(0,_barkFfi.default)().ubrn_uniffi_int
|
|
|
78
108
|
* actual expiry distance. Tables are sorted ascending by threshold.
|
|
79
109
|
*//**
|
|
80
110
|
* Generated factory for {@link PpmExpiryFeeEntry} record objects.
|
|
81
|
-
*/const PpmExpiryFeeEntry=exports.PpmExpiryFeeEntry=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePpmExpiryFeeEntry=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{expiryBlocksThreshold:_core.FfiConverterUInt32.readFromCursor(c),ppm:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.expiryBlocksThreshold,c);_core.FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.expiryBlocksThreshold)+_core.FfiConverterUInt64.allocationSize(value.ppm);}}return new FFIConverter();})();/**
|
|
111
|
+
*/const PpmExpiryFeeEntry=exports.PpmExpiryFeeEntry=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePpmExpiryFeeEntry=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{expiryBlocksThreshold:_core.FfiConverterUInt32.readFromCursor(c),ppm:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.expiryBlocksThreshold,c);_core.FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.expiryBlocksThreshold)+_core.FfiConverterUInt64.allocationSize(value.ppm);}};return new FFIConverter();})();/**
|
|
82
112
|
* Fees for offboarding VTXOs to an onchain address.
|
|
83
113
|
*//**
|
|
84
114
|
* Generated factory for {@link OffboardFees} record objects.
|
|
85
|
-
*/const OffboardFees=exports.OffboardFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),fixedAdditionalVb:_core.FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.fixedAdditionalVb,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+_core.FfiConverterUInt64.allocationSize(value.fixedAdditionalVb)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}}return new FFIConverter();})();/**
|
|
115
|
+
*/const OffboardFees=exports.OffboardFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),fixedAdditionalVb:_core.FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.fixedAdditionalVb,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+_core.FfiConverterUInt64.allocationSize(value.fixedAdditionalVb)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}};return new FFIConverter();})();/**
|
|
86
116
|
* Fees for refreshing VTXOs in a round.
|
|
87
117
|
*//**
|
|
88
118
|
* Generated factory for {@link RefreshFees} record objects.
|
|
89
|
-
*/const RefreshFees=exports.RefreshFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRefreshFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}}return new FFIConverter();})();/**
|
|
119
|
+
*/const RefreshFees=exports.RefreshFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRefreshFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}};return new FFIConverter();})();/**
|
|
90
120
|
* Fees for receiving over lightning.
|
|
91
121
|
*//**
|
|
92
122
|
* Generated factory for {@link LightningReceiveFees} record objects.
|
|
93
|
-
*/const LightningReceiveFees=exports.LightningReceiveFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceiveFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppm:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+_core.FfiConverterUInt64.allocationSize(value.ppm);}}return new FFIConverter();})();/**
|
|
123
|
+
*/const LightningReceiveFees=exports.LightningReceiveFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceiveFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppm:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+_core.FfiConverterUInt64.allocationSize(value.ppm);}};return new FFIConverter();})();/**
|
|
94
124
|
* Fees for sending over lightning.
|
|
95
125
|
*//**
|
|
96
126
|
* Generated factory for {@link LightningSendFees} record objects.
|
|
97
|
-
*/const LightningSendFees=exports.LightningSendFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSendFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:_core.FfiConverterUInt64.readFromCursor(c),baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.minFeeSats)+_core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}}return new FFIConverter();})();/**
|
|
127
|
+
*/const LightningSendFees=exports.LightningSendFees=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSendFees=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:_core.FfiConverterUInt64.readFromCursor(c),baseFeeSats:_core.FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.minFeeSats)+_core.FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}};return new FFIConverter();})();/**
|
|
98
128
|
* The Ark server's complete fee schedule, mirroring `ark::fees::FeeSchedule`.
|
|
99
129
|
*//**
|
|
100
130
|
* Generated factory for {@link FeeSchedule} record objects.
|
|
101
|
-
*/const FeeSchedule=exports.FeeSchedule=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeSchedule=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{board:FfiConverterTypeBoardFees.readFromCursor(c),offboard:FfiConverterTypeOffboardFees.readFromCursor(c),refresh:FfiConverterTypeRefreshFees.readFromCursor(c),lightningReceive:FfiConverterTypeLightningReceiveFees.readFromCursor(c),lightningSend:FfiConverterTypeLightningSendFees.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeBoardFees.writeIntoCursor(value.board,c);FfiConverterTypeOffboardFees.writeIntoCursor(value.offboard,c);FfiConverterTypeRefreshFees.writeIntoCursor(value.refresh,c);FfiConverterTypeLightningReceiveFees.writeIntoCursor(value.lightningReceive,c);FfiConverterTypeLightningSendFees.writeIntoCursor(value.lightningSend,c);}allocationSize(value){return FfiConverterTypeBoardFees.allocationSize(value.board)+FfiConverterTypeOffboardFees.allocationSize(value.offboard)+FfiConverterTypeRefreshFees.allocationSize(value.refresh)+FfiConverterTypeLightningReceiveFees.allocationSize(value.lightningReceive)+FfiConverterTypeLightningSendFees.allocationSize(value.lightningSend);}}return new FFIConverter();})();/**
|
|
131
|
+
*/const FeeSchedule=exports.FeeSchedule=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeSchedule=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{board:FfiConverterTypeBoardFees.readFromCursor(c),offboard:FfiConverterTypeOffboardFees.readFromCursor(c),refresh:FfiConverterTypeRefreshFees.readFromCursor(c),lightningReceive:FfiConverterTypeLightningReceiveFees.readFromCursor(c),lightningSend:FfiConverterTypeLightningSendFees.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeBoardFees.writeIntoCursor(value.board,c);FfiConverterTypeOffboardFees.writeIntoCursor(value.offboard,c);FfiConverterTypeRefreshFees.writeIntoCursor(value.refresh,c);FfiConverterTypeLightningReceiveFees.writeIntoCursor(value.lightningReceive,c);FfiConverterTypeLightningSendFees.writeIntoCursor(value.lightningSend,c);}allocationSize(value){return FfiConverterTypeBoardFees.allocationSize(value.board)+FfiConverterTypeOffboardFees.allocationSize(value.offboard)+FfiConverterTypeRefreshFees.allocationSize(value.refresh)+FfiConverterTypeLightningReceiveFees.allocationSize(value.lightningReceive)+FfiConverterTypeLightningSendFees.allocationSize(value.lightningSend);}};return new FFIConverter();})();/**
|
|
102
132
|
* Generated factory for {@link ArkInfo} record objects.
|
|
103
|
-
*/const ArkInfo=exports.ArkInfo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeArkInfo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),serverPubkey:FfiConverterString.readFromCursor(c),roundIntervalSecs:_core.FfiConverterUInt64.readFromCursor(c),nbRoundNonces:_core.FfiConverterUInt32.readFromCursor(c),vtxoExitDelta:_core.FfiConverterUInt32.readFromCursor(c),vtxoLifetime:_core.FfiConverterUInt32.readFromCursor(c),vtxoExpiryDelta:_core.FfiConverterUInt32.readFromCursor(c),htlcSendExpiryDelta:_core.FfiConverterUInt32.readFromCursor(c),htlcExpiryDelta:_core.FfiConverterUInt32.readFromCursor(c),maxVtxoAmountSats:FfiConverterOptionalUInt64.readFromCursor(c),requiredBoardConfirmations:_core.FfiConverterUInt32.readFromCursor(c),maxUserInvoiceCltvDelta:_core.FfiConverterUInt16.readFromCursor(c),minBoardAmountSats:_core.FfiConverterUInt64.readFromCursor(c),lnReceiveAntiDosRequired:_core.FfiConverterBool.readFromCursor(c),feeSchedule:FfiConverterTypeFeeSchedule.readFromCursor(c),maxVtxoExitDepth:_core.FfiConverterUInt16.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.serverPubkey,c);_core.FfiConverterUInt64.writeIntoCursor(value.roundIntervalSecs,c);_core.FfiConverterUInt32.writeIntoCursor(value.nbRoundNonces,c);_core.FfiConverterUInt32.writeIntoCursor(value.vtxoExitDelta,c);_core.FfiConverterUInt32.writeIntoCursor(value.vtxoLifetime,c);_core.FfiConverterUInt32.writeIntoCursor(value.vtxoExpiryDelta,c);_core.FfiConverterUInt32.writeIntoCursor(value.htlcSendExpiryDelta,c);_core.FfiConverterUInt32.writeIntoCursor(value.htlcExpiryDelta,c);FfiConverterOptionalUInt64.writeIntoCursor(value.maxVtxoAmountSats,c);_core.FfiConverterUInt32.writeIntoCursor(value.requiredBoardConfirmations,c);_core.FfiConverterUInt16.writeIntoCursor(value.maxUserInvoiceCltvDelta,c);_core.FfiConverterUInt64.writeIntoCursor(value.minBoardAmountSats,c);_core.FfiConverterBool.writeIntoCursor(value.lnReceiveAntiDosRequired,c);FfiConverterTypeFeeSchedule.writeIntoCursor(value.feeSchedule,c);_core.FfiConverterUInt16.writeIntoCursor(value.maxVtxoExitDepth,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.serverPubkey)+_core.FfiConverterUInt64.allocationSize(value.roundIntervalSecs)+_core.FfiConverterUInt32.allocationSize(value.nbRoundNonces)+_core.FfiConverterUInt32.allocationSize(value.vtxoExitDelta)+_core.FfiConverterUInt32.allocationSize(value.vtxoLifetime)+_core.FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta)+_core.FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta)+_core.FfiConverterUInt32.allocationSize(value.htlcExpiryDelta)+FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats)+_core.FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations)+_core.FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta)+_core.FfiConverterUInt64.allocationSize(value.minBoardAmountSats)+_core.FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired)+FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule)+_core.FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);}}return new FFIConverter();})()
|
|
133
|
+
*/const ArkInfo=exports.ArkInfo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeArkInfo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),serverPubkey:FfiConverterString.readFromCursor(c),roundIntervalSecs:_core.FfiConverterUInt64.readFromCursor(c),nbRoundNonces:_core.FfiConverterUInt32.readFromCursor(c),vtxoExitDelta:_core.FfiConverterUInt32.readFromCursor(c),vtxoLifetime:_core.FfiConverterUInt32.readFromCursor(c),vtxoExpiryDelta:_core.FfiConverterUInt32.readFromCursor(c),htlcSendExpiryDelta:_core.FfiConverterUInt32.readFromCursor(c),htlcExpiryDelta:_core.FfiConverterUInt32.readFromCursor(c),maxVtxoAmountSats:FfiConverterOptionalUInt64.readFromCursor(c),requiredBoardConfirmations:_core.FfiConverterUInt32.readFromCursor(c),maxUserInvoiceCltvDelta:_core.FfiConverterUInt16.readFromCursor(c),minBoardAmountSats:_core.FfiConverterUInt64.readFromCursor(c),lnReceiveAntiDosRequired:_core.FfiConverterBool.readFromCursor(c),feeSchedule:FfiConverterTypeFeeSchedule.readFromCursor(c),maxVtxoExitDepth:_core.FfiConverterUInt16.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.serverPubkey,c);_core.FfiConverterUInt64.writeIntoCursor(value.roundIntervalSecs,c);_core.FfiConverterUInt32.writeIntoCursor(value.nbRoundNonces,c);_core.FfiConverterUInt32.writeIntoCursor(value.vtxoExitDelta,c);_core.FfiConverterUInt32.writeIntoCursor(value.vtxoLifetime,c);_core.FfiConverterUInt32.writeIntoCursor(value.vtxoExpiryDelta,c);_core.FfiConverterUInt32.writeIntoCursor(value.htlcSendExpiryDelta,c);_core.FfiConverterUInt32.writeIntoCursor(value.htlcExpiryDelta,c);FfiConverterOptionalUInt64.writeIntoCursor(value.maxVtxoAmountSats,c);_core.FfiConverterUInt32.writeIntoCursor(value.requiredBoardConfirmations,c);_core.FfiConverterUInt16.writeIntoCursor(value.maxUserInvoiceCltvDelta,c);_core.FfiConverterUInt64.writeIntoCursor(value.minBoardAmountSats,c);_core.FfiConverterBool.writeIntoCursor(value.lnReceiveAntiDosRequired,c);FfiConverterTypeFeeSchedule.writeIntoCursor(value.feeSchedule,c);_core.FfiConverterUInt16.writeIntoCursor(value.maxVtxoExitDepth,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.serverPubkey)+_core.FfiConverterUInt64.allocationSize(value.roundIntervalSecs)+_core.FfiConverterUInt32.allocationSize(value.nbRoundNonces)+_core.FfiConverterUInt32.allocationSize(value.vtxoExitDelta)+_core.FfiConverterUInt32.allocationSize(value.vtxoLifetime)+_core.FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta)+_core.FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta)+_core.FfiConverterUInt32.allocationSize(value.htlcExpiryDelta)+FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats)+_core.FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations)+_core.FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta)+_core.FfiConverterUInt64.allocationSize(value.minBoardAmountSats)+_core.FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired)+FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule)+_core.FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);}};return new FFIConverter();})();// Enum: PaymentMethod
|
|
134
|
+
let PaymentMethod_Tags=exports.PaymentMethod_Tags=/*#__PURE__*/function(PaymentMethod_Tags){PaymentMethod_Tags["Ark"]="Ark";PaymentMethod_Tags["Bitcoin"]="Bitcoin";PaymentMethod_Tags["OutputScript"]="OutputScript";PaymentMethod_Tags["Invoice"]="Invoice";PaymentMethod_Tags["Offer"]="Offer";PaymentMethod_Tags["LightningAddress"]="LightningAddress";PaymentMethod_Tags["Lnurl"]="Lnurl";PaymentMethod_Tags["Custom"]="Custom";return PaymentMethod_Tags;}({});/**
|
|
135
|
+
* A payment destination, mirroring `bark::movement::PaymentMethod`.
|
|
136
|
+
*
|
|
137
|
+
* Each variant carries the destination as a string. `type` and `value`
|
|
138
|
+
* match upstream's JSON encoding (`{"type":"ark","value":"tark1…"}`), which
|
|
139
|
+
* is what `Movement.sent_to_addresses` and `Movement.received_on_addresses`
|
|
140
|
+
* hold and what `Wallet::history_by_payment_method` takes.
|
|
141
|
+
*/const PaymentMethod=exports.PaymentMethod=(()=>{/**
|
|
142
|
+
* An Ark address.
|
|
143
|
+
*/class Ark_ extends _core.UniffiEnum{/**
|
|
144
|
+
* @private
|
|
145
|
+
* This field is private and should not be used, use `tag` instead.
|
|
146
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.Ark;constructor(inner){super("PaymentMethod","Ark");this.inner=Object.freeze(inner);}static new(inner){return new Ark_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.Ark;}}/**
|
|
147
|
+
* An onchain bitcoin address.
|
|
148
|
+
*/class Bitcoin_ extends _core.UniffiEnum{/**
|
|
149
|
+
* @private
|
|
150
|
+
* This field is private and should not be used, use `tag` instead.
|
|
151
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.Bitcoin;constructor(inner){super("PaymentMethod","Bitcoin");this.inner=Object.freeze(inner);}static new(inner){return new Bitcoin_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.Bitcoin;}}/**
|
|
152
|
+
* A hex-encoded onchain output script. bark cannot pay these yet.
|
|
153
|
+
*/class OutputScript_ extends _core.UniffiEnum{/**
|
|
154
|
+
* @private
|
|
155
|
+
* This field is private and should not be used, use `tag` instead.
|
|
156
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.OutputScript;constructor(inner){super("PaymentMethod","OutputScript");this.inner=Object.freeze(inner);}static new(inner){return new OutputScript_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.OutputScript;}}/**
|
|
157
|
+
* A lightning invoice, BOLT11 or BOLT12. `decode_bolt11_invoice` reads
|
|
158
|
+
* a BOLT11 invoice's amount, description, payee and expiry.
|
|
159
|
+
*/class Invoice_ extends _core.UniffiEnum{/**
|
|
160
|
+
* @private
|
|
161
|
+
* This field is private and should not be used, use `tag` instead.
|
|
162
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.Invoice;constructor(inner){super("PaymentMethod","Invoice");this.inner=Object.freeze(inner);}static new(inner){return new Invoice_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.Invoice;}}/**
|
|
163
|
+
* A reusable BOLT12 offer.
|
|
164
|
+
*/class Offer_ extends _core.UniffiEnum{/**
|
|
165
|
+
* @private
|
|
166
|
+
* This field is private and should not be used, use `tag` instead.
|
|
167
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.Offer;constructor(inner){super("PaymentMethod","Offer");this.inner=Object.freeze(inner);}static new(inner){return new Offer_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.Offer;}}/**
|
|
168
|
+
* A lightning address (`user@domain`), resolved over LNURL-pay.
|
|
169
|
+
*/class LightningAddress_ extends _core.UniffiEnum{/**
|
|
170
|
+
* @private
|
|
171
|
+
* This field is private and should not be used, use `tag` instead.
|
|
172
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.LightningAddress;constructor(inner){super("PaymentMethod","LightningAddress");this.inner=Object.freeze(inner);}static new(inner){return new LightningAddress_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.LightningAddress;}}/**
|
|
173
|
+
* An LNURL-pay link (`lnurl1…`).
|
|
174
|
+
*/class Lnurl_ extends _core.UniffiEnum{/**
|
|
175
|
+
* @private
|
|
176
|
+
* This field is private and should not be used, use `tag` instead.
|
|
177
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.Lnurl;constructor(inner){super("PaymentMethod","Lnurl");this.inner=Object.freeze(inner);}static new(inner){return new Lnurl_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.Lnurl;}}/**
|
|
178
|
+
* A destination bark recognizes but cannot pay, such as an Arkade
|
|
179
|
+
* address.
|
|
180
|
+
*/class Custom_ extends _core.UniffiEnum{/**
|
|
181
|
+
* @private
|
|
182
|
+
* This field is private and should not be used, use `tag` instead.
|
|
183
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethod";tag=PaymentMethod_Tags.Custom;constructor(inner){super("PaymentMethod","Custom");this.inner=Object.freeze(inner);}static new(inner){return new Custom_(inner);}static instanceOf(obj){return obj.tag===PaymentMethod_Tags.Custom;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="PaymentMethod";}return Object.freeze({instanceOf,Ark:Ark_,Bitcoin:Bitcoin_,OutputScript:OutputScript_,Invoice:Invoice_,Offer:Offer_,LightningAddress:LightningAddress_,Lnurl:Lnurl_,Custom:Custom_});})();/**
|
|
184
|
+
* A payment destination, mirroring `bark::movement::PaymentMethod`.
|
|
185
|
+
*
|
|
186
|
+
* Each variant carries the destination as a string. `type` and `value`
|
|
187
|
+
* match upstream's JSON encoding (`{"type":"ark","value":"tark1…"}`), which
|
|
188
|
+
* is what `Movement.sent_to_addresses` and `Movement.received_on_addresses`
|
|
189
|
+
* hold and what `Wallet::history_by_payment_method` takes.
|
|
190
|
+
*/// FfiConverter for enum PaymentMethod
|
|
191
|
+
const FfiConverterTypePaymentMethod=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new PaymentMethod.Ark({value:FfiConverterString.readFromCursor(c)});case 2:return new PaymentMethod.Bitcoin({value:FfiConverterString.readFromCursor(c)});case 3:return new PaymentMethod.OutputScript({value:FfiConverterString.readFromCursor(c)});case 4:return new PaymentMethod.Invoice({value:FfiConverterString.readFromCursor(c)});case 5:return new PaymentMethod.Offer({value:FfiConverterString.readFromCursor(c)});case 6:return new PaymentMethod.LightningAddress({value:FfiConverterString.readFromCursor(c)});case 7:return new PaymentMethod.Lnurl({value:FfiConverterString.readFromCursor(c)});case 8:return new PaymentMethod.Custom({value:FfiConverterString.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case PaymentMethod_Tags.Ark:{c.writeI32(1);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.Bitcoin:{c.writeI32(2);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.OutputScript:{c.writeI32(3);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.Invoice:{c.writeI32(4);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.Offer:{c.writeI32(5);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.LightningAddress:{c.writeI32(6);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.Lnurl:{c.writeI32(7);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}case PaymentMethod_Tags.Custom:{c.writeI32(8);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.value,c);return;}default:// Throwing from here means that PaymentMethod_Tags hasn't matched an ordinal.
|
|
192
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case PaymentMethod_Tags.Ark:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.Bitcoin:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.OutputScript:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.Invoice:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.Offer:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.LightningAddress:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.Lnurl:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}case PaymentMethod_Tags.Custom:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.value);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();// Enum: PaymentMethodParsingError
|
|
193
|
+
let PaymentMethodParsingError_Tags=exports.PaymentMethodParsingError_Tags=/*#__PURE__*/function(PaymentMethodParsingError_Tags){PaymentMethodParsingError_Tags["NetworkMismatch"]="NetworkMismatch";PaymentMethodParsingError_Tags["InvalidArkAddress"]="InvalidArkAddress";PaymentMethodParsingError_Tags["AmountMismatch"]="AmountMismatch";PaymentMethodParsingError_Tags["InvalidAmount"]="InvalidAmount";PaymentMethodParsingError_Tags["Unsupported"]="Unsupported";return PaymentMethodParsingError_Tags;}({});/**
|
|
194
|
+
* Why an option of a [`PaymentRequest`] may not be payable, mirroring
|
|
195
|
+
* `bark::PaymentMethodParsingError`.
|
|
196
|
+
*
|
|
197
|
+
* Returned as data in [`AvailablePaymentMethod::errors`] rather than as an
|
|
198
|
+
* error, so the caller can still show every option and flag the bad ones.
|
|
199
|
+
*/const PaymentMethodParsingError=exports.PaymentMethodParsingError=(()=>{/**
|
|
200
|
+
* The destination is for another bitcoin network than the wallet's.
|
|
201
|
+
*/class NetworkMismatch_ extends _core.UniffiEnum{/**
|
|
202
|
+
* @private
|
|
203
|
+
* This field is private and should not be used, use `tag` instead.
|
|
204
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.NetworkMismatch;constructor(){super("PaymentMethodParsingError","NetworkMismatch");}static new(){return new NetworkMismatch_();}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.NetworkMismatch;}}/**
|
|
205
|
+
* This wallet cannot pay the Ark address, for example because it
|
|
206
|
+
* belongs to another Ark server. `reason` says which check failed.
|
|
207
|
+
*/class InvalidArkAddress_ extends _core.UniffiEnum{/**
|
|
208
|
+
* @private
|
|
209
|
+
* This field is private and should not be used, use `tag` instead.
|
|
210
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.InvalidArkAddress;constructor(inner){super("PaymentMethodParsingError","InvalidArkAddress");this.inner=Object.freeze(inner);}static new(inner){return new InvalidArkAddress_(inner);}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.InvalidArkAddress;}}/**
|
|
211
|
+
* The invoice or offer asks for `expected_sats`, but the URI's `amount`
|
|
212
|
+
* is `got_sats`.
|
|
213
|
+
*/class AmountMismatch_ extends _core.UniffiEnum{/**
|
|
214
|
+
* @private
|
|
215
|
+
* This field is private and should not be used, use `tag` instead.
|
|
216
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.AmountMismatch;constructor(inner){super("PaymentMethodParsingError","AmountMismatch");this.inner=Object.freeze(inner);}static new(inner){return new AmountMismatch_(inner);}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.AmountMismatch;}}/**
|
|
217
|
+
* The destination's amount is invalid.
|
|
218
|
+
*/class InvalidAmount_ extends _core.UniffiEnum{/**
|
|
219
|
+
* @private
|
|
220
|
+
* This field is private and should not be used, use `tag` instead.
|
|
221
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.InvalidAmount;constructor(){super("PaymentMethodParsingError","InvalidAmount");}static new(){return new InvalidAmount_();}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.InvalidAmount;}}/**
|
|
222
|
+
* bark recognizes the destination but cannot pay it.
|
|
223
|
+
*/class Unsupported_ extends _core.UniffiEnum{/**
|
|
224
|
+
* @private
|
|
225
|
+
* This field is private and should not be used, use `tag` instead.
|
|
226
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.Unsupported;constructor(){super("PaymentMethodParsingError","Unsupported");}static new(){return new Unsupported_();}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.Unsupported;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="PaymentMethodParsingError";}return Object.freeze({instanceOf,NetworkMismatch:NetworkMismatch_,InvalidArkAddress:InvalidArkAddress_,AmountMismatch:AmountMismatch_,InvalidAmount:InvalidAmount_,Unsupported:Unsupported_});})();/**
|
|
227
|
+
* Why an option of a [`PaymentRequest`] may not be payable, mirroring
|
|
228
|
+
* `bark::PaymentMethodParsingError`.
|
|
229
|
+
*
|
|
230
|
+
* Returned as data in [`AvailablePaymentMethod::errors`] rather than as an
|
|
231
|
+
* error, so the caller can still show every option and flag the bad ones.
|
|
232
|
+
*/// FfiConverter for enum PaymentMethodParsingError
|
|
233
|
+
const FfiConverterTypePaymentMethodParsingError=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new PaymentMethodParsingError.NetworkMismatch();case 2:return new PaymentMethodParsingError.InvalidArkAddress({reason:FfiConverterString.readFromCursor(c)});case 3:return new PaymentMethodParsingError.AmountMismatch({expectedSats:_core.FfiConverterUInt64.readFromCursor(c),gotSats:_core.FfiConverterUInt64.readFromCursor(c)});case 4:return new PaymentMethodParsingError.InvalidAmount();case 5:return new PaymentMethodParsingError.Unsupported();default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case PaymentMethodParsingError_Tags.NetworkMismatch:{c.writeI32(1);return;}case PaymentMethodParsingError_Tags.InvalidArkAddress:{c.writeI32(2);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.reason,c);return;}case PaymentMethodParsingError_Tags.AmountMismatch:{c.writeI32(3);const inner=value.inner;_core.FfiConverterUInt64.writeIntoCursor(inner.expectedSats,c);_core.FfiConverterUInt64.writeIntoCursor(inner.gotSats,c);return;}case PaymentMethodParsingError_Tags.InvalidAmount:{c.writeI32(4);return;}case PaymentMethodParsingError_Tags.Unsupported:{c.writeI32(5);return;}default:// Throwing from here means that PaymentMethodParsingError_Tags hasn't matched an ordinal.
|
|
234
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case PaymentMethodParsingError_Tags.NetworkMismatch:{return 4;}case PaymentMethodParsingError_Tags.InvalidArkAddress:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.reason);return size;}case PaymentMethodParsingError_Tags.AmountMismatch:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt64.allocationSize(inner.expectedSats);size+=_core.FfiConverterUInt64.allocationSize(inner.gotSats);return size;}case PaymentMethodParsingError_Tags.InvalidAmount:{return 4;}case PaymentMethodParsingError_Tags.Unsupported:{return 4;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
235
|
+
* One way to pay a [`PaymentRequest`], mirroring
|
|
236
|
+
* `bark::AvailablePaymentMethod`.
|
|
237
|
+
*//**
|
|
238
|
+
* Generated factory for {@link AvailablePaymentMethod} record objects.
|
|
239
|
+
*/const AvailablePaymentMethod=exports.AvailablePaymentMethod=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAvailablePaymentMethod=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{method:FfiConverterTypePaymentMethod.readFromCursor(c),errors:FfiConverterSequenceTypePaymentMethodParsingError.readFromCursor(c),requiresAmount:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypePaymentMethod.writeIntoCursor(value.method,c);FfiConverterSequenceTypePaymentMethodParsingError.writeIntoCursor(value.errors,c);_core.FfiConverterBool.writeIntoCursor(value.requiresAmount,c);}allocationSize(value){return FfiConverterTypePaymentMethod.allocationSize(value.method)+FfiConverterSequenceTypePaymentMethodParsingError.allocationSize(value.errors)+_core.FfiConverterBool.allocationSize(value.requiresAmount);}};return new FFIConverter();})();/**
|
|
104
240
|
* Generated factory for {@link Balance} record objects.
|
|
105
|
-
*/const Balance=exports.Balance=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalance=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:_core.FfiConverterUInt64.readFromCursor(c),pendingInRoundSats:_core.FfiConverterUInt64.readFromCursor(c),pendingExitSats:_core.FfiConverterUInt64.readFromCursor(c),pendingLightningSendSats:_core.FfiConverterUInt64.readFromCursor(c),claimableLightningReceiveSats:_core.FfiConverterUInt64.readFromCursor(c),pendingBoardSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingInRoundSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingExitSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingLightningSendSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.claimableLightningReceiveSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingBoardSats,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.spendableSats)+_core.FfiConverterUInt64.allocationSize(value.pendingInRoundSats)+_core.FfiConverterUInt64.allocationSize(value.pendingExitSats)+_core.FfiConverterUInt64.allocationSize(value.pendingLightningSendSats)+_core.FfiConverterUInt64.allocationSize(value.claimableLightningReceiveSats)+_core.FfiConverterUInt64.allocationSize(value.pendingBoardSats);}}return new FFIConverter();})();/**
|
|
241
|
+
*/const Balance=exports.Balance=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalance=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:_core.FfiConverterUInt64.readFromCursor(c),needsRefreshSats:_core.FfiConverterUInt64.readFromCursor(c),pendingInRoundSats:_core.FfiConverterUInt64.readFromCursor(c),pendingExitSats:_core.FfiConverterUInt64.readFromCursor(c),pendingLightningSendSats:_core.FfiConverterUInt64.readFromCursor(c),claimableLightningReceiveSats:_core.FfiConverterUInt64.readFromCursor(c),pendingBoardSats:_core.FfiConverterUInt64.readFromCursor(c),pendingArkoorSendSats:_core.FfiConverterUInt64.readFromCursor(c),pendingOffboardSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.needsRefreshSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingInRoundSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingExitSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingLightningSendSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.claimableLightningReceiveSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingBoardSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingArkoorSendSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingOffboardSats,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.spendableSats)+_core.FfiConverterUInt64.allocationSize(value.needsRefreshSats)+_core.FfiConverterUInt64.allocationSize(value.pendingInRoundSats)+_core.FfiConverterUInt64.allocationSize(value.pendingExitSats)+_core.FfiConverterUInt64.allocationSize(value.pendingLightningSendSats)+_core.FfiConverterUInt64.allocationSize(value.claimableLightningReceiveSats)+_core.FfiConverterUInt64.allocationSize(value.pendingBoardSats)+_core.FfiConverterUInt64.allocationSize(value.pendingArkoorSendSats)+_core.FfiConverterUInt64.allocationSize(value.pendingOffboardSats);}};return new FFIConverter();})();/**
|
|
242
|
+
* The numbers to show a user without the breakdown of [`Balance`],
|
|
243
|
+
* mirroring `bark::BalanceSummary`.
|
|
244
|
+
*
|
|
245
|
+
* Show `spendable_sats` as what a user can pay with and `total_sats` as what
|
|
246
|
+
* a user owns.
|
|
247
|
+
*//**
|
|
248
|
+
* Generated factory for {@link BalanceSummary} record objects.
|
|
249
|
+
*/const BalanceSummary=exports.BalanceSummary=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalanceSummary=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:_core.FfiConverterUInt64.readFromCursor(c),needsRefreshSats:_core.FfiConverterUInt64.readFromCursor(c),pendingSats:_core.FfiConverterUInt64.readFromCursor(c),totalSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.needsRefreshSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.spendableSats)+_core.FfiConverterUInt64.allocationSize(value.needsRefreshSats)+_core.FfiConverterUInt64.allocationSize(value.pendingSats)+_core.FfiConverterUInt64.allocationSize(value.totalSats);}};return new FFIConverter();})();/**
|
|
250
|
+
* Generated factory for {@link LightningInvoice} record objects.
|
|
251
|
+
*/const LightningInvoice=exports.LightningInvoice=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningInvoice=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+_core.FfiConverterUInt64.allocationSize(value.amountSats);}};return new FFIConverter();})();/**
|
|
252
|
+
* A BIP 321 URI built by `Wallet::bip321_uri`, with the destinations in it.
|
|
253
|
+
*//**
|
|
254
|
+
* Generated factory for {@link Bip321Uri} record objects.
|
|
255
|
+
*/const Bip321Uri=exports.Bip321Uri=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBip321Uri=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{uri:FfiConverterString.readFromCursor(c),arkAddress:FfiConverterOptionalString.readFromCursor(c),lightningInvoice:FfiConverterOptionalTypeLightningInvoice.readFromCursor(c),onchainAddress:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.uri,c);FfiConverterOptionalString.writeIntoCursor(value.arkAddress,c);FfiConverterOptionalTypeLightningInvoice.writeIntoCursor(value.lightningInvoice,c);FfiConverterOptionalString.writeIntoCursor(value.onchainAddress,c);}allocationSize(value){return FfiConverterString.allocationSize(value.uri)+FfiConverterOptionalString.allocationSize(value.arkAddress)+FfiConverterOptionalTypeLightningInvoice.allocationSize(value.lightningInvoice)+FfiConverterOptionalString.allocationSize(value.onchainAddress);}};return new FFIConverter();})();/**
|
|
256
|
+
* What `Wallet::bip321_uri` puts in the URI. Every field is optional.
|
|
257
|
+
*//**
|
|
258
|
+
* Generated factory for {@link Bip321UriOptions} record objects.
|
|
259
|
+
*/const Bip321UriOptions=exports.Bip321UriOptions=(()=>{const defaults=()=>({amountSats:undefined,label:undefined,message:undefined,ark:true,lightning:true,onchainAddress:undefined});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBip321UriOptions=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{amountSats:FfiConverterOptionalUInt64.readFromCursor(c),label:FfiConverterOptionalString.readFromCursor(c),message:FfiConverterOptionalString.readFromCursor(c),ark:_core.FfiConverterBool.readFromCursor(c),lightning:_core.FfiConverterBool.readFromCursor(c),onchainAddress:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterOptionalUInt64.writeIntoCursor(value.amountSats,c);FfiConverterOptionalString.writeIntoCursor(value.label,c);FfiConverterOptionalString.writeIntoCursor(value.message,c);_core.FfiConverterBool.writeIntoCursor(value.ark,c);_core.FfiConverterBool.writeIntoCursor(value.lightning,c);FfiConverterOptionalString.writeIntoCursor(value.onchainAddress,c);}allocationSize(value){return FfiConverterOptionalUInt64.allocationSize(value.amountSats)+FfiConverterOptionalString.allocationSize(value.label)+FfiConverterOptionalString.allocationSize(value.message)+_core.FfiConverterBool.allocationSize(value.ark)+_core.FfiConverterBool.allocationSize(value.lightning)+FfiConverterOptionalString.allocationSize(value.onchainAddress);}};return new FFIConverter();})();/**
|
|
106
260
|
* Reference to a block in the blockchain
|
|
107
261
|
*//**
|
|
108
262
|
* Generated factory for {@link BlockRef} record objects.
|
|
109
|
-
*/const BlockRef=exports.BlockRef=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBlockRef=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{height:_core.FfiConverterUInt32.readFromCursor(c),hash:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.height,c);FfiConverterString.writeIntoCursor(value.hash,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.height)+FfiConverterString.allocationSize(value.hash);}}return new FFIConverter();})();/**
|
|
263
|
+
*/const BlockRef=exports.BlockRef=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBlockRef=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{height:_core.FfiConverterUInt32.readFromCursor(c),hash:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.height,c);FfiConverterString.writeIntoCursor(value.hash,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.height)+FfiConverterString.allocationSize(value.hash);}};return new FFIConverter();})();/**
|
|
110
264
|
* Destination for an externally funded board (e.g. a payjoin receive).
|
|
111
265
|
*
|
|
112
266
|
* The funding script commits to the derived keypair and expiry height, so
|
|
@@ -115,17 +269,31 @@ readStringFromBuffer:(buf,offset,length)=>(0,_barkFfi.default)().ubrn_uniffi_int
|
|
|
115
269
|
* after the sender changes the transaction.
|
|
116
270
|
*//**
|
|
117
271
|
* Generated factory for {@link BoardFundingInfo} record objects.
|
|
118
|
-
*/const BoardFundingInfo=exports.BoardFundingInfo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFundingInfo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),expiryHeight:_core.FfiConverterUInt32.readFromCursor(c),keypairIndex:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);_core.FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);_core.FfiConverterUInt32.writeIntoCursor(value.keypairIndex,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+_core.FfiConverterUInt32.allocationSize(value.expiryHeight)+_core.FfiConverterUInt32.allocationSize(value.keypairIndex);}}return new FFIConverter();})();/**
|
|
272
|
+
*/const BoardFundingInfo=exports.BoardFundingInfo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFundingInfo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),expiryHeight:_core.FfiConverterUInt32.readFromCursor(c),keypairIndex:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);_core.FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);_core.FfiConverterUInt32.writeIntoCursor(value.keypairIndex,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+_core.FfiConverterUInt32.allocationSize(value.expiryHeight)+_core.FfiConverterUInt32.allocationSize(value.keypairIndex);}};return new FFIConverter();})();/**
|
|
273
|
+
* Fields of a BOLT11 invoice, as returned by `decode_bolt11_invoice`.
|
|
274
|
+
*//**
|
|
275
|
+
* Generated factory for {@link Bolt11InvoiceDetails} record objects.
|
|
276
|
+
*/const Bolt11InvoiceDetails=exports.Bolt11InvoiceDetails=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBolt11InvoiceDetails=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{paymentHash:FfiConverterString.readFromCursor(c),amountMsat:FfiConverterOptionalUInt64.readFromCursor(c),amountSats:FfiConverterOptionalUInt64.readFromCursor(c),description:FfiConverterOptionalString.readFromCursor(c),descriptionHash:FfiConverterOptionalString.readFromCursor(c),payeePubkey:FfiConverterString.readFromCursor(c),createdAt:_core.FfiConverterUInt64.readFromCursor(c),expiresAt:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterOptionalUInt64.writeIntoCursor(value.amountMsat,c);FfiConverterOptionalUInt64.writeIntoCursor(value.amountSats,c);FfiConverterOptionalString.writeIntoCursor(value.description,c);FfiConverterOptionalString.writeIntoCursor(value.descriptionHash,c);FfiConverterString.writeIntoCursor(value.payeePubkey,c);_core.FfiConverterUInt64.writeIntoCursor(value.createdAt,c);_core.FfiConverterUInt64.writeIntoCursor(value.expiresAt,c);}allocationSize(value){return FfiConverterString.allocationSize(value.paymentHash)+FfiConverterOptionalUInt64.allocationSize(value.amountMsat)+FfiConverterOptionalUInt64.allocationSize(value.amountSats)+FfiConverterOptionalString.allocationSize(value.description)+FfiConverterOptionalString.allocationSize(value.descriptionHash)+FfiConverterString.allocationSize(value.payeePubkey)+_core.FfiConverterUInt64.allocationSize(value.createdAt)+_core.FfiConverterUInt64.allocationSize(value.expiresAt);}};return new FFIConverter();})();/**
|
|
119
277
|
* Generated factory for {@link Config} record objects.
|
|
120
|
-
*/const Config=exports.Config=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeConfig=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{serverAddress:FfiConverterString.readFromCursor(c),serverAccessToken:FfiConverterOptionalString.readFromCursor(c),esploraAddress:FfiConverterOptionalString.readFromCursor(c),bitcoindAddress:FfiConverterOptionalString.readFromCursor(c),bitcoindCookiefile:FfiConverterOptionalString.readFromCursor(c),bitcoindUser:FfiConverterOptionalString.readFromCursor(c),bitcoindPass:FfiConverterOptionalString.readFromCursor(c),vtxoRefreshExpiryThreshold:FfiConverterOptionalUInt16.readFromCursor(c),vtxoExitMargin:FfiConverterOptionalUInt16.readFromCursor(c),htlcRecvClaimDelta:FfiConverterOptionalUInt16.readFromCursor(c),fallbackFeeRate:FfiConverterOptionalUInt64.readFromCursor(c),roundTxRequiredConfirmations:FfiConverterOptionalUInt32.readFromCursor(c),daemonSyncIntervalSecs:FfiConverterOptionalUInt64.readFromCursor(c),offboardRequiredConfirmations:FfiConverterOptionalUInt32.readFromCursor(c),daemonManualSync:FfiConverterOptionalBoolean.readFromCursor(c),lightningReceiveClaimRetries:FfiConverterOptionalUInt8.readFromCursor(c),userAgent:FfiConverterOptionalString.readFromCursor(c),vtxoKeyGapLimit:FfiConverterOptionalUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.serverAddress,c);FfiConverterOptionalString.writeIntoCursor(value.serverAccessToken,c);FfiConverterOptionalString.writeIntoCursor(value.esploraAddress,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindAddress,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindCookiefile,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindUser,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindPass,c);FfiConverterOptionalUInt16.writeIntoCursor(value.vtxoRefreshExpiryThreshold,c);FfiConverterOptionalUInt16.writeIntoCursor(value.vtxoExitMargin,c);FfiConverterOptionalUInt16.writeIntoCursor(value.htlcRecvClaimDelta,c);FfiConverterOptionalUInt64.writeIntoCursor(value.fallbackFeeRate,c);FfiConverterOptionalUInt32.writeIntoCursor(value.roundTxRequiredConfirmations,c);FfiConverterOptionalUInt64.writeIntoCursor(value.daemonSyncIntervalSecs,c);FfiConverterOptionalUInt32.writeIntoCursor(value.offboardRequiredConfirmations,c);FfiConverterOptionalBoolean.writeIntoCursor(value.daemonManualSync,c);FfiConverterOptionalUInt8.writeIntoCursor(value.lightningReceiveClaimRetries,c);FfiConverterOptionalString.writeIntoCursor(value.userAgent,c);FfiConverterOptionalUInt32.writeIntoCursor(value.vtxoKeyGapLimit,c);}allocationSize(value){return FfiConverterString.allocationSize(value.serverAddress)+FfiConverterOptionalString.allocationSize(value.serverAccessToken)+FfiConverterOptionalString.allocationSize(value.esploraAddress)+FfiConverterOptionalString.allocationSize(value.bitcoindAddress)+FfiConverterOptionalString.allocationSize(value.bitcoindCookiefile)+FfiConverterOptionalString.allocationSize(value.bitcoindUser)+FfiConverterOptionalString.allocationSize(value.bitcoindPass)+FfiConverterOptionalUInt16.allocationSize(value.vtxoRefreshExpiryThreshold)+FfiConverterOptionalUInt16.allocationSize(value.vtxoExitMargin)+FfiConverterOptionalUInt16.allocationSize(value.htlcRecvClaimDelta)+FfiConverterOptionalUInt64.allocationSize(value.fallbackFeeRate)+FfiConverterOptionalUInt32.allocationSize(value.roundTxRequiredConfirmations)+FfiConverterOptionalUInt64.allocationSize(value.daemonSyncIntervalSecs)+FfiConverterOptionalUInt32.allocationSize(value.offboardRequiredConfirmations)+FfiConverterOptionalBoolean.allocationSize(value.daemonManualSync)+FfiConverterOptionalUInt8.allocationSize(value.lightningReceiveClaimRetries)+FfiConverterOptionalString.allocationSize(value.userAgent)+FfiConverterOptionalUInt32.allocationSize(value.vtxoKeyGapLimit);}}return new FFIConverter();})();/**
|
|
278
|
+
*/const Config=exports.Config=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeConfig=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{serverAddress:FfiConverterString.readFromCursor(c),serverAccessToken:FfiConverterOptionalString.readFromCursor(c),esploraAddress:FfiConverterOptionalString.readFromCursor(c),bitcoindAddress:FfiConverterOptionalString.readFromCursor(c),bitcoindCookiefile:FfiConverterOptionalString.readFromCursor(c),bitcoindUser:FfiConverterOptionalString.readFromCursor(c),bitcoindPass:FfiConverterOptionalString.readFromCursor(c),vtxoRefreshExpiryThreshold:FfiConverterOptionalUInt16.readFromCursor(c),vtxoExitMargin:FfiConverterOptionalUInt16.readFromCursor(c),htlcRecvClaimDelta:FfiConverterOptionalUInt16.readFromCursor(c),fallbackFeeRate:FfiConverterOptionalUInt64.readFromCursor(c),roundTxRequiredConfirmations:FfiConverterOptionalUInt32.readFromCursor(c),daemonSyncIntervalSecs:FfiConverterOptionalUInt64.readFromCursor(c),offboardRequiredConfirmations:FfiConverterOptionalUInt32.readFromCursor(c),daemonManualSync:FfiConverterOptionalBoolean.readFromCursor(c),lightningReceiveClaimRetries:FfiConverterOptionalUInt8.readFromCursor(c),userAgent:FfiConverterOptionalString.readFromCursor(c),vtxoKeyGapLimit:FfiConverterOptionalUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.serverAddress,c);FfiConverterOptionalString.writeIntoCursor(value.serverAccessToken,c);FfiConverterOptionalString.writeIntoCursor(value.esploraAddress,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindAddress,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindCookiefile,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindUser,c);FfiConverterOptionalString.writeIntoCursor(value.bitcoindPass,c);FfiConverterOptionalUInt16.writeIntoCursor(value.vtxoRefreshExpiryThreshold,c);FfiConverterOptionalUInt16.writeIntoCursor(value.vtxoExitMargin,c);FfiConverterOptionalUInt16.writeIntoCursor(value.htlcRecvClaimDelta,c);FfiConverterOptionalUInt64.writeIntoCursor(value.fallbackFeeRate,c);FfiConverterOptionalUInt32.writeIntoCursor(value.roundTxRequiredConfirmations,c);FfiConverterOptionalUInt64.writeIntoCursor(value.daemonSyncIntervalSecs,c);FfiConverterOptionalUInt32.writeIntoCursor(value.offboardRequiredConfirmations,c);FfiConverterOptionalBoolean.writeIntoCursor(value.daemonManualSync,c);FfiConverterOptionalUInt8.writeIntoCursor(value.lightningReceiveClaimRetries,c);FfiConverterOptionalString.writeIntoCursor(value.userAgent,c);FfiConverterOptionalUInt32.writeIntoCursor(value.vtxoKeyGapLimit,c);}allocationSize(value){return FfiConverterString.allocationSize(value.serverAddress)+FfiConverterOptionalString.allocationSize(value.serverAccessToken)+FfiConverterOptionalString.allocationSize(value.esploraAddress)+FfiConverterOptionalString.allocationSize(value.bitcoindAddress)+FfiConverterOptionalString.allocationSize(value.bitcoindCookiefile)+FfiConverterOptionalString.allocationSize(value.bitcoindUser)+FfiConverterOptionalString.allocationSize(value.bitcoindPass)+FfiConverterOptionalUInt16.allocationSize(value.vtxoRefreshExpiryThreshold)+FfiConverterOptionalUInt16.allocationSize(value.vtxoExitMargin)+FfiConverterOptionalUInt16.allocationSize(value.htlcRecvClaimDelta)+FfiConverterOptionalUInt64.allocationSize(value.fallbackFeeRate)+FfiConverterOptionalUInt32.allocationSize(value.roundTxRequiredConfirmations)+FfiConverterOptionalUInt64.allocationSize(value.daemonSyncIntervalSecs)+FfiConverterOptionalUInt32.allocationSize(value.offboardRequiredConfirmations)+FfiConverterOptionalBoolean.allocationSize(value.daemonManualSync)+FfiConverterOptionalUInt8.allocationSize(value.lightningReceiveClaimRetries)+FfiConverterOptionalString.allocationSize(value.userAgent)+FfiConverterOptionalUInt32.allocationSize(value.vtxoKeyGapLimit);}};return new FFIConverter();})();/**
|
|
121
279
|
* Parameters for creating a CPFP (Child Pays For Parent) transaction
|
|
122
280
|
*//**
|
|
123
281
|
* Generated factory for {@link CpfpParams} record objects.
|
|
124
|
-
*/const CpfpParams=exports.CpfpParams=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeCpfpParams=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txHex:FfiConverterString.readFromCursor(c),feesType:FfiConverterString.readFromCursor(c),effectiveFeeRateSatPerVb:_core.FfiConverterUInt64.readFromCursor(c),currentPackageFeeSats:FfiConverterOptionalUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterString.writeIntoCursor(value.feesType,c);_core.FfiConverterUInt64.writeIntoCursor(value.effectiveFeeRateSatPerVb,c);FfiConverterOptionalUInt64.writeIntoCursor(value.currentPackageFeeSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txHex)+FfiConverterString.allocationSize(value.feesType)+_core.FfiConverterUInt64.allocationSize(value.effectiveFeeRateSatPerVb)+FfiConverterOptionalUInt64.allocationSize(value.currentPackageFeeSats);}}return new FFIConverter();})();/**
|
|
282
|
+
*/const CpfpParams=exports.CpfpParams=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeCpfpParams=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txHex:FfiConverterString.readFromCursor(c),feesType:FfiConverterString.readFromCursor(c),effectiveFeeRateSatPerVb:_core.FfiConverterUInt64.readFromCursor(c),currentPackageFeeSats:FfiConverterOptionalUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterString.writeIntoCursor(value.feesType,c);_core.FfiConverterUInt64.writeIntoCursor(value.effectiveFeeRateSatPerVb,c);FfiConverterOptionalUInt64.writeIntoCursor(value.currentPackageFeeSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txHex)+FfiConverterString.allocationSize(value.feesType)+_core.FfiConverterUInt64.allocationSize(value.effectiveFeeRateSatPerVb)+FfiConverterOptionalUInt64.allocationSize(value.currentPackageFeeSats);}};return new FFIConverter();})();/**
|
|
283
|
+
* What [`read_datadir_info`] found in a wallet directory.
|
|
284
|
+
*//**
|
|
285
|
+
* Generated factory for {@link DatadirInfo} record objects.
|
|
286
|
+
*/const DatadirInfo=exports.DatadirInfo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDatadirInfo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{dbFile:FfiConverterString.readFromCursor(c),network:FfiConverterTypeNetwork.readFromCursor(c),fingerprint:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.dbFile,c);FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.fingerprint,c);}allocationSize(value){return FfiConverterString.allocationSize(value.dbFile)+FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.fingerprint);}};return new FFIConverter();})();/**
|
|
287
|
+
* Wallet information that helps to debug issues, mirroring
|
|
288
|
+
* `bark::DebugInfo` (what `bark debug-info` prints). Users can share it in
|
|
289
|
+
* support requests.
|
|
290
|
+
*//**
|
|
291
|
+
* Generated factory for {@link DebugInfo} record objects.
|
|
292
|
+
*/const DebugInfo=exports.DebugInfo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDebugInfo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),mailboxId:FfiConverterString.readFromCursor(c),vtxoXpub:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.mailboxId,c);FfiConverterString.writeIntoCursor(value.vtxoXpub,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.mailboxId)+FfiConverterString.allocationSize(value.vtxoXpub);}};return new FFIConverter();})();/**
|
|
125
293
|
* A Bitcoin transaction output destination
|
|
126
294
|
*//**
|
|
127
295
|
* Generated factory for {@link Destination} record objects.
|
|
128
|
-
*/const Destination=exports.Destination=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDestination=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+_core.FfiConverterUInt64.allocationSize(value.amountSats);}}return new FFIConverter();})();/**
|
|
296
|
+
*/const Destination=exports.Destination=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDestination=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+_core.FfiConverterUInt64.allocationSize(value.amountSats);}};return new FFIConverter();})();/**
|
|
129
297
|
* Estimated onchain cost of unilaterally (emergency) exiting a set of VTXOs.
|
|
130
298
|
*
|
|
131
299
|
* Mirrors bark-rest's `GET /exits/fee` response. The two legs are paid from
|
|
@@ -135,14 +303,14 @@ readStringFromBuffer:(buf,offset,length)=>(0,_barkFfi.default)().ubrn_uniffi_int
|
|
|
135
303
|
* matured outputs are drained.
|
|
136
304
|
*//**
|
|
137
305
|
* Generated factory for {@link EmergencyExitFeeEstimate} record objects.
|
|
138
|
-
*/const EmergencyExitFeeEstimate=exports.EmergencyExitFeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeEmergencyExitFeeEstimate=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{exitBroadcastFeeSats:_core.FfiConverterUInt64.readFromCursor(c),claimFeeSats:_core.FfiConverterUInt64.readFromCursor(c),totalFeeSats:_core.FfiConverterUInt64.readFromCursor(c),feeRateSatPerVb:_core.FfiConverterUInt64.readFromCursor(c),txsToBroadcast:_core.FfiConverterUInt64.readFromCursor(c),fundable:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.exitBroadcastFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.claimFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeRateSatPerVb,c);_core.FfiConverterUInt64.writeIntoCursor(value.txsToBroadcast,c);_core.FfiConverterBool.writeIntoCursor(value.fundable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.exitBroadcastFeeSats)+_core.FfiConverterUInt64.allocationSize(value.claimFeeSats)+_core.FfiConverterUInt64.allocationSize(value.totalFeeSats)+_core.FfiConverterUInt64.allocationSize(value.feeRateSatPerVb)+_core.FfiConverterUInt64.allocationSize(value.txsToBroadcast)+_core.FfiConverterBool.allocationSize(value.fundable);}}return new FFIConverter();})();/**
|
|
306
|
+
*/const EmergencyExitFeeEstimate=exports.EmergencyExitFeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeEmergencyExitFeeEstimate=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{exitBroadcastFeeSats:_core.FfiConverterUInt64.readFromCursor(c),claimFeeSats:_core.FfiConverterUInt64.readFromCursor(c),totalFeeSats:_core.FfiConverterUInt64.readFromCursor(c),feeRateSatPerVb:_core.FfiConverterUInt64.readFromCursor(c),txsToBroadcast:_core.FfiConverterUInt64.readFromCursor(c),fundable:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.exitBroadcastFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.claimFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalFeeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeRateSatPerVb,c);_core.FfiConverterUInt64.writeIntoCursor(value.txsToBroadcast,c);_core.FfiConverterBool.writeIntoCursor(value.fundable,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.exitBroadcastFeeSats)+_core.FfiConverterUInt64.allocationSize(value.claimFeeSats)+_core.FfiConverterUInt64.allocationSize(value.totalFeeSats)+_core.FfiConverterUInt64.allocationSize(value.feeRateSatPerVb)+_core.FfiConverterUInt64.allocationSize(value.txsToBroadcast)+_core.FfiConverterBool.allocationSize(value.fundable);}};return new FFIConverter();})();/**
|
|
139
307
|
* Lightweight discriminator for [`ExitState`], mirroring
|
|
140
308
|
* `bark::exit::ExitStateKind`.
|
|
141
309
|
*
|
|
142
310
|
* Carries no payload — use it where only the variant matters (e.g. reporting
|
|
143
311
|
* which state blocked a cancellation). Serde/TS tags match upstream's
|
|
144
312
|
* kebab-case serialization.
|
|
145
|
-
*/let ExitStateKind=exports.ExitStateKind=/*#__PURE__*/function(ExitStateKind){ExitStateKind[ExitStateKind["Start"]=0]="Start";ExitStateKind[ExitStateKind["Processing"]=1]="Processing";ExitStateKind[ExitStateKind["AwaitingDelta"]=2]="AwaitingDelta";ExitStateKind[ExitStateKind["Claimable"]=3]="Claimable";ExitStateKind[ExitStateKind["ClaimInProgress"]=4]="ClaimInProgress";ExitStateKind[ExitStateKind["Claimed"]=5]="Claimed";ExitStateKind[ExitStateKind["VtxoAlreadySpent"]=6]="VtxoAlreadySpent";ExitStateKind[ExitStateKind["
|
|
313
|
+
*/let ExitStateKind=exports.ExitStateKind=/*#__PURE__*/function(ExitStateKind){ExitStateKind[ExitStateKind["Start"]=0]="Start";ExitStateKind[ExitStateKind["Processing"]=1]="Processing";ExitStateKind[ExitStateKind["AwaitingDelta"]=2]="AwaitingDelta";ExitStateKind[ExitStateKind["Claimable"]=3]="Claimable";ExitStateKind[ExitStateKind["ClaimInProgress"]=4]="ClaimInProgress";ExitStateKind[ExitStateKind["Claimed"]=5]="Claimed";ExitStateKind[ExitStateKind["VtxoAlreadySpent"]=6]="VtxoAlreadySpent";ExitStateKind[ExitStateKind["VtxoSwept"]=7]="VtxoSwept";ExitStateKind[ExitStateKind["Canceled"]=8]="Canceled";return ExitStateKind;}({});const FfiConverterTypeExitStateKind=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return ExitStateKind.Start;case 2:return ExitStateKind.Processing;case 3:return ExitStateKind.AwaitingDelta;case 4:return ExitStateKind.Claimable;case 5:return ExitStateKind.ClaimInProgress;case 6:return ExitStateKind.Claimed;case 7:return ExitStateKind.VtxoAlreadySpent;case 8:return ExitStateKind.VtxoSwept;case 9:return ExitStateKind.Canceled;default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value){case ExitStateKind.Start:return c.writeI32(1);case ExitStateKind.Processing:return c.writeI32(2);case ExitStateKind.AwaitingDelta:return c.writeI32(3);case ExitStateKind.Claimable:return c.writeI32(4);case ExitStateKind.ClaimInProgress:return c.writeI32(5);case ExitStateKind.Claimed:return c.writeI32(6);case ExitStateKind.VtxoAlreadySpent:return c.writeI32(7);case ExitStateKind.VtxoSwept:return c.writeI32(8);case ExitStateKind.Canceled:return c.writeI32(9);}}allocationSize(value){return 4;}}return new FFIConverter();})();// Enum: ExitCancelFailure
|
|
146
314
|
let ExitCancelFailure_Tags=exports.ExitCancelFailure_Tags=/*#__PURE__*/function(ExitCancelFailure_Tags){ExitCancelFailure_Tags["NotExiting"]="NotExiting";ExitCancelFailure_Tags["TooLate"]="TooLate";ExitCancelFailure_Tags["AlreadyBroadcast"]="AlreadyBroadcast";return ExitCancelFailure_Tags;}({});/**
|
|
147
315
|
* Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
|
|
148
316
|
* cancel the exit.
|
|
@@ -151,23 +319,23 @@ let ExitCancelFailure_Tags=exports.ExitCancelFailure_Tags=/*#__PURE__*/function(
|
|
|
151
319
|
* each is a normal state the exit can legitimately be in. Genuine failures
|
|
152
320
|
* (database, chain source unreachable) still surface as `Err`.
|
|
153
321
|
*/const ExitCancelFailure=exports.ExitCancelFailure=(()=>{/**
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
322
|
+
* No exit was ever started for this VTXO.
|
|
323
|
+
*/class NotExiting_ extends _core.UniffiEnum{/**
|
|
324
|
+
* @private
|
|
325
|
+
* This field is private and should not be used, use `tag` instead.
|
|
326
|
+
*/[_core.uniffiTypeNameSymbol]="ExitCancelFailure";tag=ExitCancelFailure_Tags.NotExiting;constructor(){super("ExitCancelFailure","NotExiting");}static new(){return new NotExiting_();}static instanceOf(obj){return obj.tag===ExitCancelFailure_Tags.NotExiting;}}/**
|
|
327
|
+
* The exit has progressed past its abortable window. `state` is the
|
|
328
|
+
* state that blocked the cancellation.
|
|
329
|
+
*/class TooLate_ extends _core.UniffiEnum{/**
|
|
330
|
+
* @private
|
|
331
|
+
* This field is private and should not be used, use `tag` instead.
|
|
332
|
+
*/[_core.uniffiTypeNameSymbol]="ExitCancelFailure";tag=ExitCancelFailure_Tags.TooLate;constructor(inner){super("ExitCancelFailure","TooLate");this.inner=Object.freeze(inner);}static new(inner){return new TooLate_(inner);}static instanceOf(obj){return obj.tag===ExitCancelFailure_Tags.TooLate;}}/**
|
|
333
|
+
* The final exit transaction is already in the mempool or a block, so
|
|
334
|
+
* the exit can no longer be called off.
|
|
335
|
+
*/class AlreadyBroadcast_ extends _core.UniffiEnum{/**
|
|
336
|
+
* @private
|
|
337
|
+
* This field is private and should not be used, use `tag` instead.
|
|
338
|
+
*/[_core.uniffiTypeNameSymbol]="ExitCancelFailure";tag=ExitCancelFailure_Tags.AlreadyBroadcast;constructor(inner){super("ExitCancelFailure","AlreadyBroadcast");this.inner=Object.freeze(inner);}static new(inner){return new AlreadyBroadcast_(inner);}static instanceOf(obj){return obj.tag===ExitCancelFailure_Tags.AlreadyBroadcast;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="ExitCancelFailure";}return Object.freeze({instanceOf,NotExiting:NotExiting_,TooLate:TooLate_,AlreadyBroadcast:AlreadyBroadcast_});})();/**
|
|
171
339
|
* Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
|
|
172
340
|
* cancel the exit.
|
|
173
341
|
*
|
|
@@ -184,63 +352,67 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
184
352
|
* When `false`, `reason` says why.
|
|
185
353
|
*//**
|
|
186
354
|
* Generated factory for {@link ExitCancelResult} record objects.
|
|
187
|
-
*/const ExitCancelResult=exports.ExitCancelResult=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitCancelResult=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{canceled:_core.FfiConverterBool.readFromCursor(c),reason:FfiConverterOptionalTypeExitCancelFailure.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterBool.writeIntoCursor(value.canceled,c);FfiConverterOptionalTypeExitCancelFailure.writeIntoCursor(value.reason,c);}allocationSize(value){return _core.FfiConverterBool.allocationSize(value.canceled)+FfiConverterOptionalTypeExitCancelFailure.allocationSize(value.reason);}}return new FFIConverter();})()
|
|
188
|
-
* Claim transaction for exited funds
|
|
189
|
-
*//**
|
|
190
|
-
* Generated factory for {@link ExitClaimTransaction} record objects.
|
|
191
|
-
*/const ExitClaimTransaction=exports.ExitClaimTransaction=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitClaimTransaction=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{psbtBase64:FfiConverterString.readFromCursor(c),feeSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.psbtBase64,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.psbtBase64)+_core.FfiConverterUInt64.allocationSize(value.feeSats);}}return new FFIConverter();})();// Enum: ExitTxOrigin
|
|
355
|
+
*/const ExitCancelResult=exports.ExitCancelResult=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitCancelResult=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{canceled:_core.FfiConverterBool.readFromCursor(c),reason:FfiConverterOptionalTypeExitCancelFailure.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterBool.writeIntoCursor(value.canceled,c);FfiConverterOptionalTypeExitCancelFailure.writeIntoCursor(value.reason,c);}allocationSize(value){return _core.FfiConverterBool.allocationSize(value.canceled)+FfiConverterOptionalTypeExitCancelFailure.allocationSize(value.reason);}};return new FFIConverter();})();// Enum: ExitTxOrigin
|
|
192
356
|
let ExitTxOrigin_Tags=exports.ExitTxOrigin_Tags=/*#__PURE__*/function(ExitTxOrigin_Tags){ExitTxOrigin_Tags["Wallet"]="Wallet";ExitTxOrigin_Tags["Mempool"]="Mempool";ExitTxOrigin_Tags["Block"]="Block";return ExitTxOrigin_Tags;}({});/**
|
|
193
357
|
* Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
|
|
194
358
|
*/const ExitTxOrigin=exports.ExitTxOrigin=(()=>{/**
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
359
|
+
* Broadcast by this wallet.
|
|
360
|
+
*/class Wallet_ extends _core.UniffiEnum{/**
|
|
361
|
+
* @private
|
|
362
|
+
* This field is private and should not be used, use `tag` instead.
|
|
363
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxOrigin";tag=ExitTxOrigin_Tags.Wallet;constructor(inner){super("ExitTxOrigin","Wallet");this.inner=Object.freeze(inner);}static new(inner){return new Wallet_(inner);}static instanceOf(obj){return obj.tag===ExitTxOrigin_Tags.Wallet;}}/**
|
|
364
|
+
* Seen in the mempool.
|
|
365
|
+
*/class Mempool_ extends _core.UniffiEnum{/**
|
|
366
|
+
* @private
|
|
367
|
+
* This field is private and should not be used, use `tag` instead.
|
|
368
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxOrigin";tag=ExitTxOrigin_Tags.Mempool;constructor(){super("ExitTxOrigin","Mempool");}static new(){return new Mempool_();}static instanceOf(obj){return obj.tag===ExitTxOrigin_Tags.Mempool;}}/**
|
|
369
|
+
* Seen confirmed in a block.
|
|
370
|
+
*/class Block_ extends _core.UniffiEnum{/**
|
|
371
|
+
* @private
|
|
372
|
+
* This field is private and should not be used, use `tag` instead.
|
|
373
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxOrigin";tag=ExitTxOrigin_Tags.Block;constructor(inner){super("ExitTxOrigin","Block");this.inner=Object.freeze(inner);}static new(inner){return new Block_(inner);}static instanceOf(obj){return obj.tag===ExitTxOrigin_Tags.Block;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="ExitTxOrigin";}return Object.freeze({instanceOf,Wallet:Wallet_,Mempool:Mempool_,Block:Block_});})();/**
|
|
210
374
|
* Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
|
|
211
375
|
*/// FfiConverter for enum ExitTxOrigin
|
|
212
376
|
const FfiConverterTypeExitTxOrigin=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new ExitTxOrigin.Wallet({confirmedIn:FfiConverterOptionalTypeBlockRef.readFromCursor(c)});case 2:return new ExitTxOrigin.Mempool();case 3:return new ExitTxOrigin.Block({confirmedIn:FfiConverterTypeBlockRef.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case ExitTxOrigin_Tags.Wallet:{c.writeI32(1);const inner=value.inner;FfiConverterOptionalTypeBlockRef.writeIntoCursor(inner.confirmedIn,c);return;}case ExitTxOrigin_Tags.Mempool:{c.writeI32(2);return;}case ExitTxOrigin_Tags.Block:{c.writeI32(3);const inner=value.inner;FfiConverterTypeBlockRef.writeIntoCursor(inner.confirmedIn,c);return;}default:// Throwing from here means that ExitTxOrigin_Tags hasn't matched an ordinal.
|
|
213
|
-
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case ExitTxOrigin_Tags.Wallet:{const inner=value.inner;let size=4;size+=FfiConverterOptionalTypeBlockRef.allocationSize(inner.confirmedIn);return size;}case ExitTxOrigin_Tags.Mempool:{return 4;}case ExitTxOrigin_Tags.Block:{const inner=value.inner;let size=4;size+=FfiConverterTypeBlockRef.allocationSize(inner.confirmedIn);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})()
|
|
377
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case ExitTxOrigin_Tags.Wallet:{const inner=value.inner;let size=4;size+=FfiConverterOptionalTypeBlockRef.allocationSize(inner.confirmedIn);return size;}case ExitTxOrigin_Tags.Mempool:{return 4;}case ExitTxOrigin_Tags.Block:{const inner=value.inner;let size=4;size+=FfiConverterTypeBlockRef.allocationSize(inner.confirmedIn);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
378
|
+
* The CPFP child of an exit transaction.
|
|
379
|
+
*//**
|
|
380
|
+
* Generated factory for {@link ExitChildTransaction} record objects.
|
|
381
|
+
*/const ExitChildTransaction=exports.ExitChildTransaction=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitChildTransaction=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c),origin:FfiConverterTypeExitTxOrigin.readFromCursor(c),feeRateSatPerKwu:FfiConverterOptionalUInt64.readFromCursor(c),totalFeeSats:FfiConverterOptionalUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterTypeExitTxOrigin.writeIntoCursor(value.origin,c);FfiConverterOptionalUInt64.writeIntoCursor(value.feeRateSatPerKwu,c);FfiConverterOptionalUInt64.writeIntoCursor(value.totalFeeSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex)+FfiConverterTypeExitTxOrigin.allocationSize(value.origin)+FfiConverterOptionalUInt64.allocationSize(value.feeRateSatPerKwu)+FfiConverterOptionalUInt64.allocationSize(value.totalFeeSats);}};return new FFIConverter();})();/**
|
|
382
|
+
* Claim transaction for exited funds
|
|
383
|
+
*//**
|
|
384
|
+
* Generated factory for {@link ExitClaimTransaction} record objects.
|
|
385
|
+
*/const ExitClaimTransaction=exports.ExitClaimTransaction=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitClaimTransaction=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{psbtBase64:FfiConverterString.readFromCursor(c),feeSats:_core.FfiConverterUInt64.readFromCursor(c),vtxoIds:FfiConverterSequenceString.readFromCursor(c),skippedVtxoIds:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.psbtBase64,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.skippedVtxoIds,c);}allocationSize(value){return FfiConverterString.allocationSize(value.psbtBase64)+_core.FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterSequenceString.allocationSize(value.vtxoIds)+FfiConverterSequenceString.allocationSize(value.skippedVtxoIds);}};return new FFIConverter();})();// Enum: ExitTxStatus
|
|
214
386
|
let ExitTxStatus_Tags=exports.ExitTxStatus_Tags=/*#__PURE__*/function(ExitTxStatus_Tags){ExitTxStatus_Tags["VerifyInputs"]="VerifyInputs";ExitTxStatus_Tags["AwaitingInputConfirmation"]="AwaitingInputConfirmation";ExitTxStatus_Tags["AwaitingCpfpBroadcast"]="AwaitingCpfpBroadcast";ExitTxStatus_Tags["AwaitingConfirmation"]="AwaitingConfirmation";ExitTxStatus_Tags["Confirmed"]="Confirmed";return ExitTxStatus_Tags;}({});/**
|
|
215
387
|
* Broadcast/confirmation status of one transaction in an exit chain,
|
|
216
388
|
* mirroring `bark::exit::ExitTxStatus`.
|
|
217
389
|
*/const ExitTxStatus=exports.ExitTxStatus=(()=>{/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
390
|
+
* Inputs are still being verified.
|
|
391
|
+
*/class VerifyInputs_ extends _core.UniffiEnum{/**
|
|
392
|
+
* @private
|
|
393
|
+
* This field is private and should not be used, use `tag` instead.
|
|
394
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.VerifyInputs;constructor(){super("ExitTxStatus","VerifyInputs");}static new(){return new VerifyInputs_();}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.VerifyInputs;}}/**
|
|
395
|
+
* Waiting for the given input txids to confirm. Sorted for a stable
|
|
396
|
+
* order (upstream keeps them in a set).
|
|
397
|
+
*/class AwaitingInputConfirmation_ extends _core.UniffiEnum{/**
|
|
398
|
+
* @private
|
|
399
|
+
* This field is private and should not be used, use `tag` instead.
|
|
400
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.AwaitingInputConfirmation;constructor(inner){super("ExitTxStatus","AwaitingInputConfirmation");this.inner=Object.freeze(inner);}static new(inner){return new AwaitingInputConfirmation_(inner);}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.AwaitingInputConfirmation;}}/**
|
|
401
|
+
* Ready for its CPFP child to be broadcast.
|
|
402
|
+
*/class AwaitingCpfpBroadcast_ extends _core.UniffiEnum{/**
|
|
403
|
+
* @private
|
|
404
|
+
* This field is private and should not be used, use `tag` instead.
|
|
405
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.AwaitingCpfpBroadcast;constructor(){super("ExitTxStatus","AwaitingCpfpBroadcast");}static new(){return new AwaitingCpfpBroadcast_();}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.AwaitingCpfpBroadcast;}}/**
|
|
406
|
+
* CPFP child broadcast; waiting for confirmation.
|
|
407
|
+
*/class AwaitingConfirmation_ extends _core.UniffiEnum{/**
|
|
408
|
+
* @private
|
|
409
|
+
* This field is private and should not be used, use `tag` instead.
|
|
410
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.AwaitingConfirmation;constructor(inner){super("ExitTxStatus","AwaitingConfirmation");this.inner=Object.freeze(inner);}static new(inner){return new AwaitingConfirmation_(inner);}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.AwaitingConfirmation;}}/**
|
|
411
|
+
* Confirmed in a block.
|
|
412
|
+
*/class Confirmed_ extends _core.UniffiEnum{/**
|
|
413
|
+
* @private
|
|
414
|
+
* This field is private and should not be used, use `tag` instead.
|
|
415
|
+
*/[_core.uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.Confirmed;constructor(inner){super("ExitTxStatus","Confirmed");this.inner=Object.freeze(inner);}static new(inner){return new Confirmed_(inner);}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.Confirmed;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="ExitTxStatus";}return Object.freeze({instanceOf,VerifyInputs:VerifyInputs_,AwaitingInputConfirmation:AwaitingInputConfirmation_,AwaitingCpfpBroadcast:AwaitingCpfpBroadcast_,AwaitingConfirmation:AwaitingConfirmation_,Confirmed:Confirmed_});})();/**
|
|
244
416
|
* Broadcast/confirmation status of one transaction in an exit chain,
|
|
245
417
|
* mirroring `bark::exit::ExitTxStatus`.
|
|
246
418
|
*/// FfiConverter for enum ExitTxStatus
|
|
@@ -249,110 +421,138 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
249
421
|
* One transaction in an exit's unilateral broadcast chain.
|
|
250
422
|
*//**
|
|
251
423
|
* Generated factory for {@link ExitTx} record objects.
|
|
252
|
-
*/const ExitTx=exports.ExitTx=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTx=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),status:FfiConverterTypeExitTxStatus.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterTypeExitTxStatus.writeIntoCursor(value.status,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterTypeExitTxStatus.allocationSize(value.status);}}return new FFIConverter();})()
|
|
253
|
-
|
|
424
|
+
*/const ExitTx=exports.ExitTx=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTx=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),status:FfiConverterTypeExitTxStatus.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterTypeExitTxStatus.writeIntoCursor(value.status,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterTypeExitTxStatus.allocationSize(value.status);}};return new FFIConverter();})();/**
|
|
425
|
+
* A Bitcoin transaction outpoint (reference to a previous output)
|
|
426
|
+
*//**
|
|
427
|
+
* Generated factory for {@link OutPoint} record objects.
|
|
428
|
+
*/const OutPoint=exports.OutPoint=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOutPoint=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),vout:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);_core.FfiConverterUInt32.writeIntoCursor(value.vout,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+_core.FfiConverterUInt32.allocationSize(value.vout);}};return new FFIConverter();})();// Enum: ExitState
|
|
429
|
+
let ExitState_Tags=exports.ExitState_Tags=/*#__PURE__*/function(ExitState_Tags){ExitState_Tags["Start"]="Start";ExitState_Tags["Processing"]="Processing";ExitState_Tags["AwaitingDelta"]="AwaitingDelta";ExitState_Tags["Claimable"]="Claimable";ExitState_Tags["ClaimInProgress"]="ClaimInProgress";ExitState_Tags["Claimed"]="Claimed";ExitState_Tags["VtxoAlreadySpent"]="VtxoAlreadySpent";ExitState_Tags["VtxoSwept"]="VtxoSwept";ExitState_Tags["Canceled"]="Canceled";return ExitState_Tags;}({});/**
|
|
254
430
|
* State of a unilateral exit, mirroring `bark::exit::ExitState`.
|
|
255
431
|
*
|
|
256
432
|
* Serde/TS tags match upstream's kebab-case serialization (`"start"`,
|
|
257
433
|
* `"processing"`, `"awaiting-delta"`, `"claimable"`, `"claim-in-progress"`,
|
|
258
|
-
* `"claimed"`, `"vtxo-already-spent"`, `"canceled"`), with
|
|
434
|
+
* `"claimed"`, `"vtxo-already-spent"`, `"vtxo-swept"`, `"canceled"`), with
|
|
435
|
+
* camelCase fields.
|
|
259
436
|
*/const ExitState=exports.ExitState=(()=>{/**
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
*
|
|
300
|
-
|
|
301
|
-
|
|
437
|
+
* The exit was requested at the given tip.
|
|
438
|
+
*/class Start_ extends _core.UniffiEnum{/**
|
|
439
|
+
* @private
|
|
440
|
+
* This field is private and should not be used, use `tag` instead.
|
|
441
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.Start;constructor(inner){super("ExitState","Start");this.inner=Object.freeze(inner);}static new(inner){return new Start_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.Start;}}/**
|
|
442
|
+
* The exit transaction chain is being broadcast and confirmed.
|
|
443
|
+
*/class Processing_ extends _core.UniffiEnum{/**
|
|
444
|
+
* @private
|
|
445
|
+
* This field is private and should not be used, use `tag` instead.
|
|
446
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.Processing;constructor(inner){super("ExitState","Processing");this.inner=Object.freeze(inner);}static new(inner){return new Processing_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.Processing;}}/**
|
|
447
|
+
* Fully confirmed; waiting out the exit delta until claimable.
|
|
448
|
+
*/class AwaitingDelta_ extends _core.UniffiEnum{/**
|
|
449
|
+
* @private
|
|
450
|
+
* This field is private and should not be used, use `tag` instead.
|
|
451
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.AwaitingDelta;constructor(inner){super("ExitState","AwaitingDelta");this.inner=Object.freeze(inner);}static new(inner){return new AwaitingDelta_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.AwaitingDelta;}}/**
|
|
452
|
+
* The exit output can be claimed.
|
|
453
|
+
*/class Claimable_ extends _core.UniffiEnum{/**
|
|
454
|
+
* @private
|
|
455
|
+
* This field is private and should not be used, use `tag` instead.
|
|
456
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.Claimable;constructor(inner){super("ExitState","Claimable");this.inner=Object.freeze(inner);}static new(inner){return new Claimable_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.Claimable;}}/**
|
|
457
|
+
* A claim transaction has been broadcast.
|
|
458
|
+
*/class ClaimInProgress_ extends _core.UniffiEnum{/**
|
|
459
|
+
* @private
|
|
460
|
+
* This field is private and should not be used, use `tag` instead.
|
|
461
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.ClaimInProgress;constructor(inner){super("ExitState","ClaimInProgress");this.inner=Object.freeze(inner);}static new(inner){return new ClaimInProgress_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.ClaimInProgress;}}/**
|
|
462
|
+
* Terminal: the exit output was claimed (or spent deeper in the tree).
|
|
463
|
+
*/class Claimed_ extends _core.UniffiEnum{/**
|
|
464
|
+
* @private
|
|
465
|
+
* This field is private and should not be used, use `tag` instead.
|
|
466
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.Claimed;constructor(inner){super("ExitState","Claimed");this.inner=Object.freeze(inner);}static new(inner){return new Claimed_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.Claimed;}}/**
|
|
467
|
+
* Terminal: the VTXO was already spent offchain, so the exit cannot
|
|
468
|
+
* proceed.
|
|
469
|
+
*/class VtxoAlreadySpent_ extends _core.UniffiEnum{/**
|
|
470
|
+
* @private
|
|
471
|
+
* This field is private and should not be used, use `tag` instead.
|
|
472
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.VtxoAlreadySpent;constructor(inner){super("ExitState","VtxoAlreadySpent");this.inner=Object.freeze(inner);}static new(inner){return new VtxoAlreadySpent_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.VtxoAlreadySpent;}}/**
|
|
473
|
+
* Terminal: an output the exit chain needs was spent on chain by someone
|
|
474
|
+
* else, in practice the server sweeping a VTXO that expired mid-exit.
|
|
475
|
+
* `spent_inputs` are the exit transaction inputs that were taken. A
|
|
476
|
+
* refresh may still be possible.
|
|
477
|
+
*/class VtxoSwept_ extends _core.UniffiEnum{/**
|
|
478
|
+
* @private
|
|
479
|
+
* This field is private and should not be used, use `tag` instead.
|
|
480
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.VtxoSwept;constructor(inner){super("ExitState","VtxoSwept");this.inner=Object.freeze(inner);}static new(inner){return new VtxoSwept_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.VtxoSwept;}}/**
|
|
481
|
+
* Resumable: the user canceled the exit before its final transaction
|
|
482
|
+
* was broadcast. The VTXO stays spendable.
|
|
483
|
+
*/class Canceled_ extends _core.UniffiEnum{/**
|
|
484
|
+
* @private
|
|
485
|
+
* This field is private and should not be used, use `tag` instead.
|
|
486
|
+
*/[_core.uniffiTypeNameSymbol]="ExitState";tag=ExitState_Tags.Canceled;constructor(inner){super("ExitState","Canceled");this.inner=Object.freeze(inner);}static new(inner){return new Canceled_(inner);}static instanceOf(obj){return obj.tag===ExitState_Tags.Canceled;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="ExitState";}return Object.freeze({instanceOf,Start:Start_,Processing:Processing_,AwaitingDelta:AwaitingDelta_,Claimable:Claimable_,ClaimInProgress:ClaimInProgress_,Claimed:Claimed_,VtxoAlreadySpent:VtxoAlreadySpent_,VtxoSwept:VtxoSwept_,Canceled:Canceled_});})();/**
|
|
302
487
|
* State of a unilateral exit, mirroring `bark::exit::ExitState`.
|
|
303
488
|
*
|
|
304
489
|
* Serde/TS tags match upstream's kebab-case serialization (`"start"`,
|
|
305
490
|
* `"processing"`, `"awaiting-delta"`, `"claimable"`, `"claim-in-progress"`,
|
|
306
|
-
* `"claimed"`, `"vtxo-already-spent"`, `"canceled"`), with
|
|
491
|
+
* `"claimed"`, `"vtxo-already-spent"`, `"vtxo-swept"`, `"canceled"`), with
|
|
492
|
+
* camelCase fields.
|
|
307
493
|
*/// FfiConverter for enum ExitState
|
|
308
|
-
const FfiConverterTypeExitState=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new ExitState.Start({tipHeight:_core.FfiConverterUInt32.readFromCursor(c)});case 2:return new ExitState.Processing({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),transactions:FfiConverterSequenceTypeExitTx.readFromCursor(c)});case 3:return new ExitState.AwaitingDelta({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),confirmedBlock:FfiConverterTypeBlockRef.readFromCursor(c),claimableHeight:_core.FfiConverterUInt32.readFromCursor(c)});case 4:return new ExitState.Claimable({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),claimableSince:FfiConverterTypeBlockRef.readFromCursor(c),lastScannedBlock:FfiConverterOptionalTypeBlockRef.readFromCursor(c)});case 5:return new ExitState.ClaimInProgress({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),claimableSince:FfiConverterTypeBlockRef.readFromCursor(c),claimTxid:FfiConverterString.readFromCursor(c)});case 6:return new ExitState.Claimed({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),txid:FfiConverterString.readFromCursor(c),block:FfiConverterTypeBlockRef.readFromCursor(c)});case 7:return new ExitState.VtxoAlreadySpent({tipHeight:_core.FfiConverterUInt32.readFromCursor(c)});case 8:return new ExitState.Canceled({tipHeight:_core.FfiConverterUInt32.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case ExitState_Tags.Start:{c.writeI32(1);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);return;}case ExitState_Tags.Processing:{c.writeI32(2);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterSequenceTypeExitTx.writeIntoCursor(inner.transactions,c);return;}case ExitState_Tags.AwaitingDelta:{c.writeI32(3);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.confirmedBlock,c);_core.FfiConverterUInt32.writeIntoCursor(inner.claimableHeight,c);return;}case ExitState_Tags.Claimable:{c.writeI32(4);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.claimableSince,c);FfiConverterOptionalTypeBlockRef.writeIntoCursor(inner.lastScannedBlock,c);return;}case ExitState_Tags.ClaimInProgress:{c.writeI32(5);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.claimableSince,c);FfiConverterString.writeIntoCursor(inner.claimTxid,c);return;}case ExitState_Tags.Claimed:{c.writeI32(6);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterString.writeIntoCursor(inner.txid,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.block,c);return;}case ExitState_Tags.VtxoAlreadySpent:{c.writeI32(7);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);return;}case ExitState_Tags.
|
|
309
|
-
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case ExitState_Tags.Start:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);return size;}case ExitState_Tags.Processing:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterSequenceTypeExitTx.allocationSize(inner.transactions);return size;}case ExitState_Tags.AwaitingDelta:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterTypeBlockRef.allocationSize(inner.confirmedBlock);size+=_core.FfiConverterUInt32.allocationSize(inner.claimableHeight);return size;}case ExitState_Tags.Claimable:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterTypeBlockRef.allocationSize(inner.claimableSince);size+=FfiConverterOptionalTypeBlockRef.allocationSize(inner.lastScannedBlock);return size;}case ExitState_Tags.ClaimInProgress:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterTypeBlockRef.allocationSize(inner.claimableSince);size+=FfiConverterString.allocationSize(inner.claimTxid);return size;}case ExitState_Tags.Claimed:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterString.allocationSize(inner.txid);size+=FfiConverterTypeBlockRef.allocationSize(inner.block);return size;}case ExitState_Tags.VtxoAlreadySpent:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);return size;}case ExitState_Tags.Canceled:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
494
|
+
const FfiConverterTypeExitState=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new ExitState.Start({tipHeight:_core.FfiConverterUInt32.readFromCursor(c)});case 2:return new ExitState.Processing({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),transactions:FfiConverterSequenceTypeExitTx.readFromCursor(c)});case 3:return new ExitState.AwaitingDelta({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),confirmedBlock:FfiConverterTypeBlockRef.readFromCursor(c),claimableHeight:_core.FfiConverterUInt32.readFromCursor(c)});case 4:return new ExitState.Claimable({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),claimableSince:FfiConverterTypeBlockRef.readFromCursor(c),lastScannedBlock:FfiConverterOptionalTypeBlockRef.readFromCursor(c)});case 5:return new ExitState.ClaimInProgress({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),claimableSince:FfiConverterTypeBlockRef.readFromCursor(c),claimTxid:FfiConverterString.readFromCursor(c)});case 6:return new ExitState.Claimed({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),txid:FfiConverterString.readFromCursor(c),block:FfiConverterTypeBlockRef.readFromCursor(c)});case 7:return new ExitState.VtxoAlreadySpent({tipHeight:_core.FfiConverterUInt32.readFromCursor(c)});case 8:return new ExitState.VtxoSwept({tipHeight:_core.FfiConverterUInt32.readFromCursor(c),spentInputs:FfiConverterSequenceTypeOutPoint.readFromCursor(c)});case 9:return new ExitState.Canceled({tipHeight:_core.FfiConverterUInt32.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case ExitState_Tags.Start:{c.writeI32(1);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);return;}case ExitState_Tags.Processing:{c.writeI32(2);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterSequenceTypeExitTx.writeIntoCursor(inner.transactions,c);return;}case ExitState_Tags.AwaitingDelta:{c.writeI32(3);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.confirmedBlock,c);_core.FfiConverterUInt32.writeIntoCursor(inner.claimableHeight,c);return;}case ExitState_Tags.Claimable:{c.writeI32(4);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.claimableSince,c);FfiConverterOptionalTypeBlockRef.writeIntoCursor(inner.lastScannedBlock,c);return;}case ExitState_Tags.ClaimInProgress:{c.writeI32(5);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.claimableSince,c);FfiConverterString.writeIntoCursor(inner.claimTxid,c);return;}case ExitState_Tags.Claimed:{c.writeI32(6);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterString.writeIntoCursor(inner.txid,c);FfiConverterTypeBlockRef.writeIntoCursor(inner.block,c);return;}case ExitState_Tags.VtxoAlreadySpent:{c.writeI32(7);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);return;}case ExitState_Tags.VtxoSwept:{c.writeI32(8);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);FfiConverterSequenceTypeOutPoint.writeIntoCursor(inner.spentInputs,c);return;}case ExitState_Tags.Canceled:{c.writeI32(9);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.tipHeight,c);return;}default:// Throwing from here means that ExitState_Tags hasn't matched an ordinal.
|
|
495
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case ExitState_Tags.Start:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);return size;}case ExitState_Tags.Processing:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterSequenceTypeExitTx.allocationSize(inner.transactions);return size;}case ExitState_Tags.AwaitingDelta:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterTypeBlockRef.allocationSize(inner.confirmedBlock);size+=_core.FfiConverterUInt32.allocationSize(inner.claimableHeight);return size;}case ExitState_Tags.Claimable:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterTypeBlockRef.allocationSize(inner.claimableSince);size+=FfiConverterOptionalTypeBlockRef.allocationSize(inner.lastScannedBlock);return size;}case ExitState_Tags.ClaimInProgress:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterTypeBlockRef.allocationSize(inner.claimableSince);size+=FfiConverterString.allocationSize(inner.claimTxid);return size;}case ExitState_Tags.Claimed:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterString.allocationSize(inner.txid);size+=FfiConverterTypeBlockRef.allocationSize(inner.block);return size;}case ExitState_Tags.VtxoAlreadySpent:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);return size;}case ExitState_Tags.VtxoSwept:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);size+=FfiConverterSequenceTypeOutPoint.allocationSize(inner.spentInputs);return size;}case ExitState_Tags.Canceled:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.tipHeight);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
310
496
|
* Status of an exit progression
|
|
311
497
|
*//**
|
|
312
498
|
* Generated factory for {@link ExitProgressStatus} record objects.
|
|
313
|
-
*/const ExitProgressStatus=exports.ExitProgressStatus=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitProgressStatus=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),error:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);FfiConverterOptionalString.writeIntoCursor(value.error,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterTypeExitState.allocationSize(value.state)+FfiConverterOptionalString.allocationSize(value.error);}}return new FFIConverter();})();/**
|
|
499
|
+
*/const ExitProgressStatus=exports.ExitProgressStatus=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitProgressStatus=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),error:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);FfiConverterOptionalString.writeIntoCursor(value.error,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterTypeExitState.allocationSize(value.state)+FfiConverterOptionalString.allocationSize(value.error);}};return new FFIConverter();})();/**
|
|
500
|
+
* One transaction of an exit: the exit transaction itself and, once it was
|
|
501
|
+
* fee-bumped, the child that confirms it. A unilateral exit is a chain of
|
|
502
|
+
* these, root first.
|
|
503
|
+
*//**
|
|
504
|
+
* Generated factory for {@link ExitTransactionPackage} record objects.
|
|
505
|
+
*/const ExitTransactionPackage=exports.ExitTransactionPackage=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionPackage=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{exitTxid:FfiConverterString.readFromCursor(c),exitTxHex:FfiConverterString.readFromCursor(c),child:FfiConverterOptionalTypeExitChildTransaction.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.exitTxid,c);FfiConverterString.writeIntoCursor(value.exitTxHex,c);FfiConverterOptionalTypeExitChildTransaction.writeIntoCursor(value.child,c);}allocationSize(value){return FfiConverterString.allocationSize(value.exitTxid)+FfiConverterString.allocationSize(value.exitTxHex)+FfiConverterOptionalTypeExitChildTransaction.allocationSize(value.child);}};return new FFIConverter();})();/**
|
|
314
506
|
* Detailed status of an exit transaction
|
|
507
|
+
*
|
|
508
|
+
* Returned for live and finished exits alike by `get_exit_status`,
|
|
509
|
+
* `list_all_exits`, `list_live_exits` and `list_finished_exits`.
|
|
315
510
|
*//**
|
|
316
511
|
* Generated factory for {@link ExitTransactionStatus} record objects.
|
|
317
|
-
*/const ExitTransactionStatus=exports.ExitTransactionStatus=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionStatus=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),history:FfiConverterOptionalSequenceTypeExitState.readFromCursor(c),transactionCount:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);FfiConverterOptionalSequenceTypeExitState.writeIntoCursor(value.history,c);_core.FfiConverterUInt32.writeIntoCursor(value.transactionCount,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterTypeExitState.allocationSize(value.state)+FfiConverterOptionalSequenceTypeExitState.allocationSize(value.history)+_core.FfiConverterUInt32.allocationSize(value.transactionCount);}}return new FFIConverter();})();/**
|
|
512
|
+
*/const ExitTransactionStatus=exports.ExitTransactionStatus=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionStatus=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),history:FfiConverterOptionalSequenceTypeExitState.readFromCursor(c),transactionCount:_core.FfiConverterUInt32.readFromCursor(c),transactions:FfiConverterSequenceTypeExitTransactionPackage.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);FfiConverterOptionalSequenceTypeExitState.writeIntoCursor(value.history,c);_core.FfiConverterUInt32.writeIntoCursor(value.transactionCount,c);FfiConverterSequenceTypeExitTransactionPackage.writeIntoCursor(value.transactions,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterTypeExitState.allocationSize(value.state)+FfiConverterOptionalSequenceTypeExitState.allocationSize(value.history)+_core.FfiConverterUInt32.allocationSize(value.transactionCount)+FfiConverterSequenceTypeExitTransactionPackage.allocationSize(value.transactions);}};return new FFIConverter();})();/**
|
|
318
513
|
* A VTXO that is being unilaterally exited
|
|
319
514
|
*//**
|
|
320
515
|
* Generated factory for {@link ExitVtxo} record objects.
|
|
321
|
-
*/const ExitVtxo=exports.ExitVtxo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitVtxo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),isClaimable:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);_core.FfiConverterBool.writeIntoCursor(value.isClaimable,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterTypeExitState.allocationSize(value.state)+_core.FfiConverterBool.allocationSize(value.isClaimable);}}return new FFIConverter();})();/**
|
|
516
|
+
*/const ExitVtxo=exports.ExitVtxo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitVtxo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),isClaimable:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);_core.FfiConverterBool.writeIntoCursor(value.isClaimable,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterTypeExitState.allocationSize(value.state)+_core.FfiConverterBool.allocationSize(value.isClaimable);}};return new FFIConverter();})();/**
|
|
322
517
|
* Generated factory for {@link FeeEstimate} record objects.
|
|
323
|
-
*/const FeeEstimate=exports.FeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeEstimate=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{grossAmountSats:_core.FfiConverterUInt64.readFromCursor(c),feeSats:_core.FfiConverterUInt64.readFromCursor(c),netAmountSats:_core.FfiConverterUInt64.readFromCursor(c),vtxosSpent:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.grossAmountSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.netAmountSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxosSpent,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.grossAmountSats)+_core.FfiConverterUInt64.allocationSize(value.feeSats)+_core.FfiConverterUInt64.allocationSize(value.netAmountSats)+FfiConverterSequenceString.allocationSize(value.vtxosSpent);}}return new FFIConverter();})();/**
|
|
518
|
+
*/const FeeEstimate=exports.FeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeEstimate=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{grossAmountSats:_core.FfiConverterUInt64.readFromCursor(c),feeSats:_core.FfiConverterUInt64.readFromCursor(c),netAmountSats:_core.FfiConverterUInt64.readFromCursor(c),vtxosSpent:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.grossAmountSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.netAmountSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxosSpent,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.grossAmountSats)+_core.FfiConverterUInt64.allocationSize(value.feeSats)+_core.FfiConverterUInt64.allocationSize(value.netAmountSats)+FfiConverterSequenceString.allocationSize(value.vtxosSpent);}};return new FFIConverter();})();/**
|
|
324
519
|
* Network fee rates by urgency, mirroring `bark::chain::FeeRates`.
|
|
325
520
|
*
|
|
326
521
|
* Rates are in sat/kwu (satoshis per 1000 weight units) — divide by 250 for
|
|
327
522
|
* sat/vB.
|
|
328
523
|
*//**
|
|
329
524
|
* Generated factory for {@link FeeRates} record objects.
|
|
330
|
-
*/const FeeRates=exports.FeeRates=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeRates=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{fastSatPerKwu:_core.FfiConverterUInt64.readFromCursor(c),regularSatPerKwu:_core.FfiConverterUInt64.readFromCursor(c),slowSatPerKwu:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.fastSatPerKwu,c);_core.FfiConverterUInt64.writeIntoCursor(value.regularSatPerKwu,c);_core.FfiConverterUInt64.writeIntoCursor(value.slowSatPerKwu,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.fastSatPerKwu)+_core.FfiConverterUInt64.allocationSize(value.regularSatPerKwu)+_core.FfiConverterUInt64.allocationSize(value.slowSatPerKwu);}}return new FFIConverter();})();/**
|
|
525
|
+
*/const FeeRates=exports.FeeRates=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeRates=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{fastSatPerKwu:_core.FfiConverterUInt64.readFromCursor(c),regularSatPerKwu:_core.FfiConverterUInt64.readFromCursor(c),slowSatPerKwu:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.fastSatPerKwu,c);_core.FfiConverterUInt64.writeIntoCursor(value.regularSatPerKwu,c);_core.FfiConverterUInt64.writeIntoCursor(value.slowSatPerKwu,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.fastSatPerKwu)+_core.FfiConverterUInt64.allocationSize(value.regularSatPerKwu)+_core.FfiConverterUInt64.allocationSize(value.slowSatPerKwu);}};return new FFIConverter();})();/**
|
|
331
526
|
* Arguments for `Wallet::import_vtxo` / `Wallet::import_vtxos`, mirroring
|
|
332
527
|
* `bark::ImportVtxoArgs`.
|
|
333
528
|
*
|
|
334
529
|
* Every field has a default, so callers only set what they need.
|
|
335
530
|
*//**
|
|
336
531
|
* Generated factory for {@link ImportVtxoArgs} record objects.
|
|
337
|
-
*/const ImportVtxoArgs=exports.ImportVtxoArgs=(()=>{const defaults=()=>({gapLimit:undefined,skipStatusCheck:false,allowPartial:false});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeImportVtxoArgs=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{gapLimit:FfiConverterOptionalUInt32.readFromCursor(c),skipStatusCheck:_core.FfiConverterBool.readFromCursor(c),allowPartial:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterOptionalUInt32.writeIntoCursor(value.gapLimit,c);_core.FfiConverterBool.writeIntoCursor(value.skipStatusCheck,c);_core.FfiConverterBool.writeIntoCursor(value.allowPartial,c);}allocationSize(value){return FfiConverterOptionalUInt32.allocationSize(value.gapLimit)+_core.FfiConverterBool.allocationSize(value.skipStatusCheck)+_core.FfiConverterBool.allocationSize(value.allowPartial);}}return new FFIConverter();})();/**
|
|
338
|
-
* Generated factory for {@link LightningInvoice} record objects.
|
|
339
|
-
*/const LightningInvoice=exports.LightningInvoice=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningInvoice=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+_core.FfiConverterUInt64.allocationSize(value.amountSats);}}return new FFIConverter();})();/**
|
|
532
|
+
*/const ImportVtxoArgs=exports.ImportVtxoArgs=(()=>{const defaults=()=>({gapLimit:undefined,skipStatusCheck:false,allowPartial:false});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeImportVtxoArgs=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{gapLimit:FfiConverterOptionalUInt32.readFromCursor(c),skipStatusCheck:_core.FfiConverterBool.readFromCursor(c),allowPartial:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterOptionalUInt32.writeIntoCursor(value.gapLimit,c);_core.FfiConverterBool.writeIntoCursor(value.skipStatusCheck,c);_core.FfiConverterBool.writeIntoCursor(value.allowPartial,c);}allocationSize(value){return FfiConverterOptionalUInt32.allocationSize(value.gapLimit)+_core.FfiConverterBool.allocationSize(value.skipStatusCheck)+_core.FfiConverterBool.allocationSize(value.allowPartial);}};return new FFIConverter();})();/**
|
|
340
533
|
* Generated factory for {@link LightningReceive} record objects.
|
|
341
|
-
*/const LightningReceive=exports.LightningReceive=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceive=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{paymentHash:FfiConverterString.readFromCursor(c),invoice:FfiConverterString.readFromCursor(c),amountSats:FfiConverterOptionalUInt64.readFromCursor(c),state:FfiConverterString.readFromCursor(c),paymentPreimage:FfiConverterOptionalString.readFromCursor(c),settledAt:FfiConverterOptionalInt64.readFromCursor(c),claimDestination:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterOptionalUInt64.writeIntoCursor(value.amountSats,c);FfiConverterString.writeIntoCursor(value.state,c);FfiConverterOptionalString.writeIntoCursor(value.paymentPreimage,c);FfiConverterOptionalInt64.writeIntoCursor(value.settledAt,c);FfiConverterOptionalString.writeIntoCursor(value.claimDestination,c);}allocationSize(value){return FfiConverterString.allocationSize(value.paymentHash)+FfiConverterString.allocationSize(value.invoice)+FfiConverterOptionalUInt64.allocationSize(value.amountSats)+FfiConverterString.allocationSize(value.state)+FfiConverterOptionalString.allocationSize(value.paymentPreimage)+FfiConverterOptionalInt64.allocationSize(value.settledAt)+FfiConverterOptionalString.allocationSize(value.claimDestination);}}return new FFIConverter();})();/**
|
|
534
|
+
*/const LightningReceive=exports.LightningReceive=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceive=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{paymentHash:FfiConverterString.readFromCursor(c),invoice:FfiConverterString.readFromCursor(c),amountSats:FfiConverterOptionalUInt64.readFromCursor(c),state:FfiConverterString.readFromCursor(c),paymentPreimage:FfiConverterOptionalString.readFromCursor(c),settledAt:FfiConverterOptionalInt64.readFromCursor(c),claimDestination:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterOptionalUInt64.writeIntoCursor(value.amountSats,c);FfiConverterString.writeIntoCursor(value.state,c);FfiConverterOptionalString.writeIntoCursor(value.paymentPreimage,c);FfiConverterOptionalInt64.writeIntoCursor(value.settledAt,c);FfiConverterOptionalString.writeIntoCursor(value.claimDestination,c);}allocationSize(value){return FfiConverterString.allocationSize(value.paymentHash)+FfiConverterString.allocationSize(value.invoice)+FfiConverterOptionalUInt64.allocationSize(value.amountSats)+FfiConverterString.allocationSize(value.state)+FfiConverterOptionalString.allocationSize(value.paymentPreimage)+FfiConverterOptionalInt64.allocationSize(value.settledAt)+FfiConverterOptionalString.allocationSize(value.claimDestination);}};return new FFIConverter();})();/**
|
|
342
535
|
* Generated factory for {@link LightningSend} record objects.
|
|
343
|
-
*/const LightningSend=exports.LightningSend=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSend=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),feeSats:_core.FfiConverterUInt64.readFromCursor(c),htlcVtxoCount:_core.FfiConverterUInt32.readFromCursor(c),hasFailedRevocation:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeSats,c);_core.FfiConverterUInt32.writeIntoCursor(value.htlcVtxoCount,c);_core.FfiConverterBool.writeIntoCursor(value.hasFailedRevocation,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+_core.FfiConverterUInt64.allocationSize(value.feeSats)+_core.FfiConverterUInt32.allocationSize(value.htlcVtxoCount)+_core.FfiConverterBool.allocationSize(value.hasFailedRevocation);}}return new FFIConverter();})();/**
|
|
536
|
+
*/const LightningSend=exports.LightningSend=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSend=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),movementId:FfiConverterOptionalUInt32.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),feeSats:_core.FfiConverterUInt64.readFromCursor(c),htlcVtxoCount:_core.FfiConverterUInt32.readFromCursor(c),hasFailedRevocation:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterOptionalUInt32.writeIntoCursor(value.movementId,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.feeSats,c);_core.FfiConverterUInt32.writeIntoCursor(value.htlcVtxoCount,c);_core.FfiConverterBool.writeIntoCursor(value.hasFailedRevocation,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+FfiConverterOptionalUInt32.allocationSize(value.movementId)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+_core.FfiConverterUInt64.allocationSize(value.feeSats)+_core.FfiConverterUInt32.allocationSize(value.htlcVtxoCount)+_core.FfiConverterBool.allocationSize(value.hasFailedRevocation);}};return new FFIConverter();})();/**
|
|
344
537
|
* Generated factory for {@link Movement} record objects.
|
|
345
|
-
*/const Movement=exports.Movement=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeMovement=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{id:_core.FfiConverterUInt32.readFromCursor(c),status:FfiConverterString.readFromCursor(c),subsystemName:FfiConverterString.readFromCursor(c),subsystemKind:FfiConverterString.readFromCursor(c),metadataJson:FfiConverterString.readFromCursor(c),intendedBalanceSats:_core.FfiConverterInt64.readFromCursor(c),effectiveBalanceSats:_core.FfiConverterInt64.readFromCursor(c),offchainFeeSats:_core.FfiConverterUInt64.readFromCursor(c),sentToAddresses:FfiConverterSequenceString.readFromCursor(c),receivedOnAddresses:FfiConverterSequenceString.readFromCursor(c),inputVtxoIds:FfiConverterSequenceString.readFromCursor(c),outputVtxoIds:FfiConverterSequenceString.readFromCursor(c),exitedVtxoIds:FfiConverterSequenceString.readFromCursor(c),createdAt:FfiConverterString.readFromCursor(c),updatedAt:FfiConverterString.readFromCursor(c),completedAt:FfiConverterOptionalString.readFromCursor(c),paymentHash:FfiConverterOptionalString.readFromCursor(c),lightningInvoice:FfiConverterOptionalString.readFromCursor(c),lightningOffer:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.id,c);FfiConverterString.writeIntoCursor(value.status,c);FfiConverterString.writeIntoCursor(value.subsystemName,c);FfiConverterString.writeIntoCursor(value.subsystemKind,c);FfiConverterString.writeIntoCursor(value.metadataJson,c);_core.FfiConverterInt64.writeIntoCursor(value.intendedBalanceSats,c);_core.FfiConverterInt64.writeIntoCursor(value.effectiveBalanceSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.offchainFeeSats,c);FfiConverterSequenceString.writeIntoCursor(value.sentToAddresses,c);FfiConverterSequenceString.writeIntoCursor(value.receivedOnAddresses,c);FfiConverterSequenceString.writeIntoCursor(value.inputVtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.outputVtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.exitedVtxoIds,c);FfiConverterString.writeIntoCursor(value.createdAt,c);FfiConverterString.writeIntoCursor(value.updatedAt,c);FfiConverterOptionalString.writeIntoCursor(value.completedAt,c);FfiConverterOptionalString.writeIntoCursor(value.paymentHash,c);FfiConverterOptionalString.writeIntoCursor(value.lightningInvoice,c);FfiConverterOptionalString.writeIntoCursor(value.lightningOffer,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.id)+FfiConverterString.allocationSize(value.status)+FfiConverterString.allocationSize(value.subsystemName)+FfiConverterString.allocationSize(value.subsystemKind)+FfiConverterString.allocationSize(value.metadataJson)+_core.FfiConverterInt64.allocationSize(value.intendedBalanceSats)+_core.FfiConverterInt64.allocationSize(value.effectiveBalanceSats)+_core.FfiConverterUInt64.allocationSize(value.offchainFeeSats)+FfiConverterSequenceString.allocationSize(value.sentToAddresses)+FfiConverterSequenceString.allocationSize(value.receivedOnAddresses)+FfiConverterSequenceString.allocationSize(value.inputVtxoIds)+FfiConverterSequenceString.allocationSize(value.outputVtxoIds)+FfiConverterSequenceString.allocationSize(value.exitedVtxoIds)+FfiConverterString.allocationSize(value.createdAt)+FfiConverterString.allocationSize(value.updatedAt)+FfiConverterOptionalString.allocationSize(value.completedAt)+FfiConverterOptionalString.allocationSize(value.paymentHash)+FfiConverterOptionalString.allocationSize(value.lightningInvoice)+FfiConverterOptionalString.allocationSize(value.lightningOffer);}}return new FFIConverter();})();/**
|
|
538
|
+
*/const Movement=exports.Movement=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeMovement=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{id:_core.FfiConverterUInt32.readFromCursor(c),status:FfiConverterString.readFromCursor(c),subsystemName:FfiConverterString.readFromCursor(c),subsystemKind:FfiConverterString.readFromCursor(c),metadataJson:FfiConverterString.readFromCursor(c),intendedBalanceSats:_core.FfiConverterInt64.readFromCursor(c),effectiveBalanceSats:_core.FfiConverterInt64.readFromCursor(c),offchainFeeSats:_core.FfiConverterUInt64.readFromCursor(c),sentToAddresses:FfiConverterSequenceString.readFromCursor(c),receivedOnAddresses:FfiConverterSequenceString.readFromCursor(c),inputVtxoIds:FfiConverterSequenceString.readFromCursor(c),outputVtxoIds:FfiConverterSequenceString.readFromCursor(c),exitedVtxoIds:FfiConverterSequenceString.readFromCursor(c),createdAt:FfiConverterString.readFromCursor(c),updatedAt:FfiConverterString.readFromCursor(c),completedAt:FfiConverterOptionalString.readFromCursor(c),paymentHash:FfiConverterOptionalString.readFromCursor(c),lightningInvoice:FfiConverterOptionalString.readFromCursor(c),lightningOffer:FfiConverterOptionalString.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.id,c);FfiConverterString.writeIntoCursor(value.status,c);FfiConverterString.writeIntoCursor(value.subsystemName,c);FfiConverterString.writeIntoCursor(value.subsystemKind,c);FfiConverterString.writeIntoCursor(value.metadataJson,c);_core.FfiConverterInt64.writeIntoCursor(value.intendedBalanceSats,c);_core.FfiConverterInt64.writeIntoCursor(value.effectiveBalanceSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.offchainFeeSats,c);FfiConverterSequenceString.writeIntoCursor(value.sentToAddresses,c);FfiConverterSequenceString.writeIntoCursor(value.receivedOnAddresses,c);FfiConverterSequenceString.writeIntoCursor(value.inputVtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.outputVtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.exitedVtxoIds,c);FfiConverterString.writeIntoCursor(value.createdAt,c);FfiConverterString.writeIntoCursor(value.updatedAt,c);FfiConverterOptionalString.writeIntoCursor(value.completedAt,c);FfiConverterOptionalString.writeIntoCursor(value.paymentHash,c);FfiConverterOptionalString.writeIntoCursor(value.lightningInvoice,c);FfiConverterOptionalString.writeIntoCursor(value.lightningOffer,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.id)+FfiConverterString.allocationSize(value.status)+FfiConverterString.allocationSize(value.subsystemName)+FfiConverterString.allocationSize(value.subsystemKind)+FfiConverterString.allocationSize(value.metadataJson)+_core.FfiConverterInt64.allocationSize(value.intendedBalanceSats)+_core.FfiConverterInt64.allocationSize(value.effectiveBalanceSats)+_core.FfiConverterUInt64.allocationSize(value.offchainFeeSats)+FfiConverterSequenceString.allocationSize(value.sentToAddresses)+FfiConverterSequenceString.allocationSize(value.receivedOnAddresses)+FfiConverterSequenceString.allocationSize(value.inputVtxoIds)+FfiConverterSequenceString.allocationSize(value.outputVtxoIds)+FfiConverterSequenceString.allocationSize(value.exitedVtxoIds)+FfiConverterString.allocationSize(value.createdAt)+FfiConverterString.allocationSize(value.updatedAt)+FfiConverterOptionalString.allocationSize(value.completedAt)+FfiConverterOptionalString.allocationSize(value.paymentHash)+FfiConverterOptionalString.allocationSize(value.lightningInvoice)+FfiConverterOptionalString.allocationSize(value.lightningOffer);}};return new FFIConverter();})();/**
|
|
539
|
+
* What `offboard_all`, `offboard_vtxos` and `send_onchain` broadcast,
|
|
540
|
+
* mirroring `bark::OffboardResult`.
|
|
541
|
+
*//**
|
|
346
542
|
* Generated factory for {@link OffboardResult} record objects.
|
|
347
|
-
*/const OffboardResult=exports.OffboardResult=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardResult=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid);}}return new FFIConverter();})();/**
|
|
543
|
+
*/const OffboardResult=exports.OffboardResult=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardResult=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),movementId:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);_core.FfiConverterUInt32.writeIntoCursor(value.movementId,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+_core.FfiConverterUInt32.allocationSize(value.movementId);}};return new FFIConverter();})();/**
|
|
348
544
|
* Generated factory for {@link OnchainBalance} record objects.
|
|
349
|
-
*/const OnchainBalance=exports.OnchainBalance=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOnchainBalance=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{confirmedSats:_core.FfiConverterUInt64.readFromCursor(c),pendingSats:_core.FfiConverterUInt64.readFromCursor(c),totalSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.confirmedSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.confirmedSats)+_core.FfiConverterUInt64.allocationSize(value.pendingSats)+_core.FfiConverterUInt64.allocationSize(value.totalSats);}}return new FFIConverter();})();/**
|
|
350
|
-
* A
|
|
545
|
+
*/const OnchainBalance=exports.OnchainBalance=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOnchainBalance=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{confirmedSats:_core.FfiConverterUInt64.readFromCursor(c),pendingSats:_core.FfiConverterUInt64.readFromCursor(c),totalSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt64.writeIntoCursor(value.confirmedSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return _core.FfiConverterUInt64.allocationSize(value.confirmedSats)+_core.FfiConverterUInt64.allocationSize(value.pendingSats)+_core.FfiConverterUInt64.allocationSize(value.totalSats);}};return new FFIConverter();})();/**
|
|
546
|
+
* A parsed payment string, mirroring `bark::PaymentRequest`.
|
|
547
|
+
*
|
|
548
|
+
* `label` and `message` come from a BIP 321 URI. For a bare BOLT11 invoice
|
|
549
|
+
* or BOLT12 offer, `amount_sats` is its amount and `message` its
|
|
550
|
+
* description.
|
|
351
551
|
*//**
|
|
352
|
-
* Generated factory for {@link
|
|
353
|
-
*/const
|
|
552
|
+
* Generated factory for {@link PaymentRequest} record objects.
|
|
553
|
+
*/const PaymentRequest=exports.PaymentRequest=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePaymentRequest=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{amountSats:FfiConverterOptionalUInt64.readFromCursor(c),label:FfiConverterOptionalString.readFromCursor(c),message:FfiConverterOptionalString.readFromCursor(c),options:FfiConverterSequenceTypeAvailablePaymentMethod.readFromCursor(c),defaultOption:FfiConverterOptionalTypeAvailablePaymentMethod.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterOptionalUInt64.writeIntoCursor(value.amountSats,c);FfiConverterOptionalString.writeIntoCursor(value.label,c);FfiConverterOptionalString.writeIntoCursor(value.message,c);FfiConverterSequenceTypeAvailablePaymentMethod.writeIntoCursor(value.options,c);FfiConverterOptionalTypeAvailablePaymentMethod.writeIntoCursor(value.defaultOption,c);}allocationSize(value){return FfiConverterOptionalUInt64.allocationSize(value.amountSats)+FfiConverterOptionalString.allocationSize(value.label)+FfiConverterOptionalString.allocationSize(value.message)+FfiConverterSequenceTypeAvailablePaymentMethod.allocationSize(value.options)+FfiConverterOptionalTypeAvailablePaymentMethod.allocationSize(value.defaultOption);}};return new FFIConverter();})();/**
|
|
354
554
|
* Generated factory for {@link PendingBoard} record objects.
|
|
355
|
-
*/const PendingBoard=exports.PendingBoard=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePendingBoard=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),txid:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterString.writeIntoCursor(value.txid,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterString.allocationSize(value.txid);}}return new FFIConverter();})();/**
|
|
555
|
+
*/const PendingBoard=exports.PendingBoard=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePendingBoard=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),txid:FfiConverterString.readFromCursor(c),movementId:_core.FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterString.writeIntoCursor(value.txid,c);_core.FfiConverterUInt32.writeIntoCursor(value.movementId,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterString.allocationSize(value.txid)+_core.FfiConverterUInt32.allocationSize(value.movementId);}};return new FFIConverter();})();/**
|
|
356
556
|
* One bucket of a [`RecoveryReport`].
|
|
357
557
|
*
|
|
358
558
|
* `total_sats` only sums the VTXOs whose amount is known, so it can
|
|
@@ -360,7 +560,7 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
360
560
|
* `vtxo_ids` is sorted, since upstream buckets them unordered.
|
|
361
561
|
*//**
|
|
362
562
|
* Generated factory for {@link RecoveryBucket} record objects.
|
|
363
|
-
*/const RecoveryBucket=exports.RecoveryBucket=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryBucket=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoIds:FfiConverterSequenceString.readFromCursor(c),totalSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterSequenceString.allocationSize(value.vtxoIds)+_core.FfiConverterUInt64.allocationSize(value.totalSats);}}return new FFIConverter();})();/**
|
|
563
|
+
*/const RecoveryBucket=exports.RecoveryBucket=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryBucket=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoIds:FfiConverterSequenceString.readFromCursor(c),totalSats:_core.FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);_core.FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterSequenceString.allocationSize(value.vtxoIds)+_core.FfiConverterUInt64.allocationSize(value.totalSats);}};return new FFIConverter();})();/**
|
|
364
564
|
* Outcome of a recovery scan: every VTXO id the scan looked at, bucketed by
|
|
365
565
|
* what was decided about it.
|
|
366
566
|
*
|
|
@@ -371,7 +571,7 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
371
571
|
* id instead sits beyond the key-derivation gap limit and needs a wider scan.
|
|
372
572
|
*//**
|
|
373
573
|
* Generated factory for {@link RecoveryReport} record objects.
|
|
374
|
-
*/const RecoveryReport=exports.RecoveryReport=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryReport=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{recovered:FfiConverterTypeRecoveryBucket.readFromCursor(c),skipped:FfiConverterTypeRecoveryBucket.readFromCursor(c),foreign:FfiConverterTypeRecoveryBucket.readFromCursor(c),failed:FfiConverterTypeRecoveryBucket.readFromCursor(c),exited:FfiConverterTypeRecoveryBucket.readFromCursor(c),isComplete:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeRecoveryBucket.writeIntoCursor(value.recovered,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.skipped,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.foreign,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.failed,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.exited,c);_core.FfiConverterBool.writeIntoCursor(value.isComplete,c);}allocationSize(value){return FfiConverterTypeRecoveryBucket.allocationSize(value.recovered)+FfiConverterTypeRecoveryBucket.allocationSize(value.skipped)+FfiConverterTypeRecoveryBucket.allocationSize(value.foreign)+FfiConverterTypeRecoveryBucket.allocationSize(value.failed)+FfiConverterTypeRecoveryBucket.allocationSize(value.exited)+_core.FfiConverterBool.allocationSize(value.isComplete);}}return new FFIConverter();})();/**
|
|
574
|
+
*/const RecoveryReport=exports.RecoveryReport=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryReport=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{recovered:FfiConverterTypeRecoveryBucket.readFromCursor(c),skipped:FfiConverterTypeRecoveryBucket.readFromCursor(c),foreign:FfiConverterTypeRecoveryBucket.readFromCursor(c),failed:FfiConverterTypeRecoveryBucket.readFromCursor(c),exited:FfiConverterTypeRecoveryBucket.readFromCursor(c),isComplete:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeRecoveryBucket.writeIntoCursor(value.recovered,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.skipped,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.foreign,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.failed,c);FfiConverterTypeRecoveryBucket.writeIntoCursor(value.exited,c);_core.FfiConverterBool.writeIntoCursor(value.isComplete,c);}allocationSize(value){return FfiConverterTypeRecoveryBucket.allocationSize(value.recovered)+FfiConverterTypeRecoveryBucket.allocationSize(value.skipped)+FfiConverterTypeRecoveryBucket.allocationSize(value.foreign)+FfiConverterTypeRecoveryBucket.allocationSize(value.failed)+FfiConverterTypeRecoveryBucket.allocationSize(value.exited)+_core.FfiConverterBool.allocationSize(value.isComplete);}};return new FFIConverter();})();/**
|
|
375
575
|
* Lifecycle phase of a round participation, mirroring
|
|
376
576
|
* `bark::round::RoundFlowKind`.
|
|
377
577
|
*
|
|
@@ -379,23 +579,23 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
379
579
|
* `"pending"` | `"ongoing"` | `"awaiting-confirmations"` | `"failed"` |
|
|
380
580
|
* `"canceled"`.
|
|
381
581
|
*/let RoundFlowKind=exports.RoundFlowKind=/*#__PURE__*/function(RoundFlowKind){/**
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
582
|
+
* Delegated participation waiting for its scheduled round. See
|
|
583
|
+
* [`RoundState::scheduled_height`].
|
|
584
|
+
*/RoundFlowKind[RoundFlowKind["DelegatedPending"]=0]="DelegatedPending";/**
|
|
585
|
+
* Interactive participation waiting for its round.
|
|
586
|
+
*/RoundFlowKind[RoundFlowKind["Pending"]=1]="Pending";/**
|
|
587
|
+
* The interactive part is being played out with the server.
|
|
588
|
+
*/RoundFlowKind[RoundFlowKind["Ongoing"]=2]="Ongoing";/**
|
|
589
|
+
* The round finished; waiting for its funding tx to confirm.
|
|
590
|
+
*/RoundFlowKind[RoundFlowKind["AwaitingConfirmations"]=3]="AwaitingConfirmations";/**
|
|
591
|
+
* The participation failed.
|
|
592
|
+
*/RoundFlowKind[RoundFlowKind["Failed"]=4]="Failed";/**
|
|
593
|
+
* The user canceled the participation.
|
|
594
|
+
*/RoundFlowKind[RoundFlowKind["Canceled"]=5]="Canceled";return RoundFlowKind;}({});const FfiConverterTypeRoundFlowKind=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return RoundFlowKind.DelegatedPending;case 2:return RoundFlowKind.Pending;case 3:return RoundFlowKind.Ongoing;case 4:return RoundFlowKind.AwaitingConfirmations;case 5:return RoundFlowKind.Failed;case 6:return RoundFlowKind.Canceled;default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value){case RoundFlowKind.DelegatedPending:return c.writeI32(1);case RoundFlowKind.Pending:return c.writeI32(2);case RoundFlowKind.Ongoing:return c.writeI32(3);case RoundFlowKind.AwaitingConfirmations:return c.writeI32(4);case RoundFlowKind.Failed:return c.writeI32(5);case RoundFlowKind.Canceled:return c.writeI32(6);}}allocationSize(value){return 4;}}return new FFIConverter();})();/**
|
|
395
595
|
* A pending round state
|
|
396
596
|
*//**
|
|
397
597
|
* Generated factory for {@link RoundState} record objects.
|
|
398
|
-
*/const RoundState=exports.RoundState=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRoundState=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{id:_core.FfiConverterUInt32.readFromCursor(c),ongoing:_core.FfiConverterBool.readFromCursor(c),state:FfiConverterTypeRoundFlowKind.readFromCursor(c),scheduledHeight:FfiConverterOptionalUInt32.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.id,c);_core.FfiConverterBool.writeIntoCursor(value.ongoing,c);FfiConverterTypeRoundFlowKind.writeIntoCursor(value.state,c);FfiConverterOptionalUInt32.writeIntoCursor(value.scheduledHeight,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.id)+_core.FfiConverterBool.allocationSize(value.ongoing)+FfiConverterTypeRoundFlowKind.allocationSize(value.state)+FfiConverterOptionalUInt32.allocationSize(value.scheduledHeight);}}return new FFIConverter();})();// Enum: VtxoLockHolder
|
|
598
|
+
*/const RoundState=exports.RoundState=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRoundState=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{id:_core.FfiConverterUInt32.readFromCursor(c),ongoing:_core.FfiConverterBool.readFromCursor(c),state:FfiConverterTypeRoundFlowKind.readFromCursor(c),scheduledHeight:FfiConverterOptionalUInt32.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterUInt32.writeIntoCursor(value.id,c);_core.FfiConverterBool.writeIntoCursor(value.ongoing,c);FfiConverterTypeRoundFlowKind.writeIntoCursor(value.state,c);FfiConverterOptionalUInt32.writeIntoCursor(value.scheduledHeight,c);}allocationSize(value){return _core.FfiConverterUInt32.allocationSize(value.id)+_core.FfiConverterBool.allocationSize(value.ongoing)+FfiConverterTypeRoundFlowKind.allocationSize(value.state)+FfiConverterOptionalUInt32.allocationSize(value.scheduledHeight);}};return new FFIConverter();})();// Enum: VtxoLockHolder
|
|
399
599
|
let VtxoLockHolder_Tags=exports.VtxoLockHolder_Tags=/*#__PURE__*/function(VtxoLockHolder_Tags){VtxoLockHolder_Tags["Action"]="Action";VtxoLockHolder_Tags["Movement"]="Movement";return VtxoLockHolder_Tags;}({});/**
|
|
400
600
|
* Who holds the lock on a [`VtxoState::Locked`] VTXO.
|
|
401
601
|
*
|
|
@@ -406,17 +606,17 @@ let VtxoLockHolder_Tags=exports.VtxoLockHolder_Tags=/*#__PURE__*/function(VtxoLo
|
|
|
406
606
|
*
|
|
407
607
|
* Serde/TS tags match upstream's serialization: `"action"` / `"movement"`.
|
|
408
608
|
*/const VtxoLockHolder=exports.VtxoLockHolder=(()=>{/**
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
609
|
+
* A wallet action checkpoint. `id` is upstream's `WalletActionId`
|
|
610
|
+
* (an opaque string).
|
|
611
|
+
*/class Action_ extends _core.UniffiEnum{/**
|
|
612
|
+
* @private
|
|
613
|
+
* This field is private and should not be used, use `tag` instead.
|
|
614
|
+
*/[_core.uniffiTypeNameSymbol]="VtxoLockHolder";tag=VtxoLockHolder_Tags.Action;constructor(inner){super("VtxoLockHolder","Action");this.inner=Object.freeze(inner);}static new(inner){return new Action_(inner);}static instanceOf(obj){return obj.tag===VtxoLockHolder_Tags.Action;}}/**
|
|
615
|
+
* A pre-action subsystem, keyed by its movement.
|
|
616
|
+
*/class Movement_ extends _core.UniffiEnum{/**
|
|
617
|
+
* @private
|
|
618
|
+
* This field is private and should not be used, use `tag` instead.
|
|
619
|
+
*/[_core.uniffiTypeNameSymbol]="VtxoLockHolder";tag=VtxoLockHolder_Tags.Movement;constructor(inner){super("VtxoLockHolder","Movement");this.inner=Object.freeze(inner);}static new(inner){return new Movement_(inner);}static instanceOf(obj){return obj.tag===VtxoLockHolder_Tags.Movement;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="VtxoLockHolder";}return Object.freeze({instanceOf,Action:Action_,Movement:Movement_});})();/**
|
|
420
620
|
* Who holds the lock on a [`VtxoState::Locked`] VTXO.
|
|
421
621
|
*
|
|
422
622
|
* Mirrors `bark::vtxo::VtxoLockHolder`. Action-based subsystems lock with
|
|
@@ -434,29 +634,29 @@ let VtxoState_Tags=exports.VtxoState_Tags=/*#__PURE__*/function(VtxoState_Tags){
|
|
|
434
634
|
* Serde/TS tags match upstream's kebab-case serialization:
|
|
435
635
|
* `"spendable"` | `"locked"` | `"spent"` | `"exited"`.
|
|
436
636
|
*/const VtxoState=exports.VtxoState=(()=>{/**
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
637
|
+
* Available; can be spent in a future round.
|
|
638
|
+
*/class Spendable_ extends _core.UniffiEnum{/**
|
|
639
|
+
* @private
|
|
640
|
+
* This field is private and should not be used, use `tag` instead.
|
|
641
|
+
*/[_core.uniffiTypeNameSymbol]="VtxoState";tag=VtxoState_Tags.Spendable;constructor(){super("VtxoState","Spendable");}static new(){return new Spendable_();}static instanceOf(obj){return obj.tag===VtxoState_Tags.Spendable;}}/**
|
|
642
|
+
* Locked by an operation. `holder` is `None` only for the narrow
|
|
643
|
+
* window between creating a fresh locked VTXO and pinning it to a
|
|
644
|
+
* specific operation, so a locked VTXO can legitimately carry no
|
|
645
|
+
* lock reason yet.
|
|
646
|
+
*/class Locked_ extends _core.UniffiEnum{/**
|
|
647
|
+
* @private
|
|
648
|
+
* This field is private and should not be used, use `tag` instead.
|
|
649
|
+
*/[_core.uniffiTypeNameSymbol]="VtxoState";tag=VtxoState_Tags.Locked;constructor(inner){super("VtxoState","Locked");this.inner=Object.freeze(inner);}static new(inner){return new Locked_(inner);}static instanceOf(obj){return obj.tag===VtxoState_Tags.Locked;}}/**
|
|
650
|
+
* Consumed.
|
|
651
|
+
*/class Spent_ extends _core.UniffiEnum{/**
|
|
652
|
+
* @private
|
|
653
|
+
* This field is private and should not be used, use `tag` instead.
|
|
654
|
+
*/[_core.uniffiTypeNameSymbol]="VtxoState";tag=VtxoState_Tags.Spent;constructor(){super("VtxoState","Spent");}static new(){return new Spent_();}static instanceOf(obj){return obj.tag===VtxoState_Tags.Spent;}}/**
|
|
655
|
+
* In (or completed) a unilateral exit.
|
|
656
|
+
*/class Exited_ extends _core.UniffiEnum{/**
|
|
657
|
+
* @private
|
|
658
|
+
* This field is private and should not be used, use `tag` instead.
|
|
659
|
+
*/[_core.uniffiTypeNameSymbol]="VtxoState";tag=VtxoState_Tags.Exited;constructor(){super("VtxoState","Exited");}static new(){return new Exited_();}static instanceOf(obj){return obj.tag===VtxoState_Tags.Exited;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="VtxoState";}return Object.freeze({instanceOf,Spendable:Spendable_,Locked:Locked_,Spent:Spent_,Exited:Exited_});})();/**
|
|
460
660
|
* Rich VTXO state, mirroring `bark::vtxo::VtxoState`.
|
|
461
661
|
*
|
|
462
662
|
* Serde/TS tags match upstream's kebab-case serialization:
|
|
@@ -465,7 +665,7 @@ let VtxoState_Tags=exports.VtxoState_Tags=/*#__PURE__*/function(VtxoState_Tags){
|
|
|
465
665
|
const FfiConverterTypeVtxoState=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new VtxoState.Spendable();case 2:return new VtxoState.Locked({holder:FfiConverterOptionalTypeVtxoLockHolder.readFromCursor(c)});case 3:return new VtxoState.Spent();case 4:return new VtxoState.Exited();default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case VtxoState_Tags.Spendable:{c.writeI32(1);return;}case VtxoState_Tags.Locked:{c.writeI32(2);const inner=value.inner;FfiConverterOptionalTypeVtxoLockHolder.writeIntoCursor(inner.holder,c);return;}case VtxoState_Tags.Spent:{c.writeI32(3);return;}case VtxoState_Tags.Exited:{c.writeI32(4);return;}default:// Throwing from here means that VtxoState_Tags hasn't matched an ordinal.
|
|
466
666
|
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case VtxoState_Tags.Spendable:{return 4;}case VtxoState_Tags.Locked:{const inner=value.inner;let size=4;size+=FfiConverterOptionalTypeVtxoLockHolder.allocationSize(inner.holder);return size;}case VtxoState_Tags.Spent:{return 4;}case VtxoState_Tags.Exited:{return 4;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
467
667
|
* Generated factory for {@link Vtxo} record objects.
|
|
468
|
-
*/const Vtxo=exports.Vtxo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeVtxo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),expiryHeight:_core.FfiConverterUInt32.readFromCursor(c),kind:FfiConverterString.readFromCursor(c),state:FfiConverterTypeVtxoState.readFromCursor(c),exitDepth:_core.FfiConverterUInt32.readFromCursor(c),exitTxWeightWu:_core.FfiConverterUInt64.readFromCursor(c),registered:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.id,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);_core.FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);FfiConverterString.writeIntoCursor(value.kind,c);FfiConverterTypeVtxoState.writeIntoCursor(value.state,c);_core.FfiConverterUInt32.writeIntoCursor(value.exitDepth,c);_core.FfiConverterUInt64.writeIntoCursor(value.exitTxWeightWu,c);_core.FfiConverterBool.writeIntoCursor(value.registered,c);}allocationSize(value){return FfiConverterString.allocationSize(value.id)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+_core.FfiConverterUInt32.allocationSize(value.expiryHeight)+FfiConverterString.allocationSize(value.kind)+FfiConverterTypeVtxoState.allocationSize(value.state)+_core.FfiConverterUInt32.allocationSize(value.exitDepth)+_core.FfiConverterUInt64.allocationSize(value.exitTxWeightWu)+_core.FfiConverterBool.allocationSize(value.registered);}}return new FFIConverter();})();// Flat error type: Exception
|
|
668
|
+
*/const Vtxo=exports.Vtxo=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeVtxo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),expiryHeight:_core.FfiConverterUInt32.readFromCursor(c),kind:FfiConverterString.readFromCursor(c),state:FfiConverterTypeVtxoState.readFromCursor(c),exitDepth:_core.FfiConverterUInt32.readFromCursor(c),exitTxWeightWu:_core.FfiConverterUInt64.readFromCursor(c),registered:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.id,c);_core.FfiConverterUInt64.writeIntoCursor(value.amountSats,c);_core.FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);FfiConverterString.writeIntoCursor(value.kind,c);FfiConverterTypeVtxoState.writeIntoCursor(value.state,c);_core.FfiConverterUInt32.writeIntoCursor(value.exitDepth,c);_core.FfiConverterUInt64.writeIntoCursor(value.exitTxWeightWu,c);_core.FfiConverterBool.writeIntoCursor(value.registered,c);}allocationSize(value){return FfiConverterString.allocationSize(value.id)+_core.FfiConverterUInt64.allocationSize(value.amountSats)+_core.FfiConverterUInt32.allocationSize(value.expiryHeight)+FfiConverterString.allocationSize(value.kind)+FfiConverterTypeVtxoState.allocationSize(value.state)+_core.FfiConverterUInt32.allocationSize(value.exitDepth)+_core.FfiConverterUInt64.allocationSize(value.exitTxWeightWu)+_core.FfiConverterBool.allocationSize(value.registered);}};return new FFIConverter();})();// Flat error type: Exception
|
|
469
669
|
let Exception_Tags=exports.Exception_Tags=/*#__PURE__*/function(Exception_Tags){Exception_Tags["Inner"]="Inner";return Exception_Tags;}({});/**
|
|
470
670
|
* The single error type surfaced across the Bark FFI.
|
|
471
671
|
*
|
|
@@ -475,12 +675,12 @@ let Exception_Tags=exports.Exception_Tags=/*#__PURE__*/function(Exception_Tags){
|
|
|
475
675
|
* `Display` string across the boundary — so the rich anyhow context collapses
|
|
476
676
|
* to a single message on the foreign side.
|
|
477
677
|
*/const Exception=exports.Exception=(()=>{class Inner extends _core.UniffiError{/**
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
678
|
+
* @private
|
|
679
|
+
* This field is private and should not be used.
|
|
680
|
+
*/[_core.uniffiTypeNameSymbol]="Exception";/**
|
|
681
|
+
* @private
|
|
682
|
+
* This field is private and should not be used.
|
|
683
|
+
*/[_core.variantOrdinalSymbol]=1;tag=Exception_Tags.Inner;constructor(message){super("Exception","Inner",message);}static instanceOf(e){return instanceOf(e)&&e[_core.variantOrdinalSymbol]===1;}}// Utility function which does not rely on instanceof.
|
|
484
684
|
function instanceOf(e){return e[_core.uniffiTypeNameSymbol]==="Exception";}return{Inner,instanceOf};})();// Union type for Exception error type.
|
|
485
685
|
/**
|
|
486
686
|
* The single error type surfaced across the Bark FFI.
|
|
@@ -495,20 +695,20 @@ function instanceOf(e){return e[_core.uniffiTypeNameSymbol]==="Exception";}retur
|
|
|
495
695
|
* `bark::onchain::WalletTxInfo`.
|
|
496
696
|
*//**
|
|
497
697
|
* Generated factory for {@link WalletTransaction} record objects.
|
|
498
|
-
*/const WalletTransaction=exports.WalletTransaction=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletTransaction=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c),onchainFeeSats:FfiConverterOptionalUInt64.readFromCursor(c),balanceChangeSats:_core.FfiConverterInt64.readFromCursor(c),confirmation:FfiConverterOptionalTypeBlockRef.readFromCursor(c),isCpfp:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterOptionalUInt64.writeIntoCursor(value.onchainFeeSats,c);_core.FfiConverterInt64.writeIntoCursor(value.balanceChangeSats,c);FfiConverterOptionalTypeBlockRef.writeIntoCursor(value.confirmation,c);_core.FfiConverterBool.writeIntoCursor(value.isCpfp,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex)+FfiConverterOptionalUInt64.allocationSize(value.onchainFeeSats)+_core.FfiConverterInt64.allocationSize(value.balanceChangeSats)+FfiConverterOptionalTypeBlockRef.allocationSize(value.confirmation)+_core.FfiConverterBool.allocationSize(value.isCpfp);}}return new FFIConverter();})();// Enum: OnchainUtxo
|
|
698
|
+
*/const WalletTransaction=exports.WalletTransaction=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletTransaction=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c),onchainFeeSats:FfiConverterOptionalUInt64.readFromCursor(c),balanceChangeSats:_core.FfiConverterInt64.readFromCursor(c),confirmation:FfiConverterOptionalTypeBlockRef.readFromCursor(c),isCpfp:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterOptionalUInt64.writeIntoCursor(value.onchainFeeSats,c);_core.FfiConverterInt64.writeIntoCursor(value.balanceChangeSats,c);FfiConverterOptionalTypeBlockRef.writeIntoCursor(value.confirmation,c);_core.FfiConverterBool.writeIntoCursor(value.isCpfp,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex)+FfiConverterOptionalUInt64.allocationSize(value.onchainFeeSats)+_core.FfiConverterInt64.allocationSize(value.balanceChangeSats)+FfiConverterOptionalTypeBlockRef.allocationSize(value.confirmation)+_core.FfiConverterBool.allocationSize(value.isCpfp);}};return new FFIConverter();})();// Enum: OnchainUtxo
|
|
499
699
|
let OnchainUtxo_Tags=exports.OnchainUtxo_Tags=/*#__PURE__*/function(OnchainUtxo_Tags){OnchainUtxo_Tags["Local"]="Local";OnchainUtxo_Tags["Exit"]="Exit";return OnchainUtxo_Tags;}({});/**
|
|
500
700
|
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
501
701
|
*/const OnchainUtxo=exports.OnchainUtxo=(()=>{/**
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
702
|
+
* A standard wallet UTXO.
|
|
703
|
+
*/class Local_ extends _core.UniffiEnum{/**
|
|
704
|
+
* @private
|
|
705
|
+
* This field is private and should not be used, use `tag` instead.
|
|
706
|
+
*/[_core.uniffiTypeNameSymbol]="OnchainUtxo";tag=OnchainUtxo_Tags.Local;constructor(inner){super("OnchainUtxo","Local");this.inner=Object.freeze(inner);}static new(inner){return new Local_(inner);}static instanceOf(obj){return obj.tag===OnchainUtxo_Tags.Local;}}/**
|
|
707
|
+
* A spendable unilateral-exit output claimed from a VTXO.
|
|
708
|
+
*/class Exit_ extends _core.UniffiEnum{/**
|
|
709
|
+
* @private
|
|
710
|
+
* This field is private and should not be used, use `tag` instead.
|
|
711
|
+
*/[_core.uniffiTypeNameSymbol]="OnchainUtxo";tag=OnchainUtxo_Tags.Exit;constructor(inner){super("OnchainUtxo","Exit");this.inner=Object.freeze(inner);}static new(inner){return new Exit_(inner);}static instanceOf(obj){return obj.tag===OnchainUtxo_Tags.Exit;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="OnchainUtxo";}return Object.freeze({instanceOf,Local:Local_,Exit:Exit_});})();/**
|
|
512
712
|
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
513
713
|
*/// FfiConverter for enum OnchainUtxo
|
|
514
714
|
const FfiConverterTypeOnchainUtxo=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new OnchainUtxo.Local({outpoint:FfiConverterTypeOutPoint.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),confirmationHeight:FfiConverterOptionalUInt32.readFromCursor(c)});case 2:return new OnchainUtxo.Exit({vtxoId:FfiConverterString.readFromCursor(c),amountSats:_core.FfiConverterUInt64.readFromCursor(c),height:_core.FfiConverterUInt32.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case OnchainUtxo_Tags.Local:{c.writeI32(1);const inner=value.inner;FfiConverterTypeOutPoint.writeIntoCursor(inner.outpoint,c);_core.FfiConverterUInt64.writeIntoCursor(inner.amountSats,c);FfiConverterOptionalUInt32.writeIntoCursor(inner.confirmationHeight,c);return;}case OnchainUtxo_Tags.Exit:{c.writeI32(2);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.vtxoId,c);_core.FfiConverterUInt64.writeIntoCursor(inner.amountSats,c);_core.FfiConverterUInt32.writeIntoCursor(inner.height,c);return;}default:// Throwing from here means that OnchainUtxo_Tags hasn't matched an ordinal.
|
|
@@ -524,10 +724,10 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
524
724
|
* - Callback (foreign-language implementation)
|
|
525
725
|
*/class OnchainWallet extends _core.UniffiAbstractObject{[_core.uniffiTypeNameSymbol]="OnchainWallet";// No primary constructor declared for this class.
|
|
526
726
|
constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core.destructorGuardSymbol]=uniffiTypeOnchainWalletObjectFactory.bless(pointer);}/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
727
|
+
* Callback-backed wallet for foreign-language implementations.
|
|
728
|
+
*/static custom(callbacks)/*throws*/{return FfiConverterTypeOnchainWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_onchainwallet_custom(FfiConverterTypeCustomOnchainWalletCallbacks.lower(callbacks,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
729
|
+
* BDK-backed wallet. Opens the shared sqlite cache.
|
|
730
|
+
*/static async default_(network,mnemonic,config,datadir,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_onchainwallet_default(FfiConverterTypeNetwork.lower(network,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterString.lower(mnemonic,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterTypeConfig.lower(config,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterString.lower(datadir,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_u64,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_u64,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_u64,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_u64,// Async returns always go through the JS-side converter: the
|
|
531
731
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
532
732
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
533
733
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -541,13 +741,13 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
541
741
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
542
742
|
// already JS-owned.
|
|
543
743
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeOnchainBalance.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
744
|
+
* Mark a wallet-known transaction as evicted from the mempool, so its
|
|
745
|
+
* inputs return to coin selection immediately. Only for a tx that has
|
|
746
|
+
* definitively been superseded on-chain (e.g. an RBF-replaced exit CPFP);
|
|
747
|
+
* evicting a still-in-flight tx invites a self-inflicted double-spend.
|
|
748
|
+
*/async evictTx(txid,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_evict_tx(uniffiTypeOnchainWalletObjectFactory.clonePointer(this),FfiConverterString.lower(txid,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
749
|
+
* Cached network fee-rate estimates from the wallet's chain source.
|
|
750
|
+
*/async feeRates(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_fee_rates(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
551
751
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
552
752
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
553
753
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -556,13 +756,13 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
556
756
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
557
757
|
// already JS-owned.
|
|
558
758
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeRates.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
759
|
+
* Discover the wallet's pre-existing on-chain history. Run once after
|
|
760
|
+
* restoring a wallet from a mnemonic: `sync` only covers addresses this
|
|
761
|
+
* wallet instance has already revealed, so it never finds transactions
|
|
762
|
+
* made by a previous incarnation. Gap-limited full scan on esplora
|
|
763
|
+
* (`birthday_height` is ignored there), block scan from `birthday_height`
|
|
764
|
+
* on bitcoind. Returns the total balance in sats afterwards.
|
|
765
|
+
*/async initialScan(birthdayHeight,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_initial_scan(uniffiTypeOnchainWalletObjectFactory.clonePointer(this),FfiConverterOptionalUInt32.lower(birthdayHeight,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_u64,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_u64,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_u64,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_u64,// Async returns always go through the JS-side converter: the
|
|
566
766
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
567
767
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
568
768
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -589,16 +789,16 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
589
789
|
// export. The bytes the runtime hands back must be deserialized
|
|
590
790
|
// here using the per-callable return-type converter.
|
|
591
791
|
/*liftFunc:*/_core.FfiConverterUInt64.lift.bind(_core.FfiConverterUInt64),/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
592
|
-
|
|
593
|
-
|
|
792
|
+
* Current chain tip height from the wallet's chain source.
|
|
793
|
+
*/async tipHeight(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_tip_height(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_u32,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_u32,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_u32,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_u32,// Async returns always go through the JS-side converter: the
|
|
594
794
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
595
795
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
596
796
|
// export. The bytes the runtime hands back must be deserialized
|
|
597
797
|
// here using the per-callable return-type converter.
|
|
598
798
|
/*liftFunc:*/_core.FfiConverterUInt32.lift.bind(_core.FfiConverterUInt32),/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
799
|
+
* Every wallet transaction with fee, balance change, confirmation and
|
|
800
|
+
* CPFP flag. Requires a prior `sync` to be meaningful.
|
|
801
|
+
*/async transactions(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_transactions(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
602
802
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
603
803
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
604
804
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -607,8 +807,8 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
607
807
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
608
808
|
// already JS-owned.
|
|
609
809
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeWalletTransaction.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
610
|
-
|
|
611
|
-
|
|
810
|
+
* The wallet's unspent outputs. Requires a prior `sync` to be meaningful.
|
|
811
|
+
*/async utxos(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_utxos(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
612
812
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
613
813
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
614
814
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -622,9 +822,9 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
622
822
|
* Every field has a default, so callers only set what they need.
|
|
623
823
|
*//**
|
|
624
824
|
* Generated factory for {@link WalletOpenArgs} record objects.
|
|
625
|
-
*/const WalletOpenArgs=exports.WalletOpenArgs=(()=>{const defaults=()=>({runDaemon:true,createIfNotExists:true,createWithoutServer:false,skipRecovery:false});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletOpenArgs=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{runDaemon:_core.FfiConverterBool.readFromCursor(c),datadir:FfiConverterString.readFromCursor(c),onchain:FfiConverterOptionalTypeOnchainWallet.readFromCursor(c),createIfNotExists:_core.FfiConverterBool.readFromCursor(c),createWithoutServer:_core.FfiConverterBool.readFromCursor(c),skipRecovery:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterBool.writeIntoCursor(value.runDaemon,c);FfiConverterString.writeIntoCursor(value.datadir,c);FfiConverterOptionalTypeOnchainWallet.writeIntoCursor(value.onchain,c);_core.FfiConverterBool.writeIntoCursor(value.createIfNotExists,c);_core.FfiConverterBool.writeIntoCursor(value.createWithoutServer,c);_core.FfiConverterBool.writeIntoCursor(value.skipRecovery,c);}allocationSize(value){return _core.FfiConverterBool.allocationSize(value.runDaemon)+FfiConverterString.allocationSize(value.datadir)+FfiConverterOptionalTypeOnchainWallet.allocationSize(value.onchain)+_core.FfiConverterBool.allocationSize(value.createIfNotExists)+_core.FfiConverterBool.allocationSize(value.createWithoutServer)+_core.FfiConverterBool.allocationSize(value.skipRecovery);}}return new FFIConverter();})();/**
|
|
825
|
+
*/const WalletOpenArgs=exports.WalletOpenArgs=(()=>{const defaults=()=>({runDaemon:true,createIfNotExists:true,createWithoutServer:false,skipRecovery:false});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletOpenArgs=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{runDaemon:_core.FfiConverterBool.readFromCursor(c),datadir:FfiConverterString.readFromCursor(c),onchain:FfiConverterOptionalTypeOnchainWallet.readFromCursor(c),createIfNotExists:_core.FfiConverterBool.readFromCursor(c),createWithoutServer:_core.FfiConverterBool.readFromCursor(c),skipRecovery:_core.FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){_core.FfiConverterBool.writeIntoCursor(value.runDaemon,c);FfiConverterString.writeIntoCursor(value.datadir,c);FfiConverterOptionalTypeOnchainWallet.writeIntoCursor(value.onchain,c);_core.FfiConverterBool.writeIntoCursor(value.createIfNotExists,c);_core.FfiConverterBool.writeIntoCursor(value.createWithoutServer,c);_core.FfiConverterBool.writeIntoCursor(value.skipRecovery,c);}allocationSize(value){return _core.FfiConverterBool.allocationSize(value.runDaemon)+FfiConverterString.allocationSize(value.datadir)+FfiConverterOptionalTypeOnchainWallet.allocationSize(value.onchain)+_core.FfiConverterBool.allocationSize(value.createIfNotExists)+_core.FfiConverterBool.allocationSize(value.createWithoutServer)+_core.FfiConverterBool.allocationSize(value.skipRecovery);}};return new FFIConverter();})();/**
|
|
626
826
|
* Generated factory for {@link WalletProperties} record objects.
|
|
627
|
-
*/const WalletProperties=exports.WalletProperties=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletProperties=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),fingerprint:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.fingerprint,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.fingerprint);}}return new FFIConverter();})();// Enum: LightningSendStatus
|
|
827
|
+
*/const WalletProperties=exports.WalletProperties=(()=>{const defaults=()=>({});const create=(()=>{return(0,_core.uniffiCreateRecord)(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletProperties=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),fingerprint:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.fingerprint,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.fingerprint);}};return new FFIConverter();})();// Enum: LightningSendStatus
|
|
628
828
|
let LightningSendStatus_Tags=exports.LightningSendStatus_Tags=/*#__PURE__*/function(LightningSendStatus_Tags){LightningSendStatus_Tags["Unknown"]="Unknown";LightningSendStatus_Tags["InProgress"]="InProgress";LightningSendStatus_Tags["Paid"]="Paid";return LightningSendStatus_Tags;}({});/**
|
|
629
829
|
* Terminal/in-flight state of an outgoing lightning send.
|
|
630
830
|
*
|
|
@@ -632,21 +832,21 @@ let LightningSendStatus_Tags=exports.LightningSendStatus_Tags=/*#__PURE__*/funct
|
|
|
632
832
|
* `check_lightning_payment` now return this so callers can drive the
|
|
633
833
|
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
634
834
|
*/const LightningSendStatus=exports.LightningSendStatus=(()=>{/**
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
835
|
+
* No record of this payment (never started, or already pruned).
|
|
836
|
+
*/class Unknown_ extends _core.UniffiEnum{/**
|
|
837
|
+
* @private
|
|
838
|
+
* This field is private and should not be used, use `tag` instead.
|
|
839
|
+
*/[_core.uniffiTypeNameSymbol]="LightningSendStatus";tag=LightningSendStatus_Tags.Unknown;constructor(){super("LightningSendStatus","Unknown");}static new(){return new Unknown_();}static instanceOf(obj){return obj.tag===LightningSendStatus_Tags.Unknown;}}/**
|
|
840
|
+
* Send is in flight; HTLC VTXOs are locked.
|
|
841
|
+
*/class InProgress_ extends _core.UniffiEnum{/**
|
|
842
|
+
* @private
|
|
843
|
+
* This field is private and should not be used, use `tag` instead.
|
|
844
|
+
*/[_core.uniffiTypeNameSymbol]="LightningSendStatus";tag=LightningSendStatus_Tags.InProgress;constructor(inner){super("LightningSendStatus","InProgress");this.inner=Object.freeze(inner);}static new(inner){return new InProgress_(inner);}static instanceOf(obj){return obj.tag===LightningSendStatus_Tags.InProgress;}}/**
|
|
845
|
+
* Send has settled; the preimage proves payment.
|
|
846
|
+
*/class Paid_ extends _core.UniffiEnum{/**
|
|
847
|
+
* @private
|
|
848
|
+
* This field is private and should not be used, use `tag` instead.
|
|
849
|
+
*/[_core.uniffiTypeNameSymbol]="LightningSendStatus";tag=LightningSendStatus_Tags.Paid;constructor(inner){super("LightningSendStatus","Paid");this.inner=Object.freeze(inner);}static new(inner){return new Paid_(inner);}static instanceOf(obj){return obj.tag===LightningSendStatus_Tags.Paid;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="LightningSendStatus";}return Object.freeze({instanceOf,Unknown:Unknown_,InProgress:InProgress_,Paid:Paid_});})();/**
|
|
650
850
|
* Terminal/in-flight state of an outgoing lightning send.
|
|
651
851
|
*
|
|
652
852
|
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
@@ -656,7 +856,33 @@ let LightningSendStatus_Tags=exports.LightningSendStatus_Tags=/*#__PURE__*/funct
|
|
|
656
856
|
const FfiConverterTypeLightningSendStatus=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new LightningSendStatus.Unknown();case 2:return new LightningSendStatus.InProgress({send:FfiConverterTypeLightningSend.readFromCursor(c)});case 3:return new LightningSendStatus.Paid({paymentHash:FfiConverterString.readFromCursor(c),preimage:FfiConverterString.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case LightningSendStatus_Tags.Unknown:{c.writeI32(1);return;}case LightningSendStatus_Tags.InProgress:{c.writeI32(2);const inner=value.inner;FfiConverterTypeLightningSend.writeIntoCursor(inner.send,c);return;}case LightningSendStatus_Tags.Paid:{c.writeI32(3);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.paymentHash,c);FfiConverterString.writeIntoCursor(inner.preimage,c);return;}default:// Throwing from here means that LightningSendStatus_Tags hasn't matched an ordinal.
|
|
657
857
|
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case LightningSendStatus_Tags.Unknown:{return 4;}case LightningSendStatus_Tags.InProgress:{const inner=value.inner;let size=4;size+=FfiConverterTypeLightningSend.allocationSize(inner.send);return size;}case LightningSendStatus_Tags.Paid:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.paymentHash);size+=FfiConverterString.allocationSize(inner.preimage);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
658
858
|
* Severity of a log record.
|
|
659
|
-
*/let LogLevel=exports.LogLevel=/*#__PURE__*/function(LogLevel){LogLevel[LogLevel["Error"]=0]="Error";LogLevel[LogLevel["Warn"]=1]="Warn";LogLevel[LogLevel["Info"]=2]="Info";LogLevel[LogLevel["Debug"]=3]="Debug";LogLevel[LogLevel["Trace"]=4]="Trace";return LogLevel;}({});const FfiConverterTypeLogLevel=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return LogLevel.Error;case 2:return LogLevel.Warn;case 3:return LogLevel.Info;case 4:return LogLevel.Debug;case 5:return LogLevel.Trace;default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value){case LogLevel.Error:return c.writeI32(1);case LogLevel.Warn:return c.writeI32(2);case LogLevel.Info:return c.writeI32(3);case LogLevel.Debug:return c.writeI32(4);case LogLevel.Trace:return c.writeI32(5);}}allocationSize(value){return 4;}}return new FFIConverter();})();// Enum:
|
|
859
|
+
*/let LogLevel=exports.LogLevel=/*#__PURE__*/function(LogLevel){LogLevel[LogLevel["Error"]=0]="Error";LogLevel[LogLevel["Warn"]=1]="Warn";LogLevel[LogLevel["Info"]=2]="Info";LogLevel[LogLevel["Debug"]=3]="Debug";LogLevel[LogLevel["Trace"]=4]="Trace";return LogLevel;}({});const FfiConverterTypeLogLevel=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return LogLevel.Error;case 2:return LogLevel.Warn;case 3:return LogLevel.Info;case 4:return LogLevel.Debug;case 5:return LogLevel.Trace;default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value){case LogLevel.Error:return c.writeI32(1);case LogLevel.Warn:return c.writeI32(2);case LogLevel.Info:return c.writeI32(3);case LogLevel.Debug:return c.writeI32(4);case LogLevel.Trace:return c.writeI32(5);}}allocationSize(value){return 4;}}return new FFIConverter();})();// Enum: PaymentResult
|
|
860
|
+
let PaymentResult_Tags=exports.PaymentResult_Tags=/*#__PURE__*/function(PaymentResult_Tags){PaymentResult_Tags["Onchain"]="Onchain";PaymentResult_Tags["Lightning"]="Lightning";PaymentResult_Tags["Ark"]="Ark";return PaymentResult_Tags;}({});/**
|
|
861
|
+
* Outcome of `Wallet::send_payment`, mirroring `bark::PaymentInitOutput`.
|
|
862
|
+
*/const PaymentResult=exports.PaymentResult=(()=>{/**
|
|
863
|
+
* The onchain payment's transaction was broadcast.
|
|
864
|
+
*/class Onchain_ extends _core.UniffiEnum{/**
|
|
865
|
+
* @private
|
|
866
|
+
* This field is private and should not be used, use `tag` instead.
|
|
867
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentResult";tag=PaymentResult_Tags.Onchain;constructor(inner){super("PaymentResult","Onchain");this.inner=Object.freeze(inner);}static new(inner){return new Onchain_(inner);}static instanceOf(obj){return obj.tag===PaymentResult_Tags.Onchain;}}/**
|
|
868
|
+
* The lightning payment was started. Unless `wait` was set it may still
|
|
869
|
+
* be in flight: follow it with `lightning_send_state(payment_hash)`.
|
|
870
|
+
* `invoice` is the one paid, which for an offer, lightning address or
|
|
871
|
+
* LNURL is the one bark fetched.
|
|
872
|
+
*/class Lightning_ extends _core.UniffiEnum{/**
|
|
873
|
+
* @private
|
|
874
|
+
* This field is private and should not be used, use `tag` instead.
|
|
875
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentResult";tag=PaymentResult_Tags.Lightning;constructor(inner){super("PaymentResult","Lightning");this.inner=Object.freeze(inner);}static new(inner){return new Lightning_(inner);}static instanceOf(obj){return obj.tag===PaymentResult_Tags.Lightning;}}/**
|
|
876
|
+
* The Ark payment was made. `movement_id` is the movement that records
|
|
877
|
+
* it.
|
|
878
|
+
*/class Ark_ extends _core.UniffiEnum{/**
|
|
879
|
+
* @private
|
|
880
|
+
* This field is private and should not be used, use `tag` instead.
|
|
881
|
+
*/[_core.uniffiTypeNameSymbol]="PaymentResult";tag=PaymentResult_Tags.Ark;constructor(inner){super("PaymentResult","Ark");this.inner=Object.freeze(inner);}static new(inner){return new Ark_(inner);}static instanceOf(obj){return obj.tag===PaymentResult_Tags.Ark;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="PaymentResult";}return Object.freeze({instanceOf,Onchain:Onchain_,Lightning:Lightning_,Ark:Ark_});})();/**
|
|
882
|
+
* Outcome of `Wallet::send_payment`, mirroring `bark::PaymentInitOutput`.
|
|
883
|
+
*/// FfiConverter for enum PaymentResult
|
|
884
|
+
const FfiConverterTypePaymentResult=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new PaymentResult.Onchain({txid:FfiConverterString.readFromCursor(c)});case 2:return new PaymentResult.Lightning({invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c)});case 3:return new PaymentResult.Ark({movementId:_core.FfiConverterUInt32.readFromCursor(c)});default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case PaymentResult_Tags.Onchain:{c.writeI32(1);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.txid,c);return;}case PaymentResult_Tags.Lightning:{c.writeI32(2);const inner=value.inner;FfiConverterString.writeIntoCursor(inner.invoice,c);FfiConverterString.writeIntoCursor(inner.paymentHash,c);return;}case PaymentResult_Tags.Ark:{c.writeI32(3);const inner=value.inner;_core.FfiConverterUInt32.writeIntoCursor(inner.movementId,c);return;}default:// Throwing from here means that PaymentResult_Tags hasn't matched an ordinal.
|
|
885
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case PaymentResult_Tags.Onchain:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.txid);return size;}case PaymentResult_Tags.Lightning:{const inner=value.inner;let size=4;size+=FfiConverterString.allocationSize(inner.invoice);size+=FfiConverterString.allocationSize(inner.paymentHash);return size;}case PaymentResult_Tags.Ark:{const inner=value.inner;let size=4;size+=_core.FfiConverterUInt32.allocationSize(inner.movementId);return size;}default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();// Enum: RecoveryStatus
|
|
660
886
|
let RecoveryStatus_Tags=exports.RecoveryStatus_Tags=/*#__PURE__*/function(RecoveryStatus_Tags){RecoveryStatus_Tags["NotRun"]="NotRun";RecoveryStatus_Tags["Failed"]="Failed";RecoveryStatus_Tags["Completed"]="Completed";return RecoveryStatus_Tags;}({});/**
|
|
661
887
|
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
662
888
|
* `bark::RecoveryStatus`.
|
|
@@ -669,21 +895,21 @@ let RecoveryStatus_Tags=exports.RecoveryStatus_Tags=/*#__PURE__*/function(Recove
|
|
|
669
895
|
*
|
|
670
896
|
* Serde/TS tags: `"not-run"` | `"failed"` | `"completed"`.
|
|
671
897
|
*/const RecoveryStatus=exports.RecoveryStatus=(()=>{/**
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
898
|
+
* No scan was attempted.
|
|
899
|
+
*/class NotRun_ extends _core.UniffiEnum{/**
|
|
900
|
+
* @private
|
|
901
|
+
* This field is private and should not be used, use `tag` instead.
|
|
902
|
+
*/[_core.uniffiTypeNameSymbol]="RecoveryStatus";tag=RecoveryStatus_Tags.NotRun;constructor(){super("RecoveryStatus","NotRun");}static new(){return new NotRun_();}static instanceOf(obj){return obj.tag===RecoveryStatus_Tags.NotRun;}}/**
|
|
903
|
+
* The scan errored before it could produce a report.
|
|
904
|
+
*/class Failed_ extends _core.UniffiEnum{/**
|
|
905
|
+
* @private
|
|
906
|
+
* This field is private and should not be used, use `tag` instead.
|
|
907
|
+
*/[_core.uniffiTypeNameSymbol]="RecoveryStatus";tag=RecoveryStatus_Tags.Failed;constructor(inner){super("RecoveryStatus","Failed");this.inner=Object.freeze(inner);}static new(inner){return new Failed_(inner);}static instanceOf(obj){return obj.tag===RecoveryStatus_Tags.Failed;}}/**
|
|
908
|
+
* The scan ran to the end.
|
|
909
|
+
*/class Completed_ extends _core.UniffiEnum{/**
|
|
910
|
+
* @private
|
|
911
|
+
* This field is private and should not be used, use `tag` instead.
|
|
912
|
+
*/[_core.uniffiTypeNameSymbol]="RecoveryStatus";tag=RecoveryStatus_Tags.Completed;constructor(inner){super("RecoveryStatus","Completed");this.inner=Object.freeze(inner);}static new(inner){return new Completed_(inner);}static instanceOf(obj){return obj.tag===RecoveryStatus_Tags.Completed;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="RecoveryStatus";}return Object.freeze({instanceOf,NotRun:NotRun_,Failed:Failed_,Completed:Completed_});})();/**
|
|
687
913
|
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
688
914
|
* `bark::RecoveryStatus`.
|
|
689
915
|
*
|
|
@@ -700,21 +926,21 @@ throw new _core.UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value)
|
|
|
700
926
|
let WalletNotification_Tags=exports.WalletNotification_Tags=/*#__PURE__*/function(WalletNotification_Tags){WalletNotification_Tags["MovementCreated"]="MovementCreated";WalletNotification_Tags["MovementUpdated"]="MovementUpdated";WalletNotification_Tags["ChannelLagging"]="ChannelLagging";return WalletNotification_Tags;}({});/**
|
|
701
927
|
* A notification event from the wallet
|
|
702
928
|
*/const WalletNotification=exports.WalletNotification=(()=>{/**
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
929
|
+
* A new movement was created
|
|
930
|
+
*/class MovementCreated_ extends _core.UniffiEnum{/**
|
|
931
|
+
* @private
|
|
932
|
+
* This field is private and should not be used, use `tag` instead.
|
|
933
|
+
*/[_core.uniffiTypeNameSymbol]="WalletNotification";tag=WalletNotification_Tags.MovementCreated;constructor(inner){super("WalletNotification","MovementCreated");this.inner=Object.freeze(inner);}static new(inner){return new MovementCreated_(inner);}static instanceOf(obj){return obj.tag===WalletNotification_Tags.MovementCreated;}}/**
|
|
934
|
+
* An existing movement was updated
|
|
935
|
+
*/class MovementUpdated_ extends _core.UniffiEnum{/**
|
|
936
|
+
* @private
|
|
937
|
+
* This field is private and should not be used, use `tag` instead.
|
|
938
|
+
*/[_core.uniffiTypeNameSymbol]="WalletNotification";tag=WalletNotification_Tags.MovementUpdated;constructor(inner){super("WalletNotification","MovementUpdated");this.inner=Object.freeze(inner);}static new(inner){return new MovementUpdated_(inner);}static instanceOf(obj){return obj.tag===WalletNotification_Tags.MovementUpdated;}}/**
|
|
939
|
+
* The notification channel is lagging (notifications were dropped)
|
|
940
|
+
*/class ChannelLagging_ extends _core.UniffiEnum{/**
|
|
941
|
+
* @private
|
|
942
|
+
* This field is private and should not be used, use `tag` instead.
|
|
943
|
+
*/[_core.uniffiTypeNameSymbol]="WalletNotification";tag=WalletNotification_Tags.ChannelLagging;constructor(){super("WalletNotification","ChannelLagging");}static new(){return new ChannelLagging_();}static instanceOf(obj){return obj.tag===WalletNotification_Tags.ChannelLagging;}}function instanceOf(obj){return obj[_core.uniffiTypeNameSymbol]==="WalletNotification";}return Object.freeze({instanceOf,MovementCreated:MovementCreated_,MovementUpdated:MovementUpdated_,ChannelLagging:ChannelLagging_});})();/**
|
|
718
944
|
* A notification event from the wallet
|
|
719
945
|
*/// FfiConverter for enum WalletNotification
|
|
720
946
|
const FfiConverterTypeWalletNotification=(()=>{class FFIConverter extends _core.AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new WalletNotification.MovementCreated({movement:FfiConverterTypeMovement.readFromCursor(c)});case 2:return new WalletNotification.MovementUpdated({movement:FfiConverterTypeMovement.readFromCursor(c)});case 3:return new WalletNotification.ChannelLagging();default:throw new _core.UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case WalletNotification_Tags.MovementCreated:{c.writeI32(1);const inner=value.inner;FfiConverterTypeMovement.writeIntoCursor(inner.movement,c);return;}case WalletNotification_Tags.MovementUpdated:{c.writeI32(2);const inner=value.inner;FfiConverterTypeMovement.writeIntoCursor(inner.movement,c);return;}case WalletNotification_Tags.ChannelLagging:{c.writeI32(3);return;}default:// Throwing from here means that WalletNotification_Tags hasn't matched an ordinal.
|
|
@@ -746,83 +972,87 @@ FfiConverterTypeBarkLogger.drop(uniffiHandle);},uniffi_clone:uniffiHandle=>{retu
|
|
|
746
972
|
* Foreign languages implement this trait to provide their own wallet functionality.
|
|
747
973
|
*/class CustomOnchainWalletCallbacksImpl extends _core.UniffiAbstractObject{[_core.uniffiTypeNameSymbol]="CustomOnchainWalletCallbacksImpl";// No primary constructor declared for this class.
|
|
748
974
|
constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core.destructorGuardSymbol]=uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.bless(pointer);}/**
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
975
|
+
* Get the wallet balance in satoshis
|
|
976
|
+
*
|
|
977
|
+
* An error falls back to the last value this returned, or 0 if none yet.
|
|
978
|
+
*/getBalance()/*throws*/{return _core.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_get_balance(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
979
|
+
* Prepare a transaction to send to given destinations
|
|
980
|
+
*
|
|
981
|
+
* # Arguments
|
|
982
|
+
* * `destinations` - List of destinations with addresses and amounts
|
|
983
|
+
* * `fee_rate_sat_per_vb` - Fee rate in sats per vbyte
|
|
984
|
+
*
|
|
985
|
+
* # Returns
|
|
986
|
+
* Base64-encoded PSBT. Rejected unless it pays every destination the
|
|
987
|
+
* exact amount asked for; extra outputs (change) are fine.
|
|
988
|
+
*/prepareTx(destinations,feeRateSatPerVb)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_prepare_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterSequenceTypeDestination.lower(destinations,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(feeRateSatPerVb,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
989
|
+
* Prepare a transaction that drains the wallet to a single address
|
|
990
|
+
*
|
|
991
|
+
* # Arguments
|
|
992
|
+
* * `address` - Bitcoin address to drain to
|
|
993
|
+
* * `fee_rate_sat_per_vb` - Fee rate in sats per vbyte
|
|
994
|
+
*
|
|
995
|
+
* # Returns
|
|
996
|
+
* Base64-encoded PSBT. Rejected unless every output pays `address`.
|
|
997
|
+
*/prepareDrainTx(address,feeRateSatPerVb)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_prepare_drain_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(address,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(feeRateSatPerVb,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
998
|
+
* Sign and finalize a PSBT, without recording the transaction
|
|
999
|
+
*
|
|
1000
|
+
* The wallet must not treat the transaction as spent yet: a board that
|
|
1001
|
+
* fails after signing has to leave the wallet untouched. Once the
|
|
1002
|
+
* transaction is broadcast, Bark reports it through `register_tx`.
|
|
1003
|
+
*
|
|
1004
|
+
* # Arguments
|
|
1005
|
+
* * `psbt_base64` - Base64-encoded PSBT
|
|
1006
|
+
*
|
|
1007
|
+
* # Returns
|
|
1008
|
+
* Base64-encoded fully signed PSBT (all witnesses filled in). Rejected
|
|
1009
|
+
* unless the unsigned transaction is unchanged.
|
|
1010
|
+
*/signPsbt(psbtBase64)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_sign_psbt(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(psbtBase64,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
1011
|
+
* Whether a script pubkey belongs to the wallet's keychains
|
|
1012
|
+
*
|
|
1013
|
+
* # Arguments
|
|
1014
|
+
* * `script_pubkey_hex` - Hex-encoded script pubkey
|
|
1015
|
+
*/isMine(scriptPubkeyHex)/*throws*/{return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_is_mine(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(scriptPubkeyHex,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
1016
|
+
* Register an unconfirmed transaction relevant to the wallet
|
|
1017
|
+
*
|
|
1018
|
+
* # Arguments
|
|
1019
|
+
* * `tx_hex` - Hex-encoded transaction
|
|
1020
|
+
*/registerTx(txHex)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_register_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(txHex,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1021
|
+
* Mark a wallet-known transaction as evicted from the mempool
|
|
1022
|
+
*
|
|
1023
|
+
* Bark calls this when a CPFP it broadcast was RBF-replaced by a competing
|
|
1024
|
+
* party, so the tx's inputs should return to coin selection immediately
|
|
1025
|
+
* instead of waiting for the sync eviction grace period. Only ever called
|
|
1026
|
+
* for a tx that has definitively been superseded on-chain.
|
|
1027
|
+
*
|
|
1028
|
+
* # Arguments
|
|
1029
|
+
* * `txid` - Hex-encoded transaction id
|
|
1030
|
+
*/evictTx(txid)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_evict_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(txid,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1031
|
+
* Create a signed P2A CPFP transaction
|
|
1032
|
+
*
|
|
1033
|
+
* # Arguments
|
|
1034
|
+
* * `params` - CPFP transaction parameters
|
|
1035
|
+
*
|
|
1036
|
+
* # Returns
|
|
1037
|
+
* Hex-encoded signed CPFP transaction. Rejected unless it spends the
|
|
1038
|
+
* parent it was given.
|
|
1039
|
+
*/makeSignedP2aCpfp(params)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_make_signed_p2a_cpfp(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterTypeCpfpParams.lower(params,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
1040
|
+
* Store a signed P2A CPFP transaction in the wallet
|
|
1041
|
+
*
|
|
1042
|
+
* # Arguments
|
|
1043
|
+
* * `tx_hex` - Hex-encoded transaction
|
|
1044
|
+
*/storeSignedP2aCpfp(txHex)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_store_signed_p2a_cpfp(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(txHex,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1045
|
+
* Sync the wallet with the chain.
|
|
1046
|
+
*
|
|
1047
|
+
* Called by Bark (e.g. the background daemon) to ask the wallet to refresh
|
|
1048
|
+
* its view of the chain before reading balances or building transactions.
|
|
1049
|
+
* Implementations bring their own chain backend up to date — Bark's chain
|
|
1050
|
+
* source is intentionally not passed across the FFI boundary.
|
|
1051
|
+
*/sync()/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_sync(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}uniffiDestroy(){const ptr=this[_core.destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.pointer(this);uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.freePointer(pointer);uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.unbless(ptr);delete this[_core.destructorGuardSymbol];}}static instanceOf(obj_){return uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.isConcreteType(obj_);}}exports.CustomOnchainWalletCallbacksImpl=CustomOnchainWalletCallbacksImpl;const uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(CustomOnchainWalletCallbacksImpl.prototype);instance[_core.pointerLiteralSymbol]=pointer;instance[_core.destructorGuardSymbol]=this.bless(pointer);instance[_core.uniffiTypeNameSymbol]="CustomOnchainWalletCallbacksImpl";return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>(0,_barkFfi.default)().ubrn_uniffi_internal_fn_method_customonchainwalletcallbacks_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr_){ptr_.markDestroyed();},pointer(obj_){if(obj_[_core.destructorGuardSymbol]===undefined){throw new _core.UniffiInternalError.UnexpectedNullPointer();}return obj_[_core.pointerLiteralSymbol];},clonePointer(obj_){const pointer=this.pointer(obj_);return uniffiCaller.rustCall(/*caller:*/callStatus=>(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_clone_customonchainwalletcallbacks(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_free_customonchainwalletcallbacks(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj_){return obj_[_core.destructorGuardSymbol]&&obj_[_core.uniffiTypeNameSymbol]==="CustomOnchainWalletCallbacksImpl";}};})();const FfiConverterTypeCustomOnchainWalletCallbacks=new _core.FfiConverterObjectWithCallbacks(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory);// Add a vtable for the callbacks that go in CustomOnchainWalletCallbacks.
|
|
822
1052
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
823
1053
|
const uniffiCallbackInterfaceCustomOnchainWalletCallbacks={// Create the VTable using a series of closures.
|
|
824
1054
|
// ts automatically converts these into C callback functions.
|
|
825
|
-
vtable:{get_balance:uniffiHandle=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.getBalance();};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,_core.FfiConverterUInt64.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},prepare_tx:(uniffiHandle,destinations,feeRateSatPerVb)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.prepareTx(FfiConverterSequenceTypeDestination.lift(destinations),_core.FfiConverterUInt64.lift(feeRateSatPerVb));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,FfiConverterString.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},prepare_drain_tx:(uniffiHandle,address,feeRateSatPerVb)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.prepareDrainTx(FfiConverterString.lift(address),_core.FfiConverterUInt64.lift(feeRateSatPerVb));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,FfiConverterString.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},
|
|
1055
|
+
vtable:{get_balance:uniffiHandle=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.getBalance();};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,_core.FfiConverterUInt64.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},prepare_tx:(uniffiHandle,destinations,feeRateSatPerVb)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.prepareTx(FfiConverterSequenceTypeDestination.lift(destinations),_core.FfiConverterUInt64.lift(feeRateSatPerVb));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,FfiConverterString.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},prepare_drain_tx:(uniffiHandle,address,feeRateSatPerVb)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.prepareDrainTx(FfiConverterString.lift(address),_core.FfiConverterUInt64.lift(feeRateSatPerVb));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,FfiConverterString.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},sign_psbt:(uniffiHandle,psbtBase64)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.signPsbt(FfiConverterString.lift(psbtBase64));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,FfiConverterString.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},is_mine:(uniffiHandle,scriptPubkeyHex)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.isMine(FfiConverterString.lift(scriptPubkeyHex));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,_core.FfiConverterBool.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},register_tx:(uniffiHandle,txHex)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.registerTx(FfiConverterString.lift(txHex));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},evict_tx:(uniffiHandle,txid)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.evictTx(FfiConverterString.lift(txid));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},make_signed_p2a_cpfp:(uniffiHandle,params)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.makeSignedP2aCpfp(FfiConverterTypeCpfpParams.lift(params));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{_core.UniffiResult.writeSuccess(uniffiResult,FfiConverterString.lower(obj,(0,_barkFfi.default)().rustbuffer_alloc));};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},store_signed_p2a_cpfp:(uniffiHandle,txHex)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.storeSignedP2aCpfp(FfiConverterString.lift(txHex));};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},sync:uniffiHandle=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);return jsCallback.sync();};const uniffiResult=_core.UniffiResult.ready();const uniffiHandleSuccess=obj=>{};const uniffiHandleError=(code,errBuf)=>{_core.UniffiResult.writeError(uniffiResult,code,errBuf);};(0,_core.uniffiTraitInterfaceCallWithError)(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/Exception.instanceOf,/*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError),/*lowerString:*/FfiConverterString.lower.bind(FfiConverterString),/*alloc:*/(0,_barkFfi.default)().rustbuffer_alloc);return uniffiResult;},uniffi_free:uniffiHandle=>{// this will throw a stale handle error if the handle isn't found.
|
|
826
1056
|
FfiConverterTypeCustomOnchainWalletCallbacks.drop(uniffiHandle);},uniffi_clone:uniffiHandle=>{return FfiConverterTypeCustomOnchainWalletCallbacks.clone(uniffiHandle);}},register:()=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_init_callback_vtable_customonchainwalletcallbacks(uniffiCallbackInterfaceCustomOnchainWalletCallbacks.vtable);}};/**
|
|
827
1057
|
* Pull-based notification handle exposed over FFI.
|
|
828
1058
|
*
|
|
@@ -853,27 +1083,27 @@ FfiConverterTypeCustomOnchainWalletCallbacks.drop(uniffiHandle);},uniffi_clone:u
|
|
|
853
1083
|
* `None` immediately.
|
|
854
1084
|
*/class NotificationHolder extends _core.UniffiAbstractObject{[_core.uniffiTypeNameSymbol]="NotificationHolder";// No primary constructor declared for this class.
|
|
855
1085
|
constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core.destructorGuardSymbol]=uniffiTypeNotificationHolderObjectFactory.bless(pointer);}/**
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1086
|
+
* Cancel the currently pending `next_notification()` wait.
|
|
1087
|
+
*
|
|
1088
|
+
* Causes a blocked `next_notification()` to return `None`.
|
|
1089
|
+
* Has no effect if no wait is currently active.
|
|
1090
|
+
*
|
|
1091
|
+
* This does NOT destroy the underlying `NotificationStream`; a subsequent
|
|
1092
|
+
* call to `next_notification()` will work normally and wait for new events.
|
|
1093
|
+
*/cancelNextNotificationWait(){uniffiCaller.rustCall(/*caller:*/callStatus=>{(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_notificationholder_cancel_next_notification_wait(uniffiTypeNotificationHolderObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1094
|
+
* Wait for the next wallet notification.
|
|
1095
|
+
*
|
|
1096
|
+
* Returns `None` when:
|
|
1097
|
+
* - `cancel_next_notification_wait()` was called while this was pending
|
|
1098
|
+
* (cancellation only affects the current wait; the stream lives on)
|
|
1099
|
+
* - The wallet's notification source was shut down permanently
|
|
1100
|
+
*
|
|
1101
|
+
* Returns an error if called concurrently on the same holder.
|
|
1102
|
+
*
|
|
1103
|
+
* After a cancellation this method can be called again normally — the
|
|
1104
|
+
* underlying `NotificationStream` is preserved in `self.stream` and a
|
|
1105
|
+
* fresh per-wait cancel channel is created on every entry.
|
|
1106
|
+
*/async nextNotification(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_notificationholder_next_notification(uniffiTypeNotificationHolderObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
877
1107
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
878
1108
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
879
1109
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -905,14 +1135,14 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
905
1135
|
* - Callback onchain dispatch
|
|
906
1136
|
*/class Wallet extends _core.UniffiAbstractObject{[_core.uniffiTypeNameSymbol]="Wallet";// No primary constructor declared for this class.
|
|
907
1137
|
constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core.destructorGuardSymbol]=uniffiTypeWalletObjectFactory.bless(pointer);}/**
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
1138
|
+
* Open a wallet (creating it first if `create_if_not_exists` is set),
|
|
1139
|
+
* mirroring [`bark::Wallet::open`]: a single entry point with everything
|
|
1140
|
+
* else optional (see [`WalletOpenArgs`]). For the explicit
|
|
1141
|
+
* initialize-but-don't-open path, use the top-level `init_wallet`.
|
|
1142
|
+
*
|
|
1143
|
+
* `mnemonic_or_seed` accepts either a BIP-39 mnemonic phrase or a 64-byte
|
|
1144
|
+
* hex-encoded seed.
|
|
1145
|
+
*/static async open(network,mnemonicOrSeed,config,args,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_constructor_wallet_open(FfiConverterTypeNetwork.lower(network,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterString.lower(mnemonicOrSeed,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterTypeConfig.lower(config,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterTypeWalletOpenArgs.lower(args,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_u64,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_u64,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_u64,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_u64,// Async returns always go through the JS-side converter: the
|
|
916
1146
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
917
1147
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
918
1148
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -934,8 +1164,8 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
934
1164
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
935
1165
|
// already JS-owned.
|
|
936
1166
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeVtxo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
937
|
-
|
|
938
|
-
|
|
1167
|
+
* Opt one stuck send into auto-exiting its HTLCs as they near expiry.
|
|
1168
|
+
*/async allowLightningSendToExit(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_allow_lightning_send_to_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async arkInfo(asyncOpts_){const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_ark_info(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
939
1169
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
940
1170
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
941
1171
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -944,8 +1174,31 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
944
1174
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
945
1175
|
// already JS-owned.
|
|
946
1176
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeArkInfo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_);}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
947
|
-
|
|
948
|
-
|
|
1177
|
+
* Force-exit an unfinished lightning receive.
|
|
1178
|
+
*/async attemptLightningReceiveExit(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_attempt_lightning_receive_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async balance(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_balance(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1179
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1180
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1181
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1182
|
+
// here using the per-callable return-type converter.
|
|
1183
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1184
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1185
|
+
// already JS-owned.
|
|
1186
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeBalance.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1187
|
+
* The numbers to show a user, without the breakdown of `balance`: what
|
|
1188
|
+
* they can spend, what needs a refresh, what is pending and the total.
|
|
1189
|
+
*/async balanceSummary(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_balance_summary(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1190
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1191
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1192
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1193
|
+
// here using the per-callable return-type converter.
|
|
1194
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1195
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1196
|
+
// already JS-owned.
|
|
1197
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeBalanceSummary.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1198
|
+
* Build a BIP 321 `bitcoin:` URI with a new Ark address, a new BOLT11
|
|
1199
|
+
* invoice (when there is an amount) and the caller's onchain address,
|
|
1200
|
+
* as `options` selects.
|
|
1201
|
+
*/async bip321Uri(options,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_bip321_uri(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterTypeBip321UriOptions.lower(options,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
949
1202
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
950
1203
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
951
1204
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -953,7 +1206,7 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
953
1206
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
954
1207
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
955
1208
|
// already JS-owned.
|
|
956
|
-
/*liftFunc:*/__rb=>{try{return
|
|
1209
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeBip321Uri.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async boardAll(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_board_all(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
957
1210
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
958
1211
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
959
1212
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -994,21 +1247,21 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
994
1247
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
995
1248
|
// already JS-owned.
|
|
996
1249
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningInvoice.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1250
|
+
* Create an invoice whose claimed VTXO is delivered to `claim_destination`
|
|
1251
|
+
* (an Ark address), letting that wallet receive while offline.
|
|
1252
|
+
*
|
|
1253
|
+
* The claim is signed directly to that address's own policy, so this wallet
|
|
1254
|
+
* has no custodial control and cannot redirect the payment. It can still
|
|
1255
|
+
* strand it: delivering the signed output to the destination's mailbox is a
|
|
1256
|
+
* separate step only this wallet can perform, and the recipient has no
|
|
1257
|
+
* independent way to recover the funds until it happens. Delivery resumes
|
|
1258
|
+
* automatically on restart, so a crash recovers on its own — but running
|
|
1259
|
+
* this for someone else means they trust you to stay online and eventually
|
|
1260
|
+
* deliver, not that they trust you with custody.
|
|
1261
|
+
*
|
|
1262
|
+
* A `claim_destination` owned by this wallet is claimed locally instead of
|
|
1263
|
+
* going through its mailbox.
|
|
1264
|
+
*/async bolt11InvoiceForAddress(amountSats,claimDestination,description=undefined,token=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_bolt11_invoice_for_address(uniffiTypeWalletObjectFactory.clonePointer(this),_core.FfiConverterUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterString.lower(claimDestination,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalString.lower(description,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalString.lower(token,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1012
1265
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1013
1266
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1014
1267
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1025,12 +1278,12 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1025
1278
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1026
1279
|
// already JS-owned.
|
|
1027
1280
|
/*liftFunc:*/__rb=>{try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async cancelAllPendingRounds(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_all_pending_rounds(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1281
|
+
* Cancel a unilateral exit still in its abortable window.
|
|
1282
|
+
*
|
|
1283
|
+
* The VTXO stays spendable either way, and a lock you took yourself is
|
|
1284
|
+
* yours to release. Expected refusals come back in the result rather than
|
|
1285
|
+
* as an error, and cancelling twice succeeds.
|
|
1286
|
+
*/async cancelExit(vtxoId,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoId,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1034
1287
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1035
1288
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1036
1289
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1060,12 +1313,23 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1060
1313
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1061
1314
|
// already JS-owned.
|
|
1062
1315
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeConfig.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_);}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1316
|
+
* The network, mailbox id and VTXO xpub, as `bark debug-info` prints
|
|
1317
|
+
* them. Users can share this in support requests.
|
|
1318
|
+
*/async debugInfo(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_debug_info(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1319
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1320
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1321
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1322
|
+
// here using the per-callable return-type converter.
|
|
1323
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1324
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1325
|
+
// already JS-owned.
|
|
1326
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeDebugInfo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1327
|
+
* Build a PSBT claiming exited VTXOs to `address`.
|
|
1328
|
+
*
|
|
1329
|
+
* Draining everything must be asked for with `drain_all`, so an id list
|
|
1330
|
+
* filtered down to nothing is an error rather than a sweep. Ids are parsed
|
|
1331
|
+
* all-or-nothing; well-formed ids that are not claimable are skipped.
|
|
1332
|
+
*/async drainExits(vtxoIds,drainAll=false,address,feeRateSatPerVb,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_drain_exits(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(drainAll,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterString.lower(address,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(feeRateSatPerVb,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1069
1333
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1070
1334
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1071
1335
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1090,19 +1354,20 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1090
1354
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1091
1355
|
// already JS-owned.
|
|
1092
1356
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1357
|
+
* Estimate the onchain cost of unilaterally (emergency) exiting VTXOs.
|
|
1358
|
+
* Mirrors bark-rest `GET /exits/fee`.
|
|
1359
|
+
*
|
|
1360
|
+
* Pass an empty `vtxo_ids` to price exiting the whole wallet (every
|
|
1361
|
+
* spendable VTXO). `fee_rate_sat_per_vb` applies to both legs; omit it to
|
|
1362
|
+
* use the chain's fast rate for the broadcast leg and regular rate for
|
|
1363
|
+
* the claim leg. `destination` only affects the claim transaction's weight.
|
|
1364
|
+
* `fee_margin` scales the broadcast leg (finite and non-negative; default
|
|
1365
|
+
* 1.2).
|
|
1366
|
+
*
|
|
1367
|
+
* The estimate never reads the onchain wallet, so it works before the
|
|
1368
|
+
* wallet holds funds and with callback wallets
|
|
1369
|
+
* (`CustomOnchainWalletCallbacks`) too.
|
|
1370
|
+
*/async estimateEmergencyExitFee(vtxoIds,feeRateSatPerVb,destination,feeMargin=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_emergency_exit_fee(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(feeRateSatPerVb,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalString.lower(destination,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalFloat64.lower(feeMargin,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1106
1371
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1107
1372
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1108
1373
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1142,6 +1407,16 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1142
1407
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1143
1408
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1144
1409
|
// already JS-owned.
|
|
1410
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1411
|
+
* Estimate the fee of paying `amount_sats` to `method`.
|
|
1412
|
+
*/async estimatePaymentFee(method,amountSats,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_payment_fee(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterTypePaymentMethod.lower(method,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1413
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1414
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1415
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1416
|
+
// here using the per-callable return-type converter.
|
|
1417
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1418
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1419
|
+
// already JS-owned.
|
|
1145
1420
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async estimateRefreshFee(vtxoIds,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1146
1421
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1147
1422
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
@@ -1158,7 +1433,10 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1158
1433
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1159
1434
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1160
1435
|
// already JS-owned.
|
|
1161
|
-
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}fingerprint(){const __rb=uniffiCaller.rustCall(/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_fingerprint(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}
|
|
1436
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}fingerprint(){const __rb=uniffiCaller.rustCall(/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_fingerprint(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
1437
|
+
* Status of one exit, live or finished. `None` if no exit was ever
|
|
1438
|
+
* started for the VTXO.
|
|
1439
|
+
*/async getExitStatus(vtxoId,includeHistory,includeTransactions,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_exit_status(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoId,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(includeHistory,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(includeTransactions,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1162
1440
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1163
1441
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1164
1442
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1166,7 +1444,10 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1166
1444
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1167
1445
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1168
1446
|
// already JS-owned.
|
|
1169
|
-
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeExitTransactionStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}
|
|
1447
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeExitTransactionStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1448
|
+
* Live exits only. Finished exits leave this list; see
|
|
1449
|
+
* `list_finished_exits` and `get_exit_status`.
|
|
1450
|
+
*/async getExitVtxos(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_get_exit_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1170
1451
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1171
1452
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1172
1453
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1236,25 +1517,25 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1236
1517
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1237
1518
|
// already JS-owned.
|
|
1238
1519
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeMovement.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1520
|
+
* Import a VTXO from its serialized form (hex or base64).
|
|
1521
|
+
*
|
|
1522
|
+
* The VTXO is stored in the state the server reports for it, so one that
|
|
1523
|
+
* was already spent is recorded as spent rather than refused. Pass `args`
|
|
1524
|
+
* to widen the key-scan gap limit, skip the server status check, or allow
|
|
1525
|
+
* partial success; omit it for the defaults.
|
|
1526
|
+
*
|
|
1527
|
+
* The first parameter keeps its historical `vtxo_base64` name for foreign
|
|
1528
|
+
* binding compatibility (uniffi exposes parameter names), but hex as
|
|
1529
|
+
* returned by [`Wallet::vtxo_encoded`] is accepted too.
|
|
1530
|
+
*/async importVtxo(vtxoBase64,args=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxo(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoBase64,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalTypeImportVtxoArgs.lower(args,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1531
|
+
* Import several VTXOs (hex or base64) under a single key scan and a
|
|
1532
|
+
* single write, which is why this is not just a loop over `import_vtxo`.
|
|
1533
|
+
*
|
|
1534
|
+
* Returns the ids now held — whether this call stored them or found them
|
|
1535
|
+
* already present — so a failed batch can be retried. One VTXO that cannot
|
|
1536
|
+
* be imported discards the whole batch unless `args.allow_partial` is set,
|
|
1537
|
+
* in which case the ones that did import are kept.
|
|
1538
|
+
*/async importVtxos(encodedVtxos,args=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(encodedVtxos,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalTypeImportVtxoArgs.lower(args,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1258
1539
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1259
1540
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1260
1541
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1263,17 +1544,17 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1263
1544
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1264
1545
|
// already JS-owned.
|
|
1265
1546
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1547
|
+
* Cheap "has this invoice ever been paid?", answered from the local fact
|
|
1548
|
+
* table without consulting the server.
|
|
1549
|
+
*/async isInvoicePaid(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_i8,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_i8,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_i8,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_i8,// Async returns always go through the JS-side converter: the
|
|
1269
1550
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1270
1551
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1271
1552
|
// export. The bytes the runtime hands back must be deserialized
|
|
1272
1553
|
// here using the per-callable return-type converter.
|
|
1273
1554
|
/*liftFunc:*/_core.FfiConverterBool.lift.bind(_core.FfiConverterBool),/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1555
|
+
* Triage a payment hash: settled or in-progress. Errors if no lightning
|
|
1556
|
+
* receive is known for this payment hash.
|
|
1557
|
+
*/async lightningReceiveState(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_receive_state(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1277
1558
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1278
1559
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1279
1560
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1282,9 +1563,19 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1282
1563
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1283
1564
|
// already JS-owned.
|
|
1284
1565
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningReceive.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1566
|
+
* Read-only triage, for polling after a send started with `wait = false`.
|
|
1567
|
+
* Unlike `checkLightningPayment`, never advances the action.
|
|
1568
|
+
*/async lightningSendState(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_send_state(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1569
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1570
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1571
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1572
|
+
// here using the per-callable return-type converter.
|
|
1573
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1574
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1575
|
+
// already JS-owned.
|
|
1576
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1577
|
+
* Status of every exit this wallet ever started, live and finished.
|
|
1578
|
+
*/async listAllExits(includeHistory=false,includeTransactions=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_list_all_exits(uniffiTypeWalletObjectFactory.clonePointer(this),_core.FfiConverterBool.lower(includeHistory,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(includeTransactions,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1288
1579
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1289
1580
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1290
1581
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1292,7 +1583,7 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1292
1583
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1293
1584
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1294
1585
|
// already JS-owned.
|
|
1295
|
-
/*liftFunc:*/__rb=>{try{return
|
|
1586
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitTransactionStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async listClaimableExits(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_list_claimable_exits(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1296
1587
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1297
1588
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1298
1589
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1301,18 +1592,40 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1301
1592
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1302
1593
|
// already JS-owned.
|
|
1303
1594
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitVtxo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1595
|
+
* Status of the exits in a terminal state: claimed, canceled, or aborted
|
|
1596
|
+
* because the VTXO was already spent or swept. They stay queryable after
|
|
1597
|
+
* completion, so a client need not snapshot them at drain time.
|
|
1598
|
+
*/async listFinishedExits(includeHistory=false,includeTransactions=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_list_finished_exits(uniffiTypeWalletObjectFactory.clonePointer(this),_core.FfiConverterBool.lower(includeHistory,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(includeTransactions,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1599
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1600
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1601
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1602
|
+
// here using the per-callable return-type converter.
|
|
1603
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1604
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1605
|
+
// already JS-owned.
|
|
1606
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitTransactionStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1607
|
+
* Status of the exits that are still progressing.
|
|
1608
|
+
*/async listLiveExits(includeHistory=false,includeTransactions=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_list_live_exits(uniffiTypeWalletObjectFactory.clonePointer(this),_core.FfiConverterBool.lower(includeHistory,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(includeTransactions,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1609
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1610
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1611
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1612
|
+
// here using the per-callable return-type converter.
|
|
1613
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1614
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1615
|
+
// already JS-owned.
|
|
1616
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitTransactionStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1617
|
+
* Reserve VTXOs so wallet-driven flows leave them alone: a locked VTXO is
|
|
1618
|
+
* excluded from coin selection.
|
|
1619
|
+
*
|
|
1620
|
+
* `holder` is what `unlockVtxos` matches on to stop one subsystem
|
|
1621
|
+
* releasing another's lock. Atomic, and re-locking with the same holder
|
|
1622
|
+
* is a no-op.
|
|
1623
|
+
*/async lockVtxos(vtxoIds,holder,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_lock_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalTypeVtxoLockHolder.lower(holder,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1624
|
+
* Create a hex-encoded authorization that lets whoever holds it read this
|
|
1625
|
+
* wallet's mailbox from the Ark server for `expiry_secs` from now, so 86400
|
|
1626
|
+
* for 24 hours. An authorization cannot be revoked early, so keep the
|
|
1627
|
+
* window short.
|
|
1628
|
+
*/mailboxAuthorization(expirySecs)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_mailbox_authorization(uniffiTypeWalletObjectFactory.clonePointer(this),_core.FfiConverterUInt32.lower(expirySecs,(0,_barkFfi.default)().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}mailboxIdentifier()/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_mailbox_identifier(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}async maintenance(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async maintenanceDelegated(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_delegated(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async maintenanceRefresh(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_refresh(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1316
1629
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1317
1630
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1318
1631
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1366,8 +1679,27 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1366
1679
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1367
1680
|
// already JS-owned.
|
|
1368
1681
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeOffboardResult.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1369
|
-
|
|
1370
|
-
|
|
1682
|
+
* Parse any payment string bark understands: a BIP 321 `bitcoin:` URI, a
|
|
1683
|
+
* `lightning:` URI (any case), a BOLT11 invoice, a BOLT12 offer, a
|
|
1684
|
+
* lightning address, an LNURL-pay link or LUD-17 `lnurlp://` URI, an Ark
|
|
1685
|
+
* address, a bitcoin address or a hex output script. Surrounding
|
|
1686
|
+
* whitespace is not trimmed.
|
|
1687
|
+
*
|
|
1688
|
+
* Problems with a single option (wrong network, an Ark address of
|
|
1689
|
+
* another server, an amount mismatch) are reported in that option's
|
|
1690
|
+
* `errors`. Errors only when nothing in the string can be paid at all.
|
|
1691
|
+
* Checking an Ark address needs a server connection.
|
|
1692
|
+
*/async parsePaymentRequest(payment,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_parse_payment_request(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(payment,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1693
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1694
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1695
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1696
|
+
// here using the per-callable return-type converter.
|
|
1697
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1698
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1699
|
+
// already JS-owned.
|
|
1700
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypePaymentRequest.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1701
|
+
* Pay to a Lightning Address (`user@domain`), resolved via LNURL-pay.
|
|
1702
|
+
*/async payLightningAddress(lightningAddress,amountSats,comment,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(lightningAddress,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalString.lower(comment,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1371
1703
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1372
1704
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1373
1705
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1375,7 +1707,13 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1375
1707
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1376
1708
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1377
1709
|
// already JS-owned.
|
|
1378
|
-
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}
|
|
1710
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1711
|
+
* Pay a BOLT11 invoice.
|
|
1712
|
+
*
|
|
1713
|
+
* `retry_for_secs` is how long the Ark server keeps trying to pay,
|
|
1714
|
+
* capped to the server's maximum; `None` leaves it to the server and 0
|
|
1715
|
+
* makes a single attempt. The same holds for every `pay_*` method.
|
|
1716
|
+
*/async payLightningInvoice(invoice,amountSats,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(invoice,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1379
1717
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1380
1718
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1381
1719
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1383,7 +1721,7 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1383
1721
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1384
1722
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1385
1723
|
// already JS-owned.
|
|
1386
|
-
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async payLightningOffer(offer,amountSats,wait=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(offer,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1724
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async payLightningOffer(offer,amountSats,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(offer,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1387
1725
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1388
1726
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1389
1727
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1392,11 +1730,11 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1392
1730
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1393
1731
|
// already JS-owned.
|
|
1394
1732
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1733
|
+
* Pay a raw LNURL-pay link (`lnurl1…`).
|
|
1734
|
+
*
|
|
1735
|
+
* Resolves the LNURL-pay endpoint to a BOLT11 invoice and pays it. Errors
|
|
1736
|
+
* if the link decodes to a non-pay LNURL (auth, withdraw, channel).
|
|
1737
|
+
*/async payLnurl(lnurl,amountSats,comment,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lnurl(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(lnurl,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalString.lower(comment,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1400
1738
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1401
1739
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1402
1740
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1490,14 +1828,14 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1490
1828
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1491
1829
|
// already JS-owned.
|
|
1492
1830
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeWalletProperties.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1831
|
+
* Recover the given VTXO ids from the server, importing the ones this
|
|
1832
|
+
* wallet owns that are still spendable. Use it to retry ids a previous
|
|
1833
|
+
* scan reported as `failed`.
|
|
1834
|
+
*
|
|
1835
|
+
* `gap_limit` overrides `Config.vtxo_key_gap_limit` for the key scan that
|
|
1836
|
+
* decides which of `vtxo_ids` this wallet owns. Widen it to reach ids a
|
|
1837
|
+
* previous scan bucketed as `foreign`.
|
|
1838
|
+
*/async recoverVtxos(vtxoIds,gapLimit=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_recover_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt32.lower(gapLimit,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1501
1839
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1502
1840
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1503
1841
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1506,20 +1844,20 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1506
1844
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1507
1845
|
// already JS-owned.
|
|
1508
1846
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeRecoveryReport.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1847
|
+
* The report of the seed-recovery scan that ran during `Wallet::open`, or
|
|
1848
|
+
* none if the scan did not complete. Use `recovery_status` to tell a scan
|
|
1849
|
+
* that failed apart from one that never ran.
|
|
1850
|
+
*/recoveryReport(){const __rb=uniffiCaller.rustCall(/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_report(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterOptionalTypeRecoveryReport.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}/**
|
|
1851
|
+
* Outcome of the seed-recovery scan that ran during `Wallet::open`.
|
|
1852
|
+
*
|
|
1853
|
+
* Recovery only runs on the open that creates the wallet locally, and not
|
|
1854
|
+
* at all when `WalletOpenArgs.skip_recovery` is set, so this is `NotRun`
|
|
1855
|
+
* on every subsequent open. `Failed` means the scan errored before
|
|
1856
|
+
* producing a report — bark logs that and lets open succeed — so funds
|
|
1857
|
+
* may be missing until a retry; `Completed` carries the report, and
|
|
1858
|
+
* `isComplete == false` there means funds may still be missing. Retry the
|
|
1859
|
+
* report's `failed` ids with `recoverVtxos`.
|
|
1860
|
+
*/recoveryStatus(){const __rb=uniffiCaller.rustCall(/*caller:*/callStatus=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_status(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterTypeRecoveryStatus.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}}async refreshServer(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_server(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async refreshVtxos(vtxoIds,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1523
1861
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1524
1862
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1525
1863
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1536,11 +1874,11 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1536
1874
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1537
1875
|
// already JS-owned.
|
|
1538
1876
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeRoundState.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1877
|
+
* Schedule a delegated refresh for `scheduled_height` instead of the next
|
|
1878
|
+
* round. The refresh fee is priced against the VTXO's remaining lifetime at
|
|
1879
|
+
* that height, and the server charges less the closer a VTXO is to expiry,
|
|
1880
|
+
* so scheduling further out never costs more than refreshing now.
|
|
1881
|
+
*/async refreshVtxosScheduled(vtxoIds,scheduledHeight,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_vtxos_scheduled(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt32.lower(scheduledHeight,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1544
1882
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1545
1883
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1546
1884
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1549,14 +1887,41 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1549
1887
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1550
1888
|
// already JS-owned.
|
|
1551
1889
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeRoundState.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1890
|
+
* Start the background daemon. The onchain wallet used by the daemon is
|
|
1891
|
+
* the one supplied to `Wallet::open` (see `WalletOpenArgs.onchain`).
|
|
1892
|
+
*/async runDaemon(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_run_daemon(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1893
|
+
* Send an out-of-round payment to an Ark address.
|
|
1894
|
+
*
|
|
1895
|
+
* An address this bark cannot deliver to (see `validateArkoorAddress`) is
|
|
1896
|
+
* rejected up front, leaving the VTXOs spendable rather than cosigned.
|
|
1897
|
+
*
|
|
1898
|
+
* Returns the id of the movement that records the payment.
|
|
1899
|
+
*/async sendArkoorPayment(arkAddress,amountSats,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_send_arkoor_payment(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(arkAddress,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_u32,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_u32,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_u32,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_u32,// Async returns always go through the JS-side converter: the
|
|
1900
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1901
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1902
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1903
|
+
// here using the per-callable return-type converter.
|
|
1904
|
+
/*liftFunc:*/_core.FfiConverterUInt32.lift.bind(_core.FfiConverterUInt32),/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1905
|
+
* Send `amount_sats` from the offchain balance to an onchain address,
|
|
1906
|
+
* as an offboard. Returns the offboard txid and its movement id.
|
|
1907
|
+
*/async sendOnchain(address,amountSats,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_send_onchain(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(address,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1908
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1909
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1910
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1911
|
+
// here using the per-callable return-type converter.
|
|
1912
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1913
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1914
|
+
// already JS-owned.
|
|
1915
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeOffboardResult.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1916
|
+
* Pay `method` over the matching rail: Ark, lightning or onchain.
|
|
1917
|
+
*
|
|
1918
|
+
* `amount_sats` is required for addresses and LNURL, and for invoices
|
|
1919
|
+
* and offers without an amount (`AvailablePaymentMethod.requires_amount`).
|
|
1920
|
+
* `comment` only reaches lightning addresses and LNURL. `wait` and
|
|
1921
|
+
* `retry_for_secs` only affect lightning. `retry_for_secs` is how long
|
|
1922
|
+
* the Ark server keeps trying to pay, capped to the server's maximum;
|
|
1923
|
+
* `None` leaves it to the server and 0 makes a single attempt.
|
|
1924
|
+
*/async sendPayment(method,amountSats=undefined,comment=undefined,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_send_payment(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterTypePaymentMethod.lower(method,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(amountSats,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalString.lower(comment,(0,_barkFfi.default)().rustbuffer_alloc),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1560
1925
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1561
1926
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1562
1927
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1564,7 +1929,7 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1564
1929
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1565
1930
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1566
1931
|
// already JS-owned.
|
|
1567
|
-
/*liftFunc:*/__rb=>{try{return
|
|
1932
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypePaymentResult.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async signExitClaimInputs(psbtBase64,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sign_exit_claim_inputs(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(psbtBase64,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1568
1933
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1569
1934
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1570
1935
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1581,17 +1946,17 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1581
1946
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1582
1947
|
// already JS-owned.
|
|
1583
1948
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeVtxo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async startExitForEntireWallet(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_entire_wallet(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async startExitForVtxos(vtxoIds,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1949
|
+
* Like `startExitForVtxos`, but skips dust and standardness checks.
|
|
1950
|
+
*
|
|
1951
|
+
* Only for VTXOs already onchain, or a node that accepts non-standard
|
|
1952
|
+
* transactions; otherwise the exit transactions may be unrelayable.
|
|
1953
|
+
*/async startExitForVtxosIncludingNonStandard(vtxoIds,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos_including_non_standard(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async stopDaemon(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_stop_daemon(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1954
|
+
* Stop the background daemon and wait until its tasks have finished, so
|
|
1955
|
+
* nothing runs in the background afterwards (e.g. before deleting the
|
|
1956
|
+
* wallet's datadir). No-op when no daemon is running.
|
|
1957
|
+
*/async stopDaemonWait(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_stop_daemon_wait(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1958
|
+
* Failed lightning sends whose HTLC revocation also failed.
|
|
1959
|
+
*/async stuckFailedLightningSends(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_stuck_failed_lightning_sends(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1595
1960
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1596
1961
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1597
1962
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1600,12 +1965,12 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1600
1965
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1601
1966
|
// already JS-owned.
|
|
1602
1967
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeLightningSend.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async sync(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async syncExits(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_exits(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1968
|
+
* Scan for VTXOs that were force-exited on-chain without the user asking
|
|
1969
|
+
* and route them into the unilateral-exit flow so the funds can be claimed.
|
|
1970
|
+
*
|
|
1971
|
+
* This already runs automatically as part of [`Self::sync`]; call it
|
|
1972
|
+
* directly to trigger the scan on demand.
|
|
1973
|
+
*/async syncForceExitedVtxos(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_force_exited_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async syncPendingBoards(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_pending_boards(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async tryClaimAllLightningReceives(wait=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_try_claim_all_lightning_receives(uniffiTypeWalletObjectFactory.clonePointer(this),_core.FfiConverterBool.lower(wait,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1609
1974
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1610
1975
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1611
1976
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1622,27 +1987,27 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1622
1987
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1623
1988
|
// already JS-owned.
|
|
1624
1989
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningReceive.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1990
|
+
* Release VTXOs locked by `lockVtxos`.
|
|
1991
|
+
*
|
|
1992
|
+
* Every VTXO must currently be held by `expected_holder` or nothing is
|
|
1993
|
+
* unlocked; that is what stops cleanup freeing a VTXO a payment or
|
|
1994
|
+
* in-flight round has since claimed. Leaving it unset bypasses the guard
|
|
1995
|
+
* entirely, so reserve that for recovery.
|
|
1996
|
+
*/async unlockVtxos(vtxoIds,expectedHolder,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_unlock_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,(0,_barkFfi.default)().rustbuffer_alloc),FfiConverterOptionalTypeVtxoLockHolder.lower(expectedHolder,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1997
|
+
* Whether this wallet can pay `address` out-of-round: same network and
|
|
1998
|
+
* server, a supported VTXO policy, and only delivery mechanisms this bark
|
|
1999
|
+
* supports. An address listing no delivery mechanism is valid. Errors only
|
|
2000
|
+
* when the address does not parse.
|
|
2001
|
+
*/async validateArkoorAddress(address,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_validate_arkoor_address(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(address,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_i8,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_i8,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_i8,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_i8,// Async returns always go through the JS-side converter: the
|
|
1637
2002
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1638
2003
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1639
2004
|
// export. The bytes the runtime hands back must be deserialized
|
|
1640
2005
|
// here using the per-callable return-type converter.
|
|
1641
2006
|
/*liftFunc:*/_core.FfiConverterBool.lift.bind(_core.FfiConverterBool),/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
2007
|
+
* Hex-encoded serialization of the full VTXO (genesis chain included),
|
|
2008
|
+
* re-importable via [`Wallet::import_vtxo`]. Mirrors bark-rest
|
|
2009
|
+
* `GET /vtxos/{id}/encoded`.
|
|
2010
|
+
*/async vtxoEncoded(vtxoId,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await(0,_core.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoId,(0,_barkFfi.default)().rustbuffer_alloc));},/*pollFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/(0,_barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1646
2011
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1647
2012
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1648
2013
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1660,19 +2025,26 @@ constructor(pointer){super();this[_core.pointerLiteralSymbol]=pointer;this[_core
|
|
|
1660
2025
|
// already JS-owned.
|
|
1661
2026
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeVtxo.lift(__rb);}finally{(0,_barkFfi.default)().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}uniffiDestroy(){const ptr=this[_core.destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeWalletObjectFactory.pointer(this);uniffiTypeWalletObjectFactory.freePointer(pointer);uniffiTypeWalletObjectFactory.unbless(ptr);delete this[_core.destructorGuardSymbol];}}static instanceOf(obj_){return uniffiTypeWalletObjectFactory.isConcreteType(obj_);}}exports.Wallet=Wallet;const uniffiTypeWalletObjectFactory=(()=>{return{create(pointer){const instance=Object.create(Wallet.prototype);instance[_core.pointerLiteralSymbol]=pointer;instance[_core.destructorGuardSymbol]=this.bless(pointer);instance[_core.uniffiTypeNameSymbol]="Wallet";return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>(0,_barkFfi.default)().ubrn_uniffi_internal_fn_method_wallet_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr_){ptr_.markDestroyed();},pointer(obj_){if(obj_[_core.destructorGuardSymbol]===undefined){throw new _core.UniffiInternalError.UnexpectedNullPointer();}return obj_[_core.pointerLiteralSymbol];},clonePointer(obj_){const pointer=this.pointer(obj_);return uniffiCaller.rustCall(/*caller:*/callStatus=>(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_clone_wallet(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>(0,_barkFfi.default)().ubrn_uniffi_bark_ffi_fn_free_wallet(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj_){return obj_[_core.destructorGuardSymbol]&&obj_[_core.uniffiTypeNameSymbol]==="Wallet";}};})();const FfiConverterTypeWallet=new _core.FfiConverterObject(uniffiTypeWalletObjectFactory);// FfiConverter for bigint | undefined
|
|
1662
2027
|
const FfiConverterOptionalUInt64=new _core.FfiConverterOptional(_core.FfiConverterUInt64);// FfiConverter for Array<PpmExpiryFeeEntry>
|
|
1663
|
-
const FfiConverterSequenceTypePpmExpiryFeeEntry=new _core.FfiConverterArray(FfiConverterTypePpmExpiryFeeEntry);// FfiConverter for
|
|
1664
|
-
const
|
|
2028
|
+
const FfiConverterSequenceTypePpmExpiryFeeEntry=new _core.FfiConverterArray(FfiConverterTypePpmExpiryFeeEntry);// FfiConverter for Array<PaymentMethodParsingError>
|
|
2029
|
+
const FfiConverterSequenceTypePaymentMethodParsingError=new _core.FfiConverterArray(FfiConverterTypePaymentMethodParsingError);// FfiConverter for string | undefined
|
|
2030
|
+
const FfiConverterOptionalString=new _core.FfiConverterOptional(FfiConverterString);// FfiConverter for LightningInvoice | undefined
|
|
2031
|
+
const FfiConverterOptionalTypeLightningInvoice=new _core.FfiConverterOptional(FfiConverterTypeLightningInvoice);// FfiConverter for number | undefined
|
|
1665
2032
|
const FfiConverterOptionalUInt16=new _core.FfiConverterOptional(_core.FfiConverterUInt16);// FfiConverter for number | undefined
|
|
1666
2033
|
const FfiConverterOptionalUInt32=new _core.FfiConverterOptional(_core.FfiConverterUInt32);// FfiConverter for boolean | undefined
|
|
1667
2034
|
const FfiConverterOptionalBoolean=new _core.FfiConverterOptional(_core.FfiConverterBool);// FfiConverter for number | undefined
|
|
1668
2035
|
const FfiConverterOptionalUInt8=new _core.FfiConverterOptional(_core.FfiConverterUInt8);// FfiConverter for ExitCancelFailure | undefined
|
|
1669
|
-
const FfiConverterOptionalTypeExitCancelFailure=new _core.FfiConverterOptional(FfiConverterTypeExitCancelFailure);// FfiConverter for
|
|
1670
|
-
const
|
|
1671
|
-
const
|
|
1672
|
-
const FfiConverterSequenceTypeExitTx=new _core.FfiConverterArray(FfiConverterTypeExitTx);// FfiConverter for Array<
|
|
2036
|
+
const FfiConverterOptionalTypeExitCancelFailure=new _core.FfiConverterOptional(FfiConverterTypeExitCancelFailure);// FfiConverter for BlockRef | undefined
|
|
2037
|
+
const FfiConverterOptionalTypeBlockRef=new _core.FfiConverterOptional(FfiConverterTypeBlockRef);// FfiConverter for Array<string>
|
|
2038
|
+
const FfiConverterSequenceString=new _core.FfiConverterArray(FfiConverterString);// FfiConverter for Array<ExitTx>
|
|
2039
|
+
const FfiConverterSequenceTypeExitTx=new _core.FfiConverterArray(FfiConverterTypeExitTx);// FfiConverter for Array<OutPoint>
|
|
2040
|
+
const FfiConverterSequenceTypeOutPoint=new _core.FfiConverterArray(FfiConverterTypeOutPoint);// FfiConverter for ExitChildTransaction | undefined
|
|
2041
|
+
const FfiConverterOptionalTypeExitChildTransaction=new _core.FfiConverterOptional(FfiConverterTypeExitChildTransaction);// FfiConverter for Array<ExitState>
|
|
1673
2042
|
const FfiConverterSequenceTypeExitState=new _core.FfiConverterArray(FfiConverterTypeExitState);// FfiConverter for Array<ExitState> | undefined
|
|
1674
|
-
const FfiConverterOptionalSequenceTypeExitState=new _core.FfiConverterOptional(FfiConverterSequenceTypeExitState);// FfiConverter for
|
|
1675
|
-
const
|
|
2043
|
+
const FfiConverterOptionalSequenceTypeExitState=new _core.FfiConverterOptional(FfiConverterSequenceTypeExitState);// FfiConverter for Array<ExitTransactionPackage>
|
|
2044
|
+
const FfiConverterSequenceTypeExitTransactionPackage=new _core.FfiConverterArray(FfiConverterTypeExitTransactionPackage);// FfiConverter for bigint | undefined
|
|
2045
|
+
const FfiConverterOptionalInt64=new _core.FfiConverterOptional(_core.FfiConverterInt64);// FfiConverter for Array<AvailablePaymentMethod>
|
|
2046
|
+
const FfiConverterSequenceTypeAvailablePaymentMethod=new _core.FfiConverterArray(FfiConverterTypeAvailablePaymentMethod);// FfiConverter for AvailablePaymentMethod | undefined
|
|
2047
|
+
const FfiConverterOptionalTypeAvailablePaymentMethod=new _core.FfiConverterOptional(FfiConverterTypeAvailablePaymentMethod);// FfiConverter for VtxoLockHolder | undefined
|
|
1676
2048
|
const FfiConverterOptionalTypeVtxoLockHolder=new _core.FfiConverterOptional(FfiConverterTypeVtxoLockHolder);// FfiConverter for Array<WalletTransaction>
|
|
1677
2049
|
const FfiConverterSequenceTypeWalletTransaction=new _core.FfiConverterArray(FfiConverterTypeWalletTransaction);// FfiConverter for Array<OnchainUtxo>
|
|
1678
2050
|
const FfiConverterSequenceTypeOnchainUtxo=new _core.FfiConverterArray(FfiConverterTypeOnchainUtxo);// FfiConverter for OnchainWalletLike | undefined
|
|
@@ -1680,18 +2052,21 @@ const FfiConverterOptionalTypeOnchainWallet=new _core.FfiConverterOptional(FfiCo
|
|
|
1680
2052
|
const FfiConverterSequenceTypeDestination=new _core.FfiConverterArray(FfiConverterTypeDestination);// FfiConverter for WalletNotification | undefined
|
|
1681
2053
|
const FfiConverterOptionalTypeWalletNotification=new _core.FfiConverterOptional(FfiConverterTypeWalletNotification);// FfiConverter for Array<Vtxo>
|
|
1682
2054
|
const FfiConverterSequenceTypeVtxo=new _core.FfiConverterArray(FfiConverterTypeVtxo);// FfiConverter for ArkInfo | undefined
|
|
1683
|
-
const FfiConverterOptionalTypeArkInfo=new _core.FfiConverterOptional(FfiConverterTypeArkInfo);// FfiConverter for
|
|
2055
|
+
const FfiConverterOptionalTypeArkInfo=new _core.FfiConverterOptional(FfiConverterTypeArkInfo);// FfiConverter for number | undefined
|
|
2056
|
+
const FfiConverterOptionalFloat64=new _core.FfiConverterOptional(_core.FfiConverterFloat64);// FfiConverter for ExitTransactionStatus | undefined
|
|
1684
2057
|
const FfiConverterOptionalTypeExitTransactionStatus=new _core.FfiConverterOptional(FfiConverterTypeExitTransactionStatus);// FfiConverter for Array<ExitVtxo>
|
|
1685
2058
|
const FfiConverterSequenceTypeExitVtxo=new _core.FfiConverterArray(FfiConverterTypeExitVtxo);// FfiConverter for Array<Movement>
|
|
1686
2059
|
const FfiConverterSequenceTypeMovement=new _core.FfiConverterArray(FfiConverterTypeMovement);// FfiConverter for ImportVtxoArgs | undefined
|
|
1687
|
-
const FfiConverterOptionalTypeImportVtxoArgs=new _core.FfiConverterOptional(FfiConverterTypeImportVtxoArgs);// FfiConverter for Array<
|
|
2060
|
+
const FfiConverterOptionalTypeImportVtxoArgs=new _core.FfiConverterOptional(FfiConverterTypeImportVtxoArgs);// FfiConverter for Array<ExitTransactionStatus>
|
|
2061
|
+
const FfiConverterSequenceTypeExitTransactionStatus=new _core.FfiConverterArray(FfiConverterTypeExitTransactionStatus);// FfiConverter for Array<PendingBoard>
|
|
1688
2062
|
const FfiConverterSequenceTypePendingBoard=new _core.FfiConverterArray(FfiConverterTypePendingBoard);// FfiConverter for Array<LightningReceive>
|
|
1689
2063
|
const FfiConverterSequenceTypeLightningReceive=new _core.FfiConverterArray(FfiConverterTypeLightningReceive);// FfiConverter for Array<LightningSend>
|
|
1690
2064
|
const FfiConverterSequenceTypeLightningSend=new _core.FfiConverterArray(FfiConverterTypeLightningSend);// FfiConverter for Array<RoundState>
|
|
1691
2065
|
const FfiConverterSequenceTypeRoundState=new _core.FfiConverterArray(FfiConverterTypeRoundState);// FfiConverter for Array<ExitProgressStatus>
|
|
1692
2066
|
const FfiConverterSequenceTypeExitProgressStatus=new _core.FfiConverterArray(FfiConverterTypeExitProgressStatus);// FfiConverter for RecoveryReport | undefined
|
|
1693
2067
|
const FfiConverterOptionalTypeRecoveryReport=new _core.FfiConverterOptional(FfiConverterTypeRecoveryReport);// FfiConverter for RoundState | undefined
|
|
1694
|
-
const FfiConverterOptionalTypeRoundState=new _core.FfiConverterOptional(FfiConverterTypeRoundState)
|
|
2068
|
+
const FfiConverterOptionalTypeRoundState=new _core.FfiConverterOptional(FfiConverterTypeRoundState);// FfiConverter for DatadirInfo | undefined
|
|
2069
|
+
const FfiConverterOptionalTypeDatadirInfo=new _core.FfiConverterOptional(FfiConverterTypeDatadirInfo);/**
|
|
1695
2070
|
* This should be called before anything else.
|
|
1696
2071
|
*
|
|
1697
2072
|
* It is likely that this is being done for you by the library's `index.ts`.
|
|
@@ -1702,5 +2077,5 @@ const FfiConverterOptionalTypeRoundState=new _core.FfiConverterOptional(FfiConve
|
|
|
1702
2077
|
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
1703
2078
|
*/function uniffiEnsureInitialized(){// Get the bindings contract version from our ComponentInterface
|
|
1704
2079
|
const bindingsContractVersion=30;// Get the scaffolding contract version by calling the into the dylib
|
|
1705
|
-
const scaffoldingContractVersion=(0,_barkFfi.default)().ubrn_ffi_bark_ffi_uniffi_contract_version();if(bindingsContractVersion!==scaffoldingContractVersion){throw new _core.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion,bindingsContractVersion);}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit()!==3344){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt()!==8893){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_extract_tx_from_psbt");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_generate_mnemonic()!==65033){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_generate_mnemonic");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_init_wallet()!==41495){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_init_wallet");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit()!==15808){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_set_logger()!==16477){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_set_logger");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address()!==43084){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_ark_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_mnemonic()!==33507){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_mnemonic");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log()!==30279){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_barklogger_log");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance()!==22074){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx()!==41818){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx()!==43328){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_finish_psbt()!==24435){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_finish_psbt");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine()!==18867){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx()!==17970){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx()!==36298){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp()!==46075){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp()!==64815){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync()!==29018){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait()!==45269){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_next_notification()!==25507){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_next_notification");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_custom()!==33645){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_custom");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_default()!==61714){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_default");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance()!==39213){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx()!==26786){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates()!==30741){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan()!==19010){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address()!==7405){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_send()!==30495){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_send");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_sync()!==4373){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_sync");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_tip_height()!==12254){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_tip_height");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_transactions()!==566){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_transactions");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_utxos()!==44926){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_utxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_open()!==45531){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_open");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height()!==59034){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos()!==62209){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit()!==56991){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info()!==54388){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit()!==6368){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance()!==37345){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all()!==5667){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_all");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount()!==54692){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_funding_address()!==8961){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_funding_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_psbt()!==28300){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_psbt");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice()!==54959){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address()!==56368){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_broadcast_tx()!==46367){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_broadcast_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds()!==53455){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_exit()!==63172){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_exit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive()!==49444){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round()!==13433){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment()!==50033){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats()!==7743){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_config()!==23594){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_config");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_drain_exits()!==45364){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_drain_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee()!==35980){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee()!==55967){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee()!==44713){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee()!==33637){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee()!==11290){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee()!==24629){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee()!==37073){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee()!==18182){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee()!==1027){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint()!==51021){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_fingerprint");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_status()!==33054){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_status");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos()!==20147){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos()!==39689){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight()!==33536){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight()!==58530){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id()!==34050){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh()!==52553){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_has_pending_exits()!==19790){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_has_pending_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history()!==10552){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method()!==11845){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo()!==26027){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos()!==13727){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid()!==5699){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state()!==27834){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state()!==53422){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits()!==58660){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lock_vtxos()!==13415){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lock_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization()!==25098){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier()!==15231){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance()!==33161){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated()!==31668){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh()!==34548){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_network()!==2007){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_network");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address()!==65478){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address_with_index()!==37344){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address_with_index");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_next_round_start_time()!==20748){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_next_round_start_time");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_notifications()!==8597){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_notifications");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_all()!==7986){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_all");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos()!==64605){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address()!==43061){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice()!==26921){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer()!==25462){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lnurl()!==1459){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lnurl");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address()!==31847){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_peek_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos()!==53566){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_boards()!==61501){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_boards");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats()!==38418){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives()!==26676){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos()!==62766){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends()!==8847){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos()!==54307){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_states()!==11480){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_states");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits()!==6255){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds()!==43537){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_properties()!==9773){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_properties");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos()!==56476){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report()!==10331){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_report");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_status()!==14132){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_status");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server()!==41162){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos()!==52101){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated()!==61476){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled()!==50488){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_run_daemon()!==9520){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_run_daemon");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment()!==32252){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_onchain()!==42570){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_onchain");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs()!==12930){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos()!==22755){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet()!==6525){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos()!==56154){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard()!==27907){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon()!==7109){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait()!==1734){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends()!==31613){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync()!==2151){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits()!==12141){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos()!==25363){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards()!==63453){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives()!==14560){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive()!==43209){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos()!==11806){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address()!==30498){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded()!==25637){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos()!==33207){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxos");}uniffiCallbackInterfaceBarkLogger.register();uniffiCallbackInterfaceCustomOnchainWalletCallbacks.register();}var _default=exports.default=Object.freeze({initialize:uniffiEnsureInitialized,converters:{FfiConverterTypeAddressWithIndex,FfiConverterTypeArkInfo,FfiConverterTypeBalance,FfiConverterTypeBarkLogger,FfiConverterTypeBlockRef,FfiConverterTypeBoardFees,FfiConverterTypeBoardFundingInfo,FfiConverterTypeConfig,FfiConverterTypeCpfpParams,FfiConverterTypeCustomOnchainWalletCallbacks,FfiConverterTypeDestination,FfiConverterTypeEmergencyExitFeeEstimate,FfiConverterTypeError,FfiConverterTypeExitCancelFailure,FfiConverterTypeExitCancelResult,FfiConverterTypeExitClaimTransaction,FfiConverterTypeExitProgressStatus,FfiConverterTypeExitState,FfiConverterTypeExitStateKind,FfiConverterTypeExitTransactionStatus,FfiConverterTypeExitTx,FfiConverterTypeExitTxOrigin,FfiConverterTypeExitTxStatus,FfiConverterTypeExitVtxo,FfiConverterTypeFeeEstimate,FfiConverterTypeFeeRates,FfiConverterTypeFeeSchedule,FfiConverterTypeImportVtxoArgs,FfiConverterTypeLightningInvoice,FfiConverterTypeLightningReceive,FfiConverterTypeLightningReceiveFees,FfiConverterTypeLightningSend,FfiConverterTypeLightningSendFees,FfiConverterTypeLightningSendStatus,FfiConverterTypeLogLevel,FfiConverterTypeMovement,FfiConverterTypeNetwork,FfiConverterTypeNotificationHolder,FfiConverterTypeOffboardFees,FfiConverterTypeOffboardResult,FfiConverterTypeOnchainBalance,FfiConverterTypeOnchainUtxo,FfiConverterTypeOnchainWallet,FfiConverterTypeOutPoint,FfiConverterTypePendingBoard,FfiConverterTypePpmExpiryFeeEntry,FfiConverterTypeRecoveryBucket,FfiConverterTypeRecoveryReport,FfiConverterTypeRecoveryStatus,FfiConverterTypeRefreshFees,FfiConverterTypeRoundFlowKind,FfiConverterTypeRoundState,FfiConverterTypeVtxo,FfiConverterTypeVtxoLockHolder,FfiConverterTypeVtxoState,FfiConverterTypeWallet,FfiConverterTypeWalletNotification,FfiConverterTypeWalletOpenArgs,FfiConverterTypeWalletProperties,FfiConverterTypeWalletTransaction}});
|
|
2080
|
+
const scaffoldingContractVersion=(0,_barkFfi.default)().ubrn_ffi_bark_ffi_uniffi_contract_version();if(bindingsContractVersion!==scaffoldingContractVersion){throw new _core.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion,bindingsContractVersion);}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_clear_logger()!==48287){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_clear_logger");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_decode_bolt11_invoice()!==43493){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_decode_bolt11_invoice");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit()!==3344){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt()!==8893){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_extract_tx_from_psbt");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_generate_mnemonic()!==65033){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_generate_mnemonic");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_init_wallet()!==41495){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_init_wallet");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit()!==15808){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_read_datadir_info()!==62647){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_read_datadir_info");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_set_logger()!==17909){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_set_logger");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address()!==43084){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_ark_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_mnemonic()!==33507){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_mnemonic");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_wallet_exists()!==32702){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_wallet_exists");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log()!==3468){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_barklogger_log");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance()!==22074){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx()!==41818){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx()!==43328){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sign_psbt()!==17958){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sign_psbt");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine()!==18867){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx()!==17970){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx()!==36298){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp()!==46075){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp()!==64815){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync()!==29018){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait()!==45269){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_next_notification()!==25507){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_next_notification");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_custom()!==33645){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_custom");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_default()!==61714){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_default");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance()!==39213){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx()!==26786){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates()!==30741){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan()!==19010){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address()!==7405){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_send()!==30495){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_send");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_sync()!==4373){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_sync");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_tip_height()!==12254){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_tip_height");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_transactions()!==566){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_transactions");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_utxos()!==44926){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_utxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_open()!==45531){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_open");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height()!==59034){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos()!==62209){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit()!==56991){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info()!==54388){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit()!==6368){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance()!==37345){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance_summary()!==9541){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance_summary");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_bip321_uri()!==64697){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bip321_uri");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all()!==5667){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_all");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount()!==54692){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_funding_address()!==8961){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_funding_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_psbt()!==28300){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_psbt");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice()!==54959){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address()!==56368){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_broadcast_tx()!==46367){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_broadcast_tx");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds()!==53455){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_exit()!==63172){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_exit");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive()!==49444){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round()!==13433){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment()!==50033){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats()!==7743){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_config()!==23594){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_config");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_debug_info()!==12282){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_debug_info");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_drain_exits()!==45364){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_drain_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee()!==35980){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee()!==55967){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee()!==5118){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee()!==33637){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee()!==11290){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee()!==24629){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee()!==37073){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_payment_fee()!==53689){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_payment_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee()!==18182){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee()!==1027){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint()!==51021){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_fingerprint");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_status()!==3037){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_status");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos()!==35836){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos()!==39689){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight()!==33536){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight()!==58530){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id()!==34050){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh()!==52553){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_has_pending_exits()!==19790){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_has_pending_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history()!==10552){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method()!==11845){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo()!==26027){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos()!==13727){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid()!==5699){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state()!==27834){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state()!==53422){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_all_exits()!==11191){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_all_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits()!==58660){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_finished_exits()!==44459){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_finished_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_live_exits()!==16771){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_live_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lock_vtxos()!==13415){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lock_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization()!==25098){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier()!==15231){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance()!==33161){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated()!==31668){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh()!==34548){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_network()!==2007){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_network");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address()!==65478){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address_with_index()!==37344){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address_with_index");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_next_round_start_time()!==20748){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_next_round_start_time");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_notifications()!==8597){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_notifications");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_all()!==7986){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_all");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos()!==64605){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_parse_payment_request()!==2160){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_parse_payment_request");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address()!==45319){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice()!==48095){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer()!==53553){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lnurl()!==19202){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lnurl");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address()!==31847){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_peek_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos()!==53566){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_boards()!==61501){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_boards");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats()!==38418){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives()!==26676){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos()!==62766){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends()!==8847){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos()!==54307){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_states()!==11480){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_states");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits()!==6255){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds()!==43537){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_properties()!==9773){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_properties");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos()!==56476){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report()!==10331){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_report");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_status()!==14132){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_status");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server()!==41162){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos()!==52101){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated()!==61476){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled()!==50488){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_run_daemon()!==9520){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_run_daemon");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment()!==61332){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_onchain()!==11375){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_onchain");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_payment()!==15378){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_payment");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs()!==12930){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos()!==22755){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet()!==6525){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos()!==56154){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard()!==27907){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon()!==7109){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait()!==1734){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends()!==31613){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync()!==2151){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits()!==12141){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_exits");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos()!==25363){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards()!==63453){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives()!==14560){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive()!==43209){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos()!==11806){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address()!==30498){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded()!==25637){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded");}if((0,_barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos()!==33207){throw new _core.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxos");}uniffiCallbackInterfaceBarkLogger.register();uniffiCallbackInterfaceCustomOnchainWalletCallbacks.register();}var _default=exports.default=Object.freeze({initialize:uniffiEnsureInitialized,converters:{FfiConverterTypeAddressWithIndex,FfiConverterTypeArkInfo,FfiConverterTypeAvailablePaymentMethod,FfiConverterTypeBalance,FfiConverterTypeBalanceSummary,FfiConverterTypeBarkLogger,FfiConverterTypeBip321Uri,FfiConverterTypeBip321UriOptions,FfiConverterTypeBlockRef,FfiConverterTypeBoardFees,FfiConverterTypeBoardFundingInfo,FfiConverterTypeBolt11InvoiceDetails,FfiConverterTypeConfig,FfiConverterTypeCpfpParams,FfiConverterTypeCustomOnchainWalletCallbacks,FfiConverterTypeDatadirInfo,FfiConverterTypeDebugInfo,FfiConverterTypeDestination,FfiConverterTypeEmergencyExitFeeEstimate,FfiConverterTypeError,FfiConverterTypeExitCancelFailure,FfiConverterTypeExitCancelResult,FfiConverterTypeExitChildTransaction,FfiConverterTypeExitClaimTransaction,FfiConverterTypeExitProgressStatus,FfiConverterTypeExitState,FfiConverterTypeExitStateKind,FfiConverterTypeExitTransactionPackage,FfiConverterTypeExitTransactionStatus,FfiConverterTypeExitTx,FfiConverterTypeExitTxOrigin,FfiConverterTypeExitTxStatus,FfiConverterTypeExitVtxo,FfiConverterTypeFeeEstimate,FfiConverterTypeFeeRates,FfiConverterTypeFeeSchedule,FfiConverterTypeImportVtxoArgs,FfiConverterTypeLightningInvoice,FfiConverterTypeLightningReceive,FfiConverterTypeLightningReceiveFees,FfiConverterTypeLightningSend,FfiConverterTypeLightningSendFees,FfiConverterTypeLightningSendStatus,FfiConverterTypeLogLevel,FfiConverterTypeMovement,FfiConverterTypeNetwork,FfiConverterTypeNotificationHolder,FfiConverterTypeOffboardFees,FfiConverterTypeOffboardResult,FfiConverterTypeOnchainBalance,FfiConverterTypeOnchainUtxo,FfiConverterTypeOnchainWallet,FfiConverterTypeOutPoint,FfiConverterTypePaymentMethod,FfiConverterTypePaymentMethodParsingError,FfiConverterTypePaymentRequest,FfiConverterTypePaymentResult,FfiConverterTypePendingBoard,FfiConverterTypePpmExpiryFeeEntry,FfiConverterTypeRecoveryBucket,FfiConverterTypeRecoveryReport,FfiConverterTypeRecoveryStatus,FfiConverterTypeRefreshFees,FfiConverterTypeRoundFlowKind,FfiConverterTypeRoundState,FfiConverterTypeVtxo,FfiConverterTypeVtxoLockHolder,FfiConverterTypeVtxoState,FfiConverterTypeWallet,FfiConverterTypeWalletNotification,FfiConverterTypeWalletOpenArgs,FfiConverterTypeWalletProperties,FfiConverterTypeWalletTransaction}});
|
|
1706
2081
|
//# sourceMappingURL=bark.js.map
|