@secondts/bark-react-native 0.23.0 → 0.24.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/cpp/generated/bark.cpp +117 -6
- package/cpp/generated/bark.hpp +6 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +125 -11
- 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 +122 -10
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +8 -2
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +126 -12
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +8 -2
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +126 -12
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +18 -2
- package/src/generated/bark.ts +257 -12
package/cpp/generated/bark.cpp
CHANGED
|
@@ -543,7 +543,13 @@ extern "C" {
|
|
|
543
543
|
);
|
|
544
544
|
/*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_import_vtxo(
|
|
545
545
|
/*handle*/ uint64_t ptr,
|
|
546
|
-
RustBuffer vtxo_base64
|
|
546
|
+
RustBuffer vtxo_base64,
|
|
547
|
+
RustBuffer args
|
|
548
|
+
);
|
|
549
|
+
/*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_import_vtxos(
|
|
550
|
+
/*handle*/ uint64_t ptr,
|
|
551
|
+
RustBuffer encoded_vtxos,
|
|
552
|
+
RustBuffer args
|
|
547
553
|
);
|
|
548
554
|
/*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(
|
|
549
555
|
/*handle*/ uint64_t ptr,
|
|
@@ -673,7 +679,8 @@ extern "C" {
|
|
|
673
679
|
);
|
|
674
680
|
/*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_recover_vtxos(
|
|
675
681
|
/*handle*/ uint64_t ptr,
|
|
676
|
-
RustBuffer vtxo_ids
|
|
682
|
+
RustBuffer vtxo_ids,
|
|
683
|
+
RustBuffer gap_limit
|
|
677
684
|
);
|
|
678
685
|
RustBuffer uniffi_bark_ffi_fn_method_wallet_recovery_report(
|
|
679
686
|
/*handle*/ uint64_t ptr,
|
|
@@ -776,12 +783,16 @@ extern "C" {
|
|
|
776
783
|
/*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_vtxos(
|
|
777
784
|
/*handle*/ uint64_t ptr
|
|
778
785
|
);
|
|
786
|
+
uint32_t uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit(RustCallStatus *uniffi_out_err
|
|
787
|
+
);
|
|
779
788
|
RustBuffer uniffi_bark_ffi_fn_func_extract_tx_from_psbt(
|
|
780
789
|
RustBuffer psbt_base64,
|
|
781
790
|
RustCallStatus *uniffi_out_err
|
|
782
791
|
);
|
|
783
792
|
RustBuffer uniffi_bark_ffi_fn_func_generate_mnemonic(RustCallStatus *uniffi_out_err
|
|
784
793
|
);
|
|
794
|
+
uint32_t uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(RustCallStatus *uniffi_out_err
|
|
795
|
+
);
|
|
785
796
|
int8_t uniffi_bark_ffi_fn_func_validate_ark_address(
|
|
786
797
|
RustBuffer address,
|
|
787
798
|
RustCallStatus *uniffi_out_err
|
|
@@ -999,10 +1010,14 @@ extern "C" {
|
|
|
999
1010
|
/*handle*/ uint64_t handle,
|
|
1000
1011
|
RustCallStatus *uniffi_out_err
|
|
1001
1012
|
);
|
|
1013
|
+
uint16_t uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit(
|
|
1014
|
+
);
|
|
1002
1015
|
uint16_t uniffi_bark_ffi_checksum_func_extract_tx_from_psbt(
|
|
1003
1016
|
);
|
|
1004
1017
|
uint16_t uniffi_bark_ffi_checksum_func_generate_mnemonic(
|
|
1005
1018
|
);
|
|
1019
|
+
uint16_t uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit(
|
|
1020
|
+
);
|
|
1006
1021
|
uint16_t uniffi_bark_ffi_checksum_func_validate_ark_address(
|
|
1007
1022
|
);
|
|
1008
1023
|
uint16_t uniffi_bark_ffi_checksum_func_validate_mnemonic(
|
|
@@ -1141,6 +1156,8 @@ extern "C" {
|
|
|
1141
1156
|
);
|
|
1142
1157
|
uint16_t uniffi_bark_ffi_checksum_method_wallet_import_vtxo(
|
|
1143
1158
|
);
|
|
1159
|
+
uint16_t uniffi_bark_ffi_checksum_method_wallet_import_vtxos(
|
|
1160
|
+
);
|
|
1144
1161
|
uint16_t uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid(
|
|
1145
1162
|
);
|
|
1146
1163
|
uint16_t uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state(
|
|
@@ -5416,11 +5433,19 @@ NativeBark::NativeBark(
|
|
|
5416
5433
|
props["ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxo"] = jsi::Function::createFromHostFunction(
|
|
5417
5434
|
rt,
|
|
5418
5435
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxo"),
|
|
5419
|
-
|
|
5436
|
+
3,
|
|
5420
5437
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5421
5438
|
return this->cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxo(rt, thisVal, args, count);
|
|
5422
5439
|
}
|
|
5423
5440
|
);
|
|
5441
|
+
props["ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxos"] = jsi::Function::createFromHostFunction(
|
|
5442
|
+
rt,
|
|
5443
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxos"),
|
|
5444
|
+
3,
|
|
5445
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5446
|
+
return this->cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxos(rt, thisVal, args, count);
|
|
5447
|
+
}
|
|
5448
|
+
);
|
|
5424
5449
|
props["ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid"] = jsi::Function::createFromHostFunction(
|
|
5425
5450
|
rt,
|
|
5426
5451
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid"),
|
|
@@ -5688,7 +5713,7 @@ NativeBark::NativeBark(
|
|
|
5688
5713
|
props["ubrn_uniffi_bark_ffi_fn_method_wallet_recover_vtxos"] = jsi::Function::createFromHostFunction(
|
|
5689
5714
|
rt,
|
|
5690
5715
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_recover_vtxos"),
|
|
5691
|
-
|
|
5716
|
+
3,
|
|
5692
5717
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5693
5718
|
return this->cpp_uniffi_bark_ffi_fn_method_wallet_recover_vtxos(rt, thisVal, args, count);
|
|
5694
5719
|
}
|
|
@@ -5909,6 +5934,14 @@ NativeBark::NativeBark(
|
|
|
5909
5934
|
return this->cpp_uniffi_bark_ffi_fn_method_wallet_vtxos(rt, thisVal, args, count);
|
|
5910
5935
|
}
|
|
5911
5936
|
);
|
|
5937
|
+
props["ubrn_uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit"] = jsi::Function::createFromHostFunction(
|
|
5938
|
+
rt,
|
|
5939
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit"),
|
|
5940
|
+
0,
|
|
5941
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5942
|
+
return this->cpp_uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit(rt, thisVal, args, count);
|
|
5943
|
+
}
|
|
5944
|
+
);
|
|
5912
5945
|
props["ubrn_uniffi_bark_ffi_fn_func_extract_tx_from_psbt"] = jsi::Function::createFromHostFunction(
|
|
5913
5946
|
rt,
|
|
5914
5947
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_func_extract_tx_from_psbt"),
|
|
@@ -5925,6 +5958,14 @@ NativeBark::NativeBark(
|
|
|
5925
5958
|
return this->cpp_uniffi_bark_ffi_fn_func_generate_mnemonic(rt, thisVal, args, count);
|
|
5926
5959
|
}
|
|
5927
5960
|
);
|
|
5961
|
+
props["ubrn_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit"] = jsi::Function::createFromHostFunction(
|
|
5962
|
+
rt,
|
|
5963
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit"),
|
|
5964
|
+
0,
|
|
5965
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5966
|
+
return this->cpp_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(rt, thisVal, args, count);
|
|
5967
|
+
}
|
|
5968
|
+
);
|
|
5928
5969
|
props["ubrn_uniffi_bark_ffi_fn_func_validate_ark_address"] = jsi::Function::createFromHostFunction(
|
|
5929
5970
|
rt,
|
|
5930
5971
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_func_validate_ark_address"),
|
|
@@ -6341,6 +6382,14 @@ NativeBark::NativeBark(
|
|
|
6341
6382
|
return this->cpp_ffi_bark_ffi_rust_future_complete_void(rt, thisVal, args, count);
|
|
6342
6383
|
}
|
|
6343
6384
|
);
|
|
6385
|
+
props["ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit"] = jsi::Function::createFromHostFunction(
|
|
6386
|
+
rt,
|
|
6387
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit"),
|
|
6388
|
+
0,
|
|
6389
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6390
|
+
return this->cpp_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit(rt, thisVal, args, count);
|
|
6391
|
+
}
|
|
6392
|
+
);
|
|
6344
6393
|
props["ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt"] = jsi::Function::createFromHostFunction(
|
|
6345
6394
|
rt,
|
|
6346
6395
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt"),
|
|
@@ -6357,6 +6406,14 @@ NativeBark::NativeBark(
|
|
|
6357
6406
|
return this->cpp_uniffi_bark_ffi_checksum_func_generate_mnemonic(rt, thisVal, args, count);
|
|
6358
6407
|
}
|
|
6359
6408
|
);
|
|
6409
|
+
props["ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit"] = jsi::Function::createFromHostFunction(
|
|
6410
|
+
rt,
|
|
6411
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit"),
|
|
6412
|
+
0,
|
|
6413
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6414
|
+
return this->cpp_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit(rt, thisVal, args, count);
|
|
6415
|
+
}
|
|
6416
|
+
);
|
|
6360
6417
|
props["ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address"] = jsi::Function::createFromHostFunction(
|
|
6361
6418
|
rt,
|
|
6362
6419
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address"),
|
|
@@ -6909,6 +6966,14 @@ NativeBark::NativeBark(
|
|
|
6909
6966
|
return this->cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxo(rt, thisVal, args, count);
|
|
6910
6967
|
}
|
|
6911
6968
|
);
|
|
6969
|
+
props["ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos"] = jsi::Function::createFromHostFunction(
|
|
6970
|
+
rt,
|
|
6971
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos"),
|
|
6972
|
+
0,
|
|
6973
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6974
|
+
return this->cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxos(rt, thisVal, args, count);
|
|
6975
|
+
}
|
|
6976
|
+
);
|
|
6912
6977
|
props["ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid"] = jsi::Function::createFromHostFunction(
|
|
6913
6978
|
rt,
|
|
6914
6979
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid"),
|
|
@@ -8230,7 +8295,14 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_history_by_payment_m
|
|
|
8230
8295
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker, value);
|
|
8231
8296
|
}
|
|
8232
8297
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxo(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8233
|
-
auto value = uniffi_bark_ffi_fn_method_wallet_import_vtxo(uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1])
|
|
8298
|
+
auto value = uniffi_bark_ffi_fn_method_wallet_import_vtxo(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])
|
|
8299
|
+
);
|
|
8300
|
+
|
|
8301
|
+
|
|
8302
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker, value);
|
|
8303
|
+
}
|
|
8304
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8305
|
+
auto value = uniffi_bark_ffi_fn_method_wallet_import_vtxos(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])
|
|
8234
8306
|
);
|
|
8235
8307
|
|
|
8236
8308
|
|
|
@@ -8477,7 +8549,7 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_properties(jsi::Runt
|
|
|
8477
8549
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker, value);
|
|
8478
8550
|
}
|
|
8479
8551
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_recover_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8480
|
-
auto value = uniffi_bark_ffi_fn_method_wallet_recover_vtxos(uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1])
|
|
8552
|
+
auto value = uniffi_bark_ffi_fn_method_wallet_recover_vtxos(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])
|
|
8481
8553
|
);
|
|
8482
8554
|
|
|
8483
8555
|
|
|
@@ -8678,6 +8750,15 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_vtxos(jsi::Runtime&
|
|
|
8678
8750
|
|
|
8679
8751
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker, value);
|
|
8680
8752
|
}
|
|
8753
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8754
|
+
RustCallStatus status = uniffi::bark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
8755
|
+
auto value = uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit(&status
|
|
8756
|
+
);
|
|
8757
|
+
uniffi::bark::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
8758
|
+
|
|
8759
|
+
|
|
8760
|
+
return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
|
|
8761
|
+
}
|
|
8681
8762
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_func_extract_tx_from_psbt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8682
8763
|
RustCallStatus status = uniffi::bark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
8683
8764
|
auto value = uniffi_bark_ffi_fn_func_extract_tx_from_psbt(uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
@@ -8697,6 +8778,15 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_func_generate_mnemonic(jsi::Runtim
|
|
|
8697
8778
|
|
|
8698
8779
|
return uniffi::bark::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
8699
8780
|
}
|
|
8781
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8782
|
+
RustCallStatus status = uniffi::bark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
8783
|
+
auto value = uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(&status
|
|
8784
|
+
);
|
|
8785
|
+
uniffi::bark::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
8786
|
+
|
|
8787
|
+
|
|
8788
|
+
return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
|
|
8789
|
+
}
|
|
8700
8790
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_func_validate_ark_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
8701
8791
|
RustCallStatus status = uniffi::bark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
8702
8792
|
auto value = uniffi_bark_ffi_fn_func_validate_ark_address(uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
@@ -9106,6 +9196,13 @@ jsi::Value NativeBark::cpp_ffi_bark_ffi_rust_future_complete_void(jsi::Runtime&
|
|
|
9106
9196
|
|
|
9107
9197
|
return jsi::Value::undefined();
|
|
9108
9198
|
}
|
|
9199
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
9200
|
+
auto value = uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit(
|
|
9201
|
+
);
|
|
9202
|
+
|
|
9203
|
+
|
|
9204
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9205
|
+
}
|
|
9109
9206
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
9110
9207
|
auto value = uniffi_bark_ffi_checksum_func_extract_tx_from_psbt(
|
|
9111
9208
|
);
|
|
@@ -9118,6 +9215,13 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_func_generate_mnemonic(jsi::
|
|
|
9118
9215
|
);
|
|
9119
9216
|
|
|
9120
9217
|
|
|
9218
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9219
|
+
}
|
|
9220
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
9221
|
+
auto value = uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit(
|
|
9222
|
+
);
|
|
9223
|
+
|
|
9224
|
+
|
|
9121
9225
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9122
9226
|
}
|
|
9123
9227
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_func_validate_ark_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -9601,6 +9705,13 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxo(js
|
|
|
9601
9705
|
);
|
|
9602
9706
|
|
|
9603
9707
|
|
|
9708
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9709
|
+
}
|
|
9710
|
+
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
9711
|
+
auto value = uniffi_bark_ffi_checksum_method_wallet_import_vtxos(
|
|
9712
|
+
);
|
|
9713
|
+
|
|
9714
|
+
|
|
9604
9715
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9605
9716
|
}
|
|
9606
9717
|
jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
package/cpp/generated/bark.hpp
CHANGED
|
@@ -101,6 +101,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
101
101
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_history(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
102
102
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_history_by_payment_method(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
103
103
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxo(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
104
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
104
105
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
105
106
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_lightning_receive_state(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
106
107
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_lightning_send_state(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -162,8 +163,10 @@ class NativeBark : public jsi::HostObject {
|
|
|
162
163
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_validate_arkoor_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
163
164
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
164
165
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
166
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
165
167
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_extract_tx_from_psbt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
166
168
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_generate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
169
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
167
170
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_validate_ark_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
168
171
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_validate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
169
172
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_set_logger(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -216,8 +219,10 @@ class NativeBark : public jsi::HostObject {
|
|
|
216
219
|
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
217
220
|
jsi::Value cpp_ffi_bark_ffi_rust_future_free_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
218
221
|
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
222
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
219
223
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
220
224
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_generate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
225
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
221
226
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_validate_ark_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
222
227
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_validate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
223
228
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_set_logger(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -287,6 +292,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
287
292
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_history(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
288
293
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
289
294
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxo(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
295
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
290
296
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
291
297
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
292
298
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state(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;;AAi2BA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAClBL,MAAM,EAErB;AA6KA;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":[]}
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.WalletTransaction = exports.WalletProperties = exports.WalletOpenArgs = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.VtxoState_Tags = exports.VtxoState = exports.VtxoLockHolder_Tags = exports.VtxoLockHolder = exports.Vtxo = exports.RoundState = exports.RoundFlowKind = exports.RefreshFees = exports.RecoveryStatus_Tags = exports.RecoveryStatus = exports.RecoveryReport = exports.RecoveryBucket = exports.PpmExpiryFeeEntry = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainUtxo_Tags = exports.OnchainUtxo = exports.OnchainBalance = exports.OffboardResult = exports.OffboardFees = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSendStatus_Tags = exports.LightningSendStatus = exports.LightningSendFees = exports.LightningSend = exports.LightningReceiveFees = exports.LightningReceive = exports.LightningInvoice = exports.FeeSchedule = exports.FeeRates = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTxStatus_Tags = exports.ExitTxStatus = exports.ExitTxOrigin_Tags = exports.ExitTxOrigin = exports.ExitTx = exports.ExitTransactionStatus = exports.ExitState_Tags = exports.ExitStateKind = exports.ExitState = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.ExitCancelResult = exports.ExitCancelFailure_Tags = exports.ExitCancelFailure = exports.Exception_Tags = exports.Exception = exports.EmergencyExitFeeEstimate = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BoardFundingInfo = exports.BoardFees = exports.BlockRef = exports.BarkLoggerImpl = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
|
|
6
|
+
exports.default = exports.WalletTransaction = exports.WalletProperties = exports.WalletOpenArgs = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.VtxoState_Tags = exports.VtxoState = exports.VtxoLockHolder_Tags = exports.VtxoLockHolder = exports.Vtxo = exports.RoundState = exports.RoundFlowKind = exports.RefreshFees = exports.RecoveryStatus_Tags = exports.RecoveryStatus = exports.RecoveryReport = exports.RecoveryBucket = exports.PpmExpiryFeeEntry = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainUtxo_Tags = exports.OnchainUtxo = exports.OnchainBalance = exports.OffboardResult = exports.OffboardFees = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSendStatus_Tags = exports.LightningSendStatus = exports.LightningSendFees = exports.LightningSend = exports.LightningReceiveFees = exports.LightningReceive = exports.LightningInvoice = exports.ImportVtxoArgs = exports.FeeSchedule = exports.FeeRates = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTxStatus_Tags = exports.ExitTxStatus = exports.ExitTxOrigin_Tags = exports.ExitTxOrigin = exports.ExitTx = exports.ExitTransactionStatus = exports.ExitState_Tags = exports.ExitStateKind = exports.ExitState = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.ExitCancelResult = exports.ExitCancelFailure_Tags = exports.ExitCancelFailure = exports.Exception_Tags = exports.Exception = exports.EmergencyExitFeeEstimate = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BoardFundingInfo = exports.BoardFees = exports.BlockRef = exports.BarkLoggerImpl = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
|
|
7
|
+
exports.defaultVtxoKeyGapLimit = defaultVtxoKeyGapLimit;
|
|
7
8
|
exports.extractTxFromPsbt = extractTxFromPsbt;
|
|
8
9
|
exports.generateMnemonic = generateMnemonic;
|
|
9
10
|
exports.initWallet = initWallet;
|
|
11
|
+
exports.maxVtxoKeyGapLimit = maxVtxoKeyGapLimit;
|
|
10
12
|
exports.setLogger = setLogger;
|
|
11
13
|
exports.validateArkAddress = validateArkAddress;
|
|
12
14
|
exports.validateMnemonic = validateMnemonic;
|
|
@@ -31,6 +33,16 @@ typeof process !== "object" ||
|
|
|
31
33
|
process?.env?.NODE_ENV !== "production" || false;
|
|
32
34
|
// Public interface members begin here.
|
|
33
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Default for `Config.vtxo_key_gap_limit`: the run of consecutive unused
|
|
38
|
+
* seed-derived VTXO key indices a scan crosses before concluding a VTXO
|
|
39
|
+
* isn't ours.
|
|
40
|
+
*/
|
|
41
|
+
function defaultVtxoKeyGapLimit() {
|
|
42
|
+
return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
43
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_default_vtxo_key_gap_limit(callStatus);
|
|
44
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
45
|
+
}
|
|
34
46
|
/**
|
|
35
47
|
* Extract a signed transaction from a PSBT
|
|
36
48
|
*
|
|
@@ -58,6 +70,16 @@ function generateMnemonic() /*throws*/{
|
|
|
58
70
|
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_generate_mnemonic(callStatus);
|
|
59
71
|
}, /*liftString:*/FfiConverterString.lift));
|
|
60
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Largest value `Config.vtxo_key_gap_limit` (or an import/recovery
|
|
75
|
+
* `gap_limit` override) accepts. A scan that matches nothing runs the limit
|
|
76
|
+
* to its end, so an unbounded limit is unbounded work.
|
|
77
|
+
*/
|
|
78
|
+
function maxVtxoKeyGapLimit() {
|
|
79
|
+
return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
80
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_func_max_vtxo_key_gap_limit(callStatus);
|
|
81
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
82
|
+
}
|
|
61
83
|
/**
|
|
62
84
|
* Validate an Ark address (basic format check only)
|
|
63
85
|
*
|
|
@@ -393,7 +415,8 @@ const FfiConverterTypeConfig = (() => {
|
|
|
393
415
|
offboardRequiredConfirmations: FfiConverterOptionalUInt32.read(from),
|
|
394
416
|
daemonManualSync: FfiConverterOptionalBool.read(from),
|
|
395
417
|
lightningReceiveClaimRetries: FfiConverterOptionalUInt8.read(from),
|
|
396
|
-
userAgent: FfiConverterOptionalString.read(from)
|
|
418
|
+
userAgent: FfiConverterOptionalString.read(from),
|
|
419
|
+
vtxoKeyGapLimit: FfiConverterOptionalUInt32.read(from)
|
|
397
420
|
};
|
|
398
421
|
}
|
|
399
422
|
write(value, into) {
|
|
@@ -414,9 +437,10 @@ const FfiConverterTypeConfig = (() => {
|
|
|
414
437
|
FfiConverterOptionalBool.write(value.daemonManualSync, into);
|
|
415
438
|
FfiConverterOptionalUInt8.write(value.lightningReceiveClaimRetries, into);
|
|
416
439
|
FfiConverterOptionalString.write(value.userAgent, into);
|
|
440
|
+
FfiConverterOptionalUInt32.write(value.vtxoKeyGapLimit, into);
|
|
417
441
|
}
|
|
418
442
|
allocationSize(value) {
|
|
419
|
-
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) + FfiConverterOptionalBool.allocationSize(value.daemonManualSync) + FfiConverterOptionalUInt8.allocationSize(value.lightningReceiveClaimRetries) + FfiConverterOptionalString.allocationSize(value.userAgent);
|
|
443
|
+
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) + FfiConverterOptionalBool.allocationSize(value.daemonManualSync) + FfiConverterOptionalUInt8.allocationSize(value.lightningReceiveClaimRetries) + FfiConverterOptionalString.allocationSize(value.userAgent) + FfiConverterOptionalUInt32.allocationSize(value.vtxoKeyGapLimit);
|
|
420
444
|
}
|
|
421
445
|
}
|
|
422
446
|
return new FFIConverter();
|
|
@@ -907,6 +931,52 @@ const FfiConverterTypeFeeSchedule = (() => {
|
|
|
907
931
|
}
|
|
908
932
|
return new FFIConverter();
|
|
909
933
|
})();
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Arguments for `Wallet::import_vtxo` / `Wallet::import_vtxos`, mirroring
|
|
937
|
+
* `bark::ImportVtxoArgs`.
|
|
938
|
+
*
|
|
939
|
+
* Every field has a default, so callers only set what they need.
|
|
940
|
+
*/
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Generated factory for {@link ImportVtxoArgs} record objects.
|
|
944
|
+
*/
|
|
945
|
+
const ImportVtxoArgs = exports.ImportVtxoArgs = (() => {
|
|
946
|
+
const defaults = () => ({
|
|
947
|
+
gapLimit: undefined,
|
|
948
|
+
skipStatusCheck: false,
|
|
949
|
+
allowPartial: false
|
|
950
|
+
});
|
|
951
|
+
const create = (() => {
|
|
952
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
953
|
+
})();
|
|
954
|
+
return Object.freeze({
|
|
955
|
+
create,
|
|
956
|
+
new: create,
|
|
957
|
+
defaults: () => Object.freeze(defaults())
|
|
958
|
+
});
|
|
959
|
+
})();
|
|
960
|
+
const FfiConverterTypeImportVtxoArgs = (() => {
|
|
961
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
962
|
+
read(from) {
|
|
963
|
+
return {
|
|
964
|
+
gapLimit: FfiConverterOptionalUInt32.read(from),
|
|
965
|
+
skipStatusCheck: _uniffiBindgenReactNative.FfiConverterBool.read(from),
|
|
966
|
+
allowPartial: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
write(value, into) {
|
|
970
|
+
FfiConverterOptionalUInt32.write(value.gapLimit, into);
|
|
971
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.skipStatusCheck, into);
|
|
972
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.allowPartial, into);
|
|
973
|
+
}
|
|
974
|
+
allocationSize(value) {
|
|
975
|
+
return FfiConverterOptionalUInt32.allocationSize(value.gapLimit) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.skipStatusCheck) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.allowPartial);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
return new FFIConverter();
|
|
979
|
+
})();
|
|
910
980
|
/**
|
|
911
981
|
* Generated factory for {@link LightningInvoice} record objects.
|
|
912
982
|
*/
|
|
@@ -1606,7 +1676,6 @@ const FfiConverterTypeVtxo = (() => {
|
|
|
1606
1676
|
const WalletOpenArgs = exports.WalletOpenArgs = (() => {
|
|
1607
1677
|
const defaults = () => ({
|
|
1608
1678
|
runDaemon: true,
|
|
1609
|
-
onchain: undefined,
|
|
1610
1679
|
createIfNotExists: true,
|
|
1611
1680
|
createWithoutServer: false,
|
|
1612
1681
|
skipRecovery: false
|
|
@@ -5558,15 +5627,20 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5558
5627
|
/**
|
|
5559
5628
|
* Import a VTXO from its serialized form (hex or base64).
|
|
5560
5629
|
*
|
|
5561
|
-
* The
|
|
5630
|
+
* The VTXO is stored in the state the server reports for it, so one that
|
|
5631
|
+
* was already spent is recorded as spent rather than refused. Pass `args`
|
|
5632
|
+
* to widen the key-scan gap limit, skip the server status check, or allow
|
|
5633
|
+
* partial success; omit it for the defaults.
|
|
5634
|
+
*
|
|
5635
|
+
* The first parameter keeps its historical `vtxo_base64` name for foreign
|
|
5562
5636
|
* binding compatibility (uniffi exposes parameter names), but hex as
|
|
5563
5637
|
* returned by [`Wallet::vtxo_encoded`] is accepted too.
|
|
5564
5638
|
*/
|
|
5565
|
-
async importVtxo(vtxoBase64, asyncOpts_) /*throws*/{
|
|
5639
|
+
async importVtxo(vtxoBase64, args = undefined, asyncOpts_) /*throws*/{
|
|
5566
5640
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5567
5641
|
try {
|
|
5568
5642
|
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
5569
|
-
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxo(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(vtxoBase64));
|
|
5643
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxo(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(vtxoBase64), FfiConverterOptionalTypeImportVtxoArgs.lower(args));
|
|
5570
5644
|
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
5571
5645
|
} catch (__error) {
|
|
5572
5646
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
@@ -5575,6 +5649,29 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5575
5649
|
throw __error;
|
|
5576
5650
|
}
|
|
5577
5651
|
}
|
|
5652
|
+
|
|
5653
|
+
/**
|
|
5654
|
+
* Import several VTXOs (hex or base64) under a single key scan and a
|
|
5655
|
+
* single write, which is why this is not just a loop over `import_vtxo`.
|
|
5656
|
+
*
|
|
5657
|
+
* Returns the ids now held — whether this call stored them or found them
|
|
5658
|
+
* already present — so a failed batch can be retried. One VTXO that cannot
|
|
5659
|
+
* be imported discards the whole batch unless `args.allow_partial` is set,
|
|
5660
|
+
* in which case the ones that did import are kept.
|
|
5661
|
+
*/
|
|
5662
|
+
async importVtxos(encodedVtxos, args = undefined, asyncOpts_) /*throws*/{
|
|
5663
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5664
|
+
try {
|
|
5665
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
5666
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_import_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(encodedVtxos), FfiConverterOptionalTypeImportVtxoArgs.lower(args));
|
|
5667
|
+
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterArrayString.lift.bind(FfiConverterArrayString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
5668
|
+
} catch (__error) {
|
|
5669
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
5670
|
+
__error.stack = __stack;
|
|
5671
|
+
}
|
|
5672
|
+
throw __error;
|
|
5673
|
+
}
|
|
5674
|
+
}
|
|
5578
5675
|
async isInvoicePaid(paymentHash, asyncOpts_) /*throws*/{
|
|
5579
5676
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5580
5677
|
try {
|
|
@@ -6001,12 +6098,16 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
6001
6098
|
* Recover the given VTXO ids from the server, importing the ones this
|
|
6002
6099
|
* wallet owns that are still spendable. Use it to retry ids a previous
|
|
6003
6100
|
* scan reported as `failed`.
|
|
6101
|
+
*
|
|
6102
|
+
* `gap_limit` overrides `Config.vtxo_key_gap_limit` for the key scan that
|
|
6103
|
+
* decides which of `vtxo_ids` this wallet owns. Widen it to reach ids a
|
|
6104
|
+
* previous scan bucketed as `foreign`.
|
|
6004
6105
|
*/
|
|
6005
|
-
async recoverVtxos(vtxoIds, asyncOpts_) /*throws*/{
|
|
6106
|
+
async recoverVtxos(vtxoIds, gapLimit = undefined, asyncOpts_) /*throws*/{
|
|
6006
6107
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6007
6108
|
try {
|
|
6008
6109
|
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6009
|
-
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_recover_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds));
|
|
6110
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_recover_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterOptionalUInt32.lower(gapLimit));
|
|
6010
6111
|
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeRecoveryReport.lift.bind(FfiConverterTypeRecoveryReport), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
6011
6112
|
} catch (__error) {
|
|
6012
6113
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
@@ -6476,6 +6577,9 @@ const FfiConverterOptionalTypeBlockRef = new _uniffiBindgenReactNative.FfiConver
|
|
|
6476
6577
|
// FfiConverter for ExitTransactionStatus | undefined
|
|
6477
6578
|
const FfiConverterOptionalTypeExitTransactionStatus = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeExitTransactionStatus);
|
|
6478
6579
|
|
|
6580
|
+
// FfiConverter for ImportVtxoArgs | undefined
|
|
6581
|
+
const FfiConverterOptionalTypeImportVtxoArgs = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeImportVtxoArgs);
|
|
6582
|
+
|
|
6479
6583
|
// FfiConverter for RecoveryReport | undefined
|
|
6480
6584
|
const FfiConverterOptionalTypeRecoveryReport = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeRecoveryReport);
|
|
6481
6585
|
|
|
@@ -6575,12 +6679,18 @@ function uniffiEnsureInitialized() {
|
|
|
6575
6679
|
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
6576
6680
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
6577
6681
|
}
|
|
6682
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit() !== 3344) {
|
|
6683
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_default_vtxo_key_gap_limit");
|
|
6684
|
+
}
|
|
6578
6685
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt() !== 8893) {
|
|
6579
6686
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_extract_tx_from_psbt");
|
|
6580
6687
|
}
|
|
6581
6688
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_generate_mnemonic() !== 65033) {
|
|
6582
6689
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_generate_mnemonic");
|
|
6583
6690
|
}
|
|
6691
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit() !== 15808) {
|
|
6692
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_max_vtxo_key_gap_limit");
|
|
6693
|
+
}
|
|
6584
6694
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_func_validate_ark_address() !== 43084) {
|
|
6585
6695
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_func_validate_ark_address");
|
|
6586
6696
|
}
|
|
@@ -6785,9 +6895,12 @@ function uniffiEnsureInitialized() {
|
|
|
6785
6895
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method() !== 11845) {
|
|
6786
6896
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method");
|
|
6787
6897
|
}
|
|
6788
|
-
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo() !==
|
|
6898
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo() !== 26027) {
|
|
6789
6899
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");
|
|
6790
6900
|
}
|
|
6901
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxos() !== 13727) {
|
|
6902
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxos");
|
|
6903
|
+
}
|
|
6791
6904
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid() !== 31079) {
|
|
6792
6905
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");
|
|
6793
6906
|
}
|
|
@@ -6887,7 +7000,7 @@ function uniffiEnsureInitialized() {
|
|
|
6887
7000
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_properties() !== 9773) {
|
|
6888
7001
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_properties");
|
|
6889
7002
|
}
|
|
6890
|
-
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos() !==
|
|
7003
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos() !== 56476) {
|
|
6891
7004
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");
|
|
6892
7005
|
}
|
|
6893
7006
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report() !== 10331) {
|
|
@@ -7013,6 +7126,7 @@ var _default = exports.default = Object.freeze({
|
|
|
7013
7126
|
FfiConverterTypeFeeEstimate,
|
|
7014
7127
|
FfiConverterTypeFeeRates,
|
|
7015
7128
|
FfiConverterTypeFeeSchedule,
|
|
7129
|
+
FfiConverterTypeImportVtxoArgs,
|
|
7016
7130
|
FfiConverterTypeLightningInvoice,
|
|
7017
7131
|
FfiConverterTypeLightningReceive,
|
|
7018
7132
|
FfiConverterTypeLightningReceiveFees,
|