@secondts/bark-react-native 0.12.2 → 0.13.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 CHANGED
@@ -60,7 +60,7 @@ npx expo install @secondts/bark-react-native@beta
60
60
 
61
61
  ```bash
62
62
  # Or install a specific beta version
63
- npx expo install @secondts/bark-react-native@0.12.2
63
+ npx expo install @secondts/bark-react-native@0.13.0
64
64
  ```
65
65
 
66
66
  For bare React Native projects, use:
@@ -677,6 +677,10 @@ extern "C" {
677
677
  /*handle*/ uint64_t ptr,
678
678
  RustBuffer address
679
679
  );
680
+ /*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(
681
+ /*handle*/ uint64_t ptr,
682
+ RustBuffer vtxo_id
683
+ );
680
684
  /*handle*/ uint64_t uniffi_bark_ffi_fn_method_wallet_vtxos(
681
685
  /*handle*/ uint64_t ptr
682
686
  );
@@ -1123,6 +1127,8 @@ extern "C" {
1123
1127
  );
1124
1128
  uint16_t uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address(
1125
1129
  );
1130
+ uint16_t uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded(
1131
+ );
1126
1132
  uint16_t uniffi_bark_ffi_checksum_method_wallet_vtxos(
1127
1133
  );
1128
1134
  uint16_t uniffi_bark_ffi_checksum_constructor_onchainwallet_custom(
@@ -5461,6 +5467,14 @@ NativeBark::NativeBark(
5461
5467
  return this->cpp_uniffi_bark_ffi_fn_method_wallet_validate_arkoor_address(rt, thisVal, args, count);
5462
5468
  }
5463
5469
  );
5470
+ props["ubrn_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded"] = jsi::Function::createFromHostFunction(
5471
+ rt,
5472
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded"),
5473
+ 2,
5474
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
5475
+ return this->cpp_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(rt, thisVal, args, count);
5476
+ }
5477
+ );
5464
5478
  props["ubrn_uniffi_bark_ffi_fn_method_wallet_vtxos"] = jsi::Function::createFromHostFunction(
5465
5479
  rt,
5466
5480
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_fn_method_wallet_vtxos"),
@@ -6781,6 +6795,14 @@ NativeBark::NativeBark(
6781
6795
  return this->cpp_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address(rt, thisVal, args, count);
6782
6796
  }
6783
6797
  );
6798
+ props["ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded"] = jsi::Function::createFromHostFunction(
6799
+ rt,
6800
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded"),
6801
+ 0,
6802
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
6803
+ return this->cpp_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded(rt, thisVal, args, count);
6804
+ }
6805
+ );
6784
6806
  props["ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos"] = jsi::Function::createFromHostFunction(
6785
6807
  rt,
6786
6808
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos"),
@@ -7904,6 +7926,13 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_validate_arkoor_addr
7904
7926
  );
7905
7927
 
7906
7928
 
7929
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker, value);
7930
+ }
7931
+ jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
7932
+ auto value = uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::bark::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1])
7933
+ );
7934
+
7935
+
7907
7936
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker, value);
7908
7937
  }
7909
7938
  jsi::Value NativeBark::cpp_uniffi_bark_ffi_fn_method_wallet_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
@@ -9109,6 +9138,13 @@ jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_validate_arkoo
9109
9138
  );
9110
9139
 
9111
9140
 
9141
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
9142
+ }
9143
+ jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
9144
+ auto value = uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded(
9145
+ );
9146
+
9147
+
9112
9148
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
9113
9149
  }
9114
9150
  jsi::Value NativeBark::cpp_uniffi_bark_ffi_checksum_method_wallet_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
@@ -140,6 +140,7 @@ class NativeBark : public jsi::HostObject {
140
140
  jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_try_claim_all_lightning_receives(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
141
141
  jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_try_claim_lightning_receive(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
142
142
  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);
143
+ 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);
143
144
  jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
144
145
  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);
145
146
  jsi::Value cpp_uniffi_bark_ffi_fn_func_generate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
@@ -305,6 +306,7 @@ class NativeBark : public jsi::HostObject {
305
306
  jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
306
307
  jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
307
308
  jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
309
+ jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
308
310
  jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
309
311
  jsi::Value cpp_uniffi_bark_ffi_checksum_constructor_onchainwallet_custom(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
310
312
  jsi::Value cpp_uniffi_bark_ffi_checksum_constructor_onchainwallet_default(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;;AA2uBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAClBL,MAAM,EAErB;AAwKA;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":[]}
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;;AAgvBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAClBL,MAAM,EAErB;AAwKA;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":[]}
@@ -2866,6 +2866,14 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
2866
2866
  throw __error;
2867
2867
  }
2868
2868
  }
2869
+
2870
+ /**
2871
+ * Import a VTXO from its serialized form (hex or base64).
2872
+ *
2873
+ * The parameter keeps its historical `vtxo_base64` name for foreign
2874
+ * binding compatibility (uniffi exposes parameter names), but hex as
2875
+ * returned by [`Wallet::vtxo_encoded`] is accepted too.
2876
+ */
2869
2877
  async importVtxo(vtxoBase64, asyncOpts_) /*throws*/{
2870
2878
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2871
2879
  try {
@@ -3547,6 +3555,25 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3547
3555
  throw __error;
3548
3556
  }
3549
3557
  }
3558
+
3559
+ /**
3560
+ * Hex-encoded serialization of the full VTXO (genesis chain included),
3561
+ * re-importable via [`Wallet::import_vtxo`]. Mirrors bark-rest
3562
+ * `GET /vtxos/{id}/encoded`.
3563
+ */
3564
+ async vtxoEncoded(vtxoId, asyncOpts_) /*throws*/{
3565
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3566
+ try {
3567
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3568
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_vtxo_encoded(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(vtxoId));
3569
+ }, /*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:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3570
+ } catch (__error) {
3571
+ if (uniffiIsDebug && __error instanceof Error) {
3572
+ __error.stack = __stack;
3573
+ }
3574
+ throw __error;
3575
+ }
3576
+ }
3550
3577
  async vtxos(asyncOpts_) /*throws*/{
3551
3578
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3552
3579
  try {
@@ -3875,7 +3902,7 @@ function uniffiEnsureInitialized() {
3875
3902
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method() !== 11845) {
3876
3903
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method");
3877
3904
  }
3878
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo() !== 42571) {
3905
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo() !== 48135) {
3879
3906
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");
3880
3907
  }
3881
3908
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid() !== 31079) {
@@ -4031,6 +4058,9 @@ function uniffiEnsureInitialized() {
4031
4058
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 10861) {
4032
4059
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");
4033
4060
  }
4061
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded() !== 25637) {
4062
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded");
4063
+ }
4034
4064
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxos() !== 33207) {
4035
4065
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_vtxos");
4036
4066
  }