@secondts/bark-react-native 0.1.2-beta.31 → 0.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/generated/bark.cpp +45 -3
- package/cpp/generated/bark.hpp +2 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +24 -4
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +24 -4
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +3 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +28 -4
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +3 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +28 -4
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +9 -1
- package/src/generated/bark.ts +69 -6
package/cpp/generated/bark.cpp
CHANGED
|
@@ -353,7 +353,8 @@ extern "C" {
|
|
|
353
353
|
);
|
|
354
354
|
uint64_t uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(
|
|
355
355
|
/*handle*/ uint64_t ptr,
|
|
356
|
-
|
|
356
|
+
RustBuffer address,
|
|
357
|
+
RustBuffer vtxo_ids,
|
|
357
358
|
RustCallStatus *uniffi_out_err
|
|
358
359
|
);
|
|
359
360
|
uint64_t uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee(
|
|
@@ -361,6 +362,12 @@ extern "C" {
|
|
|
361
362
|
RustBuffer vtxo_ids,
|
|
362
363
|
RustCallStatus *uniffi_out_err
|
|
363
364
|
);
|
|
365
|
+
uint64_t uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(
|
|
366
|
+
/*handle*/ uint64_t ptr,
|
|
367
|
+
RustBuffer address,
|
|
368
|
+
uint64_t amount_sats,
|
|
369
|
+
RustCallStatus *uniffi_out_err
|
|
370
|
+
);
|
|
364
371
|
RustBuffer uniffi_bark_ffi_fn_method_wallet_fingerprint(
|
|
365
372
|
/*handle*/ uint64_t ptr,
|
|
366
373
|
RustCallStatus *uniffi_out_err
|
|
@@ -896,6 +903,8 @@ extern "C" {
|
|
|
896
903
|
);
|
|
897
904
|
uint16_t uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee(
|
|
898
905
|
);
|
|
906
|
+
uint16_t uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(
|
|
907
|
+
);
|
|
899
908
|
uint16_t uniffi_bark_ffi_checksum_method_wallet_fingerprint(
|
|
900
909
|
);
|
|
901
910
|
uint16_t uniffi_bark_ffi_checksum_method_wallet_get_exit_status(
|
|
@@ -4274,7 +4283,7 @@ NativeBark::NativeBark(
|
|
|
4274
4283
|
props["ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee"] = jsi::Function::createFromHostFunction(
|
|
4275
4284
|
rt,
|
|
4276
4285
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee"),
|
|
4277
|
-
|
|
4286
|
+
3,
|
|
4278
4287
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
4279
4288
|
return this->cpp_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(rt, thisVal, args, count);
|
|
4280
4289
|
}
|
|
@@ -4287,6 +4296,14 @@ NativeBark::NativeBark(
|
|
|
4287
4296
|
return this->cpp_uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee(rt, thisVal, args, count);
|
|
4288
4297
|
}
|
|
4289
4298
|
);
|
|
4299
|
+
props["ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee"] = jsi::Function::createFromHostFunction(
|
|
4300
|
+
rt,
|
|
4301
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee"),
|
|
4302
|
+
3,
|
|
4303
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
4304
|
+
return this->cpp_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(rt, thisVal, args, count);
|
|
4305
|
+
}
|
|
4306
|
+
);
|
|
4290
4307
|
props["ubrn_uniffi_bark_ffi_fn_method_wallet_fingerprint"] = jsi::Function::createFromHostFunction(
|
|
4291
4308
|
rt,
|
|
4292
4309
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_fingerprint"),
|
|
@@ -5007,6 +5024,14 @@ NativeBark::NativeBark(
|
|
|
5007
5024
|
return this->cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee(rt, thisVal, args, count);
|
|
5008
5025
|
}
|
|
5009
5026
|
);
|
|
5027
|
+
props["ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee"] = jsi::Function::createFromHostFunction(
|
|
5028
|
+
rt,
|
|
5029
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee"),
|
|
5030
|
+
0,
|
|
5031
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5032
|
+
return this->cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(rt, thisVal, args, count);
|
|
5033
|
+
}
|
|
5034
|
+
);
|
|
5010
5035
|
props["ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint"] = jsi::Function::createFromHostFunction(
|
|
5011
5036
|
rt,
|
|
5012
5037
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint"),
|
|
@@ -6012,7 +6037,7 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_estimate_lightning_s
|
|
|
6012
6037
|
}
|
|
6013
6038
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
6014
6039
|
RustCallStatus status = uniffi::bark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
6015
|
-
auto value = uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker, args[0]),
|
|
6040
|
+
auto value = uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
6016
6041
|
&status
|
|
6017
6042
|
);
|
|
6018
6043
|
uniffi::bark::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
@@ -6028,6 +6053,16 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee
|
|
|
6028
6053
|
uniffi::bark::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
6029
6054
|
|
|
6030
6055
|
|
|
6056
|
+
return uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, value);
|
|
6057
|
+
}
|
|
6058
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
6059
|
+
RustCallStatus status = uniffi::bark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
6060
|
+
auto value = uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[2]),
|
|
6061
|
+
&status
|
|
6062
|
+
);
|
|
6063
|
+
uniffi::bark::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
6064
|
+
|
|
6065
|
+
|
|
6031
6066
|
return uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, value);
|
|
6032
6067
|
}
|
|
6033
6068
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_fingerprint(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -6853,6 +6888,13 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_refre
|
|
|
6853
6888
|
);
|
|
6854
6889
|
|
|
6855
6890
|
|
|
6891
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
6892
|
+
}
|
|
6893
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
6894
|
+
auto value = uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(
|
|
6895
|
+
);
|
|
6896
|
+
|
|
6897
|
+
|
|
6856
6898
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
6857
6899
|
}
|
|
6858
6900
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_fingerprint(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
package/cpp/generated/bark.hpp
CHANGED
|
@@ -54,6 +54,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
54
54
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_lightning_send_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
55
55
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
56
56
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
57
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
57
58
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_fingerprint(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
58
59
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_get_exit_status(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
59
60
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_get_exit_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -144,6 +145,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
144
145
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
145
146
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
146
147
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
148
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
147
149
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_fingerprint(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
148
150
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_get_exit_status(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
149
151
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeBark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeBark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;AACA;;AAilBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAClBL,MAAM,EAErB;AA8JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|
|
@@ -2484,13 +2484,14 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
2484
2484
|
*
|
|
2485
2485
|
* # Arguments
|
|
2486
2486
|
*
|
|
2487
|
-
* * `
|
|
2487
|
+
* * `address` - Destination address for the offboard
|
|
2488
|
+
* * `vtxo_ids` - VTXOs to offboard
|
|
2488
2489
|
*
|
|
2489
2490
|
* Returns the estimated fee in sats
|
|
2490
2491
|
*/
|
|
2491
|
-
estimateOffboardFee(
|
|
2492
|
+
estimateOffboardFee(address, vtxoIds) /*throws*/{
|
|
2492
2493
|
return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2493
|
-
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
2494
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), FfiConverterArrayString.lower(vtxoIds), callStatus);
|
|
2494
2495
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2495
2496
|
}
|
|
2496
2497
|
|
|
@@ -2509,6 +2510,22 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
2509
2510
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2510
2511
|
}
|
|
2511
2512
|
|
|
2513
|
+
/**
|
|
2514
|
+
* Estimate the fee for a send onchain operation
|
|
2515
|
+
*
|
|
2516
|
+
* # Arguments
|
|
2517
|
+
*
|
|
2518
|
+
* * `address` - Destination address
|
|
2519
|
+
* * `amount_sats` - Amount to send in sats
|
|
2520
|
+
*
|
|
2521
|
+
* Returns the estimated fee in sats
|
|
2522
|
+
*/
|
|
2523
|
+
estimateSendOnchainFee(address, amountSats) /*throws*/{
|
|
2524
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError), /*caller:*/callStatus => {
|
|
2525
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
|
|
2526
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2512
2529
|
/**
|
|
2513
2530
|
* Get the wallet's BIP32 fingerprint
|
|
2514
2531
|
*/
|
|
@@ -3288,12 +3305,15 @@ function uniffiEnsureInitialized() {
|
|
|
3288
3305
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee() !== 1211) {
|
|
3289
3306
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee");
|
|
3290
3307
|
}
|
|
3291
|
-
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee() !==
|
|
3308
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee() !== 31248) {
|
|
3292
3309
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee");
|
|
3293
3310
|
}
|
|
3294
3311
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee() !== 57066) {
|
|
3295
3312
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee");
|
|
3296
3313
|
}
|
|
3314
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee() !== 31326) {
|
|
3315
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee");
|
|
3316
|
+
}
|
|
3297
3317
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint() !== 60041) {
|
|
3298
3318
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_fingerprint");
|
|
3299
3319
|
}
|