@secondts/bark-react-native 0.26.0 → 0.27.0
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 +84 -38
- 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 +81 -6
- package/cpp/generated/bark.hpp +4 -0
- 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 +854 -708
- 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 +853 -707
- 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 +7 -3
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +533 -20
- 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 +7 -3
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +533 -20
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +5 -15
- package/scripts/postinstall.js +92 -31
- package/src/WalletNotifications.ts +7 -2
- package/src/generated/bark-ffi.ts +400 -1022
- package/src/generated/bark.ts +12904 -14919
- 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
|
@@ -38,6 +38,8 @@ process?.env?.NODE_ENV!=="production"||false;// Public interface members begin h
|
|
|
38
38
|
* Low-level function to initialize a wallet
|
|
39
39
|
*
|
|
40
40
|
* You probably want to use [`Wallet::open`] instead.
|
|
41
|
+
*
|
|
42
|
+
* `datadir` is a filesystem path or a `file://` URI.
|
|
41
43
|
*/export async function initWallet(network,mnemonicOrSeed,config,datadir,allowUnreachableServer,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_func_init_wallet(FfiConverterTypeNetwork.lower(network,nativeModule().rustbuffer_alloc),FfiConverterString.lower(mnemonicOrSeed,nativeModule().rustbuffer_alloc),FfiConverterTypeConfig.lower(config,nativeModule().rustbuffer_alloc),FfiConverterString.lower(datadir,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(allowUnreachableServer,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
42
44
|
* Largest value `Config.vtxo_key_gap_limit` (or an import/recovery
|
|
43
45
|
* `gap_limit` override) accepts. A scan that matches nothing runs the limit
|
|
@@ -68,6 +70,8 @@ process?.env?.NODE_ENV!=="production"||false;// Public interface members begin h
|
|
|
68
70
|
*/export function validateMnemonic(mnemonic)/*throws*/{return FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_func_validate_mnemonic(FfiConverterString.lower(mnemonic,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
69
71
|
* Whether `datadir` holds an initialized bark wallet.
|
|
70
72
|
*
|
|
73
|
+
* `datadir` is a filesystem path or a `file://` URI.
|
|
74
|
+
*
|
|
71
75
|
* Answers without side effects: the database is opened read-only, no
|
|
72
76
|
* migration runs and no file or directory is created. Returns `false` for a
|
|
73
77
|
* missing or empty directory and for a database that never got its wallet
|
|
@@ -96,11 +100,11 @@ writeStringIntoBuffer:(s,buf,offset)=>{const view=new Uint8Array(buf.arrayBuffer
|
|
|
96
100
|
// the double property-lookup in string_from_buffer.
|
|
97
101
|
readStringFromBuffer:(buf,offset,length)=>nativeModule().ubrn_uniffi_internal_fn_func_ffi__read_string_from_buffer(buf,offset,length)};})();const FfiConverterString=uniffiCreateFfiConverterString(stringConverter);/**
|
|
98
102
|
* Generated factory for {@link AddressWithIndex} record objects.
|
|
99
|
-
*/export const AddressWithIndex=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAddressWithIndex=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),index:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);FfiConverterUInt32.writeIntoCursor(value.index,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+FfiConverterUInt32.allocationSize(value.index);}}return new FFIConverter();})();export let 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 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 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();})();/**
|
|
103
|
+
*/export const AddressWithIndex=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAddressWithIndex=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),index:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);FfiConverterUInt32.writeIntoCursor(value.index,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+FfiConverterUInt32.allocationSize(value.index);}};return new FFIConverter();})();export let 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 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 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();})();/**
|
|
100
104
|
* Fees for boarding onchain funds into the Ark.
|
|
101
105
|
*//**
|
|
102
106
|
* Generated factory for {@link BoardFees} record objects.
|
|
103
|
-
*/export const BoardFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:FfiConverterUInt64.readFromCursor(c),baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppm:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.minFeeSats)+FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterUInt64.allocationSize(value.ppm);}}return new FFIConverter();})();/**
|
|
107
|
+
*/export const BoardFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:FfiConverterUInt64.readFromCursor(c),baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppm:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.minFeeSats)+FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterUInt64.allocationSize(value.ppm);}};return new FFIConverter();})();/**
|
|
104
108
|
* One tier of a PPM-by-expiry fee table.
|
|
105
109
|
*
|
|
106
110
|
* The entry applies when a VTXO expires in at most `expiry_blocks_threshold`
|
|
@@ -108,29 +112,29 @@ readStringFromBuffer:(buf,offset,length)=>nativeModule().ubrn_uniffi_internal_fn
|
|
|
108
112
|
* actual expiry distance. Tables are sorted ascending by threshold.
|
|
109
113
|
*//**
|
|
110
114
|
* Generated factory for {@link PpmExpiryFeeEntry} record objects.
|
|
111
|
-
*/export const PpmExpiryFeeEntry=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePpmExpiryFeeEntry=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{expiryBlocksThreshold:FfiConverterUInt32.readFromCursor(c),ppm:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt32.writeIntoCursor(value.expiryBlocksThreshold,c);FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return FfiConverterUInt32.allocationSize(value.expiryBlocksThreshold)+FfiConverterUInt64.allocationSize(value.ppm);}}return new FFIConverter();})();/**
|
|
115
|
+
*/export const PpmExpiryFeeEntry=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePpmExpiryFeeEntry=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{expiryBlocksThreshold:FfiConverterUInt32.readFromCursor(c),ppm:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt32.writeIntoCursor(value.expiryBlocksThreshold,c);FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return FfiConverterUInt32.allocationSize(value.expiryBlocksThreshold)+FfiConverterUInt64.allocationSize(value.ppm);}};return new FFIConverter();})();/**
|
|
112
116
|
* Fees for offboarding VTXOs to an onchain address.
|
|
113
117
|
*//**
|
|
114
118
|
* Generated factory for {@link OffboardFees} record objects.
|
|
115
|
-
*/export const OffboardFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:FfiConverterUInt64.readFromCursor(c),fixedAdditionalVb:FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.fixedAdditionalVb,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterUInt64.allocationSize(value.fixedAdditionalVb)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}}return new FFIConverter();})();/**
|
|
119
|
+
*/export const OffboardFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:FfiConverterUInt64.readFromCursor(c),fixedAdditionalVb:FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.fixedAdditionalVb,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterUInt64.allocationSize(value.fixedAdditionalVb)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}};return new FFIConverter();})();/**
|
|
116
120
|
* Fees for refreshing VTXOs in a round.
|
|
117
121
|
*//**
|
|
118
122
|
* Generated factory for {@link RefreshFees} record objects.
|
|
119
|
-
*/export const RefreshFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRefreshFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}}return new FFIConverter();})();/**
|
|
123
|
+
*/export const RefreshFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRefreshFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}};return new FFIConverter();})();/**
|
|
120
124
|
* Fees for receiving over lightning.
|
|
121
125
|
*//**
|
|
122
126
|
* Generated factory for {@link LightningReceiveFees} record objects.
|
|
123
|
-
*/export const LightningReceiveFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceiveFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppm:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterUInt64.allocationSize(value.ppm);}}return new FFIConverter();})();/**
|
|
127
|
+
*/export const LightningReceiveFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceiveFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppm:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.ppm,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterUInt64.allocationSize(value.ppm);}};return new FFIConverter();})();/**
|
|
124
128
|
* Fees for sending over lightning.
|
|
125
129
|
*//**
|
|
126
130
|
* Generated factory for {@link LightningSendFees} record objects.
|
|
127
|
-
*/export const LightningSendFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSendFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:FfiConverterUInt64.readFromCursor(c),baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.minFeeSats)+FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}}return new FFIConverter();})();/**
|
|
131
|
+
*/export const LightningSendFees=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSendFees=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{minFeeSats:FfiConverterUInt64.readFromCursor(c),baseFeeSats:FfiConverterUInt64.readFromCursor(c),ppmExpiryTable:FfiConverterSequenceTypePpmExpiryFeeEntry.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.minFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.baseFeeSats,c);FfiConverterSequenceTypePpmExpiryFeeEntry.writeIntoCursor(value.ppmExpiryTable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.minFeeSats)+FfiConverterUInt64.allocationSize(value.baseFeeSats)+FfiConverterSequenceTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);}};return new FFIConverter();})();/**
|
|
128
132
|
* The Ark server's complete fee schedule, mirroring `ark::fees::FeeSchedule`.
|
|
129
133
|
*//**
|
|
130
134
|
* Generated factory for {@link FeeSchedule} record objects.
|
|
131
|
-
*/export const FeeSchedule=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeSchedule=(()=>{class FFIConverter extends 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();})();/**
|
|
135
|
+
*/export const FeeSchedule=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeSchedule=(()=>{class FFIConverter extends 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();})();/**
|
|
132
136
|
* Generated factory for {@link ArkInfo} record objects.
|
|
133
|
-
*/export const ArkInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeArkInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),serverPubkey:FfiConverterString.readFromCursor(c),roundIntervalSecs:FfiConverterUInt64.readFromCursor(c),nbRoundNonces:FfiConverterUInt32.readFromCursor(c),vtxoExitDelta:FfiConverterUInt32.readFromCursor(c),vtxoLifetime:FfiConverterUInt32.readFromCursor(c),vtxoExpiryDelta:FfiConverterUInt32.readFromCursor(c),htlcSendExpiryDelta:FfiConverterUInt32.readFromCursor(c),htlcExpiryDelta:FfiConverterUInt32.readFromCursor(c),maxVtxoAmountSats:FfiConverterOptionalUInt64.readFromCursor(c),requiredBoardConfirmations:FfiConverterUInt32.readFromCursor(c),maxUserInvoiceCltvDelta:FfiConverterUInt16.readFromCursor(c),minBoardAmountSats:FfiConverterUInt64.readFromCursor(c),lnReceiveAntiDosRequired:FfiConverterBool.readFromCursor(c),feeSchedule:FfiConverterTypeFeeSchedule.readFromCursor(c),maxVtxoExitDepth:FfiConverterUInt16.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.serverPubkey,c);FfiConverterUInt64.writeIntoCursor(value.roundIntervalSecs,c);FfiConverterUInt32.writeIntoCursor(value.nbRoundNonces,c);FfiConverterUInt32.writeIntoCursor(value.vtxoExitDelta,c);FfiConverterUInt32.writeIntoCursor(value.vtxoLifetime,c);FfiConverterUInt32.writeIntoCursor(value.vtxoExpiryDelta,c);FfiConverterUInt32.writeIntoCursor(value.htlcSendExpiryDelta,c);FfiConverterUInt32.writeIntoCursor(value.htlcExpiryDelta,c);FfiConverterOptionalUInt64.writeIntoCursor(value.maxVtxoAmountSats,c);FfiConverterUInt32.writeIntoCursor(value.requiredBoardConfirmations,c);FfiConverterUInt16.writeIntoCursor(value.maxUserInvoiceCltvDelta,c);FfiConverterUInt64.writeIntoCursor(value.minBoardAmountSats,c);FfiConverterBool.writeIntoCursor(value.lnReceiveAntiDosRequired,c);FfiConverterTypeFeeSchedule.writeIntoCursor(value.feeSchedule,c);FfiConverterUInt16.writeIntoCursor(value.maxVtxoExitDepth,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.serverPubkey)+FfiConverterUInt64.allocationSize(value.roundIntervalSecs)+FfiConverterUInt32.allocationSize(value.nbRoundNonces)+FfiConverterUInt32.allocationSize(value.vtxoExitDelta)+FfiConverterUInt32.allocationSize(value.vtxoLifetime)+FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta)+FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta)+FfiConverterUInt32.allocationSize(value.htlcExpiryDelta)+FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats)+FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations)+FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta)+FfiConverterUInt64.allocationSize(value.minBoardAmountSats)+FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired)+FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule)+FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);}}return new FFIConverter();})();// Enum: PaymentMethod
|
|
137
|
+
*/export const ArkInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeArkInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{network:FfiConverterTypeNetwork.readFromCursor(c),serverPubkey:FfiConverterString.readFromCursor(c),roundIntervalSecs:FfiConverterUInt64.readFromCursor(c),nbRoundNonces:FfiConverterUInt32.readFromCursor(c),vtxoExitDelta:FfiConverterUInt32.readFromCursor(c),vtxoLifetime:FfiConverterUInt32.readFromCursor(c),vtxoExpiryDelta:FfiConverterUInt32.readFromCursor(c),htlcSendExpiryDelta:FfiConverterUInt32.readFromCursor(c),htlcExpiryDelta:FfiConverterUInt32.readFromCursor(c),maxVtxoAmountSats:FfiConverterOptionalUInt64.readFromCursor(c),requiredBoardConfirmations:FfiConverterUInt32.readFromCursor(c),maxUserInvoiceCltvDelta:FfiConverterUInt16.readFromCursor(c),minBoardAmountSats:FfiConverterUInt64.readFromCursor(c),lnReceiveAntiDosRequired:FfiConverterBool.readFromCursor(c),feeSchedule:FfiConverterTypeFeeSchedule.readFromCursor(c),maxVtxoExitDepth:FfiConverterUInt16.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypeNetwork.writeIntoCursor(value.network,c);FfiConverterString.writeIntoCursor(value.serverPubkey,c);FfiConverterUInt64.writeIntoCursor(value.roundIntervalSecs,c);FfiConverterUInt32.writeIntoCursor(value.nbRoundNonces,c);FfiConverterUInt32.writeIntoCursor(value.vtxoExitDelta,c);FfiConverterUInt32.writeIntoCursor(value.vtxoLifetime,c);FfiConverterUInt32.writeIntoCursor(value.vtxoExpiryDelta,c);FfiConverterUInt32.writeIntoCursor(value.htlcSendExpiryDelta,c);FfiConverterUInt32.writeIntoCursor(value.htlcExpiryDelta,c);FfiConverterOptionalUInt64.writeIntoCursor(value.maxVtxoAmountSats,c);FfiConverterUInt32.writeIntoCursor(value.requiredBoardConfirmations,c);FfiConverterUInt16.writeIntoCursor(value.maxUserInvoiceCltvDelta,c);FfiConverterUInt64.writeIntoCursor(value.minBoardAmountSats,c);FfiConverterBool.writeIntoCursor(value.lnReceiveAntiDosRequired,c);FfiConverterTypeFeeSchedule.writeIntoCursor(value.feeSchedule,c);FfiConverterUInt16.writeIntoCursor(value.maxVtxoExitDepth,c);}allocationSize(value){return FfiConverterTypeNetwork.allocationSize(value.network)+FfiConverterString.allocationSize(value.serverPubkey)+FfiConverterUInt64.allocationSize(value.roundIntervalSecs)+FfiConverterUInt32.allocationSize(value.nbRoundNonces)+FfiConverterUInt32.allocationSize(value.vtxoExitDelta)+FfiConverterUInt32.allocationSize(value.vtxoLifetime)+FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta)+FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta)+FfiConverterUInt32.allocationSize(value.htlcExpiryDelta)+FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats)+FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations)+FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta)+FfiConverterUInt64.allocationSize(value.minBoardAmountSats)+FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired)+FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule)+FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);}};return new FFIConverter();})();// Enum: PaymentMethod
|
|
134
138
|
export let 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
139
|
* A payment destination, mirroring `bark::movement::PaymentMethod`.
|
|
136
140
|
*
|
|
@@ -139,48 +143,48 @@ export let PaymentMethod_Tags=/*#__PURE__*/function(PaymentMethod_Tags){PaymentM
|
|
|
139
143
|
* is what `Movement.sent_to_addresses` and `Movement.received_on_addresses`
|
|
140
144
|
* hold and what `Wallet::history_by_payment_method` takes.
|
|
141
145
|
*/export const PaymentMethod=(()=>{/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
146
|
+
* An Ark address.
|
|
147
|
+
*/class Ark_ extends UniffiEnum{/**
|
|
148
|
+
* @private
|
|
149
|
+
* This field is private and should not be used, use `tag` instead.
|
|
150
|
+
*/[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;}}/**
|
|
151
|
+
* An onchain bitcoin address.
|
|
152
|
+
*/class Bitcoin_ extends UniffiEnum{/**
|
|
153
|
+
* @private
|
|
154
|
+
* This field is private and should not be used, use `tag` instead.
|
|
155
|
+
*/[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;}}/**
|
|
156
|
+
* A hex-encoded onchain output script. bark cannot pay these yet.
|
|
157
|
+
*/class OutputScript_ extends UniffiEnum{/**
|
|
158
|
+
* @private
|
|
159
|
+
* This field is private and should not be used, use `tag` instead.
|
|
160
|
+
*/[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;}}/**
|
|
161
|
+
* A lightning invoice, BOLT11 or BOLT12. `decode_bolt11_invoice` reads
|
|
162
|
+
* a BOLT11 invoice's amount, description, payee and expiry.
|
|
163
|
+
*/class Invoice_ extends UniffiEnum{/**
|
|
164
|
+
* @private
|
|
165
|
+
* This field is private and should not be used, use `tag` instead.
|
|
166
|
+
*/[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;}}/**
|
|
167
|
+
* A reusable BOLT12 offer.
|
|
168
|
+
*/class Offer_ extends UniffiEnum{/**
|
|
169
|
+
* @private
|
|
170
|
+
* This field is private and should not be used, use `tag` instead.
|
|
171
|
+
*/[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;}}/**
|
|
172
|
+
* A lightning address (`user@domain`), resolved over LNURL-pay.
|
|
173
|
+
*/class LightningAddress_ extends UniffiEnum{/**
|
|
174
|
+
* @private
|
|
175
|
+
* This field is private and should not be used, use `tag` instead.
|
|
176
|
+
*/[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;}}/**
|
|
177
|
+
* An LNURL-pay link (`lnurl1…`).
|
|
178
|
+
*/class Lnurl_ extends UniffiEnum{/**
|
|
179
|
+
* @private
|
|
180
|
+
* This field is private and should not be used, use `tag` instead.
|
|
181
|
+
*/[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;}}/**
|
|
182
|
+
* A destination bark recognizes but cannot pay, such as an Arkade
|
|
183
|
+
* address.
|
|
184
|
+
*/class Custom_ extends UniffiEnum{/**
|
|
185
|
+
* @private
|
|
186
|
+
* This field is private and should not be used, use `tag` instead.
|
|
187
|
+
*/[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[uniffiTypeNameSymbol]==="PaymentMethod";}return Object.freeze({instanceOf,Ark:Ark_,Bitcoin:Bitcoin_,OutputScript:OutputScript_,Invoice:Invoice_,Offer:Offer_,LightningAddress:LightningAddress_,Lnurl:Lnurl_,Custom:Custom_});})();/**
|
|
184
188
|
* A payment destination, mirroring `bark::movement::PaymentMethod`.
|
|
185
189
|
*
|
|
186
190
|
* Each variant carries the destination as a string. `type` and `value`
|
|
@@ -197,33 +201,33 @@ export let PaymentMethodParsingError_Tags=/*#__PURE__*/function(PaymentMethodPar
|
|
|
197
201
|
* Returned as data in [`AvailablePaymentMethod::errors`] rather than as an
|
|
198
202
|
* error, so the caller can still show every option and flag the bad ones.
|
|
199
203
|
*/export const PaymentMethodParsingError=(()=>{/**
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
204
|
+
* The destination is for another bitcoin network than the wallet's.
|
|
205
|
+
*/class NetworkMismatch_ extends UniffiEnum{/**
|
|
206
|
+
* @private
|
|
207
|
+
* This field is private and should not be used, use `tag` instead.
|
|
208
|
+
*/[uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.NetworkMismatch;constructor(){super("PaymentMethodParsingError","NetworkMismatch");}static new(){return new NetworkMismatch_();}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.NetworkMismatch;}}/**
|
|
209
|
+
* This wallet cannot pay the Ark address, for example because it
|
|
210
|
+
* belongs to another Ark server. `reason` says which check failed.
|
|
211
|
+
*/class InvalidArkAddress_ extends UniffiEnum{/**
|
|
212
|
+
* @private
|
|
213
|
+
* This field is private and should not be used, use `tag` instead.
|
|
214
|
+
*/[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;}}/**
|
|
215
|
+
* The invoice or offer asks for `expected_sats`, but the URI's `amount`
|
|
216
|
+
* is `got_sats`.
|
|
217
|
+
*/class AmountMismatch_ extends UniffiEnum{/**
|
|
218
|
+
* @private
|
|
219
|
+
* This field is private and should not be used, use `tag` instead.
|
|
220
|
+
*/[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;}}/**
|
|
221
|
+
* The destination's amount is invalid.
|
|
222
|
+
*/class InvalidAmount_ extends UniffiEnum{/**
|
|
223
|
+
* @private
|
|
224
|
+
* This field is private and should not be used, use `tag` instead.
|
|
225
|
+
*/[uniffiTypeNameSymbol]="PaymentMethodParsingError";tag=PaymentMethodParsingError_Tags.InvalidAmount;constructor(){super("PaymentMethodParsingError","InvalidAmount");}static new(){return new InvalidAmount_();}static instanceOf(obj){return obj.tag===PaymentMethodParsingError_Tags.InvalidAmount;}}/**
|
|
226
|
+
* bark recognizes the destination but cannot pay it.
|
|
227
|
+
*/class Unsupported_ extends UniffiEnum{/**
|
|
228
|
+
* @private
|
|
229
|
+
* This field is private and should not be used, use `tag` instead.
|
|
230
|
+
*/[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[uniffiTypeNameSymbol]==="PaymentMethodParsingError";}return Object.freeze({instanceOf,NetworkMismatch:NetworkMismatch_,InvalidArkAddress:InvalidArkAddress_,AmountMismatch:AmountMismatch_,InvalidAmount:InvalidAmount_,Unsupported:Unsupported_});})();/**
|
|
227
231
|
* Why an option of a [`PaymentRequest`] may not be payable, mirroring
|
|
228
232
|
* `bark::PaymentMethodParsingError`.
|
|
229
233
|
*
|
|
@@ -236,9 +240,9 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
236
240
|
* `bark::AvailablePaymentMethod`.
|
|
237
241
|
*//**
|
|
238
242
|
* Generated factory for {@link AvailablePaymentMethod} record objects.
|
|
239
|
-
*/export const AvailablePaymentMethod=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAvailablePaymentMethod=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{method:FfiConverterTypePaymentMethod.readFromCursor(c),errors:FfiConverterSequenceTypePaymentMethodParsingError.readFromCursor(c),requiresAmount:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypePaymentMethod.writeIntoCursor(value.method,c);FfiConverterSequenceTypePaymentMethodParsingError.writeIntoCursor(value.errors,c);FfiConverterBool.writeIntoCursor(value.requiresAmount,c);}allocationSize(value){return FfiConverterTypePaymentMethod.allocationSize(value.method)+FfiConverterSequenceTypePaymentMethodParsingError.allocationSize(value.errors)+FfiConverterBool.allocationSize(value.requiresAmount);}}return new FFIConverter();})();/**
|
|
243
|
+
*/export const AvailablePaymentMethod=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAvailablePaymentMethod=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{method:FfiConverterTypePaymentMethod.readFromCursor(c),errors:FfiConverterSequenceTypePaymentMethodParsingError.readFromCursor(c),requiresAmount:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterTypePaymentMethod.writeIntoCursor(value.method,c);FfiConverterSequenceTypePaymentMethodParsingError.writeIntoCursor(value.errors,c);FfiConverterBool.writeIntoCursor(value.requiresAmount,c);}allocationSize(value){return FfiConverterTypePaymentMethod.allocationSize(value.method)+FfiConverterSequenceTypePaymentMethodParsingError.allocationSize(value.errors)+FfiConverterBool.allocationSize(value.requiresAmount);}};return new FFIConverter();})();/**
|
|
240
244
|
* Generated factory for {@link Balance} record objects.
|
|
241
|
-
*/export const Balance=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalance=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:FfiConverterUInt64.readFromCursor(c),needsRefreshSats:FfiConverterUInt64.readFromCursor(c),pendingInRoundSats:FfiConverterUInt64.readFromCursor(c),pendingExitSats:FfiConverterUInt64.readFromCursor(c),pendingLightningSendSats:FfiConverterUInt64.readFromCursor(c),claimableLightningReceiveSats:FfiConverterUInt64.readFromCursor(c),pendingBoardSats:FfiConverterUInt64.readFromCursor(c),pendingArkoorSendSats:FfiConverterUInt64.readFromCursor(c),pendingOffboardSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);FfiConverterUInt64.writeIntoCursor(value.needsRefreshSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingInRoundSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingExitSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingLightningSendSats,c);FfiConverterUInt64.writeIntoCursor(value.claimableLightningReceiveSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingBoardSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingArkoorSendSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingOffboardSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.spendableSats)+FfiConverterUInt64.allocationSize(value.needsRefreshSats)+FfiConverterUInt64.allocationSize(value.pendingInRoundSats)+FfiConverterUInt64.allocationSize(value.pendingExitSats)+FfiConverterUInt64.allocationSize(value.pendingLightningSendSats)+FfiConverterUInt64.allocationSize(value.claimableLightningReceiveSats)+FfiConverterUInt64.allocationSize(value.pendingBoardSats)+FfiConverterUInt64.allocationSize(value.pendingArkoorSendSats)+FfiConverterUInt64.allocationSize(value.pendingOffboardSats);}}return new FFIConverter();})();/**
|
|
245
|
+
*/export const Balance=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalance=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:FfiConverterUInt64.readFromCursor(c),needsRefreshSats:FfiConverterUInt64.readFromCursor(c),pendingInRoundSats:FfiConverterUInt64.readFromCursor(c),pendingExitSats:FfiConverterUInt64.readFromCursor(c),pendingLightningSendSats:FfiConverterUInt64.readFromCursor(c),claimableLightningReceiveSats:FfiConverterUInt64.readFromCursor(c),pendingBoardSats:FfiConverterUInt64.readFromCursor(c),pendingArkoorSendSats:FfiConverterUInt64.readFromCursor(c),pendingOffboardSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);FfiConverterUInt64.writeIntoCursor(value.needsRefreshSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingInRoundSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingExitSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingLightningSendSats,c);FfiConverterUInt64.writeIntoCursor(value.claimableLightningReceiveSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingBoardSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingArkoorSendSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingOffboardSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.spendableSats)+FfiConverterUInt64.allocationSize(value.needsRefreshSats)+FfiConverterUInt64.allocationSize(value.pendingInRoundSats)+FfiConverterUInt64.allocationSize(value.pendingExitSats)+FfiConverterUInt64.allocationSize(value.pendingLightningSendSats)+FfiConverterUInt64.allocationSize(value.claimableLightningReceiveSats)+FfiConverterUInt64.allocationSize(value.pendingBoardSats)+FfiConverterUInt64.allocationSize(value.pendingArkoorSendSats)+FfiConverterUInt64.allocationSize(value.pendingOffboardSats);}};return new FFIConverter();})();/**
|
|
242
246
|
* The numbers to show a user without the breakdown of [`Balance`],
|
|
243
247
|
* mirroring `bark::BalanceSummary`.
|
|
244
248
|
*
|
|
@@ -246,21 +250,21 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
246
250
|
* a user owns.
|
|
247
251
|
*//**
|
|
248
252
|
* Generated factory for {@link BalanceSummary} record objects.
|
|
249
|
-
*/export const BalanceSummary=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalanceSummary=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:FfiConverterUInt64.readFromCursor(c),needsRefreshSats:FfiConverterUInt64.readFromCursor(c),pendingSats:FfiConverterUInt64.readFromCursor(c),totalSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);FfiConverterUInt64.writeIntoCursor(value.needsRefreshSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.spendableSats)+FfiConverterUInt64.allocationSize(value.needsRefreshSats)+FfiConverterUInt64.allocationSize(value.pendingSats)+FfiConverterUInt64.allocationSize(value.totalSats);}}return new FFIConverter();})();/**
|
|
253
|
+
*/export const BalanceSummary=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBalanceSummary=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{spendableSats:FfiConverterUInt64.readFromCursor(c),needsRefreshSats:FfiConverterUInt64.readFromCursor(c),pendingSats:FfiConverterUInt64.readFromCursor(c),totalSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.spendableSats,c);FfiConverterUInt64.writeIntoCursor(value.needsRefreshSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.spendableSats)+FfiConverterUInt64.allocationSize(value.needsRefreshSats)+FfiConverterUInt64.allocationSize(value.pendingSats)+FfiConverterUInt64.allocationSize(value.totalSats);}};return new FFIConverter();})();/**
|
|
250
254
|
* Generated factory for {@link LightningInvoice} record objects.
|
|
251
|
-
*/export const LightningInvoice=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningInvoice=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+FfiConverterUInt64.allocationSize(value.amountSats);}}return new FFIConverter();})();/**
|
|
255
|
+
*/export const LightningInvoice=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningInvoice=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+FfiConverterUInt64.allocationSize(value.amountSats);}};return new FFIConverter();})();/**
|
|
252
256
|
* A BIP 321 URI built by `Wallet::bip321_uri`, with the destinations in it.
|
|
253
257
|
*//**
|
|
254
258
|
* Generated factory for {@link Bip321Uri} record objects.
|
|
255
|
-
*/export const Bip321Uri=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBip321Uri=(()=>{class FFIConverter extends 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();})();/**
|
|
259
|
+
*/export const Bip321Uri=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBip321Uri=(()=>{class FFIConverter extends 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
260
|
* What `Wallet::bip321_uri` puts in the URI. Every field is optional.
|
|
257
261
|
*//**
|
|
258
262
|
* Generated factory for {@link Bip321UriOptions} record objects.
|
|
259
|
-
*/export const Bip321UriOptions=(()=>{const defaults=()=>({amountSats:undefined,label:undefined,message:undefined,ark:true,lightning:true,onchainAddress:undefined});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBip321UriOptions=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{amountSats:FfiConverterOptionalUInt64.readFromCursor(c),label:FfiConverterOptionalString.readFromCursor(c),message:FfiConverterOptionalString.readFromCursor(c),ark:FfiConverterBool.readFromCursor(c),lightning: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);FfiConverterBool.writeIntoCursor(value.ark,c);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)+FfiConverterBool.allocationSize(value.ark)+FfiConverterBool.allocationSize(value.lightning)+FfiConverterOptionalString.allocationSize(value.onchainAddress);}}return new FFIConverter();})();/**
|
|
263
|
+
*/export const Bip321UriOptions=(()=>{const defaults=()=>({amountSats:undefined,label:undefined,message:undefined,ark:true,lightning:true,onchainAddress:undefined});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBip321UriOptions=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{amountSats:FfiConverterOptionalUInt64.readFromCursor(c),label:FfiConverterOptionalString.readFromCursor(c),message:FfiConverterOptionalString.readFromCursor(c),ark:FfiConverterBool.readFromCursor(c),lightning: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);FfiConverterBool.writeIntoCursor(value.ark,c);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)+FfiConverterBool.allocationSize(value.ark)+FfiConverterBool.allocationSize(value.lightning)+FfiConverterOptionalString.allocationSize(value.onchainAddress);}};return new FFIConverter();})();/**
|
|
260
264
|
* Reference to a block in the blockchain
|
|
261
265
|
*//**
|
|
262
266
|
* Generated factory for {@link BlockRef} record objects.
|
|
263
|
-
*/export const BlockRef=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBlockRef=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{height:FfiConverterUInt32.readFromCursor(c),hash:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt32.writeIntoCursor(value.height,c);FfiConverterString.writeIntoCursor(value.hash,c);}allocationSize(value){return FfiConverterUInt32.allocationSize(value.height)+FfiConverterString.allocationSize(value.hash);}}return new FFIConverter();})();/**
|
|
267
|
+
*/export const BlockRef=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBlockRef=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{height:FfiConverterUInt32.readFromCursor(c),hash:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt32.writeIntoCursor(value.height,c);FfiConverterString.writeIntoCursor(value.hash,c);}allocationSize(value){return FfiConverterUInt32.allocationSize(value.height)+FfiConverterString.allocationSize(value.hash);}};return new FFIConverter();})();/**
|
|
264
268
|
* Destination for an externally funded board (e.g. a payjoin receive).
|
|
265
269
|
*
|
|
266
270
|
* The funding script commits to the derived keypair and expiry height, so
|
|
@@ -269,31 +273,31 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
269
273
|
* after the sender changes the transaction.
|
|
270
274
|
*//**
|
|
271
275
|
* Generated factory for {@link BoardFundingInfo} record objects.
|
|
272
|
-
*/export const BoardFundingInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFundingInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),expiryHeight:FfiConverterUInt32.readFromCursor(c),keypairIndex:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);FfiConverterUInt32.writeIntoCursor(value.keypairIndex,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+FfiConverterUInt32.allocationSize(value.expiryHeight)+FfiConverterUInt32.allocationSize(value.keypairIndex);}}return new FFIConverter();})();/**
|
|
276
|
+
*/export const BoardFundingInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBoardFundingInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),expiryHeight:FfiConverterUInt32.readFromCursor(c),keypairIndex:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);FfiConverterUInt32.writeIntoCursor(value.keypairIndex,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+FfiConverterUInt32.allocationSize(value.expiryHeight)+FfiConverterUInt32.allocationSize(value.keypairIndex);}};return new FFIConverter();})();/**
|
|
273
277
|
* Fields of a BOLT11 invoice, as returned by `decode_bolt11_invoice`.
|
|
274
278
|
*//**
|
|
275
279
|
* Generated factory for {@link Bolt11InvoiceDetails} record objects.
|
|
276
|
-
*/export const Bolt11InvoiceDetails=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBolt11InvoiceDetails=(()=>{class FFIConverter extends 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:FfiConverterUInt64.readFromCursor(c),expiresAt: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);FfiConverterUInt64.writeIntoCursor(value.createdAt,c);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)+FfiConverterUInt64.allocationSize(value.createdAt)+FfiConverterUInt64.allocationSize(value.expiresAt);}}return new FFIConverter();})();/**
|
|
280
|
+
*/export const Bolt11InvoiceDetails=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeBolt11InvoiceDetails=(()=>{class FFIConverter extends 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:FfiConverterUInt64.readFromCursor(c),expiresAt: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);FfiConverterUInt64.writeIntoCursor(value.createdAt,c);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)+FfiConverterUInt64.allocationSize(value.createdAt)+FfiConverterUInt64.allocationSize(value.expiresAt);}};return new FFIConverter();})();/**
|
|
277
281
|
* Generated factory for {@link Config} record objects.
|
|
278
|
-
*/export const Config=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeConfig=(()=>{class FFIConverter extends 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();})();/**
|
|
282
|
+
*/export const Config=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeConfig=(()=>{class FFIConverter extends 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();})();/**
|
|
279
283
|
* Parameters for creating a CPFP (Child Pays For Parent) transaction
|
|
280
284
|
*//**
|
|
281
285
|
* Generated factory for {@link CpfpParams} record objects.
|
|
282
|
-
*/export const CpfpParams=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeCpfpParams=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txHex:FfiConverterString.readFromCursor(c),feesType:FfiConverterString.readFromCursor(c),effectiveFeeRateSatPerVb:FfiConverterUInt64.readFromCursor(c),currentPackageFeeSats:FfiConverterOptionalUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterString.writeIntoCursor(value.feesType,c);FfiConverterUInt64.writeIntoCursor(value.effectiveFeeRateSatPerVb,c);FfiConverterOptionalUInt64.writeIntoCursor(value.currentPackageFeeSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txHex)+FfiConverterString.allocationSize(value.feesType)+FfiConverterUInt64.allocationSize(value.effectiveFeeRateSatPerVb)+FfiConverterOptionalUInt64.allocationSize(value.currentPackageFeeSats);}}return new FFIConverter();})();/**
|
|
286
|
+
*/export const CpfpParams=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeCpfpParams=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txHex:FfiConverterString.readFromCursor(c),feesType:FfiConverterString.readFromCursor(c),effectiveFeeRateSatPerVb:FfiConverterUInt64.readFromCursor(c),currentPackageFeeSats:FfiConverterOptionalUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterString.writeIntoCursor(value.feesType,c);FfiConverterUInt64.writeIntoCursor(value.effectiveFeeRateSatPerVb,c);FfiConverterOptionalUInt64.writeIntoCursor(value.currentPackageFeeSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txHex)+FfiConverterString.allocationSize(value.feesType)+FfiConverterUInt64.allocationSize(value.effectiveFeeRateSatPerVb)+FfiConverterOptionalUInt64.allocationSize(value.currentPackageFeeSats);}};return new FFIConverter();})();/**
|
|
283
287
|
* What [`read_datadir_info`] found in a wallet directory.
|
|
284
288
|
*//**
|
|
285
289
|
* Generated factory for {@link DatadirInfo} record objects.
|
|
286
|
-
*/export const DatadirInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDatadirInfo=(()=>{class FFIConverter extends 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();})();/**
|
|
290
|
+
*/export const DatadirInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDatadirInfo=(()=>{class FFIConverter extends 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
291
|
* Wallet information that helps to debug issues, mirroring
|
|
288
292
|
* `bark::DebugInfo` (what `bark debug-info` prints). Users can share it in
|
|
289
293
|
* support requests.
|
|
290
294
|
*//**
|
|
291
295
|
* Generated factory for {@link DebugInfo} record objects.
|
|
292
|
-
*/export const DebugInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDebugInfo=(()=>{class FFIConverter extends 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();})();/**
|
|
296
|
+
*/export const DebugInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDebugInfo=(()=>{class FFIConverter extends 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();})();/**
|
|
293
297
|
* A Bitcoin transaction output destination
|
|
294
298
|
*//**
|
|
295
299
|
* Generated factory for {@link Destination} record objects.
|
|
296
|
-
*/export const Destination=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDestination=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+FfiConverterUInt64.allocationSize(value.amountSats);}}return new FFIConverter();})();/**
|
|
300
|
+
*/export const Destination=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeDestination=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{address:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.address,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);}allocationSize(value){return FfiConverterString.allocationSize(value.address)+FfiConverterUInt64.allocationSize(value.amountSats);}};return new FFIConverter();})();/**
|
|
297
301
|
* Estimated onchain cost of unilaterally (emergency) exiting a set of VTXOs.
|
|
298
302
|
*
|
|
299
303
|
* Mirrors bark-rest's `GET /exits/fee` response. The two legs are paid from
|
|
@@ -303,7 +307,7 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
303
307
|
* matured outputs are drained.
|
|
304
308
|
*//**
|
|
305
309
|
* Generated factory for {@link EmergencyExitFeeEstimate} record objects.
|
|
306
|
-
*/export const EmergencyExitFeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeEmergencyExitFeeEstimate=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{exitBroadcastFeeSats:FfiConverterUInt64.readFromCursor(c),claimFeeSats:FfiConverterUInt64.readFromCursor(c),totalFeeSats:FfiConverterUInt64.readFromCursor(c),feeRateSatPerVb:FfiConverterUInt64.readFromCursor(c),txsToBroadcast:FfiConverterUInt64.readFromCursor(c),fundable:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.exitBroadcastFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.claimFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.totalFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.feeRateSatPerVb,c);FfiConverterUInt64.writeIntoCursor(value.txsToBroadcast,c);FfiConverterBool.writeIntoCursor(value.fundable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.exitBroadcastFeeSats)+FfiConverterUInt64.allocationSize(value.claimFeeSats)+FfiConverterUInt64.allocationSize(value.totalFeeSats)+FfiConverterUInt64.allocationSize(value.feeRateSatPerVb)+FfiConverterUInt64.allocationSize(value.txsToBroadcast)+FfiConverterBool.allocationSize(value.fundable);}}return new FFIConverter();})();/**
|
|
310
|
+
*/export const EmergencyExitFeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeEmergencyExitFeeEstimate=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{exitBroadcastFeeSats:FfiConverterUInt64.readFromCursor(c),claimFeeSats:FfiConverterUInt64.readFromCursor(c),totalFeeSats:FfiConverterUInt64.readFromCursor(c),feeRateSatPerVb:FfiConverterUInt64.readFromCursor(c),txsToBroadcast:FfiConverterUInt64.readFromCursor(c),fundable:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.exitBroadcastFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.claimFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.totalFeeSats,c);FfiConverterUInt64.writeIntoCursor(value.feeRateSatPerVb,c);FfiConverterUInt64.writeIntoCursor(value.txsToBroadcast,c);FfiConverterBool.writeIntoCursor(value.fundable,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.exitBroadcastFeeSats)+FfiConverterUInt64.allocationSize(value.claimFeeSats)+FfiConverterUInt64.allocationSize(value.totalFeeSats)+FfiConverterUInt64.allocationSize(value.feeRateSatPerVb)+FfiConverterUInt64.allocationSize(value.txsToBroadcast)+FfiConverterBool.allocationSize(value.fundable);}};return new FFIConverter();})();/**
|
|
307
311
|
* Lightweight discriminator for [`ExitState`], mirroring
|
|
308
312
|
* `bark::exit::ExitStateKind`.
|
|
309
313
|
*
|
|
@@ -319,23 +323,23 @@ export let ExitCancelFailure_Tags=/*#__PURE__*/function(ExitCancelFailure_Tags){
|
|
|
319
323
|
* each is a normal state the exit can legitimately be in. Genuine failures
|
|
320
324
|
* (database, chain source unreachable) still surface as `Err`.
|
|
321
325
|
*/export const ExitCancelFailure=(()=>{/**
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
326
|
+
* No exit was ever started for this VTXO.
|
|
327
|
+
*/class NotExiting_ extends UniffiEnum{/**
|
|
328
|
+
* @private
|
|
329
|
+
* This field is private and should not be used, use `tag` instead.
|
|
330
|
+
*/[uniffiTypeNameSymbol]="ExitCancelFailure";tag=ExitCancelFailure_Tags.NotExiting;constructor(){super("ExitCancelFailure","NotExiting");}static new(){return new NotExiting_();}static instanceOf(obj){return obj.tag===ExitCancelFailure_Tags.NotExiting;}}/**
|
|
331
|
+
* The exit has progressed past its abortable window. `state` is the
|
|
332
|
+
* state that blocked the cancellation.
|
|
333
|
+
*/class TooLate_ extends UniffiEnum{/**
|
|
334
|
+
* @private
|
|
335
|
+
* This field is private and should not be used, use `tag` instead.
|
|
336
|
+
*/[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;}}/**
|
|
337
|
+
* The final exit transaction is already in the mempool or a block, so
|
|
338
|
+
* the exit can no longer be called off.
|
|
339
|
+
*/class AlreadyBroadcast_ extends UniffiEnum{/**
|
|
340
|
+
* @private
|
|
341
|
+
* This field is private and should not be used, use `tag` instead.
|
|
342
|
+
*/[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[uniffiTypeNameSymbol]==="ExitCancelFailure";}return Object.freeze({instanceOf,NotExiting:NotExiting_,TooLate:TooLate_,AlreadyBroadcast:AlreadyBroadcast_});})();/**
|
|
339
343
|
* Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
|
|
340
344
|
* cancel the exit.
|
|
341
345
|
*
|
|
@@ -352,25 +356,25 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
352
356
|
* When `false`, `reason` says why.
|
|
353
357
|
*//**
|
|
354
358
|
* Generated factory for {@link ExitCancelResult} record objects.
|
|
355
|
-
*/export const ExitCancelResult=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitCancelResult=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{canceled:FfiConverterBool.readFromCursor(c),reason:FfiConverterOptionalTypeExitCancelFailure.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterBool.writeIntoCursor(value.canceled,c);FfiConverterOptionalTypeExitCancelFailure.writeIntoCursor(value.reason,c);}allocationSize(value){return FfiConverterBool.allocationSize(value.canceled)+FfiConverterOptionalTypeExitCancelFailure.allocationSize(value.reason);}}return new FFIConverter();})();// Enum: ExitTxOrigin
|
|
359
|
+
*/export const ExitCancelResult=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitCancelResult=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{canceled:FfiConverterBool.readFromCursor(c),reason:FfiConverterOptionalTypeExitCancelFailure.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterBool.writeIntoCursor(value.canceled,c);FfiConverterOptionalTypeExitCancelFailure.writeIntoCursor(value.reason,c);}allocationSize(value){return FfiConverterBool.allocationSize(value.canceled)+FfiConverterOptionalTypeExitCancelFailure.allocationSize(value.reason);}};return new FFIConverter();})();// Enum: ExitTxOrigin
|
|
356
360
|
export let ExitTxOrigin_Tags=/*#__PURE__*/function(ExitTxOrigin_Tags){ExitTxOrigin_Tags["Wallet"]="Wallet";ExitTxOrigin_Tags["Mempool"]="Mempool";ExitTxOrigin_Tags["Block"]="Block";return ExitTxOrigin_Tags;}({});/**
|
|
357
361
|
* Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
|
|
358
362
|
*/export const ExitTxOrigin=(()=>{/**
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
363
|
+
* Broadcast by this wallet.
|
|
364
|
+
*/class Wallet_ extends UniffiEnum{/**
|
|
365
|
+
* @private
|
|
366
|
+
* This field is private and should not be used, use `tag` instead.
|
|
367
|
+
*/[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;}}/**
|
|
368
|
+
* Seen in the mempool.
|
|
369
|
+
*/class Mempool_ extends UniffiEnum{/**
|
|
370
|
+
* @private
|
|
371
|
+
* This field is private and should not be used, use `tag` instead.
|
|
372
|
+
*/[uniffiTypeNameSymbol]="ExitTxOrigin";tag=ExitTxOrigin_Tags.Mempool;constructor(){super("ExitTxOrigin","Mempool");}static new(){return new Mempool_();}static instanceOf(obj){return obj.tag===ExitTxOrigin_Tags.Mempool;}}/**
|
|
373
|
+
* Seen confirmed in a block.
|
|
374
|
+
*/class Block_ extends UniffiEnum{/**
|
|
375
|
+
* @private
|
|
376
|
+
* This field is private and should not be used, use `tag` instead.
|
|
377
|
+
*/[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[uniffiTypeNameSymbol]==="ExitTxOrigin";}return Object.freeze({instanceOf,Wallet:Wallet_,Mempool:Mempool_,Block:Block_});})();/**
|
|
374
378
|
* Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
|
|
375
379
|
*/// FfiConverter for enum ExitTxOrigin
|
|
376
380
|
const FfiConverterTypeExitTxOrigin=(()=>{class FFIConverter extends 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 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.
|
|
@@ -378,41 +382,46 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
378
382
|
* The CPFP child of an exit transaction.
|
|
379
383
|
*//**
|
|
380
384
|
* Generated factory for {@link ExitChildTransaction} record objects.
|
|
381
|
-
*/export const ExitChildTransaction=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitChildTransaction=(()=>{class FFIConverter extends 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();})();/**
|
|
385
|
+
*/export const ExitChildTransaction=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitChildTransaction=(()=>{class FFIConverter extends 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
386
|
* Claim transaction for exited funds
|
|
383
387
|
*//**
|
|
384
388
|
* Generated factory for {@link ExitClaimTransaction} record objects.
|
|
385
|
-
*/export const ExitClaimTransaction=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitClaimTransaction=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{psbtBase64:FfiConverterString.readFromCursor(c),feeSats:FfiConverterUInt64.readFromCursor(c),vtxoIds:FfiConverterSequenceString.readFromCursor(c),skippedVtxoIds:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.psbtBase64,c);FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.skippedVtxoIds,c);}allocationSize(value){return FfiConverterString.allocationSize(value.psbtBase64)+FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterSequenceString.allocationSize(value.vtxoIds)+FfiConverterSequenceString.allocationSize(value.skippedVtxoIds);}}return new FFIConverter();})()
|
|
389
|
+
*/export const ExitClaimTransaction=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitClaimTransaction=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{psbtBase64:FfiConverterString.readFromCursor(c),feeSats:FfiConverterUInt64.readFromCursor(c),vtxoIds:FfiConverterSequenceString.readFromCursor(c),skippedVtxoIds:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.psbtBase64,c);FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);FfiConverterSequenceString.writeIntoCursor(value.skippedVtxoIds,c);}allocationSize(value){return FfiConverterString.allocationSize(value.psbtBase64)+FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterSequenceString.allocationSize(value.vtxoIds)+FfiConverterSequenceString.allocationSize(value.skippedVtxoIds);}};return new FFIConverter();})();/**
|
|
390
|
+
* Fee a transaction commits together with its unconfirmed ancestors,
|
|
391
|
+
* mirroring `bark::exit::FeeInfo`.
|
|
392
|
+
*//**
|
|
393
|
+
* Generated factory for {@link ExitFeeInfo} record objects.
|
|
394
|
+
*/export const ExitFeeInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitFeeInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{feeRateSatPerKwu:FfiConverterUInt64.readFromCursor(c),totalFeeSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.feeRateSatPerKwu,c);FfiConverterUInt64.writeIntoCursor(value.totalFeeSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.feeRateSatPerKwu)+FfiConverterUInt64.allocationSize(value.totalFeeSats);}};return new FFIConverter();})();// Enum: ExitTxStatus
|
|
386
395
|
export let 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;}({});/**
|
|
387
396
|
* Broadcast/confirmation status of one transaction in an exit chain,
|
|
388
397
|
* mirroring `bark::exit::ExitTxStatus`.
|
|
389
398
|
*/export const ExitTxStatus=(()=>{/**
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
399
|
+
* Inputs are still being verified.
|
|
400
|
+
*/class VerifyInputs_ extends UniffiEnum{/**
|
|
401
|
+
* @private
|
|
402
|
+
* This field is private and should not be used, use `tag` instead.
|
|
403
|
+
*/[uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.VerifyInputs;constructor(){super("ExitTxStatus","VerifyInputs");}static new(){return new VerifyInputs_();}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.VerifyInputs;}}/**
|
|
404
|
+
* Waiting for the given input txids to confirm. Sorted for a stable
|
|
405
|
+
* order (upstream keeps them in a set).
|
|
406
|
+
*/class AwaitingInputConfirmation_ extends UniffiEnum{/**
|
|
407
|
+
* @private
|
|
408
|
+
* This field is private and should not be used, use `tag` instead.
|
|
409
|
+
*/[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;}}/**
|
|
410
|
+
* Ready for its CPFP child to be broadcast.
|
|
411
|
+
*/class AwaitingCpfpBroadcast_ extends UniffiEnum{/**
|
|
412
|
+
* @private
|
|
413
|
+
* This field is private and should not be used, use `tag` instead.
|
|
414
|
+
*/[uniffiTypeNameSymbol]="ExitTxStatus";tag=ExitTxStatus_Tags.AwaitingCpfpBroadcast;constructor(){super("ExitTxStatus","AwaitingCpfpBroadcast");}static new(){return new AwaitingCpfpBroadcast_();}static instanceOf(obj){return obj.tag===ExitTxStatus_Tags.AwaitingCpfpBroadcast;}}/**
|
|
415
|
+
* CPFP child broadcast; waiting for confirmation.
|
|
416
|
+
*/class AwaitingConfirmation_ extends UniffiEnum{/**
|
|
417
|
+
* @private
|
|
418
|
+
* This field is private and should not be used, use `tag` instead.
|
|
419
|
+
*/[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;}}/**
|
|
420
|
+
* Confirmed in a block.
|
|
421
|
+
*/class Confirmed_ extends UniffiEnum{/**
|
|
422
|
+
* @private
|
|
423
|
+
* This field is private and should not be used, use `tag` instead.
|
|
424
|
+
*/[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[uniffiTypeNameSymbol]==="ExitTxStatus";}return Object.freeze({instanceOf,VerifyInputs:VerifyInputs_,AwaitingInputConfirmation:AwaitingInputConfirmation_,AwaitingCpfpBroadcast:AwaitingCpfpBroadcast_,AwaitingConfirmation:AwaitingConfirmation_,Confirmed:Confirmed_});})();/**
|
|
416
425
|
* Broadcast/confirmation status of one transaction in an exit chain,
|
|
417
426
|
* mirroring `bark::exit::ExitTxStatus`.
|
|
418
427
|
*/// FfiConverter for enum ExitTxStatus
|
|
@@ -421,11 +430,11 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
421
430
|
* One transaction in an exit's unilateral broadcast chain.
|
|
422
431
|
*//**
|
|
423
432
|
* Generated factory for {@link ExitTx} record objects.
|
|
424
|
-
*/export const ExitTx=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTx=(()=>{class FFIConverter extends 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();})();/**
|
|
433
|
+
*/export const ExitTx=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTx=(()=>{class FFIConverter extends 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
434
|
* A Bitcoin transaction outpoint (reference to a previous output)
|
|
426
435
|
*//**
|
|
427
436
|
* Generated factory for {@link OutPoint} record objects.
|
|
428
|
-
*/export const OutPoint=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOutPoint=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),vout:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterUInt32.writeIntoCursor(value.vout,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterUInt32.allocationSize(value.vout);}}return new FFIConverter();})();// Enum: ExitState
|
|
437
|
+
*/export const OutPoint=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOutPoint=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),vout:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterUInt32.writeIntoCursor(value.vout,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterUInt32.allocationSize(value.vout);}};return new FFIConverter();})();// Enum: ExitState
|
|
429
438
|
export let 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;}({});/**
|
|
430
439
|
* State of a unilateral exit, mirroring `bark::exit::ExitState`.
|
|
431
440
|
*
|
|
@@ -434,56 +443,56 @@ export let ExitState_Tags=/*#__PURE__*/function(ExitState_Tags){ExitState_Tags["
|
|
|
434
443
|
* `"claimed"`, `"vtxo-already-spent"`, `"vtxo-swept"`, `"canceled"`), with
|
|
435
444
|
* camelCase fields.
|
|
436
445
|
*/export const ExitState=(()=>{/**
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
446
|
+
* The exit was requested at the given tip.
|
|
447
|
+
*/class Start_ extends UniffiEnum{/**
|
|
448
|
+
* @private
|
|
449
|
+
* This field is private and should not be used, use `tag` instead.
|
|
450
|
+
*/[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;}}/**
|
|
451
|
+
* The exit transaction chain is being broadcast and confirmed.
|
|
452
|
+
*/class Processing_ extends UniffiEnum{/**
|
|
453
|
+
* @private
|
|
454
|
+
* This field is private and should not be used, use `tag` instead.
|
|
455
|
+
*/[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;}}/**
|
|
456
|
+
* Fully confirmed; waiting out the exit delta until claimable.
|
|
457
|
+
*/class AwaitingDelta_ extends UniffiEnum{/**
|
|
458
|
+
* @private
|
|
459
|
+
* This field is private and should not be used, use `tag` instead.
|
|
460
|
+
*/[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;}}/**
|
|
461
|
+
* The exit output can be claimed.
|
|
462
|
+
*/class Claimable_ extends UniffiEnum{/**
|
|
463
|
+
* @private
|
|
464
|
+
* This field is private and should not be used, use `tag` instead.
|
|
465
|
+
*/[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;}}/**
|
|
466
|
+
* A claim transaction has been broadcast.
|
|
467
|
+
*/class ClaimInProgress_ extends UniffiEnum{/**
|
|
468
|
+
* @private
|
|
469
|
+
* This field is private and should not be used, use `tag` instead.
|
|
470
|
+
*/[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;}}/**
|
|
471
|
+
* Terminal: the exit output was claimed (or spent deeper in the tree).
|
|
472
|
+
*/class Claimed_ extends UniffiEnum{/**
|
|
473
|
+
* @private
|
|
474
|
+
* This field is private and should not be used, use `tag` instead.
|
|
475
|
+
*/[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;}}/**
|
|
476
|
+
* Terminal: the VTXO was already spent offchain, so the exit cannot
|
|
477
|
+
* proceed.
|
|
478
|
+
*/class VtxoAlreadySpent_ extends UniffiEnum{/**
|
|
479
|
+
* @private
|
|
480
|
+
* This field is private and should not be used, use `tag` instead.
|
|
481
|
+
*/[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;}}/**
|
|
482
|
+
* Terminal: an output the exit chain needs was spent on chain by someone
|
|
483
|
+
* else, in practice the server sweeping a VTXO that expired mid-exit.
|
|
484
|
+
* `spent_inputs` are the exit transaction inputs that were taken. A
|
|
485
|
+
* refresh may still be possible.
|
|
486
|
+
*/class VtxoSwept_ extends UniffiEnum{/**
|
|
487
|
+
* @private
|
|
488
|
+
* This field is private and should not be used, use `tag` instead.
|
|
489
|
+
*/[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;}}/**
|
|
490
|
+
* Resumable: the user canceled the exit before its final transaction
|
|
491
|
+
* was broadcast. The VTXO stays spendable.
|
|
492
|
+
*/class Canceled_ extends UniffiEnum{/**
|
|
493
|
+
* @private
|
|
494
|
+
* This field is private and should not be used, use `tag` instead.
|
|
495
|
+
*/[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[uniffiTypeNameSymbol]==="ExitState";}return Object.freeze({instanceOf,Start:Start_,Processing:Processing_,AwaitingDelta:AwaitingDelta_,Claimable:Claimable_,ClaimInProgress:ClaimInProgress_,Claimed:Claimed_,VtxoAlreadySpent:VtxoAlreadySpent_,VtxoSwept:VtxoSwept_,Canceled:Canceled_});})();/**
|
|
487
496
|
* State of a unilateral exit, mirroring `bark::exit::ExitState`.
|
|
488
497
|
*
|
|
489
498
|
* Serde/TS tags match upstream's kebab-case serialization (`"start"`,
|
|
@@ -496,53 +505,57 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
496
505
|
* Status of an exit progression
|
|
497
506
|
*//**
|
|
498
507
|
* Generated factory for {@link ExitProgressStatus} record objects.
|
|
499
|
-
*/export const ExitProgressStatus=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitProgressStatus=(()=>{class FFIConverter extends 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();})();/**
|
|
508
|
+
*/export const ExitProgressStatus=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitProgressStatus=(()=>{class FFIConverter extends 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();})();/**
|
|
509
|
+
* A transaction of an exit chain, mirroring `bark::exit::TransactionInfo`.
|
|
510
|
+
*//**
|
|
511
|
+
* Generated factory for {@link ExitTransactionInfo} record objects.
|
|
512
|
+
*/export const ExitTransactionInfo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex);}};return new FFIConverter();})();/**
|
|
500
513
|
* One transaction of an exit: the exit transaction itself and, once it was
|
|
501
514
|
* fee-bumped, the child that confirms it. A unilateral exit is a chain of
|
|
502
515
|
* these, root first.
|
|
503
516
|
*//**
|
|
504
517
|
* Generated factory for {@link ExitTransactionPackage} record objects.
|
|
505
|
-
*/export const ExitTransactionPackage=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionPackage=(()=>{class FFIConverter extends 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();})();/**
|
|
518
|
+
*/export const ExitTransactionPackage=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionPackage=(()=>{class FFIConverter extends 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();})();/**
|
|
506
519
|
* Detailed status of an exit transaction
|
|
507
520
|
*
|
|
508
521
|
* Returned for live and finished exits alike by `get_exit_status`,
|
|
509
522
|
* `list_all_exits`, `list_live_exits` and `list_finished_exits`.
|
|
510
523
|
*//**
|
|
511
524
|
* Generated factory for {@link ExitTransactionStatus} record objects.
|
|
512
|
-
*/export const ExitTransactionStatus=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionStatus=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),history:FfiConverterOptionalSequenceTypeExitState.readFromCursor(c),transactionCount: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);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)+FfiConverterUInt32.allocationSize(value.transactionCount)+FfiConverterSequenceTypeExitTransactionPackage.allocationSize(value.transactions);}}return new FFIConverter();})();/**
|
|
525
|
+
*/export const ExitTransactionStatus=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitTransactionStatus=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),history:FfiConverterOptionalSequenceTypeExitState.readFromCursor(c),transactionCount: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);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)+FfiConverterUInt32.allocationSize(value.transactionCount)+FfiConverterSequenceTypeExitTransactionPackage.allocationSize(value.transactions);}};return new FFIConverter();})();/**
|
|
513
526
|
* A VTXO that is being unilaterally exited
|
|
514
527
|
*//**
|
|
515
528
|
* Generated factory for {@link ExitVtxo} record objects.
|
|
516
|
-
*/export const ExitVtxo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitVtxo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),isClaimable:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);FfiConverterBool.writeIntoCursor(value.isClaimable,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterTypeExitState.allocationSize(value.state)+FfiConverterBool.allocationSize(value.isClaimable);}}return new FFIConverter();})();/**
|
|
529
|
+
*/export const ExitVtxo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeExitVtxo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),state:FfiConverterTypeExitState.readFromCursor(c),isClaimable:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterTypeExitState.writeIntoCursor(value.state,c);FfiConverterBool.writeIntoCursor(value.isClaimable,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterTypeExitState.allocationSize(value.state)+FfiConverterBool.allocationSize(value.isClaimable);}};return new FFIConverter();})();/**
|
|
517
530
|
* Generated factory for {@link FeeEstimate} record objects.
|
|
518
|
-
*/export const FeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeEstimate=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{grossAmountSats:FfiConverterUInt64.readFromCursor(c),feeSats:FfiConverterUInt64.readFromCursor(c),netAmountSats:FfiConverterUInt64.readFromCursor(c),vtxosSpent:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.grossAmountSats,c);FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterUInt64.writeIntoCursor(value.netAmountSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxosSpent,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.grossAmountSats)+FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterUInt64.allocationSize(value.netAmountSats)+FfiConverterSequenceString.allocationSize(value.vtxosSpent);}}return new FFIConverter();})();/**
|
|
531
|
+
*/export const FeeEstimate=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeEstimate=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{grossAmountSats:FfiConverterUInt64.readFromCursor(c),feeSats:FfiConverterUInt64.readFromCursor(c),netAmountSats:FfiConverterUInt64.readFromCursor(c),vtxosSpent:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.grossAmountSats,c);FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterUInt64.writeIntoCursor(value.netAmountSats,c);FfiConverterSequenceString.writeIntoCursor(value.vtxosSpent,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.grossAmountSats)+FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterUInt64.allocationSize(value.netAmountSats)+FfiConverterSequenceString.allocationSize(value.vtxosSpent);}};return new FFIConverter();})();/**
|
|
519
532
|
* Network fee rates by urgency, mirroring `bark::chain::FeeRates`.
|
|
520
533
|
*
|
|
521
534
|
* Rates are in sat/kwu (satoshis per 1000 weight units) — divide by 250 for
|
|
522
535
|
* sat/vB.
|
|
523
536
|
*//**
|
|
524
537
|
* Generated factory for {@link FeeRates} record objects.
|
|
525
|
-
*/export const FeeRates=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeRates=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{fastSatPerKwu:FfiConverterUInt64.readFromCursor(c),regularSatPerKwu:FfiConverterUInt64.readFromCursor(c),slowSatPerKwu:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.fastSatPerKwu,c);FfiConverterUInt64.writeIntoCursor(value.regularSatPerKwu,c);FfiConverterUInt64.writeIntoCursor(value.slowSatPerKwu,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.fastSatPerKwu)+FfiConverterUInt64.allocationSize(value.regularSatPerKwu)+FfiConverterUInt64.allocationSize(value.slowSatPerKwu);}}return new FFIConverter();})();/**
|
|
538
|
+
*/export const FeeRates=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeFeeRates=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{fastSatPerKwu:FfiConverterUInt64.readFromCursor(c),regularSatPerKwu:FfiConverterUInt64.readFromCursor(c),slowSatPerKwu:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.fastSatPerKwu,c);FfiConverterUInt64.writeIntoCursor(value.regularSatPerKwu,c);FfiConverterUInt64.writeIntoCursor(value.slowSatPerKwu,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.fastSatPerKwu)+FfiConverterUInt64.allocationSize(value.regularSatPerKwu)+FfiConverterUInt64.allocationSize(value.slowSatPerKwu);}};return new FFIConverter();})();/**
|
|
526
539
|
* Arguments for `Wallet::import_vtxo` / `Wallet::import_vtxos`, mirroring
|
|
527
540
|
* `bark::ImportVtxoArgs`.
|
|
528
541
|
*
|
|
529
542
|
* Every field has a default, so callers only set what they need.
|
|
530
543
|
*//**
|
|
531
544
|
* Generated factory for {@link ImportVtxoArgs} record objects.
|
|
532
|
-
*/export const ImportVtxoArgs=(()=>{const defaults=()=>({gapLimit:undefined,skipStatusCheck:false,allowPartial:false});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeImportVtxoArgs=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{gapLimit:FfiConverterOptionalUInt32.readFromCursor(c),skipStatusCheck:FfiConverterBool.readFromCursor(c),allowPartial:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterOptionalUInt32.writeIntoCursor(value.gapLimit,c);FfiConverterBool.writeIntoCursor(value.skipStatusCheck,c);FfiConverterBool.writeIntoCursor(value.allowPartial,c);}allocationSize(value){return FfiConverterOptionalUInt32.allocationSize(value.gapLimit)+FfiConverterBool.allocationSize(value.skipStatusCheck)+FfiConverterBool.allocationSize(value.allowPartial);}}return new FFIConverter();})();/**
|
|
545
|
+
*/export const ImportVtxoArgs=(()=>{const defaults=()=>({gapLimit:undefined,skipStatusCheck:false,allowPartial:false});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeImportVtxoArgs=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{gapLimit:FfiConverterOptionalUInt32.readFromCursor(c),skipStatusCheck:FfiConverterBool.readFromCursor(c),allowPartial:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterOptionalUInt32.writeIntoCursor(value.gapLimit,c);FfiConverterBool.writeIntoCursor(value.skipStatusCheck,c);FfiConverterBool.writeIntoCursor(value.allowPartial,c);}allocationSize(value){return FfiConverterOptionalUInt32.allocationSize(value.gapLimit)+FfiConverterBool.allocationSize(value.skipStatusCheck)+FfiConverterBool.allocationSize(value.allowPartial);}};return new FFIConverter();})();/**
|
|
533
546
|
* Generated factory for {@link LightningReceive} record objects.
|
|
534
|
-
*/export const LightningReceive=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceive=(()=>{class FFIConverter extends 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();})();/**
|
|
547
|
+
*/export const LightningReceive=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningReceive=(()=>{class FFIConverter extends 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();})();/**
|
|
535
548
|
* Generated factory for {@link LightningSend} record objects.
|
|
536
|
-
*/export const LightningSend=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSend=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),movementId:FfiConverterOptionalUInt32.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),feeSats:FfiConverterUInt64.readFromCursor(c),htlcVtxoCount:FfiConverterUInt32.readFromCursor(c),hasFailedRevocation:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterOptionalUInt32.writeIntoCursor(value.movementId,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterUInt32.writeIntoCursor(value.htlcVtxoCount,c);FfiConverterBool.writeIntoCursor(value.hasFailedRevocation,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+FfiConverterOptionalUInt32.allocationSize(value.movementId)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterUInt32.allocationSize(value.htlcVtxoCount)+FfiConverterBool.allocationSize(value.hasFailedRevocation);}}return new FFIConverter();})();/**
|
|
549
|
+
*/export const LightningSend=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningSend=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{invoice:FfiConverterString.readFromCursor(c),paymentHash:FfiConverterString.readFromCursor(c),movementId:FfiConverterOptionalUInt32.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),feeSats:FfiConverterUInt64.readFromCursor(c),htlcVtxoCount:FfiConverterUInt32.readFromCursor(c),hasFailedRevocation:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.invoice,c);FfiConverterString.writeIntoCursor(value.paymentHash,c);FfiConverterOptionalUInt32.writeIntoCursor(value.movementId,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterUInt64.writeIntoCursor(value.feeSats,c);FfiConverterUInt32.writeIntoCursor(value.htlcVtxoCount,c);FfiConverterBool.writeIntoCursor(value.hasFailedRevocation,c);}allocationSize(value){return FfiConverterString.allocationSize(value.invoice)+FfiConverterString.allocationSize(value.paymentHash)+FfiConverterOptionalUInt32.allocationSize(value.movementId)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterUInt64.allocationSize(value.feeSats)+FfiConverterUInt32.allocationSize(value.htlcVtxoCount)+FfiConverterBool.allocationSize(value.hasFailedRevocation);}};return new FFIConverter();})();/**
|
|
537
550
|
* Generated factory for {@link Movement} record objects.
|
|
538
|
-
*/export const Movement=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeMovement=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterUInt32.readFromCursor(c),status:FfiConverterString.readFromCursor(c),subsystemName:FfiConverterString.readFromCursor(c),subsystemKind:FfiConverterString.readFromCursor(c),metadataJson:FfiConverterString.readFromCursor(c),intendedBalanceSats:FfiConverterInt64.readFromCursor(c),effectiveBalanceSats:FfiConverterInt64.readFromCursor(c),offchainFeeSats: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){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);FfiConverterInt64.writeIntoCursor(value.intendedBalanceSats,c);FfiConverterInt64.writeIntoCursor(value.effectiveBalanceSats,c);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 FfiConverterUInt32.allocationSize(value.id)+FfiConverterString.allocationSize(value.status)+FfiConverterString.allocationSize(value.subsystemName)+FfiConverterString.allocationSize(value.subsystemKind)+FfiConverterString.allocationSize(value.metadataJson)+FfiConverterInt64.allocationSize(value.intendedBalanceSats)+FfiConverterInt64.allocationSize(value.effectiveBalanceSats)+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();})();/**
|
|
551
|
+
*/export const Movement=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeMovement=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterUInt32.readFromCursor(c),status:FfiConverterString.readFromCursor(c),subsystemName:FfiConverterString.readFromCursor(c),subsystemKind:FfiConverterString.readFromCursor(c),metadataJson:FfiConverterString.readFromCursor(c),intendedBalanceSats:FfiConverterInt64.readFromCursor(c),effectiveBalanceSats:FfiConverterInt64.readFromCursor(c),offchainFeeSats: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){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);FfiConverterInt64.writeIntoCursor(value.intendedBalanceSats,c);FfiConverterInt64.writeIntoCursor(value.effectiveBalanceSats,c);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 FfiConverterUInt32.allocationSize(value.id)+FfiConverterString.allocationSize(value.status)+FfiConverterString.allocationSize(value.subsystemName)+FfiConverterString.allocationSize(value.subsystemKind)+FfiConverterString.allocationSize(value.metadataJson)+FfiConverterInt64.allocationSize(value.intendedBalanceSats)+FfiConverterInt64.allocationSize(value.effectiveBalanceSats)+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
552
|
* What `offboard_all`, `offboard_vtxos` and `send_onchain` broadcast,
|
|
540
553
|
* mirroring `bark::OffboardResult`.
|
|
541
554
|
*//**
|
|
542
555
|
* Generated factory for {@link OffboardResult} record objects.
|
|
543
|
-
*/export const OffboardResult=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardResult=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),movementId:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterUInt32.writeIntoCursor(value.movementId,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterUInt32.allocationSize(value.movementId);}}return new FFIConverter();})();/**
|
|
556
|
+
*/export const OffboardResult=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOffboardResult=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),movementId:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterUInt32.writeIntoCursor(value.movementId,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterUInt32.allocationSize(value.movementId);}};return new FFIConverter();})();/**
|
|
544
557
|
* Generated factory for {@link OnchainBalance} record objects.
|
|
545
|
-
*/export const OnchainBalance=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOnchainBalance=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{confirmedSats:FfiConverterUInt64.readFromCursor(c),pendingSats:FfiConverterUInt64.readFromCursor(c),totalSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.confirmedSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.confirmedSats)+FfiConverterUInt64.allocationSize(value.pendingSats)+FfiConverterUInt64.allocationSize(value.totalSats);}}return new FFIConverter();})();/**
|
|
558
|
+
*/export const OnchainBalance=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeOnchainBalance=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{confirmedSats:FfiConverterUInt64.readFromCursor(c),pendingSats:FfiConverterUInt64.readFromCursor(c),totalSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt64.writeIntoCursor(value.confirmedSats,c);FfiConverterUInt64.writeIntoCursor(value.pendingSats,c);FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterUInt64.allocationSize(value.confirmedSats)+FfiConverterUInt64.allocationSize(value.pendingSats)+FfiConverterUInt64.allocationSize(value.totalSats);}};return new FFIConverter();})();/**
|
|
546
559
|
* A parsed payment string, mirroring `bark::PaymentRequest`.
|
|
547
560
|
*
|
|
548
561
|
* `label` and `message` come from a BIP 321 URI. For a bare BOLT11 invoice
|
|
@@ -550,9 +563,75 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
550
563
|
* description.
|
|
551
564
|
*//**
|
|
552
565
|
* Generated factory for {@link PaymentRequest} record objects.
|
|
553
|
-
*/export const PaymentRequest=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePaymentRequest=(()=>{class FFIConverter extends 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();})();/**
|
|
566
|
+
*/export const PaymentRequest=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePaymentRequest=(()=>{class FFIConverter extends 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();})();/**
|
|
554
567
|
* Generated factory for {@link PendingBoard} record objects.
|
|
555
|
-
*/export const PendingBoard=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePendingBoard=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),txid:FfiConverterString.readFromCursor(c),movementId:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterUInt32.writeIntoCursor(value.movementId,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterString.allocationSize(value.txid)+FfiConverterUInt32.allocationSize(value.movementId);}}return new FFIConverter();})()
|
|
568
|
+
*/export const PendingBoard=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePendingBoard=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),txid:FfiConverterString.readFromCursor(c),movementId:FfiConverterUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterUInt32.writeIntoCursor(value.movementId,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterString.allocationSize(value.txid)+FfiConverterUInt32.allocationSize(value.movementId);}};return new FFIConverter();})();// Enum: PresignedExitStatus
|
|
569
|
+
export let PresignedExitStatus_Tags=/*#__PURE__*/function(PresignedExitStatus_Tags){PresignedExitStatus_Tags["FullySigned"]="FullySigned";PresignedExitStatus_Tags["PartiallySigned"]="PartiallySigned";PresignedExitStatus_Tags["Unsigned"]="Unsigned";return PresignedExitStatus_Tags;}({});/**
|
|
570
|
+
* How much of a [`PresignedExit`]'s remaining broadcast work could be funded
|
|
571
|
+
* and signed, mirroring `bark::exit::PresignedExitStatus`.
|
|
572
|
+
*/export const PresignedExitStatus=(()=>{/**
|
|
573
|
+
* Every package has a signed child. The exit's broadcast completes once
|
|
574
|
+
* wave `exited_in_wave` (an index into [`PresignedExits::waves`])
|
|
575
|
+
* confirms; `None` when the chain is already confirmed and there is
|
|
576
|
+
* nothing to broadcast. `fee_info` totals the children's fees over the
|
|
577
|
+
* combined weight of this exit's packages.
|
|
578
|
+
*/class FullySigned_ extends UniffiEnum{/**
|
|
579
|
+
* @private
|
|
580
|
+
* This field is private and should not be used, use `tag` instead.
|
|
581
|
+
*/[uniffiTypeNameSymbol]="PresignedExitStatus";tag=PresignedExitStatus_Tags.FullySigned;constructor(inner){super("PresignedExitStatus","FullySigned");this.inner=Object.freeze(inner);}static new(inner){return new FullySigned_(inner);}static instanceOf(obj){return obj.tag===PresignedExitStatus_Tags.FullySigned;}}/**
|
|
582
|
+
* Confirmed onchain funds ran out mid-chain: wave `last_wave` holds this
|
|
583
|
+
* exit's last signed package and [`PresignedExit::unsigned`] continues
|
|
584
|
+
* right after it.
|
|
585
|
+
*/class PartiallySigned_ extends UniffiEnum{/**
|
|
586
|
+
* @private
|
|
587
|
+
* This field is private and should not be used, use `tag` instead.
|
|
588
|
+
*/[uniffiTypeNameSymbol]="PresignedExitStatus";tag=PresignedExitStatus_Tags.PartiallySigned;constructor(inner){super("PresignedExitStatus","PartiallySigned");this.inner=Object.freeze(inner);}static new(inner){return new PartiallySigned_(inner);}static instanceOf(obj){return obj.tag===PresignedExitStatus_Tags.PartiallySigned;}}/**
|
|
589
|
+
* No package could be funded.
|
|
590
|
+
*/class Unsigned_ extends UniffiEnum{/**
|
|
591
|
+
* @private
|
|
592
|
+
* This field is private and should not be used, use `tag` instead.
|
|
593
|
+
*/[uniffiTypeNameSymbol]="PresignedExitStatus";tag=PresignedExitStatus_Tags.Unsigned;constructor(){super("PresignedExitStatus","Unsigned");}static new(){return new Unsigned_();}static instanceOf(obj){return obj.tag===PresignedExitStatus_Tags.Unsigned;}}function instanceOf(obj){return obj[uniffiTypeNameSymbol]==="PresignedExitStatus";}return Object.freeze({instanceOf,FullySigned:FullySigned_,PartiallySigned:PartiallySigned_,Unsigned:Unsigned_});})();/**
|
|
594
|
+
* How much of a [`PresignedExit`]'s remaining broadcast work could be funded
|
|
595
|
+
* and signed, mirroring `bark::exit::PresignedExitStatus`.
|
|
596
|
+
*/// FfiConverter for enum PresignedExitStatus
|
|
597
|
+
const FfiConverterTypePresignedExitStatus=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new PresignedExitStatus.FullySigned({exitedInWave:FfiConverterOptionalUInt32.readFromCursor(c),feeInfo:FfiConverterTypeExitFeeInfo.readFromCursor(c)});case 2:return new PresignedExitStatus.PartiallySigned({lastWave:FfiConverterUInt32.readFromCursor(c)});case 3:return new PresignedExitStatus.Unsigned();default:throw new UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case PresignedExitStatus_Tags.FullySigned:{c.writeI32(1);const inner=value.inner;FfiConverterOptionalUInt32.writeIntoCursor(inner.exitedInWave,c);FfiConverterTypeExitFeeInfo.writeIntoCursor(inner.feeInfo,c);return;}case PresignedExitStatus_Tags.PartiallySigned:{c.writeI32(2);const inner=value.inner;FfiConverterUInt32.writeIntoCursor(inner.lastWave,c);return;}case PresignedExitStatus_Tags.Unsigned:{c.writeI32(3);return;}default:// Throwing from here means that PresignedExitStatus_Tags hasn't matched an ordinal.
|
|
598
|
+
throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case PresignedExitStatus_Tags.FullySigned:{const inner=value.inner;let size=4;size+=FfiConverterOptionalUInt32.allocationSize(inner.exitedInWave);size+=FfiConverterTypeExitFeeInfo.allocationSize(inner.feeInfo);return size;}case PresignedExitStatus_Tags.PartiallySigned:{const inner=value.inner;let size=4;size+=FfiConverterUInt32.allocationSize(inner.lastWave);return size;}case PresignedExitStatus_Tags.Unsigned:{return 4;}default:throw new UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
599
|
+
* The presigned broadcast work for one VTXO, mirroring
|
|
600
|
+
* `bark::exit::PresignedExit`.
|
|
601
|
+
*//**
|
|
602
|
+
* Generated factory for {@link PresignedExit} record objects.
|
|
603
|
+
*/export const PresignedExit=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePresignedExit=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),status:FfiConverterTypePresignedExitStatus.readFromCursor(c),unsigned:FfiConverterSequenceTypeExitTransactionInfo.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterTypePresignedExitStatus.writeIntoCursor(value.status,c);FfiConverterSequenceTypeExitTransactionInfo.writeIntoCursor(value.unsigned,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterTypePresignedExitStatus.allocationSize(value.status)+FfiConverterSequenceTypeExitTransactionInfo.allocationSize(value.unsigned);}};return new FFIConverter();})();/**
|
|
604
|
+
* A signed CPFP child and the fee it commits, mirroring
|
|
605
|
+
* `bark::exit::PresignedExitChildInfo`.
|
|
606
|
+
*//**
|
|
607
|
+
* Generated factory for {@link PresignedExitChild} record objects.
|
|
608
|
+
*/export const PresignedExitChild=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePresignedExitChild=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c),feeInfo:FfiConverterTypeExitFeeInfo.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterTypeExitFeeInfo.writeIntoCursor(value.feeInfo,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex)+FfiConverterTypeExitFeeInfo.allocationSize(value.feeInfo);}};return new FFIConverter();})();/**
|
|
609
|
+
* An `(exit, child)` transaction package, broadcast as one unit (e.g. with
|
|
610
|
+
* `submitpackage`), mirroring `bark::exit::PresignedExitPackage`.
|
|
611
|
+
*//**
|
|
612
|
+
* Generated factory for {@link PresignedExitPackage} record objects.
|
|
613
|
+
*/export const PresignedExitPackage=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePresignedExitPackage=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),exit:FfiConverterTypeExitTransactionInfo.readFromCursor(c),child:FfiConverterTypePresignedExitChild.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterTypeExitTransactionInfo.writeIntoCursor(value.exit,c);FfiConverterTypePresignedExitChild.writeIntoCursor(value.child,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterTypeExitTransactionInfo.allocationSize(value.exit)+FfiConverterTypePresignedExitChild.allocationSize(value.child);}};return new FFIConverter();})();/**
|
|
614
|
+
* One step of a presigned broadcast plan, mirroring
|
|
615
|
+
* `bark::exit::PresignedWave`. See [`PresignedExits`] for the rules.
|
|
616
|
+
*//**
|
|
617
|
+
* Generated factory for {@link PresignedWave} record objects.
|
|
618
|
+
*/export const PresignedWave=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePresignedWave=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{packages:FfiConverterSequenceTypePresignedExitPackage.readFromCursor(c),inMempool:FfiConverterSequenceTypeExitTransactionInfo.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceTypePresignedExitPackage.writeIntoCursor(value.packages,c);FfiConverterSequenceTypeExitTransactionInfo.writeIntoCursor(value.inMempool,c);}allocationSize(value){return FfiConverterSequenceTypePresignedExitPackage.allocationSize(value.packages)+FfiConverterSequenceTypeExitTransactionInfo.allocationSize(value.inMempool);}};return new FFIConverter();})();/**
|
|
619
|
+
* Presigned emergency-exit chains for a set of VTXOs: a wave-by-wave
|
|
620
|
+
* broadcast plan plus a per-VTXO summary, mirroring
|
|
621
|
+
* `bark::exit::PresignedExits`.
|
|
622
|
+
*
|
|
623
|
+
* Execute the plan in wave order: broadcast all of a wave's packages
|
|
624
|
+
* together, then wait for every one, and its `in_mempool` transactions, to
|
|
625
|
+
* confirm before the next wave. Each wave's children spend change confirmed
|
|
626
|
+
* by the previous wave.
|
|
627
|
+
*
|
|
628
|
+
* Presigning reserves no funds, so a later spend from the onchain wallet can
|
|
629
|
+
* invalidate the remaining children. It does reveal the change addresses
|
|
630
|
+
* those children pay to. The children are fully signed: treat the result as
|
|
631
|
+
* sensitive and store it accordingly.
|
|
632
|
+
*//**
|
|
633
|
+
* Generated factory for {@link PresignedExits} record objects.
|
|
634
|
+
*/export const PresignedExits=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypePresignedExits=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{exits:FfiConverterSequenceTypePresignedExit.readFromCursor(c),waves:FfiConverterSequenceTypePresignedWave.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceTypePresignedExit.writeIntoCursor(value.exits,c);FfiConverterSequenceTypePresignedWave.writeIntoCursor(value.waves,c);}allocationSize(value){return FfiConverterSequenceTypePresignedExit.allocationSize(value.exits)+FfiConverterSequenceTypePresignedWave.allocationSize(value.waves);}};return new FFIConverter();})();/**
|
|
556
635
|
* One bucket of a [`RecoveryReport`].
|
|
557
636
|
*
|
|
558
637
|
* `total_sats` only sums the VTXOs whose amount is known, so it can
|
|
@@ -560,7 +639,7 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
560
639
|
* `vtxo_ids` is sorted, since upstream buckets them unordered.
|
|
561
640
|
*//**
|
|
562
641
|
* Generated factory for {@link RecoveryBucket} record objects.
|
|
563
|
-
*/export const RecoveryBucket=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryBucket=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoIds:FfiConverterSequenceString.readFromCursor(c),totalSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterSequenceString.allocationSize(value.vtxoIds)+FfiConverterUInt64.allocationSize(value.totalSats);}}return new FFIConverter();})();/**
|
|
642
|
+
*/export const RecoveryBucket=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryBucket=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoIds:FfiConverterSequenceString.readFromCursor(c),totalSats:FfiConverterUInt64.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceString.writeIntoCursor(value.vtxoIds,c);FfiConverterUInt64.writeIntoCursor(value.totalSats,c);}allocationSize(value){return FfiConverterSequenceString.allocationSize(value.vtxoIds)+FfiConverterUInt64.allocationSize(value.totalSats);}};return new FFIConverter();})();/**
|
|
564
643
|
* Outcome of a recovery scan: every VTXO id the scan looked at, bucketed by
|
|
565
644
|
* what was decided about it.
|
|
566
645
|
*
|
|
@@ -571,7 +650,16 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
571
650
|
* id instead sits beyond the key-derivation gap limit and needs a wider scan.
|
|
572
651
|
*//**
|
|
573
652
|
* Generated factory for {@link RecoveryReport} record objects.
|
|
574
|
-
*/export const RecoveryReport=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryReport=(()=>{class FFIConverter extends 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: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);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)+FfiConverterBool.allocationSize(value.isComplete);}}return new FFIConverter();})();/**
|
|
653
|
+
*/export const RecoveryReport=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRecoveryReport=(()=>{class FFIConverter extends 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: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);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)+FfiConverterBool.allocationSize(value.isComplete);}};return new FFIConverter();})();/**
|
|
654
|
+
* The exit transactions one VTXO still needs confirmed to be exited.
|
|
655
|
+
*//**
|
|
656
|
+
* Generated factory for {@link RemainingExit} record objects.
|
|
657
|
+
*/export const RemainingExit=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRemainingExit=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{vtxoId:FfiConverterString.readFromCursor(c),txids:FfiConverterSequenceString.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.vtxoId,c);FfiConverterSequenceString.writeIntoCursor(value.txids,c);}allocationSize(value){return FfiConverterString.allocationSize(value.vtxoId)+FfiConverterSequenceString.allocationSize(value.txids);}};return new FFIConverter();})();/**
|
|
658
|
+
* The exit transactions of a set of VTXOs still awaiting confirmation,
|
|
659
|
+
* mirroring `bark::exit::RemainingExitTransactions`.
|
|
660
|
+
*//**
|
|
661
|
+
* Generated factory for {@link RemainingExitTransactions} record objects.
|
|
662
|
+
*/export const RemainingExitTransactions=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRemainingExitTransactions=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{exits:FfiConverterSequenceTypeRemainingExit.readFromCursor(c),transactions:FfiConverterSequenceTypeExitTransactionInfo.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterSequenceTypeRemainingExit.writeIntoCursor(value.exits,c);FfiConverterSequenceTypeExitTransactionInfo.writeIntoCursor(value.transactions,c);}allocationSize(value){return FfiConverterSequenceTypeRemainingExit.allocationSize(value.exits)+FfiConverterSequenceTypeExitTransactionInfo.allocationSize(value.transactions);}};return new FFIConverter();})();/**
|
|
575
663
|
* Lifecycle phase of a round participation, mirroring
|
|
576
664
|
* `bark::round::RoundFlowKind`.
|
|
577
665
|
*
|
|
@@ -579,23 +667,23 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
579
667
|
* `"pending"` | `"ongoing"` | `"awaiting-confirmations"` | `"failed"` |
|
|
580
668
|
* `"canceled"`.
|
|
581
669
|
*/export let RoundFlowKind=/*#__PURE__*/function(RoundFlowKind){/**
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
670
|
+
* Delegated participation waiting for its scheduled round. See
|
|
671
|
+
* [`RoundState::scheduled_height`].
|
|
672
|
+
*/RoundFlowKind[RoundFlowKind["DelegatedPending"]=0]="DelegatedPending";/**
|
|
673
|
+
* Interactive participation waiting for its round.
|
|
674
|
+
*/RoundFlowKind[RoundFlowKind["Pending"]=1]="Pending";/**
|
|
675
|
+
* The interactive part is being played out with the server.
|
|
676
|
+
*/RoundFlowKind[RoundFlowKind["Ongoing"]=2]="Ongoing";/**
|
|
677
|
+
* The round finished; waiting for its funding tx to confirm.
|
|
678
|
+
*/RoundFlowKind[RoundFlowKind["AwaitingConfirmations"]=3]="AwaitingConfirmations";/**
|
|
679
|
+
* The participation failed.
|
|
680
|
+
*/RoundFlowKind[RoundFlowKind["Failed"]=4]="Failed";/**
|
|
681
|
+
* The user canceled the participation.
|
|
682
|
+
*/RoundFlowKind[RoundFlowKind["Canceled"]=5]="Canceled";return RoundFlowKind;}({});const FfiConverterTypeRoundFlowKind=(()=>{class FFIConverter extends 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 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();})();/**
|
|
595
683
|
* A pending round state
|
|
596
684
|
*//**
|
|
597
685
|
* Generated factory for {@link RoundState} record objects.
|
|
598
|
-
*/export const RoundState=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRoundState=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterUInt32.readFromCursor(c),ongoing:FfiConverterBool.readFromCursor(c),state:FfiConverterTypeRoundFlowKind.readFromCursor(c),scheduledHeight:FfiConverterOptionalUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt32.writeIntoCursor(value.id,c);FfiConverterBool.writeIntoCursor(value.ongoing,c);FfiConverterTypeRoundFlowKind.writeIntoCursor(value.state,c);FfiConverterOptionalUInt32.writeIntoCursor(value.scheduledHeight,c);}allocationSize(value){return FfiConverterUInt32.allocationSize(value.id)+FfiConverterBool.allocationSize(value.ongoing)+FfiConverterTypeRoundFlowKind.allocationSize(value.state)+FfiConverterOptionalUInt32.allocationSize(value.scheduledHeight);}}return new FFIConverter();})();// Enum: VtxoLockHolder
|
|
686
|
+
*/export const RoundState=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeRoundState=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterUInt32.readFromCursor(c),ongoing:FfiConverterBool.readFromCursor(c),state:FfiConverterTypeRoundFlowKind.readFromCursor(c),scheduledHeight:FfiConverterOptionalUInt32.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterUInt32.writeIntoCursor(value.id,c);FfiConverterBool.writeIntoCursor(value.ongoing,c);FfiConverterTypeRoundFlowKind.writeIntoCursor(value.state,c);FfiConverterOptionalUInt32.writeIntoCursor(value.scheduledHeight,c);}allocationSize(value){return FfiConverterUInt32.allocationSize(value.id)+FfiConverterBool.allocationSize(value.ongoing)+FfiConverterTypeRoundFlowKind.allocationSize(value.state)+FfiConverterOptionalUInt32.allocationSize(value.scheduledHeight);}};return new FFIConverter();})();// Enum: VtxoLockHolder
|
|
599
687
|
export let VtxoLockHolder_Tags=/*#__PURE__*/function(VtxoLockHolder_Tags){VtxoLockHolder_Tags["Action"]="Action";VtxoLockHolder_Tags["Movement"]="Movement";return VtxoLockHolder_Tags;}({});/**
|
|
600
688
|
* Who holds the lock on a [`VtxoState::Locked`] VTXO.
|
|
601
689
|
*
|
|
@@ -606,17 +694,17 @@ export let VtxoLockHolder_Tags=/*#__PURE__*/function(VtxoLockHolder_Tags){VtxoLo
|
|
|
606
694
|
*
|
|
607
695
|
* Serde/TS tags match upstream's serialization: `"action"` / `"movement"`.
|
|
608
696
|
*/export const VtxoLockHolder=(()=>{/**
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
697
|
+
* A wallet action checkpoint. `id` is upstream's `WalletActionId`
|
|
698
|
+
* (an opaque string).
|
|
699
|
+
*/class Action_ extends UniffiEnum{/**
|
|
700
|
+
* @private
|
|
701
|
+
* This field is private and should not be used, use `tag` instead.
|
|
702
|
+
*/[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;}}/**
|
|
703
|
+
* A pre-action subsystem, keyed by its movement.
|
|
704
|
+
*/class Movement_ extends UniffiEnum{/**
|
|
705
|
+
* @private
|
|
706
|
+
* This field is private and should not be used, use `tag` instead.
|
|
707
|
+
*/[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[uniffiTypeNameSymbol]==="VtxoLockHolder";}return Object.freeze({instanceOf,Action:Action_,Movement:Movement_});})();/**
|
|
620
708
|
* Who holds the lock on a [`VtxoState::Locked`] VTXO.
|
|
621
709
|
*
|
|
622
710
|
* Mirrors `bark::vtxo::VtxoLockHolder`. Action-based subsystems lock with
|
|
@@ -634,29 +722,29 @@ export let VtxoState_Tags=/*#__PURE__*/function(VtxoState_Tags){VtxoState_Tags["
|
|
|
634
722
|
* Serde/TS tags match upstream's kebab-case serialization:
|
|
635
723
|
* `"spendable"` | `"locked"` | `"spent"` | `"exited"`.
|
|
636
724
|
*/export const VtxoState=(()=>{/**
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
725
|
+
* Available; can be spent in a future round.
|
|
726
|
+
*/class Spendable_ extends UniffiEnum{/**
|
|
727
|
+
* @private
|
|
728
|
+
* This field is private and should not be used, use `tag` instead.
|
|
729
|
+
*/[uniffiTypeNameSymbol]="VtxoState";tag=VtxoState_Tags.Spendable;constructor(){super("VtxoState","Spendable");}static new(){return new Spendable_();}static instanceOf(obj){return obj.tag===VtxoState_Tags.Spendable;}}/**
|
|
730
|
+
* Locked by an operation. `holder` is `None` only for the narrow
|
|
731
|
+
* window between creating a fresh locked VTXO and pinning it to a
|
|
732
|
+
* specific operation, so a locked VTXO can legitimately carry no
|
|
733
|
+
* lock reason yet.
|
|
734
|
+
*/class Locked_ extends UniffiEnum{/**
|
|
735
|
+
* @private
|
|
736
|
+
* This field is private and should not be used, use `tag` instead.
|
|
737
|
+
*/[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;}}/**
|
|
738
|
+
* Consumed.
|
|
739
|
+
*/class Spent_ extends UniffiEnum{/**
|
|
740
|
+
* @private
|
|
741
|
+
* This field is private and should not be used, use `tag` instead.
|
|
742
|
+
*/[uniffiTypeNameSymbol]="VtxoState";tag=VtxoState_Tags.Spent;constructor(){super("VtxoState","Spent");}static new(){return new Spent_();}static instanceOf(obj){return obj.tag===VtxoState_Tags.Spent;}}/**
|
|
743
|
+
* In (or completed) a unilateral exit.
|
|
744
|
+
*/class Exited_ extends UniffiEnum{/**
|
|
745
|
+
* @private
|
|
746
|
+
* This field is private and should not be used, use `tag` instead.
|
|
747
|
+
*/[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[uniffiTypeNameSymbol]==="VtxoState";}return Object.freeze({instanceOf,Spendable:Spendable_,Locked:Locked_,Spent:Spent_,Exited:Exited_});})();/**
|
|
660
748
|
* Rich VTXO state, mirroring `bark::vtxo::VtxoState`.
|
|
661
749
|
*
|
|
662
750
|
* Serde/TS tags match upstream's kebab-case serialization:
|
|
@@ -665,7 +753,7 @@ export let VtxoState_Tags=/*#__PURE__*/function(VtxoState_Tags){VtxoState_Tags["
|
|
|
665
753
|
const FfiConverterTypeVtxoState=(()=>{class FFIConverter extends 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 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.
|
|
666
754
|
throw new 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 UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();/**
|
|
667
755
|
* Generated factory for {@link Vtxo} record objects.
|
|
668
|
-
*/export const Vtxo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeVtxo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),expiryHeight:FfiConverterUInt32.readFromCursor(c),kind:FfiConverterString.readFromCursor(c),state:FfiConverterTypeVtxoState.readFromCursor(c),exitDepth:FfiConverterUInt32.readFromCursor(c),exitTxWeightWu:FfiConverterUInt64.readFromCursor(c),registered:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.id,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);FfiConverterString.writeIntoCursor(value.kind,c);FfiConverterTypeVtxoState.writeIntoCursor(value.state,c);FfiConverterUInt32.writeIntoCursor(value.exitDepth,c);FfiConverterUInt64.writeIntoCursor(value.exitTxWeightWu,c);FfiConverterBool.writeIntoCursor(value.registered,c);}allocationSize(value){return FfiConverterString.allocationSize(value.id)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterUInt32.allocationSize(value.expiryHeight)+FfiConverterString.allocationSize(value.kind)+FfiConverterTypeVtxoState.allocationSize(value.state)+FfiConverterUInt32.allocationSize(value.exitDepth)+FfiConverterUInt64.allocationSize(value.exitTxWeightWu)+FfiConverterBool.allocationSize(value.registered);}}return new FFIConverter();})();// Flat error type: Exception
|
|
756
|
+
*/export const Vtxo=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeVtxo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{id:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),expiryHeight:FfiConverterUInt32.readFromCursor(c),kind:FfiConverterString.readFromCursor(c),state:FfiConverterTypeVtxoState.readFromCursor(c),exitDepth:FfiConverterUInt32.readFromCursor(c),exitTxWeightWu:FfiConverterUInt64.readFromCursor(c),registered:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.id,c);FfiConverterUInt64.writeIntoCursor(value.amountSats,c);FfiConverterUInt32.writeIntoCursor(value.expiryHeight,c);FfiConverterString.writeIntoCursor(value.kind,c);FfiConverterTypeVtxoState.writeIntoCursor(value.state,c);FfiConverterUInt32.writeIntoCursor(value.exitDepth,c);FfiConverterUInt64.writeIntoCursor(value.exitTxWeightWu,c);FfiConverterBool.writeIntoCursor(value.registered,c);}allocationSize(value){return FfiConverterString.allocationSize(value.id)+FfiConverterUInt64.allocationSize(value.amountSats)+FfiConverterUInt32.allocationSize(value.expiryHeight)+FfiConverterString.allocationSize(value.kind)+FfiConverterTypeVtxoState.allocationSize(value.state)+FfiConverterUInt32.allocationSize(value.exitDepth)+FfiConverterUInt64.allocationSize(value.exitTxWeightWu)+FfiConverterBool.allocationSize(value.registered);}};return new FFIConverter();})();// Flat error type: Exception
|
|
669
757
|
export let Exception_Tags=/*#__PURE__*/function(Exception_Tags){Exception_Tags["Inner"]="Inner";return Exception_Tags;}({});/**
|
|
670
758
|
* The single error type surfaced across the Bark FFI.
|
|
671
759
|
*
|
|
@@ -675,12 +763,12 @@ export let Exception_Tags=/*#__PURE__*/function(Exception_Tags){Exception_Tags["
|
|
|
675
763
|
* `Display` string across the boundary — so the rich anyhow context collapses
|
|
676
764
|
* to a single message on the foreign side.
|
|
677
765
|
*/export const Exception=(()=>{class Inner extends UniffiError{/**
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
766
|
+
* @private
|
|
767
|
+
* This field is private and should not be used.
|
|
768
|
+
*/[uniffiTypeNameSymbol]="Exception";/**
|
|
769
|
+
* @private
|
|
770
|
+
* This field is private and should not be used.
|
|
771
|
+
*/[variantOrdinalSymbol]=1;tag=Exception_Tags.Inner;constructor(message){super("Exception","Inner",message);}static instanceOf(e){return instanceOf(e)&&e[variantOrdinalSymbol]===1;}}// Utility function which does not rely on instanceof.
|
|
684
772
|
function instanceOf(e){return e[uniffiTypeNameSymbol]==="Exception";}return{Inner,instanceOf};})();// Union type for Exception error type.
|
|
685
773
|
/**
|
|
686
774
|
* The single error type surfaced across the Bark FFI.
|
|
@@ -695,20 +783,20 @@ function instanceOf(e){return e[uniffiTypeNameSymbol]==="Exception";}return{Inne
|
|
|
695
783
|
* `bark::onchain::WalletTxInfo`.
|
|
696
784
|
*//**
|
|
697
785
|
* Generated factory for {@link WalletTransaction} record objects.
|
|
698
|
-
*/export const WalletTransaction=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletTransaction=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c),onchainFeeSats:FfiConverterOptionalUInt64.readFromCursor(c),balanceChangeSats:FfiConverterInt64.readFromCursor(c),confirmation:FfiConverterOptionalTypeBlockRef.readFromCursor(c),isCpfp:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterOptionalUInt64.writeIntoCursor(value.onchainFeeSats,c);FfiConverterInt64.writeIntoCursor(value.balanceChangeSats,c);FfiConverterOptionalTypeBlockRef.writeIntoCursor(value.confirmation,c);FfiConverterBool.writeIntoCursor(value.isCpfp,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex)+FfiConverterOptionalUInt64.allocationSize(value.onchainFeeSats)+FfiConverterInt64.allocationSize(value.balanceChangeSats)+FfiConverterOptionalTypeBlockRef.allocationSize(value.confirmation)+FfiConverterBool.allocationSize(value.isCpfp);}}return new FFIConverter();})();// Enum: OnchainUtxo
|
|
786
|
+
*/export const WalletTransaction=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletTransaction=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{txid:FfiConverterString.readFromCursor(c),txHex:FfiConverterString.readFromCursor(c),onchainFeeSats:FfiConverterOptionalUInt64.readFromCursor(c),balanceChangeSats:FfiConverterInt64.readFromCursor(c),confirmation:FfiConverterOptionalTypeBlockRef.readFromCursor(c),isCpfp:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterString.writeIntoCursor(value.txid,c);FfiConverterString.writeIntoCursor(value.txHex,c);FfiConverterOptionalUInt64.writeIntoCursor(value.onchainFeeSats,c);FfiConverterInt64.writeIntoCursor(value.balanceChangeSats,c);FfiConverterOptionalTypeBlockRef.writeIntoCursor(value.confirmation,c);FfiConverterBool.writeIntoCursor(value.isCpfp,c);}allocationSize(value){return FfiConverterString.allocationSize(value.txid)+FfiConverterString.allocationSize(value.txHex)+FfiConverterOptionalUInt64.allocationSize(value.onchainFeeSats)+FfiConverterInt64.allocationSize(value.balanceChangeSats)+FfiConverterOptionalTypeBlockRef.allocationSize(value.confirmation)+FfiConverterBool.allocationSize(value.isCpfp);}};return new FFIConverter();})();// Enum: OnchainUtxo
|
|
699
787
|
export let OnchainUtxo_Tags=/*#__PURE__*/function(OnchainUtxo_Tags){OnchainUtxo_Tags["Local"]="Local";OnchainUtxo_Tags["Exit"]="Exit";return OnchainUtxo_Tags;}({});/**
|
|
700
788
|
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
701
789
|
*/export const OnchainUtxo=(()=>{/**
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
790
|
+
* A standard wallet UTXO.
|
|
791
|
+
*/class Local_ extends UniffiEnum{/**
|
|
792
|
+
* @private
|
|
793
|
+
* This field is private and should not be used, use `tag` instead.
|
|
794
|
+
*/[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;}}/**
|
|
795
|
+
* A spendable unilateral-exit output claimed from a VTXO.
|
|
796
|
+
*/class Exit_ extends UniffiEnum{/**
|
|
797
|
+
* @private
|
|
798
|
+
* This field is private and should not be used, use `tag` instead.
|
|
799
|
+
*/[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[uniffiTypeNameSymbol]==="OnchainUtxo";}return Object.freeze({instanceOf,Local:Local_,Exit:Exit_});})();/**
|
|
712
800
|
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
713
801
|
*/// FfiConverter for enum OnchainUtxo
|
|
714
802
|
const FfiConverterTypeOnchainUtxo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){switch(c.readI32()){case 1:return new OnchainUtxo.Local({outpoint:FfiConverterTypeOutPoint.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),confirmationHeight:FfiConverterOptionalUInt32.readFromCursor(c)});case 2:return new OnchainUtxo.Exit({vtxoId:FfiConverterString.readFromCursor(c),amountSats:FfiConverterUInt64.readFromCursor(c),height:FfiConverterUInt32.readFromCursor(c)});default:throw new UniffiInternalError.UnexpectedEnumCase();}}writeIntoCursor(value,c){switch(value.tag){case OnchainUtxo_Tags.Local:{c.writeI32(1);const inner=value.inner;FfiConverterTypeOutPoint.writeIntoCursor(inner.outpoint,c);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);FfiConverterUInt64.writeIntoCursor(inner.amountSats,c);FfiConverterUInt32.writeIntoCursor(inner.height,c);return;}default:// Throwing from here means that OnchainUtxo_Tags hasn't matched an ordinal.
|
|
@@ -724,10 +812,11 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
724
812
|
* - Callback (foreign-language implementation)
|
|
725
813
|
*/export class OnchainWallet extends UniffiAbstractObject{[uniffiTypeNameSymbol]="OnchainWallet";// No primary constructor declared for this class.
|
|
726
814
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeOnchainWalletObjectFactory.bless(pointer);}/**
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
815
|
+
* Callback-backed wallet for foreign-language implementations.
|
|
816
|
+
*/static custom(callbacks)/*throws*/{return FfiConverterTypeOnchainWallet.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_constructor_onchainwallet_custom(FfiConverterTypeCustomOnchainWalletCallbacks.lower(callbacks,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
817
|
+
* BDK-backed wallet. Opens the shared sqlite cache in `datadir`, a
|
|
818
|
+
* filesystem path or a `file://` URI.
|
|
819
|
+
*/static async default_(network,mnemonic,config,datadir,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_constructor_onchainwallet_default(FfiConverterTypeNetwork.lower(network,nativeModule().rustbuffer_alloc),FfiConverterString.lower(mnemonic,nativeModule().rustbuffer_alloc),FfiConverterTypeConfig.lower(config,nativeModule().rustbuffer_alloc),FfiConverterString.lower(datadir,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_u64,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_u64,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_u64,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_u64,// Async returns always go through the JS-side converter: the
|
|
731
820
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
732
821
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
733
822
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -741,13 +830,13 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
741
830
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
742
831
|
// already JS-owned.
|
|
743
832
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeOnchainBalance.lift(__rb);}finally{nativeModule().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;}}/**
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
833
|
+
* Mark a wallet-known transaction as evicted from the mempool, so its
|
|
834
|
+
* inputs return to coin selection immediately. Only for a tx that has
|
|
835
|
+
* definitively been superseded on-chain (e.g. an RBF-replaced exit CPFP);
|
|
836
|
+
* evicting a still-in-flight tx invites a self-inflicted double-spend.
|
|
837
|
+
*/async evictTx(txid,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_evict_tx(uniffiTypeOnchainWalletObjectFactory.clonePointer(this),FfiConverterString.lower(txid,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
838
|
+
* Cached network fee-rate estimates from the wallet's chain source.
|
|
839
|
+
*/async feeRates(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_fee_rates(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
751
840
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
752
841
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
753
842
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -756,13 +845,13 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
756
845
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
757
846
|
// already JS-owned.
|
|
758
847
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeRates.lift(__rb);}finally{nativeModule().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;}}/**
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
848
|
+
* Discover the wallet's pre-existing on-chain history. Run once after
|
|
849
|
+
* restoring a wallet from a mnemonic: `sync` only covers addresses this
|
|
850
|
+
* wallet instance has already revealed, so it never finds transactions
|
|
851
|
+
* made by a previous incarnation. Gap-limited full scan on esplora
|
|
852
|
+
* (`birthday_height` is ignored there), block scan from `birthday_height`
|
|
853
|
+
* on bitcoind. Returns the total balance in sats afterwards.
|
|
854
|
+
*/async initialScan(birthdayHeight,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_initial_scan(uniffiTypeOnchainWalletObjectFactory.clonePointer(this),FfiConverterOptionalUInt32.lower(birthdayHeight,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_u64,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_u64,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_u64,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_u64,// Async returns always go through the JS-side converter: the
|
|
766
855
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
767
856
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
768
857
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -789,16 +878,16 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
789
878
|
// export. The bytes the runtime hands back must be deserialized
|
|
790
879
|
// here using the per-callable return-type converter.
|
|
791
880
|
/*liftFunc:*/FfiConverterUInt64.lift.bind(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;}}/**
|
|
792
|
-
|
|
793
|
-
|
|
881
|
+
* Current chain tip height from the wallet's chain source.
|
|
882
|
+
*/async tipHeight(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_tip_height(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_u32,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_u32,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_u32,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_u32,// Async returns always go through the JS-side converter: the
|
|
794
883
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
795
884
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
796
885
|
// export. The bytes the runtime hands back must be deserialized
|
|
797
886
|
// here using the per-callable return-type converter.
|
|
798
887
|
/*liftFunc:*/FfiConverterUInt32.lift.bind(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;}}/**
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
888
|
+
* Every wallet transaction with fee, balance change, confirmation and
|
|
889
|
+
* CPFP flag. Requires a prior `sync` to be meaningful.
|
|
890
|
+
*/async transactions(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_transactions(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
802
891
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
803
892
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
804
893
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -807,8 +896,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
807
896
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
808
897
|
// already JS-owned.
|
|
809
898
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeWalletTransaction.lift(__rb);}finally{nativeModule().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;}}/**
|
|
810
|
-
|
|
811
|
-
|
|
899
|
+
* The wallet's unspent outputs. Requires a prior `sync` to be meaningful.
|
|
900
|
+
*/async utxos(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_utxos(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
812
901
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
813
902
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
814
903
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -822,9 +911,9 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
822
911
|
* Every field has a default, so callers only set what they need.
|
|
823
912
|
*//**
|
|
824
913
|
* Generated factory for {@link WalletOpenArgs} record objects.
|
|
825
|
-
*/export const WalletOpenArgs=(()=>{const defaults=()=>({runDaemon:true,createIfNotExists:true,createWithoutServer:false,skipRecovery:false});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletOpenArgs=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{runDaemon:FfiConverterBool.readFromCursor(c),datadir:FfiConverterString.readFromCursor(c),onchain:FfiConverterOptionalTypeOnchainWallet.readFromCursor(c),createIfNotExists:FfiConverterBool.readFromCursor(c),createWithoutServer:FfiConverterBool.readFromCursor(c),skipRecovery:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterBool.writeIntoCursor(value.runDaemon,c);FfiConverterString.writeIntoCursor(value.datadir,c);FfiConverterOptionalTypeOnchainWallet.writeIntoCursor(value.onchain,c);FfiConverterBool.writeIntoCursor(value.createIfNotExists,c);FfiConverterBool.writeIntoCursor(value.createWithoutServer,c);FfiConverterBool.writeIntoCursor(value.skipRecovery,c);}allocationSize(value){return FfiConverterBool.allocationSize(value.runDaemon)+FfiConverterString.allocationSize(value.datadir)+FfiConverterOptionalTypeOnchainWallet.allocationSize(value.onchain)+FfiConverterBool.allocationSize(value.createIfNotExists)+FfiConverterBool.allocationSize(value.createWithoutServer)+FfiConverterBool.allocationSize(value.skipRecovery);}}return new FFIConverter();})();/**
|
|
914
|
+
*/export const WalletOpenArgs=(()=>{const defaults=()=>({runDaemon:true,createIfNotExists:true,createWithoutServer:false,skipRecovery:false});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletOpenArgs=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{readFromCursor(c){return{runDaemon:FfiConverterBool.readFromCursor(c),datadir:FfiConverterString.readFromCursor(c),onchain:FfiConverterOptionalTypeOnchainWallet.readFromCursor(c),createIfNotExists:FfiConverterBool.readFromCursor(c),createWithoutServer:FfiConverterBool.readFromCursor(c),skipRecovery:FfiConverterBool.readFromCursor(c)};}writeIntoCursor(value,c){FfiConverterBool.writeIntoCursor(value.runDaemon,c);FfiConverterString.writeIntoCursor(value.datadir,c);FfiConverterOptionalTypeOnchainWallet.writeIntoCursor(value.onchain,c);FfiConverterBool.writeIntoCursor(value.createIfNotExists,c);FfiConverterBool.writeIntoCursor(value.createWithoutServer,c);FfiConverterBool.writeIntoCursor(value.skipRecovery,c);}allocationSize(value){return FfiConverterBool.allocationSize(value.runDaemon)+FfiConverterString.allocationSize(value.datadir)+FfiConverterOptionalTypeOnchainWallet.allocationSize(value.onchain)+FfiConverterBool.allocationSize(value.createIfNotExists)+FfiConverterBool.allocationSize(value.createWithoutServer)+FfiConverterBool.allocationSize(value.skipRecovery);}};return new FFIConverter();})();/**
|
|
826
915
|
* Generated factory for {@link WalletProperties} record objects.
|
|
827
|
-
*/export const WalletProperties=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletProperties=(()=>{class FFIConverter extends 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
|
|
916
|
+
*/export const WalletProperties=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({create,new:create,defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeWalletProperties=(()=>{class FFIConverter extends 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
|
|
828
917
|
export let LightningSendStatus_Tags=/*#__PURE__*/function(LightningSendStatus_Tags){LightningSendStatus_Tags["Unknown"]="Unknown";LightningSendStatus_Tags["InProgress"]="InProgress";LightningSendStatus_Tags["Paid"]="Paid";return LightningSendStatus_Tags;}({});/**
|
|
829
918
|
* Terminal/in-flight state of an outgoing lightning send.
|
|
830
919
|
*
|
|
@@ -832,21 +921,21 @@ export let LightningSendStatus_Tags=/*#__PURE__*/function(LightningSendStatus_Ta
|
|
|
832
921
|
* `check_lightning_payment` now return this so callers can drive the
|
|
833
922
|
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
834
923
|
*/export const LightningSendStatus=(()=>{/**
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
924
|
+
* No record of this payment (never started, or already pruned).
|
|
925
|
+
*/class Unknown_ extends UniffiEnum{/**
|
|
926
|
+
* @private
|
|
927
|
+
* This field is private and should not be used, use `tag` instead.
|
|
928
|
+
*/[uniffiTypeNameSymbol]="LightningSendStatus";tag=LightningSendStatus_Tags.Unknown;constructor(){super("LightningSendStatus","Unknown");}static new(){return new Unknown_();}static instanceOf(obj){return obj.tag===LightningSendStatus_Tags.Unknown;}}/**
|
|
929
|
+
* Send is in flight; HTLC VTXOs are locked.
|
|
930
|
+
*/class InProgress_ extends UniffiEnum{/**
|
|
931
|
+
* @private
|
|
932
|
+
* This field is private and should not be used, use `tag` instead.
|
|
933
|
+
*/[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;}}/**
|
|
934
|
+
* Send has settled; the preimage proves payment.
|
|
935
|
+
*/class Paid_ extends UniffiEnum{/**
|
|
936
|
+
* @private
|
|
937
|
+
* This field is private and should not be used, use `tag` instead.
|
|
938
|
+
*/[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[uniffiTypeNameSymbol]==="LightningSendStatus";}return Object.freeze({instanceOf,Unknown:Unknown_,InProgress:InProgress_,Paid:Paid_});})();/**
|
|
850
939
|
* Terminal/in-flight state of an outgoing lightning send.
|
|
851
940
|
*
|
|
852
941
|
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
@@ -860,25 +949,25 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
860
949
|
export let PaymentResult_Tags=/*#__PURE__*/function(PaymentResult_Tags){PaymentResult_Tags["Onchain"]="Onchain";PaymentResult_Tags["Lightning"]="Lightning";PaymentResult_Tags["Ark"]="Ark";return PaymentResult_Tags;}({});/**
|
|
861
950
|
* Outcome of `Wallet::send_payment`, mirroring `bark::PaymentInitOutput`.
|
|
862
951
|
*/export const PaymentResult=(()=>{/**
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
952
|
+
* The onchain payment's transaction was broadcast.
|
|
953
|
+
*/class Onchain_ extends UniffiEnum{/**
|
|
954
|
+
* @private
|
|
955
|
+
* This field is private and should not be used, use `tag` instead.
|
|
956
|
+
*/[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;}}/**
|
|
957
|
+
* The lightning payment was started. Unless `wait` was set it may still
|
|
958
|
+
* be in flight: follow it with `lightning_send_state(payment_hash)`.
|
|
959
|
+
* `invoice` is the one paid, which for an offer, lightning address or
|
|
960
|
+
* LNURL is the one bark fetched.
|
|
961
|
+
*/class Lightning_ extends UniffiEnum{/**
|
|
962
|
+
* @private
|
|
963
|
+
* This field is private and should not be used, use `tag` instead.
|
|
964
|
+
*/[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;}}/**
|
|
965
|
+
* The Ark payment was made. `movement_id` is the movement that records
|
|
966
|
+
* it.
|
|
967
|
+
*/class Ark_ extends UniffiEnum{/**
|
|
968
|
+
* @private
|
|
969
|
+
* This field is private and should not be used, use `tag` instead.
|
|
970
|
+
*/[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[uniffiTypeNameSymbol]==="PaymentResult";}return Object.freeze({instanceOf,Onchain:Onchain_,Lightning:Lightning_,Ark:Ark_});})();/**
|
|
882
971
|
* Outcome of `Wallet::send_payment`, mirroring `bark::PaymentInitOutput`.
|
|
883
972
|
*/// FfiConverter for enum PaymentResult
|
|
884
973
|
const FfiConverterTypePaymentResult=(()=>{class FFIConverter extends 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:FfiConverterUInt32.readFromCursor(c)});default:throw new 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;FfiConverterUInt32.writeIntoCursor(inner.movementId,c);return;}default:// Throwing from here means that PaymentResult_Tags hasn't matched an ordinal.
|
|
@@ -895,21 +984,21 @@ export let RecoveryStatus_Tags=/*#__PURE__*/function(RecoveryStatus_Tags){Recove
|
|
|
895
984
|
*
|
|
896
985
|
* Serde/TS tags: `"not-run"` | `"failed"` | `"completed"`.
|
|
897
986
|
*/export const RecoveryStatus=(()=>{/**
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
987
|
+
* No scan was attempted.
|
|
988
|
+
*/class NotRun_ extends UniffiEnum{/**
|
|
989
|
+
* @private
|
|
990
|
+
* This field is private and should not be used, use `tag` instead.
|
|
991
|
+
*/[uniffiTypeNameSymbol]="RecoveryStatus";tag=RecoveryStatus_Tags.NotRun;constructor(){super("RecoveryStatus","NotRun");}static new(){return new NotRun_();}static instanceOf(obj){return obj.tag===RecoveryStatus_Tags.NotRun;}}/**
|
|
992
|
+
* The scan errored before it could produce a report.
|
|
993
|
+
*/class Failed_ extends UniffiEnum{/**
|
|
994
|
+
* @private
|
|
995
|
+
* This field is private and should not be used, use `tag` instead.
|
|
996
|
+
*/[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;}}/**
|
|
997
|
+
* The scan ran to the end.
|
|
998
|
+
*/class Completed_ extends UniffiEnum{/**
|
|
999
|
+
* @private
|
|
1000
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1001
|
+
*/[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[uniffiTypeNameSymbol]==="RecoveryStatus";}return Object.freeze({instanceOf,NotRun:NotRun_,Failed:Failed_,Completed:Completed_});})();/**
|
|
913
1002
|
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
914
1003
|
* `bark::RecoveryStatus`.
|
|
915
1004
|
*
|
|
@@ -926,21 +1015,21 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
926
1015
|
export let WalletNotification_Tags=/*#__PURE__*/function(WalletNotification_Tags){WalletNotification_Tags["MovementCreated"]="MovementCreated";WalletNotification_Tags["MovementUpdated"]="MovementUpdated";WalletNotification_Tags["ChannelLagging"]="ChannelLagging";return WalletNotification_Tags;}({});/**
|
|
927
1016
|
* A notification event from the wallet
|
|
928
1017
|
*/export const WalletNotification=(()=>{/**
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1018
|
+
* A new movement was created
|
|
1019
|
+
*/class MovementCreated_ extends UniffiEnum{/**
|
|
1020
|
+
* @private
|
|
1021
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1022
|
+
*/[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;}}/**
|
|
1023
|
+
* An existing movement was updated
|
|
1024
|
+
*/class MovementUpdated_ extends UniffiEnum{/**
|
|
1025
|
+
* @private
|
|
1026
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1027
|
+
*/[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;}}/**
|
|
1028
|
+
* The notification channel is lagging (notifications were dropped)
|
|
1029
|
+
*/class ChannelLagging_ extends UniffiEnum{/**
|
|
1030
|
+
* @private
|
|
1031
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1032
|
+
*/[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[uniffiTypeNameSymbol]==="WalletNotification";}return Object.freeze({instanceOf,MovementCreated:MovementCreated_,MovementUpdated:MovementUpdated_,ChannelLagging:ChannelLagging_});})();/**
|
|
944
1033
|
* A notification event from the wallet
|
|
945
1034
|
*/// FfiConverter for enum WalletNotification
|
|
946
1035
|
const FfiConverterTypeWalletNotification=(()=>{class FFIConverter extends 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 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.
|
|
@@ -972,83 +1061,83 @@ FfiConverterTypeBarkLogger.drop(uniffiHandle);},uniffi_clone:uniffiHandle=>{retu
|
|
|
972
1061
|
* Foreign languages implement this trait to provide their own wallet functionality.
|
|
973
1062
|
*/export class CustomOnchainWalletCallbacksImpl extends UniffiAbstractObject{[uniffiTypeNameSymbol]="CustomOnchainWalletCallbacksImpl";// No primary constructor declared for this class.
|
|
974
1063
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.bless(pointer);}/**
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1064
|
+
* Get the wallet balance in satoshis
|
|
1065
|
+
*
|
|
1066
|
+
* An error falls back to the last value this returned, or 0 if none yet.
|
|
1067
|
+
*/getBalance()/*throws*/{return FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_get_balance(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
1068
|
+
* Prepare a transaction to send to given destinations
|
|
1069
|
+
*
|
|
1070
|
+
* # Arguments
|
|
1071
|
+
* * `destinations` - List of destinations with addresses and amounts
|
|
1072
|
+
* * `fee_rate_sat_per_vb` - Fee rate in sats per vbyte
|
|
1073
|
+
*
|
|
1074
|
+
* # Returns
|
|
1075
|
+
* Base64-encoded PSBT. Rejected unless it pays every destination the
|
|
1076
|
+
* exact amount asked for; extra outputs (change) are fine.
|
|
1077
|
+
*/prepareTx(destinations,feeRateSatPerVb)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_prepare_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterSequenceTypeDestination.lower(destinations,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(feeRateSatPerVb,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}/**
|
|
1078
|
+
* Prepare a transaction that drains the wallet to a single address
|
|
1079
|
+
*
|
|
1080
|
+
* # Arguments
|
|
1081
|
+
* * `address` - Bitcoin address to drain to
|
|
1082
|
+
* * `fee_rate_sat_per_vb` - Fee rate in sats per vbyte
|
|
1083
|
+
*
|
|
1084
|
+
* # Returns
|
|
1085
|
+
* Base64-encoded PSBT. Rejected unless every output pays `address`.
|
|
1086
|
+
*/prepareDrainTx(address,feeRateSatPerVb)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_prepare_drain_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(address,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(feeRateSatPerVb,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}/**
|
|
1087
|
+
* Sign and finalize a PSBT, without recording the transaction
|
|
1088
|
+
*
|
|
1089
|
+
* The wallet must not treat the transaction as spent yet: a board that
|
|
1090
|
+
* fails after signing has to leave the wallet untouched. Once the
|
|
1091
|
+
* transaction is broadcast, Bark reports it through `register_tx`.
|
|
1092
|
+
*
|
|
1093
|
+
* # Arguments
|
|
1094
|
+
* * `psbt_base64` - Base64-encoded PSBT
|
|
1095
|
+
*
|
|
1096
|
+
* # Returns
|
|
1097
|
+
* Base64-encoded fully signed PSBT (all witnesses filled in). Rejected
|
|
1098
|
+
* unless the unsigned transaction is unchanged.
|
|
1099
|
+
*/signPsbt(psbtBase64)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_sign_psbt(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(psbtBase64,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}/**
|
|
1100
|
+
* Whether a script pubkey belongs to the wallet's keychains
|
|
1101
|
+
*
|
|
1102
|
+
* # Arguments
|
|
1103
|
+
* * `script_pubkey_hex` - Hex-encoded script pubkey
|
|
1104
|
+
*/isMine(scriptPubkeyHex)/*throws*/{return FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_is_mine(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(scriptPubkeyHex,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));}/**
|
|
1105
|
+
* Register an unconfirmed transaction relevant to the wallet
|
|
1106
|
+
*
|
|
1107
|
+
* # Arguments
|
|
1108
|
+
* * `tx_hex` - Hex-encoded transaction
|
|
1109
|
+
*/registerTx(txHex)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_register_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(txHex,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1110
|
+
* Mark a wallet-known transaction as evicted from the mempool
|
|
1111
|
+
*
|
|
1112
|
+
* Bark calls this when a CPFP it broadcast was RBF-replaced by a competing
|
|
1113
|
+
* party, so the tx's inputs should return to coin selection immediately
|
|
1114
|
+
* instead of waiting for the sync eviction grace period. Only ever called
|
|
1115
|
+
* for a tx that has definitively been superseded on-chain.
|
|
1116
|
+
*
|
|
1117
|
+
* # Arguments
|
|
1118
|
+
* * `txid` - Hex-encoded transaction id
|
|
1119
|
+
*/evictTx(txid)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_evict_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(txid,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1120
|
+
* Create a signed P2A CPFP transaction
|
|
1121
|
+
*
|
|
1122
|
+
* # Arguments
|
|
1123
|
+
* * `params` - CPFP transaction parameters
|
|
1124
|
+
*
|
|
1125
|
+
* # Returns
|
|
1126
|
+
* Hex-encoded signed CPFP transaction. Rejected unless it spends the
|
|
1127
|
+
* parent it was given.
|
|
1128
|
+
*/makeSignedP2aCpfp(params)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_make_signed_p2a_cpfp(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterTypeCpfpParams.lower(params,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}/**
|
|
1129
|
+
* Store a signed P2A CPFP transaction in the wallet
|
|
1130
|
+
*
|
|
1131
|
+
* # Arguments
|
|
1132
|
+
* * `tx_hex` - Hex-encoded transaction
|
|
1133
|
+
*/storeSignedP2aCpfp(txHex)/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_store_signed_p2a_cpfp(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),FfiConverterString.lower(txHex,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1134
|
+
* Sync the wallet with the chain.
|
|
1135
|
+
*
|
|
1136
|
+
* Called by Bark (e.g. the background daemon) to ask the wallet to refresh
|
|
1137
|
+
* its view of the chain before reading balances or building transactions.
|
|
1138
|
+
* Implementations bring their own chain backend up to date — Bark's chain
|
|
1139
|
+
* source is intentionally not passed across the FFI boundary.
|
|
1140
|
+
*/sync()/*throws*/{uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_sync(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.pointer(this);uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.freePointer(pointer);uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj_){return uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.isConcreteType(obj_);}}const uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(CustomOnchainWalletCallbacksImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]="CustomOnchainWalletCallbacksImpl";return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_customonchainwalletcallbacks_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr_){ptr_.markDestroyed();},pointer(obj_){if(obj_[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj_[pointerLiteralSymbol];},clonePointer(obj_){const pointer=this.pointer(obj_);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_bark_ffi_fn_clone_customonchainwalletcallbacks(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_bark_ffi_fn_free_customonchainwalletcallbacks(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj_){return obj_[destructorGuardSymbol]&&obj_[uniffiTypeNameSymbol]==="CustomOnchainWalletCallbacksImpl";}};})();const FfiConverterTypeCustomOnchainWalletCallbacks=new FfiConverterObjectWithCallbacks(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory);// Add a vtable for the callbacks that go in CustomOnchainWalletCallbacks.
|
|
1052
1141
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
1053
1142
|
const uniffiCallbackInterfaceCustomOnchainWalletCallbacks={// Create the VTable using a series of closures.
|
|
1054
1143
|
// ts automatically converts these into C callback functions.
|
|
@@ -1083,27 +1172,27 @@ FfiConverterTypeCustomOnchainWalletCallbacks.drop(uniffiHandle);},uniffi_clone:u
|
|
|
1083
1172
|
* `None` immediately.
|
|
1084
1173
|
*/export class NotificationHolder extends UniffiAbstractObject{[uniffiTypeNameSymbol]="NotificationHolder";// No primary constructor declared for this class.
|
|
1085
1174
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeNotificationHolderObjectFactory.bless(pointer);}/**
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1175
|
+
* Cancel the currently pending `next_notification()` wait.
|
|
1176
|
+
*
|
|
1177
|
+
* Causes a blocked `next_notification()` to return `None`.
|
|
1178
|
+
* Has no effect if no wait is currently active.
|
|
1179
|
+
*
|
|
1180
|
+
* This does NOT destroy the underlying `NotificationStream`; a subsequent
|
|
1181
|
+
* call to `next_notification()` will work normally and wait for new events.
|
|
1182
|
+
*/cancelNextNotificationWait(){uniffiCaller.rustCall(/*caller:*/callStatus=>{nativeModule().ubrn_uniffi_bark_ffi_fn_method_notificationholder_cancel_next_notification_wait(uniffiTypeNotificationHolderObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));}/**
|
|
1183
|
+
* Wait for the next wallet notification.
|
|
1184
|
+
*
|
|
1185
|
+
* Returns `None` when:
|
|
1186
|
+
* - `cancel_next_notification_wait()` was called while this was pending
|
|
1187
|
+
* (cancellation only affects the current wait; the stream lives on)
|
|
1188
|
+
* - The wallet's notification source was shut down permanently
|
|
1189
|
+
*
|
|
1190
|
+
* Returns an error if called concurrently on the same holder.
|
|
1191
|
+
*
|
|
1192
|
+
* After a cancellation this method can be called again normally — the
|
|
1193
|
+
* underlying `NotificationStream` is preserved in `self.stream` and a
|
|
1194
|
+
* fresh per-wait cancel channel is created on every entry.
|
|
1195
|
+
*/async nextNotification(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_notificationholder_next_notification(uniffiTypeNotificationHolderObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1107
1196
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1108
1197
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1109
1198
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1135,14 +1224,14 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1135
1224
|
* - Callback onchain dispatch
|
|
1136
1225
|
*/export class Wallet extends UniffiAbstractObject{[uniffiTypeNameSymbol]="Wallet";// No primary constructor declared for this class.
|
|
1137
1226
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeWalletObjectFactory.bless(pointer);}/**
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1227
|
+
* Open a wallet (creating it first if `create_if_not_exists` is set),
|
|
1228
|
+
* mirroring [`bark::Wallet::open`]: a single entry point with everything
|
|
1229
|
+
* else optional (see [`WalletOpenArgs`]). For the explicit
|
|
1230
|
+
* initialize-but-don't-open path, use the top-level `init_wallet`.
|
|
1231
|
+
*
|
|
1232
|
+
* `mnemonic_or_seed` accepts either a BIP-39 mnemonic phrase or a 64-byte
|
|
1233
|
+
* hex-encoded seed.
|
|
1234
|
+
*/static async open(network,mnemonicOrSeed,config,args,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_constructor_wallet_open(FfiConverterTypeNetwork.lower(network,nativeModule().rustbuffer_alloc),FfiConverterString.lower(mnemonicOrSeed,nativeModule().rustbuffer_alloc),FfiConverterTypeConfig.lower(config,nativeModule().rustbuffer_alloc),FfiConverterTypeWalletOpenArgs.lower(args,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_u64,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_u64,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_u64,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_u64,// Async returns always go through the JS-side converter: the
|
|
1146
1235
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1147
1236
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1148
1237
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1164,8 +1253,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1164
1253
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1165
1254
|
// already JS-owned.
|
|
1166
1255
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeVtxo.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1167
|
-
|
|
1168
|
-
|
|
1256
|
+
* Opt one stuck send into auto-exiting its HTLCs as they near expiry.
|
|
1257
|
+
*/async allowLightningSendToExit(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_allow_lightning_send_to_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_ark_info(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1169
1258
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1170
1259
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1171
1260
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1174,8 +1263,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1174
1263
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1175
1264
|
// already JS-owned.
|
|
1176
1265
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeArkInfo.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_);}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1177
|
-
|
|
1178
|
-
|
|
1266
|
+
* Force-exit an unfinished lightning receive.
|
|
1267
|
+
*/async attemptLightningReceiveExit(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_attempt_lightning_receive_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_balance(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1179
1268
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1180
1269
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1181
1270
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1184,9 +1273,9 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1184
1273
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1185
1274
|
// already JS-owned.
|
|
1186
1275
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeBalance.lift(__rb);}finally{nativeModule().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
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1276
|
+
* The numbers to show a user, without the breakdown of `balance`: what
|
|
1277
|
+
* they can spend, what needs a refresh, what is pending and the total.
|
|
1278
|
+
*/async balanceSummary(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_balance_summary(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1190
1279
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1191
1280
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1192
1281
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1195,10 +1284,10 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1195
1284
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1196
1285
|
// already JS-owned.
|
|
1197
1286
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeBalanceSummary.lift(__rb);}finally{nativeModule().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
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1287
|
+
* Build a BIP 321 `bitcoin:` URI with a new Ark address, a new BOLT11
|
|
1288
|
+
* invoice (when there is an amount) and the caller's onchain address,
|
|
1289
|
+
* as `options` selects.
|
|
1290
|
+
*/async bip321Uri(options,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_bip321_uri(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterTypeBip321UriOptions.lower(options,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1202
1291
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1203
1292
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1204
1293
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1238,7 +1327,13 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1238
1327
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1239
1328
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1240
1329
|
// already JS-owned.
|
|
1241
|
-
/*liftFunc:*/__rb=>{try{return FfiConverterTypePendingBoard.lift(__rb);}finally{nativeModule().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;}}
|
|
1330
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypePendingBoard.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1331
|
+
* Create an invoice for an incoming lightning payment.
|
|
1332
|
+
*
|
|
1333
|
+
* `expiry_secs` is how long the invoice can be paid for. It defaults to,
|
|
1334
|
+
* and cannot exceed, the Ark server's invoice expiry; creating the invoice
|
|
1335
|
+
* fails if the server does not honour it. Must be at least 1.
|
|
1336
|
+
*/async bolt11Invoice(amountSats,description,token=undefined,expirySecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_bolt11_invoice(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(description,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(token,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(expirySecs,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1242
1337
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1243
1338
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1244
1339
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1247,21 +1342,23 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1247
1342
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1248
1343
|
// already JS-owned.
|
|
1249
1344
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningInvoice.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1345
|
+
* Create an invoice whose claimed VTXO is delivered to `claim_destination`
|
|
1346
|
+
* (an Ark address), letting that wallet receive while offline.
|
|
1347
|
+
*
|
|
1348
|
+
* The claim is signed directly to that address's own policy, so this wallet
|
|
1349
|
+
* has no custodial control and cannot redirect the payment. It can still
|
|
1350
|
+
* strand it: delivering the signed output to the destination's mailbox is a
|
|
1351
|
+
* separate step only this wallet can perform, and the recipient has no
|
|
1352
|
+
* independent way to recover the funds until it happens. Delivery resumes
|
|
1353
|
+
* automatically on restart, so a crash recovers on its own — but running
|
|
1354
|
+
* this for someone else means they trust you to stay online and eventually
|
|
1355
|
+
* deliver, not that they trust you with custody.
|
|
1356
|
+
*
|
|
1357
|
+
* A `claim_destination` owned by this wallet is claimed locally instead of
|
|
1358
|
+
* going through its mailbox.
|
|
1359
|
+
*
|
|
1360
|
+
* `expiry_secs` works as in [`Self::bolt11_invoice`].
|
|
1361
|
+
*/async bolt11InvoiceForAddress(amountSats,claimDestination,description=undefined,token=undefined,expirySecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_bolt11_invoice_for_address(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc),FfiConverterString.lower(claimDestination,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(description,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(token,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(expirySecs,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1265
1362
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1266
1363
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1267
1364
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1278,12 +1375,12 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1278
1375
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1279
1376
|
// already JS-owned.
|
|
1280
1377
|
/*liftFunc:*/__rb=>{try{return FfiConverterString.lift(__rb);}finally{nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_all_pending_rounds(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1378
|
+
* Cancel a unilateral exit still in its abortable window.
|
|
1379
|
+
*
|
|
1380
|
+
* The VTXO stays spendable either way, and a lock you took yourself is
|
|
1381
|
+
* yours to release. Expected refusals come back in the result rather than
|
|
1382
|
+
* as an error, and cancelling twice succeeds.
|
|
1383
|
+
*/async cancelExit(vtxoId,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoId,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1287
1384
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1288
1385
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1289
1386
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1313,9 +1410,9 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1313
1410
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1314
1411
|
// already JS-owned.
|
|
1315
1412
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeConfig.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString),/*asyncOpts:*/asyncOpts_);}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1413
|
+
* The network, mailbox id and VTXO xpub, as `bark debug-info` prints
|
|
1414
|
+
* them. Users can share this in support requests.
|
|
1415
|
+
*/async debugInfo(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_debug_info(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1319
1416
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1320
1417
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1321
1418
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1324,12 +1421,12 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1324
1421
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1325
1422
|
// already JS-owned.
|
|
1326
1423
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeDebugInfo.lift(__rb);}finally{nativeModule().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
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1424
|
+
* Build a PSBT claiming exited VTXOs to `address`.
|
|
1425
|
+
*
|
|
1426
|
+
* Draining everything must be asked for with `drain_all`, so an id list
|
|
1427
|
+
* filtered down to nothing is an error rather than a sweep. Ids are parsed
|
|
1428
|
+
* all-or-nothing; well-formed ids that are not claimable are skipped.
|
|
1429
|
+
*/async drainExits(vtxoIds,drainAll=false,address,feeRateSatPerVb,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_drain_exits(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(drainAll,nativeModule().rustbuffer_alloc),FfiConverterString.lower(address,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(feeRateSatPerVb,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1333
1430
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1334
1431
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1335
1432
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1354,20 +1451,20 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1354
1451
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1355
1452
|
// already JS-owned.
|
|
1356
1453
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1454
|
+
* Estimate the onchain cost of unilaterally (emergency) exiting VTXOs.
|
|
1455
|
+
* Mirrors bark-rest `GET /exits/fee`.
|
|
1456
|
+
*
|
|
1457
|
+
* Pass an empty `vtxo_ids` to price exiting the whole wallet (every
|
|
1458
|
+
* spendable VTXO). `fee_rate_sat_per_vb` applies to both legs; omit it to
|
|
1459
|
+
* use the chain's fast rate for the broadcast leg and regular rate for
|
|
1460
|
+
* the claim leg. `destination` only affects the claim transaction's weight.
|
|
1461
|
+
* `fee_margin` scales the broadcast leg (finite and non-negative; default
|
|
1462
|
+
* 1.2).
|
|
1463
|
+
*
|
|
1464
|
+
* The estimate never reads the onchain wallet, so it works before the
|
|
1465
|
+
* wallet holds funds and with callback wallets
|
|
1466
|
+
* (`CustomOnchainWalletCallbacks`) too.
|
|
1467
|
+
*/async estimateEmergencyExitFee(vtxoIds,feeRateSatPerVb,destination,feeMargin=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_emergency_exit_fee(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(feeRateSatPerVb,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(destination,nativeModule().rustbuffer_alloc),FfiConverterOptionalFloat64.lower(feeMargin,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1371
1468
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1372
1469
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1373
1470
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1408,8 +1505,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1408
1505
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1409
1506
|
// already JS-owned.
|
|
1410
1507
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{nativeModule().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
|
-
|
|
1412
|
-
|
|
1508
|
+
* Estimate the fee of paying `amount_sats` to `method`.
|
|
1509
|
+
*/async estimatePaymentFee(method,amountSats,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_payment_fee(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterTypePaymentMethod.lower(method,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1413
1510
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1414
1511
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1415
1512
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1434,9 +1531,9 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1434
1531
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1435
1532
|
// already JS-owned.
|
|
1436
1533
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeFeeEstimate.lift(__rb);}finally{nativeModule().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 nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_fingerprint(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}/**
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1534
|
+
* Status of one exit, live or finished. `None` if no exit was ever
|
|
1535
|
+
* started for the VTXO.
|
|
1536
|
+
*/async getExitStatus(vtxoId,includeHistory,includeTransactions,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_get_exit_status(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoId,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(includeHistory,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(includeTransactions,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1440
1537
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1441
1538
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1442
1539
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1445,9 +1542,9 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1445
1542
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1446
1543
|
// already JS-owned.
|
|
1447
1544
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeExitTransactionStatus.lift(__rb);}finally{nativeModule().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
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1545
|
+
* Live exits only. Finished exits leave this list; see
|
|
1546
|
+
* `list_finished_exits` and `get_exit_status`.
|
|
1547
|
+
*/async getExitVtxos(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_get_exit_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1451
1548
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1452
1549
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1453
1550
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1517,25 +1614,25 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1517
1614
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1518
1615
|
// already JS-owned.
|
|
1519
1616
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeMovement.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1617
|
+
* Import a VTXO from its serialized form (hex or base64).
|
|
1618
|
+
*
|
|
1619
|
+
* The VTXO is stored in the state the server reports for it, so one that
|
|
1620
|
+
* was already spent is recorded as spent rather than refused. Pass `args`
|
|
1621
|
+
* to widen the key-scan gap limit, skip the server status check, or allow
|
|
1622
|
+
* partial success; omit it for the defaults.
|
|
1623
|
+
*
|
|
1624
|
+
* The first parameter keeps its historical `vtxo_base64` name for foreign
|
|
1625
|
+
* binding compatibility (uniffi exposes parameter names), but hex as
|
|
1626
|
+
* returned by [`Wallet::vtxo_encoded`] is accepted too.
|
|
1627
|
+
*/async importVtxo(vtxoBase64,args=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxo(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoBase64,nativeModule().rustbuffer_alloc),FfiConverterOptionalTypeImportVtxoArgs.lower(args,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
1628
|
+
* Import several VTXOs (hex or base64) under a single key scan and a
|
|
1629
|
+
* single write, which is why this is not just a loop over `import_vtxo`.
|
|
1630
|
+
*
|
|
1631
|
+
* Returns the ids now held — whether this call stored them or found them
|
|
1632
|
+
* already present — so a failed batch can be retried. One VTXO that cannot
|
|
1633
|
+
* be imported discards the whole batch unless `args.allow_partial` is set,
|
|
1634
|
+
* in which case the ones that did import are kept.
|
|
1635
|
+
*/async importVtxos(encodedVtxos,args=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(encodedVtxos,nativeModule().rustbuffer_alloc),FfiConverterOptionalTypeImportVtxoArgs.lower(args,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1539
1636
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1540
1637
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1541
1638
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1544,17 +1641,17 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1544
1641
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1545
1642
|
// already JS-owned.
|
|
1546
1643
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceString.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1644
|
+
* Cheap "has this invoice ever been paid?", answered from the local fact
|
|
1645
|
+
* table without consulting the server.
|
|
1646
|
+
*/async isInvoicePaid(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_i8,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_i8,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_i8,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_i8,// Async returns always go through the JS-side converter: the
|
|
1550
1647
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1551
1648
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1552
1649
|
// export. The bytes the runtime hands back must be deserialized
|
|
1553
1650
|
// here using the per-callable return-type converter.
|
|
1554
1651
|
/*liftFunc:*/FfiConverterBool.lift.bind(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;}}/**
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1652
|
+
* Triage a payment hash: settled or in-progress. Errors if no lightning
|
|
1653
|
+
* receive is known for this payment hash.
|
|
1654
|
+
*/async lightningReceiveState(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_receive_state(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1558
1655
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1559
1656
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1560
1657
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1563,9 +1660,9 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1563
1660
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1564
1661
|
// already JS-owned.
|
|
1565
1662
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningReceive.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1663
|
+
* Read-only triage, for polling after a send started with `wait = false`.
|
|
1664
|
+
* Unlike `checkLightningPayment`, never advances the action.
|
|
1665
|
+
*/async lightningSendState(paymentHash,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_send_state(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(paymentHash,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1569
1666
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1570
1667
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1571
1668
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1574,8 +1671,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1574
1671
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1575
1672
|
// already JS-owned.
|
|
1576
1673
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{nativeModule().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
|
-
|
|
1578
|
-
|
|
1674
|
+
* Status of every exit this wallet ever started, live and finished.
|
|
1675
|
+
*/async listAllExits(includeHistory=false,includeTransactions=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_list_all_exits(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterBool.lower(includeHistory,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(includeTransactions,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1579
1676
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1580
1677
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1581
1678
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1592,10 +1689,10 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1592
1689
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1593
1690
|
// already JS-owned.
|
|
1594
1691
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitVtxo.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1692
|
+
* Status of the exits in a terminal state: claimed, canceled, or aborted
|
|
1693
|
+
* because the VTXO was already spent or swept. They stay queryable after
|
|
1694
|
+
* completion, so a client need not snapshot them at drain time.
|
|
1695
|
+
*/async listFinishedExits(includeHistory=false,includeTransactions=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_list_finished_exits(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterBool.lower(includeHistory,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(includeTransactions,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1599
1696
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1600
1697
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1601
1698
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1604,8 +1701,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1604
1701
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1605
1702
|
// already JS-owned.
|
|
1606
1703
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitTransactionStatus.lift(__rb);}finally{nativeModule().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
|
-
|
|
1608
|
-
|
|
1704
|
+
* Status of the exits that are still progressing.
|
|
1705
|
+
*/async listLiveExits(includeHistory=false,includeTransactions=false,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_list_live_exits(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterBool.lower(includeHistory,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(includeTransactions,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1609
1706
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1610
1707
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1611
1708
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1614,18 +1711,18 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1614
1711
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1615
1712
|
// already JS-owned.
|
|
1616
1713
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeExitTransactionStatus.lift(__rb);}finally{nativeModule().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
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1714
|
+
* Reserve VTXOs so wallet-driven flows leave them alone: a locked VTXO is
|
|
1715
|
+
* excluded from coin selection.
|
|
1716
|
+
*
|
|
1717
|
+
* `holder` is what `unlockVtxos` matches on to stop one subsystem
|
|
1718
|
+
* releasing another's lock. Atomic, and re-locking with the same holder
|
|
1719
|
+
* is a no-op.
|
|
1720
|
+
*/async lockVtxos(vtxoIds,holder,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lock_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterOptionalTypeVtxoLockHolder.lower(holder,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
1721
|
+
* Create a hex-encoded authorization that lets whoever holds it read this
|
|
1722
|
+
* wallet's mailbox from the Ark server for `expiry_secs` from now, so 86400
|
|
1723
|
+
* for 24 hours. An authorization cannot be revoked early, so keep the
|
|
1724
|
+
* window short.
|
|
1725
|
+
*/mailboxAuthorization(expirySecs)/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_mailbox_authorization(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterUInt32.lower(expirySecs,nativeModule().rustbuffer_alloc),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}mailboxIdentifier()/*throws*/{const __rb=uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError),/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_mailbox_identifier(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterString.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}async maintenance(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_delegated(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_refresh(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1629
1726
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1630
1727
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1631
1728
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1679,17 +1776,17 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1679
1776
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1680
1777
|
// already JS-owned.
|
|
1681
1778
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeOffboardResult.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1779
|
+
* Parse any payment string bark understands: a BIP 321 `bitcoin:` URI, a
|
|
1780
|
+
* `lightning:` URI (any case), a BOLT11 invoice, a BOLT12 offer, a
|
|
1781
|
+
* lightning address, an LNURL-pay link or LUD-17 `lnurlp://` URI, an Ark
|
|
1782
|
+
* address, a bitcoin address or a hex output script. Surrounding
|
|
1783
|
+
* whitespace is not trimmed.
|
|
1784
|
+
*
|
|
1785
|
+
* Problems with a single option (wrong network, an Ark address of
|
|
1786
|
+
* another server, an amount mismatch) are reported in that option's
|
|
1787
|
+
* `errors`. Errors only when nothing in the string can be paid at all.
|
|
1788
|
+
* Checking an Ark address needs a server connection.
|
|
1789
|
+
*/async parsePaymentRequest(payment,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_parse_payment_request(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(payment,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1693
1790
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1694
1791
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1695
1792
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1698,8 +1795,8 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1698
1795
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1699
1796
|
// already JS-owned.
|
|
1700
1797
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypePaymentRequest.lift(__rb);}finally{nativeModule().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
|
-
|
|
1702
|
-
|
|
1798
|
+
* Pay to a Lightning Address (`user@domain`), resolved via LNURL-pay.
|
|
1799
|
+
*/async payLightningAddress(lightningAddress,amountSats,comment,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(lightningAddress,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(comment,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(wait,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1703
1800
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1704
1801
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1705
1802
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1708,12 +1805,12 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1708
1805
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1709
1806
|
// already JS-owned.
|
|
1710
1807
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{nativeModule().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
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1808
|
+
* Pay a BOLT11 invoice.
|
|
1809
|
+
*
|
|
1810
|
+
* `retry_for_secs` is how long the Ark server keeps trying to pay,
|
|
1811
|
+
* capped to the server's maximum; `None` leaves it to the server and 0
|
|
1812
|
+
* makes a single attempt. The same holds for every `pay_*` method.
|
|
1813
|
+
*/async payLightningInvoice(invoice,amountSats,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(invoice,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(amountSats,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(wait,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1717
1814
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1718
1815
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1719
1816
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1730,11 +1827,11 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1730
1827
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1731
1828
|
// already JS-owned.
|
|
1732
1829
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningSendStatus.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1830
|
+
* Pay a raw LNURL-pay link (`lnurl1…`).
|
|
1831
|
+
*
|
|
1832
|
+
* Resolves the LNURL-pay endpoint to a BOLT11 invoice and pays it. Errors
|
|
1833
|
+
* if the link decodes to a non-pay LNURL (auth, withdraw, channel).
|
|
1834
|
+
*/async payLnurl(lnurl,amountSats,comment,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lnurl(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(lnurl,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(comment,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(wait,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1738
1835
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1739
1836
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1740
1837
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1811,7 +1908,33 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1811
1908
|
// Borrowed view over foreign memory: the call site owns the free,
|
|
1812
1909
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1813
1910
|
// already JS-owned.
|
|
1814
|
-
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeRoundState.lift(__rb);}finally{nativeModule().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;}}
|
|
1911
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeRoundState.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1912
|
+
* Sign, without broadcasting, the CPFP child of every exit transaction
|
|
1913
|
+
* that still needs broadcasting to emergency-exit the given VTXOs, for as
|
|
1914
|
+
* long as confirmed onchain funds last. Mirrors bark-rest
|
|
1915
|
+
* `POST /exits/presign`.
|
|
1916
|
+
*
|
|
1917
|
+
* Omit `vtxo_ids` to presign every spendable VTXO; an empty list presigns
|
|
1918
|
+
* nothing. `fee_rate_sat_per_vb` defaults to the chain's fast rate. Syncs
|
|
1919
|
+
* the onchain wallet and exits first.
|
|
1920
|
+
*
|
|
1921
|
+
* Execute the result wave by wave: broadcast a wave's packages together
|
|
1922
|
+
* and wait for them, and its `in_mempool` transactions, to confirm before
|
|
1923
|
+
* the next. No funds are reserved, so a later onchain spend can
|
|
1924
|
+
* invalidate the children. The children are signed: store the result
|
|
1925
|
+
* securely.
|
|
1926
|
+
*
|
|
1927
|
+
* Needs the built-in onchain wallet; with callback wallets
|
|
1928
|
+
* (`CustomOnchainWalletCallbacks`) it fails.
|
|
1929
|
+
*/async presignEmergencyExit(vtxoIds=undefined,feeRateSatPerVb=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_presign_emergency_exit(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterOptionalSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(feeRateSatPerVb,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1930
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
1931
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1932
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
1933
|
+
// here using the per-callable return-type converter.
|
|
1934
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
1935
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1936
|
+
// already JS-owned.
|
|
1937
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypePresignedExits.lift(__rb);}finally{nativeModule().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 progressExits(feeRateSatPerVb,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_progress_exits(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterOptionalUInt64.lower(feeRateSatPerVb,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1815
1938
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1816
1939
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1817
1940
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1828,14 +1951,14 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1828
1951
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1829
1952
|
// already JS-owned.
|
|
1830
1953
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeWalletProperties.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1954
|
+
* Recover the given VTXO ids from the server, importing the ones this
|
|
1955
|
+
* wallet owns that are still spendable. Use it to retry ids a previous
|
|
1956
|
+
* scan reported as `failed`.
|
|
1957
|
+
*
|
|
1958
|
+
* `gap_limit` overrides `Config.vtxo_key_gap_limit` for the key scan that
|
|
1959
|
+
* decides which of `vtxo_ids` this wallet owns. Widen it to reach ids a
|
|
1960
|
+
* previous scan bucketed as `foreign`.
|
|
1961
|
+
*/async recoverVtxos(vtxoIds,gapLimit=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_recover_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt32.lower(gapLimit,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1839
1962
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1840
1963
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1841
1964
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1844,20 +1967,20 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1844
1967
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1845
1968
|
// already JS-owned.
|
|
1846
1969
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeRecoveryReport.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1970
|
+
* The report of the seed-recovery scan that ran during `Wallet::open`, or
|
|
1971
|
+
* none if the scan did not complete. Use `recovery_status` to tell a scan
|
|
1972
|
+
* that failed apart from one that never ran.
|
|
1973
|
+
*/recoveryReport(){const __rb=uniffiCaller.rustCall(/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_report(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterOptionalTypeRecoveryReport.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}/**
|
|
1974
|
+
* Outcome of the seed-recovery scan that ran during `Wallet::open`.
|
|
1975
|
+
*
|
|
1976
|
+
* Recovery only runs on the open that creates the wallet locally, and not
|
|
1977
|
+
* at all when `WalletOpenArgs.skip_recovery` is set, so this is `NotRun`
|
|
1978
|
+
* on every subsequent open. `Failed` means the scan errored before
|
|
1979
|
+
* producing a report — bark logs that and lets open succeed — so funds
|
|
1980
|
+
* may be missing until a retry; `Completed` carries the report, and
|
|
1981
|
+
* `isComplete == false` there means funds may still be missing. Retry the
|
|
1982
|
+
* report's `failed` ids with `recoverVtxos`.
|
|
1983
|
+
*/recoveryStatus(){const __rb=uniffiCaller.rustCall(/*caller:*/callStatus=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_status(uniffiTypeWalletObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift.bind(FfiConverterString));try{return FfiConverterTypeRecoveryStatus.lift(__rb);}finally{nativeModule().rustbuffer_free(__rb);}}async refreshServer(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_server(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1861
1984
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1862
1985
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1863
1986
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1874,11 +1997,11 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1874
1997
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1875
1998
|
// already JS-owned.
|
|
1876
1999
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeRoundState.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
2000
|
+
* Schedule a delegated refresh for `scheduled_height` instead of the next
|
|
2001
|
+
* round. The refresh fee is priced against the VTXO's remaining lifetime at
|
|
2002
|
+
* that height, and the server charges less the closer a VTXO is to expiry,
|
|
2003
|
+
* so scheduling further out never costs more than refreshing now.
|
|
2004
|
+
*/async refreshVtxosScheduled(vtxoIds,scheduledHeight,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_refresh_vtxos_scheduled(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterUInt32.lower(scheduledHeight,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1882
2005
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1883
2006
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1884
2007
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1887,24 +2010,41 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1887
2010
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1888
2011
|
// already JS-owned.
|
|
1889
2012
|
/*liftFunc:*/__rb=>{try{return FfiConverterOptionalTypeRoundState.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
2013
|
+
* List every exit transaction of the given VTXOs still awaiting
|
|
2014
|
+
* confirmation, so anyone can broadcast the exits on the user's behalf.
|
|
2015
|
+
* Mirrors bark-rest `GET /exits/remaining`.
|
|
2016
|
+
*
|
|
2017
|
+
* Omit `vtxo_ids` to cover every spendable VTXO; an empty list covers
|
|
2018
|
+
* nothing. Read-only: signs nothing and never touches the onchain wallet,
|
|
2019
|
+
* so it works with callback wallets too. Statuses of started exits reflect
|
|
2020
|
+
* the last `sync_exits`.
|
|
2021
|
+
*/async remainingExitTransactions(vtxoIds=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_remaining_exit_transactions(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterOptionalSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
2022
|
+
// FFI symbol returns the future handle (u64), and the user-level
|
|
2023
|
+
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2024
|
+
// export. The bytes the runtime hands back must be deserialized
|
|
2025
|
+
// here using the per-callable return-type converter.
|
|
2026
|
+
// Borrowed view over foreign memory: the call site owns the free,
|
|
2027
|
+
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
2028
|
+
// already JS-owned.
|
|
2029
|
+
/*liftFunc:*/__rb=>{try{return FfiConverterTypeRemainingExitTransactions.lift(__rb);}finally{nativeModule().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;}}/**
|
|
2030
|
+
* Start the background daemon. The onchain wallet used by the daemon is
|
|
2031
|
+
* the one supplied to `Wallet::open` (see `WalletOpenArgs.onchain`).
|
|
2032
|
+
*/async runDaemon(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_run_daemon(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
2033
|
+
* Send an out-of-round payment to an Ark address.
|
|
2034
|
+
*
|
|
2035
|
+
* An address this bark cannot deliver to (see `validateArkoorAddress`) is
|
|
2036
|
+
* rejected up front, leaving the VTXOs spendable rather than cosigned.
|
|
2037
|
+
*
|
|
2038
|
+
* Returns the id of the movement that records the payment.
|
|
2039
|
+
*/async sendArkoorPayment(arkAddress,amountSats,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_send_arkoor_payment(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(arkAddress,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_u32,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_u32,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_u32,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_u32,// Async returns always go through the JS-side converter: the
|
|
1900
2040
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1901
2041
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1902
2042
|
// export. The bytes the runtime hands back must be deserialized
|
|
1903
2043
|
// here using the per-callable return-type converter.
|
|
1904
2044
|
/*liftFunc:*/FfiConverterUInt32.lift.bind(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
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
2045
|
+
* Send `amount_sats` from the offchain balance to an onchain address,
|
|
2046
|
+
* as an offboard. Returns the offboard txid and its movement id.
|
|
2047
|
+
*/async sendOnchain(address,amountSats,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_send_onchain(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(address,nativeModule().rustbuffer_alloc),FfiConverterUInt64.lower(amountSats,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1908
2048
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1909
2049
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1910
2050
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1913,15 +2053,15 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1913
2053
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1914
2054
|
// already JS-owned.
|
|
1915
2055
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeOffboardResult.lift(__rb);}finally{nativeModule().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
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
2056
|
+
* Pay `method` over the matching rail: Ark, lightning or onchain.
|
|
2057
|
+
*
|
|
2058
|
+
* `amount_sats` is required for addresses and LNURL, and for invoices
|
|
2059
|
+
* and offers without an amount (`AvailablePaymentMethod.requires_amount`).
|
|
2060
|
+
* `comment` only reaches lightning addresses and LNURL. `wait` and
|
|
2061
|
+
* `retry_for_secs` only affect lightning. `retry_for_secs` is how long
|
|
2062
|
+
* the Ark server keeps trying to pay, capped to the server's maximum;
|
|
2063
|
+
* `None` leaves it to the server and 0 makes a single attempt.
|
|
2064
|
+
*/async sendPayment(method,amountSats=undefined,comment=undefined,wait=false,retryForSecs=undefined,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_send_payment(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterTypePaymentMethod.lower(method,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(amountSats,nativeModule().rustbuffer_alloc),FfiConverterOptionalString.lower(comment,nativeModule().rustbuffer_alloc),FfiConverterBool.lower(wait,nativeModule().rustbuffer_alloc),FfiConverterOptionalUInt64.lower(retryForSecs,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1925
2065
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1926
2066
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1927
2067
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1946,17 +2086,17 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1946
2086
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1947
2087
|
// already JS-owned.
|
|
1948
2088
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeVtxo.lift(__rb);}finally{nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_entire_wallet(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2089
|
+
* Like `startExitForVtxos`, but skips dust and standardness checks.
|
|
2090
|
+
*
|
|
2091
|
+
* Only for VTXOs already onchain, or a node that accepts non-standard
|
|
2092
|
+
* transactions; otherwise the exit transactions may be unrelayable.
|
|
2093
|
+
*/async startExitForVtxosIncludingNonStandard(vtxoIds,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos_including_non_standard(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_stop_daemon(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
2094
|
+
* Stop the background daemon and wait until its tasks have finished, so
|
|
2095
|
+
* nothing runs in the background afterwards (e.g. before deleting the
|
|
2096
|
+
* wallet's datadir). No-op when no daemon is running.
|
|
2097
|
+
*/async stopDaemonWait(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_stop_daemon_wait(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
2098
|
+
* Failed lightning sends whose HTLC revocation also failed.
|
|
2099
|
+
*/async stuckFailedLightningSends(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_stuck_failed_lightning_sends(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1960
2100
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1961
2101
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1962
2102
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1965,12 +2105,12 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1965
2105
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1966
2106
|
// already JS-owned.
|
|
1967
2107
|
/*liftFunc:*/__rb=>{try{return FfiConverterSequenceTypeLightningSend.lift(__rb);}finally{nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_sync(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_exits(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
2108
|
+
* Scan for VTXOs that were force-exited on-chain without the user asking
|
|
2109
|
+
* and route them into the unilateral-exit flow so the funds can be claimed.
|
|
2110
|
+
*
|
|
2111
|
+
* This already runs automatically as part of [`Self::sync`]; call it
|
|
2112
|
+
* directly to trigger the scan on demand.
|
|
2113
|
+
*/async syncForceExitedVtxos(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_force_exited_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_pending_boards(uniffiTypeWalletObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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 uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_try_claim_all_lightning_receives(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterBool.lower(wait,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
1974
2114
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
1975
2115
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
1976
2116
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -1987,27 +2127,27 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
1987
2127
|
// as on the sync paths. Unconditional — a no-op where buffers are
|
|
1988
2128
|
// already JS-owned.
|
|
1989
2129
|
/*liftFunc:*/__rb=>{try{return FfiConverterTypeLightningReceive.lift(__rb);}finally{nativeModule().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;}}/**
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2130
|
+
* Release VTXOs locked by `lockVtxos`.
|
|
2131
|
+
*
|
|
2132
|
+
* Every VTXO must currently be held by `expected_holder` or nothing is
|
|
2133
|
+
* unlocked; that is what stops cleanup freeing a VTXO a payment or
|
|
2134
|
+
* in-flight round has since claimed. Leaving it unset bypasses the guard
|
|
2135
|
+
* entirely, so reserve that for recovery.
|
|
2136
|
+
*/async unlockVtxos(vtxoIds,expectedHolder,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_unlock_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterSequenceString.lower(vtxoIds,nativeModule().rustbuffer_alloc),FfiConverterOptionalTypeVtxoLockHolder.lower(expectedHolder,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void,/*freeFunc:*/nativeModule().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;}}/**
|
|
2137
|
+
* Whether this wallet can pay `address` out-of-round: same network and
|
|
2138
|
+
* server, a supported VTXO policy, and only delivery mechanisms this bark
|
|
2139
|
+
* supports. An address listing no delivery mechanism is valid. Errors only
|
|
2140
|
+
* when the address does not parse.
|
|
2141
|
+
*/async validateArkoorAddress(address,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_validate_arkoor_address(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(address,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_i8,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_i8,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_i8,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_i8,// Async returns always go through the JS-side converter: the
|
|
2002
2142
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
2003
2143
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2004
2144
|
// export. The bytes the runtime hands back must be deserialized
|
|
2005
2145
|
// here using the per-callable return-type converter.
|
|
2006
2146
|
/*liftFunc:*/FfiConverterBool.lift.bind(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;}}/**
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2147
|
+
* Hex-encoded serialization of the full VTXO (genesis chain included),
|
|
2148
|
+
* re-importable via [`Wallet::import_vtxo`]. Mirrors bark-rest
|
|
2149
|
+
* `GET /vtxos/{id}/encoded`.
|
|
2150
|
+
*/async vtxoEncoded(vtxoId,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(uniffiTypeWalletObjectFactory.clonePointer(this),FfiConverterString.lower(vtxoId,nativeModule().rustbuffer_alloc));},/*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,// Async returns always go through the JS-side converter: the
|
|
2011
2151
|
// FFI symbol returns the future handle (u64), and the user-level
|
|
2012
2152
|
// RustBuffer comes back via the shared `rust_future_complete_*`
|
|
2013
2153
|
// export. The bytes the runtime hands back must be deserialized
|
|
@@ -2044,7 +2184,12 @@ const FfiConverterOptionalSequenceTypeExitState=new FfiConverterOptional(FfiConv
|
|
|
2044
2184
|
const FfiConverterSequenceTypeExitTransactionPackage=new FfiConverterArray(FfiConverterTypeExitTransactionPackage);// FfiConverter for bigint | undefined
|
|
2045
2185
|
const FfiConverterOptionalInt64=new FfiConverterOptional(FfiConverterInt64);// FfiConverter for Array<AvailablePaymentMethod>
|
|
2046
2186
|
const FfiConverterSequenceTypeAvailablePaymentMethod=new FfiConverterArray(FfiConverterTypeAvailablePaymentMethod);// FfiConverter for AvailablePaymentMethod | undefined
|
|
2047
|
-
const FfiConverterOptionalTypeAvailablePaymentMethod=new FfiConverterOptional(FfiConverterTypeAvailablePaymentMethod);// FfiConverter for
|
|
2187
|
+
const FfiConverterOptionalTypeAvailablePaymentMethod=new FfiConverterOptional(FfiConverterTypeAvailablePaymentMethod);// FfiConverter for Array<ExitTransactionInfo>
|
|
2188
|
+
const FfiConverterSequenceTypeExitTransactionInfo=new FfiConverterArray(FfiConverterTypeExitTransactionInfo);// FfiConverter for Array<PresignedExit>
|
|
2189
|
+
const FfiConverterSequenceTypePresignedExit=new FfiConverterArray(FfiConverterTypePresignedExit);// FfiConverter for Array<PresignedExitPackage>
|
|
2190
|
+
const FfiConverterSequenceTypePresignedExitPackage=new FfiConverterArray(FfiConverterTypePresignedExitPackage);// FfiConverter for Array<PresignedWave>
|
|
2191
|
+
const FfiConverterSequenceTypePresignedWave=new FfiConverterArray(FfiConverterTypePresignedWave);// FfiConverter for Array<RemainingExit>
|
|
2192
|
+
const FfiConverterSequenceTypeRemainingExit=new FfiConverterArray(FfiConverterTypeRemainingExit);// FfiConverter for VtxoLockHolder | undefined
|
|
2048
2193
|
const FfiConverterOptionalTypeVtxoLockHolder=new FfiConverterOptional(FfiConverterTypeVtxoLockHolder);// FfiConverter for Array<WalletTransaction>
|
|
2049
2194
|
const FfiConverterSequenceTypeWalletTransaction=new FfiConverterArray(FfiConverterTypeWalletTransaction);// FfiConverter for Array<OnchainUtxo>
|
|
2050
2195
|
const FfiConverterSequenceTypeOnchainUtxo=new FfiConverterArray(FfiConverterTypeOnchainUtxo);// FfiConverter for OnchainWalletLike | undefined
|
|
@@ -2062,7 +2207,8 @@ const FfiConverterSequenceTypeExitTransactionStatus=new FfiConverterArray(FfiCon
|
|
|
2062
2207
|
const FfiConverterSequenceTypePendingBoard=new FfiConverterArray(FfiConverterTypePendingBoard);// FfiConverter for Array<LightningReceive>
|
|
2063
2208
|
const FfiConverterSequenceTypeLightningReceive=new FfiConverterArray(FfiConverterTypeLightningReceive);// FfiConverter for Array<LightningSend>
|
|
2064
2209
|
const FfiConverterSequenceTypeLightningSend=new FfiConverterArray(FfiConverterTypeLightningSend);// FfiConverter for Array<RoundState>
|
|
2065
|
-
const FfiConverterSequenceTypeRoundState=new FfiConverterArray(FfiConverterTypeRoundState);// FfiConverter for Array<
|
|
2210
|
+
const FfiConverterSequenceTypeRoundState=new FfiConverterArray(FfiConverterTypeRoundState);// FfiConverter for Array<string> | undefined
|
|
2211
|
+
const FfiConverterOptionalSequenceString=new FfiConverterOptional(FfiConverterSequenceString);// FfiConverter for Array<ExitProgressStatus>
|
|
2066
2212
|
const FfiConverterSequenceTypeExitProgressStatus=new FfiConverterArray(FfiConverterTypeExitProgressStatus);// FfiConverter for RecoveryReport | undefined
|
|
2067
2213
|
const FfiConverterOptionalTypeRecoveryReport=new FfiConverterOptional(FfiConverterTypeRecoveryReport);// FfiConverter for RoundState | undefined
|
|
2068
2214
|
const FfiConverterOptionalTypeRoundState=new FfiConverterOptional(FfiConverterTypeRoundState);// FfiConverter for DatadirInfo | undefined
|
|
@@ -2077,5 +2223,5 @@ const FfiConverterOptionalTypeDatadirInfo=new FfiConverterOptional(FfiConverterT
|
|
|
2077
2223
|
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
2078
2224
|
*/function uniffiEnsureInitialized(){// Get the bindings contract version from our ComponentInterface
|
|
2079
2225
|
const bindingsContractVersion=30;// Get the scaffolding contract version by calling the into the dylib
|
|
2080
|
-
const scaffoldingContractVersion=nativeModule().ubrn_ffi_bark_ffi_uniffi_contract_version();if(bindingsContractVersion!==scaffoldingContractVersion){throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion,bindingsContractVersion);}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_clear_logger()!==48287){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_clear_logger");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_decode_bolt11_invoice()!==43493){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_decode_bolt11_invoice");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit()!==3344){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt()!==8893){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_extract_tx_from_psbt");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_generate_mnemonic()!==65033){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_generate_mnemonic");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_init_wallet()!==41495){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_init_wallet");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit()!==15808){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_read_datadir_info()!==62647){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_read_datadir_info");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_set_logger()!==17909){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_set_logger");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address()!==43084){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_ark_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_validate_mnemonic()!==33507){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_mnemonic");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_wallet_exists()!==32702){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_wallet_exists");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log()!==3468){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_barklogger_log");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance()!==22074){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx()!==41818){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx()!==43328){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sign_psbt()!==17958){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sign_psbt");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine()!==18867){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx()!==17970){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx()!==36298){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp()!==46075){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp()!==64815){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync()!==29018){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait()!==45269){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_next_notification()!==25507){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_next_notification");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_custom()!==33645){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_custom");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_default()!==61714){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_default");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance()!==39213){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx()!==26786){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates()!==30741){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan()!==19010){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address()!==7405){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_send()!==30495){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_send");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_sync()!==4373){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_sync");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_tip_height()!==12254){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_tip_height");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_transactions()!==566){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_transactions");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_utxos()!==44926){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_utxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_open()!==45531){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_open");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height()!==59034){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos()!==62209){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit()!==56991){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info()!==54388){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit()!==6368){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance()!==37345){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance_summary()!==9541){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance_summary");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bip321_uri()!==64697){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bip321_uri");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all()!==5667){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_all");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount()!==54692){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_funding_address()!==8961){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_funding_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_psbt()!==28300){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_psbt");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice()!==54959){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address()!==56368){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_broadcast_tx()!==46367){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_broadcast_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds()!==53455){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_exit()!==63172){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive()!==49444){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round()!==13433){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment()!==50033){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats()!==7743){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_config()!==23594){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_config");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_debug_info()!==12282){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_debug_info");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_drain_exits()!==45364){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_drain_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee()!==35980){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee()!==55967){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee()!==5118){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee()!==33637){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee()!==11290){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee()!==24629){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee()!==37073){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_payment_fee()!==53689){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_payment_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee()!==18182){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee()!==1027){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint()!==51021){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_fingerprint");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_status()!==3037){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_status");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos()!==35836){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos()!==39689){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight()!==33536){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight()!==58530){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id()!==34050){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh()!==52553){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_has_pending_exits()!==19790){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_has_pending_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_history()!==10552){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method()!==11845){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo()!==26027){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos()!==13727){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid()!==5699){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state()!==27834){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state()!==53422){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_all_exits()!==11191){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_all_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits()!==58660){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_finished_exits()!==44459){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_finished_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_live_exits()!==16771){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_live_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lock_vtxos()!==13415){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lock_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization()!==25098){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier()!==15231){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance()!==33161){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated()!==31668){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh()!==34548){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_network()!==2007){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_network");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address()!==65478){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address_with_index()!==37344){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address_with_index");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_next_round_start_time()!==20748){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_next_round_start_time");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_notifications()!==8597){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_notifications");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_all()!==7986){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_all");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos()!==64605){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_parse_payment_request()!==2160){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_parse_payment_request");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address()!==45319){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice()!==48095){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer()!==53553){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lnurl()!==19202){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lnurl");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address()!==31847){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_peek_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos()!==53566){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_boards()!==61501){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_boards");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats()!==38418){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives()!==26676){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos()!==62766){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends()!==8847){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos()!==54307){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_states()!==11480){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_states");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits()!==6255){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds()!==43537){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_properties()!==9773){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_properties");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos()!==56476){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report()!==10331){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_report");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_status()!==14132){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_status");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server()!==41162){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos()!==52101){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated()!==61476){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled()!==50488){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_run_daemon()!==9520){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_run_daemon");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment()!==61332){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_onchain()!==11375){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_onchain");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_payment()!==15378){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_payment");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs()!==12930){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos()!==22755){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet()!==6525){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos()!==56154){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard()!==27907){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon()!==7109){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait()!==1734){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends()!==31613){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync()!==2151){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits()!==12141){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos()!==25363){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards()!==63453){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives()!==14560){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive()!==43209){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos()!==11806){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address()!==30498){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded()!==25637){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos()!==33207){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxos");}uniffiCallbackInterfaceBarkLogger.register();uniffiCallbackInterfaceCustomOnchainWalletCallbacks.register();}export 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}});
|
|
2226
|
+
const scaffoldingContractVersion=nativeModule().ubrn_ffi_bark_ffi_uniffi_contract_version();if(bindingsContractVersion!==scaffoldingContractVersion){throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion,bindingsContractVersion);}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_clear_logger()!==48287){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_clear_logger");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_decode_bolt11_invoice()!==43493){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_decode_bolt11_invoice");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit()!==3344){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt()!==8893){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_extract_tx_from_psbt");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_generate_mnemonic()!==65033){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_generate_mnemonic");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_init_wallet()!==2602){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_init_wallet");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit()!==15808){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_read_datadir_info()!==62647){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_read_datadir_info");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_set_logger()!==17909){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_set_logger");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address()!==43084){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_ark_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_validate_mnemonic()!==33507){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_mnemonic");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_func_wallet_exists()!==29370){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_wallet_exists");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log()!==3468){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_barklogger_log");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance()!==22074){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_balance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx()!==41818){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx()!==43328){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_prepare_drain_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sign_psbt()!==17958){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sign_psbt");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine()!==18867){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx()!==17970){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx()!==36298){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp()!==46075){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp()!==64815){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync()!==29018){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait()!==45269){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_notificationholder_next_notification()!==25507){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_notificationholder_next_notification");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_custom()!==33645){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_custom");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_constructor_onchainwallet_default()!==23070){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_onchainwallet_default");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance()!==39213){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx()!==26786){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates()!==30741){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan()!==19010){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address()!==7405){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_send()!==30495){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_send");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_sync()!==4373){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_sync");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_tip_height()!==12254){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_tip_height");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_transactions()!==566){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_transactions");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_utxos()!==44926){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_utxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_constructor_wallet_open()!==45531){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_constructor_wallet_open");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height()!==59034){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos()!==62209){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit()!==56991){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info()!==54388){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit()!==6368){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance()!==37345){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance_summary()!==9541){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance_summary");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bip321_uri()!==64697){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bip321_uri");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all()!==5667){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_all");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount()!==54692){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_funding_address()!==8961){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_funding_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_psbt()!==28300){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_psbt");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice()!==32731){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address()!==25554){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice_for_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_broadcast_tx()!==46367){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_broadcast_tx");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds()!==53455){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_exit()!==63172){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive()!==49444){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round()!==13433){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment()!==50033){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats()!==7743){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_config()!==23594){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_config");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_debug_info()!==12282){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_debug_info");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_drain_exits()!==45364){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_drain_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee()!==35980){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_arkoor_payment_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee()!==55967){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee()!==5118){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee()!==33637){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee()!==11290){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee()!==24629){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee()!==37073){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_payment_fee()!==53689){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_payment_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee()!==18182){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee()!==1027){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint()!==51021){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_fingerprint");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_status()!==3037){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_status");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos()!==35836){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos()!==39689){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_expiring_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight()!==33536){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_first_expiring_vtxo_blockheight");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight()!==58530){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_next_required_refresh_blockheight");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id()!==34050){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxo_by_id");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh()!==52553){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_has_pending_exits()!==19790){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_has_pending_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_history()!==10552){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method()!==11845){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo()!==26027){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos()!==13727){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid()!==5699){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state()!==27834){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state()!==53422){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_all_exits()!==11191){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_all_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits()!==58660){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_finished_exits()!==44459){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_finished_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_live_exits()!==16771){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_live_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lock_vtxos()!==13415){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lock_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization()!==25098){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier()!==15231){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_identifier");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance()!==33161){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated()!==31668){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_delegated");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh()!==34548){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_network()!==2007){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_network");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address()!==65478){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_new_address_with_index()!==37344){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_new_address_with_index");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_next_round_start_time()!==20748){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_next_round_start_time");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_notifications()!==8597){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_notifications");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_all()!==7986){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_all");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos()!==64605){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_parse_payment_request()!==2160){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_parse_payment_request");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address()!==45319){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice()!==48095){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer()!==53553){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lnurl()!==19202){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lnurl");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address()!==31847){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_peek_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos()!==53566){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_boards()!==61501){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_boards");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats()!==38418){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives()!==26676){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_receives");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos()!==62766){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_send_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends()!==8847){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_lightning_sends");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos()!==54307){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_input_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_states()!==11480){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_states");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_presign_emergency_exit()!==32185){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_presign_emergency_exit");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits()!==6255){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds()!==43537){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_properties()!==9773){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_properties");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos()!==56476){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report()!==10331){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_report");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_status()!==14132){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_status");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server()!==41162){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos()!==52101){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated()!==61476){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled()!==50488){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_scheduled");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_remaining_exit_transactions()!==44959){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_remaining_exit_transactions");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_run_daemon()!==9520){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_run_daemon");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment()!==61332){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_onchain()!==11375){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_onchain");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_payment()!==15378){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_send_payment");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs()!==12930){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sign_exit_claim_inputs");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos()!==22755){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_spendable_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet()!==6525){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_entire_wallet");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos()!==56154){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard()!==27907){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon()!==7109){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait()!==1734){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends()!==31613){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync()!==2151){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits()!==12141){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_exits");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos()!==25363){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards()!==63453){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_pending_boards");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives()!==14560){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive()!==43209){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos()!==11806){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address()!==30498){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded()!==25637){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded");}if(nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos()!==33207){throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxos");}uniffiCallbackInterfaceBarkLogger.register();uniffiCallbackInterfaceCustomOnchainWalletCallbacks.register();}export 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,FfiConverterTypeExitFeeInfo,FfiConverterTypeExitProgressStatus,FfiConverterTypeExitState,FfiConverterTypeExitStateKind,FfiConverterTypeExitTransactionInfo,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,FfiConverterTypePresignedExit,FfiConverterTypePresignedExitChild,FfiConverterTypePresignedExitPackage,FfiConverterTypePresignedExitStatus,FfiConverterTypePresignedExits,FfiConverterTypePresignedWave,FfiConverterTypeRecoveryBucket,FfiConverterTypeRecoveryReport,FfiConverterTypeRecoveryStatus,FfiConverterTypeRefreshFees,FfiConverterTypeRemainingExit,FfiConverterTypeRemainingExitTransactions,FfiConverterTypeRoundFlowKind,FfiConverterTypeRoundState,FfiConverterTypeVtxo,FfiConverterTypeVtxoLockHolder,FfiConverterTypeVtxoState,FfiConverterTypeWallet,FfiConverterTypeWalletNotification,FfiConverterTypeWalletOpenArgs,FfiConverterTypeWalletProperties,FfiConverterTypeWalletTransaction}});
|
|
2081
2227
|
//# sourceMappingURL=bark.js.map
|