react-native-nitro-ark 0.0.58 → 0.0.59
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/android/src/main/jniLibs/arm64-v8a/libcxxbridge1.a +0 -0
- package/cpp/NitroArk.hpp +123 -7
- package/cpp/generated/ark_cxx.h +39 -4
- package/lib/module/index.js +55 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NitroArk.nitro.d.ts +18 -5
- package/lib/typescript/src/NitroArk.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +49 -6
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/shared/c++/BarkVtxo.hpp +6 -2
- package/nitrogen/generated/shared/c++/{LightningPaymentResult.hpp → Bolt11PaymentResult.hpp} +10 -10
- package/nitrogen/generated/shared/c++/Bolt12PaymentResult.hpp +77 -0
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.cpp +6 -0
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.hpp +15 -6
- package/nitrogen/generated/shared/c++/PaymentTypes.hpp +7 -3
- package/package.json +1 -1
- package/src/NitroArk.nitro.ts +21 -5
- package/src/index.tsx +88 -11
|
Binary file
|
package/cpp/NitroArk.hpp
CHANGED
|
@@ -16,6 +16,8 @@ inline PaymentTypes convertPaymentType(bark_cxx::PaymentTypes type) {
|
|
|
16
16
|
switch (type) {
|
|
17
17
|
case bark_cxx::PaymentTypes::Bolt11:
|
|
18
18
|
return PaymentTypes::BOLT11;
|
|
19
|
+
case bark_cxx::PaymentTypes::Bolt12:
|
|
20
|
+
return PaymentTypes::BOLT12;
|
|
19
21
|
case bark_cxx::PaymentTypes::Lnurl:
|
|
20
22
|
return PaymentTypes::LNURL;
|
|
21
23
|
case bark_cxx::PaymentTypes::Arkoor:
|
|
@@ -131,6 +133,16 @@ public:
|
|
|
131
133
|
return Promise<bool>::async([]() { return bark_cxx::is_wallet_loaded(); });
|
|
132
134
|
}
|
|
133
135
|
|
|
136
|
+
std::shared_ptr<Promise<void>> registerAllConfirmedBoards() override {
|
|
137
|
+
return Promise<void>::async([]() {
|
|
138
|
+
try {
|
|
139
|
+
bark_cxx::register_all_confirmed_boards();
|
|
140
|
+
} catch (const rust::Error& e) {
|
|
141
|
+
throw std::runtime_error(e.what());
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
134
146
|
std::shared_ptr<Promise<void>> maintenance() override {
|
|
135
147
|
return Promise<void>::async([]() {
|
|
136
148
|
try {
|
|
@@ -141,6 +153,16 @@ public:
|
|
|
141
153
|
});
|
|
142
154
|
}
|
|
143
155
|
|
|
156
|
+
std::shared_ptr<Promise<void>> maintenanceWithOnchain() override {
|
|
157
|
+
return Promise<void>::async([]() {
|
|
158
|
+
try {
|
|
159
|
+
bark_cxx::maintenance_with_onchain();
|
|
160
|
+
} catch (const rust::Error& e) {
|
|
161
|
+
throw std::runtime_error(e.what());
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
144
166
|
std::shared_ptr<Promise<void>> maintenanceRefresh() override {
|
|
145
167
|
return Promise<void>::async([]() {
|
|
146
168
|
try {
|
|
@@ -330,6 +352,7 @@ public:
|
|
|
330
352
|
vtxo.exit_delta = static_cast<double>(rust_vtxo.exit_delta);
|
|
331
353
|
vtxo.anchor_point = std::string(rust_vtxo.anchor_point.data(), rust_vtxo.anchor_point.length());
|
|
332
354
|
vtxo.point = std::string(rust_vtxo.point.data(), rust_vtxo.point.length());
|
|
355
|
+
vtxo.state = std::string(rust_vtxo.state.data(), rust_vtxo.state.length());
|
|
333
356
|
vtxos.push_back(vtxo);
|
|
334
357
|
}
|
|
335
358
|
return vtxos;
|
|
@@ -352,6 +375,7 @@ public:
|
|
|
352
375
|
vtxo.exit_delta = static_cast<double>(rust_vtxo.exit_delta);
|
|
353
376
|
vtxo.anchor_point = std::string(rust_vtxo.anchor_point.data(), rust_vtxo.anchor_point.length());
|
|
354
377
|
vtxo.point = std::string(rust_vtxo.point.data(), rust_vtxo.point.length());
|
|
378
|
+
vtxo.state = std::string(rust_vtxo.state.data(), rust_vtxo.state.length());
|
|
355
379
|
vtxos.push_back(vtxo);
|
|
356
380
|
}
|
|
357
381
|
return vtxos;
|
|
@@ -361,6 +385,38 @@ public:
|
|
|
361
385
|
});
|
|
362
386
|
}
|
|
363
387
|
|
|
388
|
+
std::shared_ptr<Promise<std::optional<double>>> getFirstExpiringVtxoBlockheight() override {
|
|
389
|
+
return Promise<std::optional<double>>::async([]() {
|
|
390
|
+
try {
|
|
391
|
+
const uint32_t* result_ptr = bark_cxx::get_first_expiring_vtxo_blockheight();
|
|
392
|
+
if (result_ptr == nullptr) {
|
|
393
|
+
return std::optional<double>(std::nullopt);
|
|
394
|
+
}
|
|
395
|
+
double value = static_cast<double>(*result_ptr);
|
|
396
|
+
delete result_ptr; // Free the heap-allocated memory from Rust
|
|
397
|
+
return std::optional<double>(value);
|
|
398
|
+
} catch (const rust::Error& e) {
|
|
399
|
+
throw std::runtime_error(e.what());
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
std::shared_ptr<Promise<std::optional<double>>> getNextRequiredRefreshBlockheight() override {
|
|
405
|
+
return Promise<std::optional<double>>::async([]() {
|
|
406
|
+
try {
|
|
407
|
+
const uint32_t* result_ptr = bark_cxx::get_next_required_refresh_blockheight();
|
|
408
|
+
if (result_ptr == nullptr) {
|
|
409
|
+
return std::optional<double>(std::nullopt);
|
|
410
|
+
}
|
|
411
|
+
double value = static_cast<double>(*result_ptr);
|
|
412
|
+
delete result_ptr; // Free the heap-allocated memory from Rust
|
|
413
|
+
return std::optional<double>(value);
|
|
414
|
+
} catch (const rust::Error& e) {
|
|
415
|
+
throw std::runtime_error(e.what());
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
|
|
364
420
|
// --- Onchain Operations ---
|
|
365
421
|
|
|
366
422
|
std::shared_ptr<Promise<OnchainBalanceResult>> onchainBalance() override {
|
|
@@ -493,9 +549,9 @@ public:
|
|
|
493
549
|
|
|
494
550
|
// --- Lightning Operations ---
|
|
495
551
|
|
|
496
|
-
std::shared_ptr<Promise<
|
|
497
|
-
|
|
498
|
-
return Promise<
|
|
552
|
+
std::shared_ptr<Promise<Bolt11PaymentResult>> sendLightningPayment(const std::string& destination,
|
|
553
|
+
std::optional<double> amountSat) override {
|
|
554
|
+
return Promise<Bolt11PaymentResult>::async([destination, amountSat]() {
|
|
499
555
|
try {
|
|
500
556
|
bark_cxx::Bolt11PaymentResult rust_result;
|
|
501
557
|
if (amountSat.has_value()) {
|
|
@@ -505,7 +561,7 @@ public:
|
|
|
505
561
|
rust_result = bark_cxx::send_lightning_payment(destination, nullptr);
|
|
506
562
|
}
|
|
507
563
|
|
|
508
|
-
|
|
564
|
+
Bolt11PaymentResult result;
|
|
509
565
|
result.bolt11_invoice = std::string(rust_result.bolt11_invoice.data(), rust_result.bolt11_invoice.length());
|
|
510
566
|
result.preimage = std::string(rust_result.preimage.data(), rust_result.preimage.length());
|
|
511
567
|
result.payment_type = convertPaymentType(rust_result.payment_type);
|
|
@@ -517,6 +573,30 @@ public:
|
|
|
517
573
|
});
|
|
518
574
|
}
|
|
519
575
|
|
|
576
|
+
std::shared_ptr<Promise<Bolt12PaymentResult>> payOffer(const std::string& bolt12,
|
|
577
|
+
std::optional<double> amountSat) override {
|
|
578
|
+
return Promise<Bolt12PaymentResult>::async([bolt12, amountSat]() {
|
|
579
|
+
try {
|
|
580
|
+
bark_cxx::Bolt12PaymentResult rust_result;
|
|
581
|
+
if (amountSat.has_value()) {
|
|
582
|
+
uint64_t amountSat_val = static_cast<uint64_t>(amountSat.value());
|
|
583
|
+
rust_result = bark_cxx::pay_offer(bolt12, &amountSat_val);
|
|
584
|
+
} else {
|
|
585
|
+
rust_result = bark_cxx::pay_offer(bolt12, nullptr);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
Bolt12PaymentResult result;
|
|
589
|
+
result.bolt12_offer = std::string(rust_result.bolt12_offer.data(), rust_result.bolt12_offer.length());
|
|
590
|
+
result.preimage = std::string(rust_result.preimage.data(), rust_result.preimage.length());
|
|
591
|
+
result.payment_type = convertPaymentType(rust_result.payment_type);
|
|
592
|
+
|
|
593
|
+
return result;
|
|
594
|
+
} catch (const rust::Error& e) {
|
|
595
|
+
throw std::runtime_error(e.what());
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
|
|
520
600
|
std::shared_ptr<Promise<LnurlPaymentResult>> sendLnaddr(const std::string& addr, double amountSat,
|
|
521
601
|
const std::string& comment) override {
|
|
522
602
|
return Promise<LnurlPaymentResult>::async([addr, amountSat, comment]() {
|
|
@@ -559,10 +639,10 @@ public:
|
|
|
559
639
|
}
|
|
560
640
|
|
|
561
641
|
std::shared_ptr<Promise<std::optional<LightningReceive>>>
|
|
562
|
-
lightningReceiveStatus(const std::string&
|
|
563
|
-
return Promise<std::optional<LightningReceive>>::async([
|
|
642
|
+
lightningReceiveStatus(const std::string& paymentHash) override {
|
|
643
|
+
return Promise<std::optional<LightningReceive>>::async([paymentHash]() {
|
|
564
644
|
try {
|
|
565
|
-
const bark_cxx::LightningReceive* status_ptr = bark_cxx::lightning_receive_status(
|
|
645
|
+
const bark_cxx::LightningReceive* status_ptr = bark_cxx::lightning_receive_status(paymentHash);
|
|
566
646
|
|
|
567
647
|
if (status_ptr == nullptr) {
|
|
568
648
|
return std::optional<LightningReceive>();
|
|
@@ -577,6 +657,7 @@ public:
|
|
|
577
657
|
|
|
578
658
|
if (status->preimage_revealed_at != nullptr) {
|
|
579
659
|
result.preimage_revealed_at = static_cast<double>(*status->preimage_revealed_at);
|
|
660
|
+
delete status->preimage_revealed_at; // Free the heap-allocated memory from Rust
|
|
580
661
|
} else {
|
|
581
662
|
result.preimage_revealed_at = std::nullopt;
|
|
582
663
|
}
|
|
@@ -588,6 +669,40 @@ public:
|
|
|
588
669
|
});
|
|
589
670
|
}
|
|
590
671
|
|
|
672
|
+
std::shared_ptr<Promise<std::vector<LightningReceive>>> lightningReceives(double pageSize,
|
|
673
|
+
double pageIndex) override {
|
|
674
|
+
return Promise<std::vector<LightningReceive>>::async([pageSize, pageIndex]() {
|
|
675
|
+
try {
|
|
676
|
+
rust::Vec<bark_cxx::LightningReceive> receives_rs =
|
|
677
|
+
bark_cxx::lightning_receives(static_cast<uint16_t>(pageIndex), static_cast<uint16_t>(pageSize));
|
|
678
|
+
|
|
679
|
+
std::vector<LightningReceive> receives;
|
|
680
|
+
receives.reserve(receives_rs.size());
|
|
681
|
+
|
|
682
|
+
for (const auto& receive_rs : receives_rs) {
|
|
683
|
+
LightningReceive receive;
|
|
684
|
+
receive.payment_hash = std::string(receive_rs.payment_hash.data(), receive_rs.payment_hash.length());
|
|
685
|
+
receive.payment_preimage =
|
|
686
|
+
std::string(receive_rs.payment_preimage.data(), receive_rs.payment_preimage.length());
|
|
687
|
+
receive.invoice = std::string(receive_rs.invoice.data(), receive_rs.invoice.length());
|
|
688
|
+
|
|
689
|
+
if (receive_rs.preimage_revealed_at != nullptr) {
|
|
690
|
+
receive.preimage_revealed_at = static_cast<double>(*receive_rs.preimage_revealed_at);
|
|
691
|
+
delete receive_rs.preimage_revealed_at;
|
|
692
|
+
} else {
|
|
693
|
+
receive.preimage_revealed_at = std::nullopt;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
receives.push_back(std::move(receive));
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
return receives;
|
|
700
|
+
} catch (const rust::Error& e) {
|
|
701
|
+
throw std::runtime_error(e.what());
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
|
|
591
706
|
// --- Ark Operations ---
|
|
592
707
|
|
|
593
708
|
std::shared_ptr<Promise<std::string>> boardAmount(double amountSat) override {
|
|
@@ -644,6 +759,7 @@ public:
|
|
|
644
759
|
vtxo.exit_delta = static_cast<double>(rust_vtxo.exit_delta);
|
|
645
760
|
vtxo.anchor_point = std::string(rust_vtxo.anchor_point.data(), rust_vtxo.anchor_point.length());
|
|
646
761
|
vtxo.point = std::string(rust_vtxo.point.data(), rust_vtxo.point.length());
|
|
762
|
+
vtxo.state = std::string(rust_vtxo.state.data(), rust_vtxo.state.length());
|
|
647
763
|
vtxos.push_back(vtxo);
|
|
648
764
|
}
|
|
649
765
|
result.vtxos = vtxos;
|
package/cpp/generated/ark_cxx.h
CHANGED
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
#include <ranges>
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
|
+
#ifdef __clang__
|
|
22
|
+
#pragma clang diagnostic push
|
|
23
|
+
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
|
24
|
+
#endif // __clang__
|
|
25
|
+
|
|
21
26
|
namespace rust {
|
|
22
27
|
inline namespace cxxbridge1 {
|
|
23
28
|
// #include "rust/cxx.h"
|
|
@@ -801,6 +806,7 @@ namespace bark_cxx {
|
|
|
801
806
|
enum class PaymentTypes : ::std::uint8_t;
|
|
802
807
|
struct NewAddressResult;
|
|
803
808
|
struct Bolt11PaymentResult;
|
|
809
|
+
struct Bolt12PaymentResult;
|
|
804
810
|
struct LnurlPaymentResult;
|
|
805
811
|
struct ArkoorPaymentResult;
|
|
806
812
|
struct OnchainPaymentResult;
|
|
@@ -825,6 +831,7 @@ struct BarkVtxo final {
|
|
|
825
831
|
::std::uint16_t exit_delta CXX_DEFAULT_VALUE(0);
|
|
826
832
|
::rust::String anchor_point;
|
|
827
833
|
::rust::String point;
|
|
834
|
+
::rust::String state;
|
|
828
835
|
|
|
829
836
|
using IsRelocatable = ::std::true_type;
|
|
830
837
|
};
|
|
@@ -834,9 +841,10 @@ struct BarkVtxo final {
|
|
|
834
841
|
#define CXXBRIDGE1_ENUM_bark_cxx$PaymentTypes
|
|
835
842
|
enum class PaymentTypes : ::std::uint8_t {
|
|
836
843
|
Bolt11 = 0,
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
844
|
+
Bolt12 = 1,
|
|
845
|
+
Lnurl = 2,
|
|
846
|
+
Arkoor = 3,
|
|
847
|
+
Onchain = 4,
|
|
840
848
|
};
|
|
841
849
|
#endif // CXXBRIDGE1_ENUM_bark_cxx$PaymentTypes
|
|
842
850
|
|
|
@@ -862,6 +870,17 @@ struct Bolt11PaymentResult final {
|
|
|
862
870
|
};
|
|
863
871
|
#endif // CXXBRIDGE1_STRUCT_bark_cxx$Bolt11PaymentResult
|
|
864
872
|
|
|
873
|
+
#ifndef CXXBRIDGE1_STRUCT_bark_cxx$Bolt12PaymentResult
|
|
874
|
+
#define CXXBRIDGE1_STRUCT_bark_cxx$Bolt12PaymentResult
|
|
875
|
+
struct Bolt12PaymentResult final {
|
|
876
|
+
::rust::String bolt12_offer;
|
|
877
|
+
::rust::String preimage;
|
|
878
|
+
::bark_cxx::PaymentTypes payment_type;
|
|
879
|
+
|
|
880
|
+
using IsRelocatable = ::std::true_type;
|
|
881
|
+
};
|
|
882
|
+
#endif // CXXBRIDGE1_STRUCT_bark_cxx$Bolt12PaymentResult
|
|
883
|
+
|
|
865
884
|
#ifndef CXXBRIDGE1_STRUCT_bark_cxx$LnurlPaymentResult
|
|
866
885
|
#define CXXBRIDGE1_STRUCT_bark_cxx$LnurlPaymentResult
|
|
867
886
|
struct LnurlPaymentResult final {
|
|
@@ -1049,12 +1068,22 @@ bool verify_message(::rust::Str message, ::rust::Str signature, ::rust::Str publ
|
|
|
1049
1068
|
|
|
1050
1069
|
::rust::Vec<::bark_cxx::BarkVtxo> get_expiring_vtxos(::std::uint32_t threshold);
|
|
1051
1070
|
|
|
1071
|
+
::std::uint32_t const *get_first_expiring_vtxo_blockheight();
|
|
1072
|
+
|
|
1073
|
+
::std::uint32_t const *get_next_required_refresh_blockheight();
|
|
1074
|
+
|
|
1052
1075
|
::rust::String bolt11_invoice(::std::uint64_t amount_msat);
|
|
1053
1076
|
|
|
1054
|
-
::bark_cxx::LightningReceive const *lightning_receive_status(::rust::String
|
|
1077
|
+
::bark_cxx::LightningReceive const *lightning_receive_status(::rust::String payment_hash);
|
|
1078
|
+
|
|
1079
|
+
::rust::Vec<::bark_cxx::LightningReceive> lightning_receives(::std::uint16_t page_index, ::std::uint16_t page_size);
|
|
1080
|
+
|
|
1081
|
+
void register_all_confirmed_boards();
|
|
1055
1082
|
|
|
1056
1083
|
void maintenance();
|
|
1057
1084
|
|
|
1085
|
+
void maintenance_with_onchain();
|
|
1086
|
+
|
|
1058
1087
|
void maintenance_refresh();
|
|
1059
1088
|
|
|
1060
1089
|
void sync();
|
|
@@ -1075,6 +1104,8 @@ void validate_arkoor_address(::rust::Str address);
|
|
|
1075
1104
|
|
|
1076
1105
|
::bark_cxx::Bolt11PaymentResult send_lightning_payment(::rust::Str destination, ::std::uint64_t const *amount_sat);
|
|
1077
1106
|
|
|
1107
|
+
::bark_cxx::Bolt12PaymentResult pay_offer(::rust::Str offer, ::std::uint64_t const *amount_sat);
|
|
1108
|
+
|
|
1078
1109
|
::bark_cxx::LnurlPaymentResult send_lnaddr(::rust::Str addr, ::std::uint64_t amount_sat, ::rust::Str comment);
|
|
1079
1110
|
|
|
1080
1111
|
::rust::String send_round_onchain_payment(::rust::Str destination, ::std::uint64_t amount_sat);
|
|
@@ -1103,3 +1134,7 @@ void onchain_sync();
|
|
|
1103
1134
|
|
|
1104
1135
|
::rust::String onchain_send_many(::rust::Vec<::bark_cxx::SendManyOutput> outputs, ::std::uint64_t const *fee_rate);
|
|
1105
1136
|
} // namespace bark_cxx
|
|
1137
|
+
|
|
1138
|
+
#ifdef __clang__
|
|
1139
|
+
#pragma clang diagnostic pop
|
|
1140
|
+
#endif // __clang__
|
package/lib/module/index.js
CHANGED
|
@@ -51,6 +51,14 @@ export function isWalletLoaded() {
|
|
|
51
51
|
return NitroArkHybridObject.isWalletLoaded();
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Registers all confirmed boards.
|
|
56
|
+
* @returns A promise that resolves on success.
|
|
57
|
+
*/
|
|
58
|
+
export function registerAllConfirmedBoards() {
|
|
59
|
+
return NitroArkHybridObject.registerAllConfirmedBoards();
|
|
60
|
+
}
|
|
61
|
+
|
|
54
62
|
/**
|
|
55
63
|
* Runs wallet maintenance tasks.
|
|
56
64
|
* @returns A promise that resolves on success.
|
|
@@ -59,6 +67,14 @@ export function maintenance() {
|
|
|
59
67
|
return NitroArkHybridObject.maintenance();
|
|
60
68
|
}
|
|
61
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Runs wallet maintenance tasks with onchain data.
|
|
72
|
+
* @returns A promise that resolves on success.
|
|
73
|
+
*/
|
|
74
|
+
export function maintenanceWithOnchain() {
|
|
75
|
+
return NitroArkHybridObject.maintenanceWithOnchain();
|
|
76
|
+
}
|
|
77
|
+
|
|
62
78
|
/**
|
|
63
79
|
* Refreshes vtxos that need to be refreshed.
|
|
64
80
|
* @returns A promise that resolves on success.
|
|
@@ -188,6 +204,22 @@ export function getVtxos() {
|
|
|
188
204
|
return NitroArkHybridObject.getVtxos();
|
|
189
205
|
}
|
|
190
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Gets the first expiring VTXO blockheight for the loaded wallet.
|
|
209
|
+
* @returns A promise resolving to the first expiring VTXO blockheight.
|
|
210
|
+
*/
|
|
211
|
+
export function getFirstExpiringVtxoBlockheight() {
|
|
212
|
+
return NitroArkHybridObject.getFirstExpiringVtxoBlockheight();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Gets the next required refresh blockheight for the loaded wallet for the first expiring VTXO.
|
|
217
|
+
* @returns A promise resolving to the next required refresh blockheight.
|
|
218
|
+
*/
|
|
219
|
+
export function getNextRequiredRefreshBlockheight() {
|
|
220
|
+
return NitroArkHybridObject.getNextRequiredRefreshBlockheight();
|
|
221
|
+
}
|
|
222
|
+
|
|
191
223
|
/**
|
|
192
224
|
* Gets the list of expiring VTXOs as a JSON Object of type BarkVtxo.
|
|
193
225
|
* @param threshold The block height threshold to check for expiring VTXOs.
|
|
@@ -281,12 +313,21 @@ export function bolt11Invoice(amountMsat) {
|
|
|
281
313
|
|
|
282
314
|
/**
|
|
283
315
|
* Gets the status of a Lightning receive.
|
|
284
|
-
* @param
|
|
316
|
+
* @param paymentHash The payment hash of the Lightning receive.
|
|
285
317
|
* @returns A promise resolving to the Lightning receive status.
|
|
286
318
|
*/
|
|
319
|
+
export function lightningReceiveStatus(paymentHash) {
|
|
320
|
+
return NitroArkHybridObject.lightningReceiveStatus(paymentHash);
|
|
321
|
+
}
|
|
287
322
|
|
|
288
|
-
|
|
289
|
-
|
|
323
|
+
/**
|
|
324
|
+
* Gets a page of Lightning receives.
|
|
325
|
+
* @param pageSize The number of items to retrieve.
|
|
326
|
+
* @param pageIndex The index of the page to retrieve.
|
|
327
|
+
* @returns A promise resolving to an array of Lightning receives.
|
|
328
|
+
*/
|
|
329
|
+
export function lightningReceives(pageSize, pageIndex) {
|
|
330
|
+
return NitroArkHybridObject.lightningReceives(pageSize, pageIndex);
|
|
290
331
|
}
|
|
291
332
|
|
|
292
333
|
/**
|
|
@@ -302,12 +343,22 @@ export function finishLightningReceive(bolt11) {
|
|
|
302
343
|
* Sends a Lightning payment.
|
|
303
344
|
* @param destination The Lightning invoice.
|
|
304
345
|
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
305
|
-
* @returns A promise resolving to a
|
|
346
|
+
* @returns A promise resolving to a Bolt11PaymentResult object
|
|
306
347
|
*/
|
|
307
348
|
export function sendLightningPayment(destination, amountSat) {
|
|
308
349
|
return NitroArkHybridObject.sendLightningPayment(destination, amountSat);
|
|
309
350
|
}
|
|
310
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Sends a payment to a Bolt12 offer.
|
|
354
|
+
* @param offer The Bolt12 offer.
|
|
355
|
+
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
356
|
+
* @returns A promise resolving to a Bolt12PaymentResult object
|
|
357
|
+
*/
|
|
358
|
+
export function payOffer(offer, amountSat) {
|
|
359
|
+
return NitroArkHybridObject.payOffer(offer, amountSat);
|
|
360
|
+
}
|
|
361
|
+
|
|
311
362
|
/**
|
|
312
363
|
* Sends a payment to a Lightning Address.
|
|
313
364
|
* @param addr The Lightning Address.
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NitroModules","NitroArkHybridObject","createHybridObject","createMnemonic","createWallet","datadir","opts","loadWallet","config","closeWallet","isWalletLoaded","maintenance","maintenanceRefresh","sync","syncExits","syncPastRounds","getArkInfo","offchainBalance","deriveStoreNextKeypair","peakKeyPair","index","newAddress","signMessage","message","signMesssageWithMnemonic","mnemonic","network","deriveKeypairFromMnemonic","verifyMessage","signature","publicKey","getVtxos","getExpiringVtxos","threshold","onchainBalance","onchainSync","onchainListUnspent","onchainUtxos","onchainAddress","onchainSend","destination","amountSat","onchainDrain","onchainSendMany","outputs","bolt11Invoice","amountMsat","lightningReceiveStatus","
|
|
1
|
+
{"version":3,"names":["NitroModules","NitroArkHybridObject","createHybridObject","createMnemonic","createWallet","datadir","opts","loadWallet","config","closeWallet","isWalletLoaded","registerAllConfirmedBoards","maintenance","maintenanceWithOnchain","maintenanceRefresh","sync","syncExits","syncPastRounds","getArkInfo","offchainBalance","deriveStoreNextKeypair","peakKeyPair","index","newAddress","signMessage","message","signMesssageWithMnemonic","mnemonic","network","deriveKeypairFromMnemonic","verifyMessage","signature","publicKey","getVtxos","getFirstExpiringVtxoBlockheight","getNextRequiredRefreshBlockheight","getExpiringVtxos","threshold","onchainBalance","onchainSync","onchainListUnspent","onchainUtxos","onchainAddress","onchainSend","destination","amountSat","onchainDrain","onchainSendMany","outputs","bolt11Invoice","amountMsat","lightningReceiveStatus","paymentHash","lightningReceives","pageSize","pageIndex","finishLightningReceive","bolt11","sendLightningPayment","payOffer","offer","sendLnaddr","addr","comment","boardAmount","boardAll","validateArkoorAddress","address","sendArkoorPayment","sendRoundOnchainPayment","offboardSpecific","vtxoIds","destinationAddress","offboardAll"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAkCzD;AACA,OAAO,MAAMC,oBAAoB,GAC/BD,YAAY,CAACE,kBAAkB,CAAW,UAAU,CAAC;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAoB;EAChD,OAAOF,oBAAoB,CAACE,cAAc,CAAC,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAC1BC,OAAe,EACfC,IAAoB,EACL;EACf,OAAOL,oBAAoB,CAACG,YAAY,CAACC,OAAO,EAAEC,IAAI,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CACxBF,OAAe,EACfG,MAAsB,EACP;EACf,OAAOP,oBAAoB,CAACM,UAAU,CAACF,OAAO,EAAEG,MAAM,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAA,EAAkB;EAC3C,OAAOR,oBAAoB,CAACQ,WAAW,CAAC,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAqB;EACjD,OAAOT,oBAAoB,CAACS,cAAc,CAAC,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAAA,EAAkB;EAC1D,OAAOV,oBAAoB,CAACU,0BAA0B,CAAC,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAA,EAAkB;EAC3C,OAAOX,oBAAoB,CAACW,WAAW,CAAC,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAA,EAAkB;EACtD,OAAOZ,oBAAoB,CAACY,sBAAsB,CAAC,CAAC;AACtD;;AAEA;AACA;AACA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ACa;EAC9B,OAAO5C,oBAAoB,CAACmE,iBAAiB,CAACxB,WAAW,EAAEC,SAAS,CAAC;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASwB,uBAAuBA,CACrCzB,WAAmB,EACnBC,SAAiB,EACA;EACjB,OAAO5C,oBAAoB,CAACoE,uBAAuB,CAACzB,WAAW,EAAEC,SAAS,CAAC;AAC7E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASyB,gBAAgBA,CAC9BC,OAAiB,EACjBC,kBAA0B,EACT;EACjB,OAAOvE,oBAAoB,CAACqE,gBAAgB,CAACC,OAAO,EAAEC,kBAAkB,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACD,kBAA0B,EAAmB;EACvE,OAAOvE,oBAAoB,CAACwE,WAAW,CAACD,kBAAkB,CAAC;AAC7D;;AAEA","ignoreList":[]}
|
|
@@ -30,26 +30,32 @@ export interface BarkSendManyOutput {
|
|
|
30
30
|
destination: string;
|
|
31
31
|
amountSat: number;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
interface BarkVtxo {
|
|
34
34
|
amount: number;
|
|
35
35
|
expiry_height: number;
|
|
36
36
|
server_pubkey: string;
|
|
37
37
|
exit_delta: number;
|
|
38
38
|
anchor_point: string;
|
|
39
39
|
point: string;
|
|
40
|
+
state: string;
|
|
40
41
|
}
|
|
41
|
-
export type PaymentTypes = 'Bolt11' | 'Lnurl' | 'Arkoor' | 'Onchain';
|
|
42
|
+
export type PaymentTypes = 'Bolt11' | 'Bolt12' | 'Lnurl' | 'Arkoor' | 'Onchain';
|
|
42
43
|
export interface ArkoorPaymentResult {
|
|
43
44
|
amount_sat: number;
|
|
44
45
|
destination_pubkey: string;
|
|
45
46
|
vtxos: BarkVtxo[];
|
|
46
47
|
payment_type: PaymentTypes;
|
|
47
48
|
}
|
|
48
|
-
export interface
|
|
49
|
+
export interface Bolt11PaymentResult {
|
|
49
50
|
bolt11_invoice: string;
|
|
50
51
|
preimage: string;
|
|
51
52
|
payment_type: PaymentTypes;
|
|
52
53
|
}
|
|
54
|
+
export interface Bolt12PaymentResult {
|
|
55
|
+
bolt12_offer: string;
|
|
56
|
+
preimage: string;
|
|
57
|
+
payment_type: PaymentTypes;
|
|
58
|
+
}
|
|
53
59
|
export interface LnurlPaymentResult {
|
|
54
60
|
lnurl: string;
|
|
55
61
|
bolt11_invoice: string;
|
|
@@ -98,7 +104,9 @@ export interface NitroArk extends HybridObject<{
|
|
|
98
104
|
loadWallet(datadir: string, config: BarkCreateOpts): Promise<void>;
|
|
99
105
|
isWalletLoaded(): Promise<boolean>;
|
|
100
106
|
closeWallet(): Promise<void>;
|
|
107
|
+
registerAllConfirmedBoards(): Promise<void>;
|
|
101
108
|
maintenance(): Promise<void>;
|
|
109
|
+
maintenanceWithOnchain(): Promise<void>;
|
|
102
110
|
maintenanceRefresh(): Promise<void>;
|
|
103
111
|
sync(): Promise<void>;
|
|
104
112
|
syncExits(): Promise<void>;
|
|
@@ -113,6 +121,8 @@ export interface NitroArk extends HybridObject<{
|
|
|
113
121
|
deriveKeypairFromMnemonic(mnemonic: string, network: string, index: number): Promise<KeyPairResult>;
|
|
114
122
|
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
115
123
|
getVtxos(): Promise<BarkVtxo[]>;
|
|
124
|
+
getFirstExpiringVtxoBlockheight(): Promise<number | undefined>;
|
|
125
|
+
getNextRequiredRefreshBlockheight(): Promise<number | undefined>;
|
|
116
126
|
getExpiringVtxos(threshold: number): Promise<BarkVtxo[]>;
|
|
117
127
|
onchainBalance(): Promise<OnchainBalanceResult>;
|
|
118
128
|
onchainSync(): Promise<void>;
|
|
@@ -126,13 +136,16 @@ export interface NitroArk extends HybridObject<{
|
|
|
126
136
|
boardAll(): Promise<string>;
|
|
127
137
|
validateArkoorAddress(address: string): Promise<void>;
|
|
128
138
|
sendArkoorPayment(destination: string, amountSat: number): Promise<ArkoorPaymentResult>;
|
|
129
|
-
sendLightningPayment(destination: string, amountSat?: number): Promise<
|
|
139
|
+
sendLightningPayment(destination: string, amountSat?: number): Promise<Bolt11PaymentResult>;
|
|
140
|
+
payOffer(offer: string, amountSat?: number): Promise<Bolt12PaymentResult>;
|
|
130
141
|
sendLnaddr(addr: string, amountSat: number, comment: string): Promise<LnurlPaymentResult>;
|
|
131
142
|
sendRoundOnchainPayment(destination: string, amountSat: number): Promise<string>;
|
|
132
143
|
bolt11Invoice(amountMsat: number): Promise<string>;
|
|
133
|
-
lightningReceiveStatus(
|
|
144
|
+
lightningReceiveStatus(paymentHash: string): Promise<LightningReceive | undefined>;
|
|
145
|
+
lightningReceives(pageSize: number, pageIndex: number): Promise<LightningReceive[]>;
|
|
134
146
|
finishLightningReceive(bolt11: string): Promise<void>;
|
|
135
147
|
offboardSpecific(vtxoIds: string[], destinationAddress: string): Promise<string>;
|
|
136
148
|
offboardAll(destinationAddress: string): Promise<string>;
|
|
137
149
|
}
|
|
150
|
+
export {};
|
|
138
151
|
//# sourceMappingURL=NitroArk.nitro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NitroArk.nitro.d.ts","sourceRoot":"","sources":["../../../src/NitroArk.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM/D,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,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BAAmB,CAAC,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1E,UAAU,CACR,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC/B,uBAAuB,CACrB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAAC;IAGnB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,sBAAsB,CACpB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IACzC,iBAAiB,CACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/B,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAGtD,gBAAgB,CACd,OAAO,EAAE,MAAM,EAAE,EACjB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,WAAW,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1D"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import type { NitroArk, BarkCreateOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult,
|
|
1
|
+
import type { NitroArk, BarkCreateOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, Bolt11PaymentResult, Bolt12PaymentResult, LnurlPaymentResult, OnchainPaymentResult, OffchainBalanceResult, OnchainBalanceResult, NewAddressResult, KeyPairResult, LightningReceive } from './NitroArk.nitro';
|
|
2
|
+
export type BarkVtxo = {
|
|
3
|
+
amount: number;
|
|
4
|
+
expiry_height: number;
|
|
5
|
+
server_pubkey: string;
|
|
6
|
+
exit_delta: number;
|
|
7
|
+
anchor_point: string;
|
|
8
|
+
point: string;
|
|
9
|
+
state: 'Spendable' | 'Spent' | 'UnregisteredBoard' | 'PendingLightningSend' | 'PendingLightningRecv' | 'Unknown';
|
|
10
|
+
};
|
|
2
11
|
export declare const NitroArkHybridObject: NitroArk;
|
|
3
12
|
/**
|
|
4
13
|
* Creates a new BIP39 mnemonic phrase.
|
|
@@ -30,11 +39,21 @@ export declare function closeWallet(): Promise<void>;
|
|
|
30
39
|
* @returns A promise resolving to true if a wallet is loaded, false otherwise.
|
|
31
40
|
*/
|
|
32
41
|
export declare function isWalletLoaded(): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Registers all confirmed boards.
|
|
44
|
+
* @returns A promise that resolves on success.
|
|
45
|
+
*/
|
|
46
|
+
export declare function registerAllConfirmedBoards(): Promise<void>;
|
|
33
47
|
/**
|
|
34
48
|
* Runs wallet maintenance tasks.
|
|
35
49
|
* @returns A promise that resolves on success.
|
|
36
50
|
*/
|
|
37
51
|
export declare function maintenance(): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Runs wallet maintenance tasks with onchain data.
|
|
54
|
+
* @returns A promise that resolves on success.
|
|
55
|
+
*/
|
|
56
|
+
export declare function maintenanceWithOnchain(): Promise<void>;
|
|
38
57
|
/**
|
|
39
58
|
* Refreshes vtxos that need to be refreshed.
|
|
40
59
|
* @returns A promise that resolves on success.
|
|
@@ -119,6 +138,16 @@ export declare function verifyMessage(message: string, signature: string, public
|
|
|
119
138
|
* @returns A promise resolving BarkVtxo[] array.
|
|
120
139
|
*/
|
|
121
140
|
export declare function getVtxos(): Promise<BarkVtxo[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Gets the first expiring VTXO blockheight for the loaded wallet.
|
|
143
|
+
* @returns A promise resolving to the first expiring VTXO blockheight.
|
|
144
|
+
*/
|
|
145
|
+
export declare function getFirstExpiringVtxoBlockheight(): Promise<number | undefined>;
|
|
146
|
+
/**
|
|
147
|
+
* Gets the next required refresh blockheight for the loaded wallet for the first expiring VTXO.
|
|
148
|
+
* @returns A promise resolving to the next required refresh blockheight.
|
|
149
|
+
*/
|
|
150
|
+
export declare function getNextRequiredRefreshBlockheight(): Promise<number | undefined>;
|
|
122
151
|
/**
|
|
123
152
|
* Gets the list of expiring VTXOs as a JSON Object of type BarkVtxo.
|
|
124
153
|
* @param threshold The block height threshold to check for expiring VTXOs.
|
|
@@ -177,10 +206,17 @@ export declare function onchainSendMany(outputs: BarkSendManyOutput[]): Promise<
|
|
|
177
206
|
export declare function bolt11Invoice(amountMsat: number): Promise<string>;
|
|
178
207
|
/**
|
|
179
208
|
* Gets the status of a Lightning receive.
|
|
180
|
-
* @param
|
|
209
|
+
* @param paymentHash The payment hash of the Lightning receive.
|
|
181
210
|
* @returns A promise resolving to the Lightning receive status.
|
|
182
211
|
*/
|
|
183
|
-
export declare function lightningReceiveStatus(
|
|
212
|
+
export declare function lightningReceiveStatus(paymentHash: string): Promise<LightningReceive | undefined>;
|
|
213
|
+
/**
|
|
214
|
+
* Gets a page of Lightning receives.
|
|
215
|
+
* @param pageSize The number of items to retrieve.
|
|
216
|
+
* @param pageIndex The index of the page to retrieve.
|
|
217
|
+
* @returns A promise resolving to an array of Lightning receives.
|
|
218
|
+
*/
|
|
219
|
+
export declare function lightningReceives(pageSize: number, pageIndex: number): Promise<LightningReceive[]>;
|
|
184
220
|
/**
|
|
185
221
|
* Claims a Lightning payment.
|
|
186
222
|
* @param bolt11 The Lightning invoice string to claim.
|
|
@@ -191,9 +227,16 @@ export declare function finishLightningReceive(bolt11: string): Promise<void>;
|
|
|
191
227
|
* Sends a Lightning payment.
|
|
192
228
|
* @param destination The Lightning invoice.
|
|
193
229
|
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
194
|
-
* @returns A promise resolving to a
|
|
230
|
+
* @returns A promise resolving to a Bolt11PaymentResult object
|
|
231
|
+
*/
|
|
232
|
+
export declare function sendLightningPayment(destination: string, amountSat?: number): Promise<Bolt11PaymentResult>;
|
|
233
|
+
/**
|
|
234
|
+
* Sends a payment to a Bolt12 offer.
|
|
235
|
+
* @param offer The Bolt12 offer.
|
|
236
|
+
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
237
|
+
* @returns A promise resolving to a Bolt12PaymentResult object
|
|
195
238
|
*/
|
|
196
|
-
export declare function
|
|
239
|
+
export declare function payOffer(offer: string, amountSat?: number): Promise<Bolt12PaymentResult>;
|
|
197
240
|
/**
|
|
198
241
|
* Sends a payment to a Lightning Address.
|
|
199
242
|
* @param addr The Lightning Address.
|
|
@@ -248,5 +291,5 @@ export declare function offboardSpecific(vtxoIds: string[], destinationAddress:
|
|
|
248
291
|
* @returns A promise resolving to a JSON result string.
|
|
249
292
|
*/
|
|
250
293
|
export declare function offboardAll(destinationAddress: string): Promise<string>;
|
|
251
|
-
export type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult,
|
|
294
|
+
export type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, Bolt11PaymentResult, LnurlPaymentResult, OnchainPaymentResult, PaymentTypes, OffchainBalanceResult, OnchainBalanceResult, NewAddressResult, KeyPairResult, LightningReceive, } from './NitroArk.nitro';
|
|
252
295
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,WAAW,EACX,kBAAkB,EACl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AC,MAAM,CAAC,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEvE;AAGD,YAAY,EACV,QAAQ,EACR,cAAc,EACd,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,kBAAkB,CAAC"}
|
|
@@ -35,10 +35,11 @@ namespace margelo::nitro::nitroark {
|
|
|
35
35
|
double exit_delta SWIFT_PRIVATE;
|
|
36
36
|
std::string anchor_point SWIFT_PRIVATE;
|
|
37
37
|
std::string point SWIFT_PRIVATE;
|
|
38
|
+
std::string state SWIFT_PRIVATE;
|
|
38
39
|
|
|
39
40
|
public:
|
|
40
41
|
BarkVtxo() = default;
|
|
41
|
-
explicit BarkVtxo(double amount, double expiry_height, std::string server_pubkey, double exit_delta, std::string anchor_point, std::string point): amount(amount), expiry_height(expiry_height), server_pubkey(server_pubkey), exit_delta(exit_delta), anchor_point(anchor_point), point(point) {}
|
|
42
|
+
explicit BarkVtxo(double amount, double expiry_height, std::string server_pubkey, double exit_delta, std::string anchor_point, std::string point, std::string state): amount(amount), expiry_height(expiry_height), server_pubkey(server_pubkey), exit_delta(exit_delta), anchor_point(anchor_point), point(point), state(state) {}
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
} // namespace margelo::nitro::nitroark
|
|
@@ -56,7 +57,8 @@ namespace margelo::nitro {
|
|
|
56
57
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "server_pubkey")),
|
|
57
58
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "exit_delta")),
|
|
58
59
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "anchor_point")),
|
|
59
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "point"))
|
|
60
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "point")),
|
|
61
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "state"))
|
|
60
62
|
);
|
|
61
63
|
}
|
|
62
64
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::BarkVtxo& arg) {
|
|
@@ -67,6 +69,7 @@ namespace margelo::nitro {
|
|
|
67
69
|
obj.setProperty(runtime, "exit_delta", JSIConverter<double>::toJSI(runtime, arg.exit_delta));
|
|
68
70
|
obj.setProperty(runtime, "anchor_point", JSIConverter<std::string>::toJSI(runtime, arg.anchor_point));
|
|
69
71
|
obj.setProperty(runtime, "point", JSIConverter<std::string>::toJSI(runtime, arg.point));
|
|
72
|
+
obj.setProperty(runtime, "state", JSIConverter<std::string>::toJSI(runtime, arg.state));
|
|
70
73
|
return obj;
|
|
71
74
|
}
|
|
72
75
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -80,6 +83,7 @@ namespace margelo::nitro {
|
|
|
80
83
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "exit_delta"))) return false;
|
|
81
84
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "anchor_point"))) return false;
|
|
82
85
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "point"))) return false;
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "state"))) return false;
|
|
83
87
|
return true;
|
|
84
88
|
}
|
|
85
89
|
};
|
package/nitrogen/generated/shared/c++/{LightningPaymentResult.hpp → Bolt11PaymentResult.hpp}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Bolt11PaymentResult.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
@@ -27,35 +27,35 @@ namespace margelo::nitro::nitroark { enum class PaymentTypes; }
|
|
|
27
27
|
namespace margelo::nitro::nitroark {
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* A struct which can be represented as a JavaScript object (
|
|
30
|
+
* A struct which can be represented as a JavaScript object (Bolt11PaymentResult).
|
|
31
31
|
*/
|
|
32
|
-
struct
|
|
32
|
+
struct Bolt11PaymentResult {
|
|
33
33
|
public:
|
|
34
34
|
std::string bolt11_invoice SWIFT_PRIVATE;
|
|
35
35
|
std::string preimage SWIFT_PRIVATE;
|
|
36
36
|
PaymentTypes payment_type SWIFT_PRIVATE;
|
|
37
37
|
|
|
38
38
|
public:
|
|
39
|
-
|
|
40
|
-
explicit
|
|
39
|
+
Bolt11PaymentResult() = default;
|
|
40
|
+
explicit Bolt11PaymentResult(std::string bolt11_invoice, std::string preimage, PaymentTypes payment_type): bolt11_invoice(bolt11_invoice), preimage(preimage), payment_type(payment_type) {}
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
} // namespace margelo::nitro::nitroark
|
|
44
44
|
|
|
45
45
|
namespace margelo::nitro {
|
|
46
46
|
|
|
47
|
-
// C++
|
|
47
|
+
// C++ Bolt11PaymentResult <> JS Bolt11PaymentResult (object)
|
|
48
48
|
template <>
|
|
49
|
-
struct JSIConverter<margelo::nitro::nitroark::
|
|
50
|
-
static inline margelo::nitro::nitroark::
|
|
49
|
+
struct JSIConverter<margelo::nitro::nitroark::Bolt11PaymentResult> final {
|
|
50
|
+
static inline margelo::nitro::nitroark::Bolt11PaymentResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
51
|
jsi::Object obj = arg.asObject(runtime);
|
|
52
|
-
return margelo::nitro::nitroark::
|
|
52
|
+
return margelo::nitro::nitroark::Bolt11PaymentResult(
|
|
53
53
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bolt11_invoice")),
|
|
54
54
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "preimage")),
|
|
55
55
|
JSIConverter<margelo::nitro::nitroark::PaymentTypes>::fromJSI(runtime, obj.getProperty(runtime, "payment_type"))
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::Bolt11PaymentResult& arg) {
|
|
59
59
|
jsi::Object obj(runtime);
|
|
60
60
|
obj.setProperty(runtime, "bolt11_invoice", JSIConverter<std::string>::toJSI(runtime, arg.bolt11_invoice));
|
|
61
61
|
obj.setProperty(runtime, "preimage", JSIConverter<std::string>::toJSI(runtime, arg.preimage));
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Bolt12PaymentResult.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
// Forward declaration of `PaymentTypes` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::nitroark { enum class PaymentTypes; }
|
|
23
|
+
|
|
24
|
+
#include <string>
|
|
25
|
+
#include "PaymentTypes.hpp"
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::nitroark {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (Bolt12PaymentResult).
|
|
31
|
+
*/
|
|
32
|
+
struct Bolt12PaymentResult {
|
|
33
|
+
public:
|
|
34
|
+
std::string bolt12_offer SWIFT_PRIVATE;
|
|
35
|
+
std::string preimage SWIFT_PRIVATE;
|
|
36
|
+
PaymentTypes payment_type SWIFT_PRIVATE;
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
Bolt12PaymentResult() = default;
|
|
40
|
+
explicit Bolt12PaymentResult(std::string bolt12_offer, std::string preimage, PaymentTypes payment_type): bolt12_offer(bolt12_offer), preimage(preimage), payment_type(payment_type) {}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
} // namespace margelo::nitro::nitroark
|
|
44
|
+
|
|
45
|
+
namespace margelo::nitro {
|
|
46
|
+
|
|
47
|
+
// C++ Bolt12PaymentResult <> JS Bolt12PaymentResult (object)
|
|
48
|
+
template <>
|
|
49
|
+
struct JSIConverter<margelo::nitro::nitroark::Bolt12PaymentResult> final {
|
|
50
|
+
static inline margelo::nitro::nitroark::Bolt12PaymentResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
52
|
+
return margelo::nitro::nitroark::Bolt12PaymentResult(
|
|
53
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bolt12_offer")),
|
|
54
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "preimage")),
|
|
55
|
+
JSIConverter<margelo::nitro::nitroark::PaymentTypes>::fromJSI(runtime, obj.getProperty(runtime, "payment_type"))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::Bolt12PaymentResult& arg) {
|
|
59
|
+
jsi::Object obj(runtime);
|
|
60
|
+
obj.setProperty(runtime, "bolt12_offer", JSIConverter<std::string>::toJSI(runtime, arg.bolt12_offer));
|
|
61
|
+
obj.setProperty(runtime, "preimage", JSIConverter<std::string>::toJSI(runtime, arg.preimage));
|
|
62
|
+
obj.setProperty(runtime, "payment_type", JSIConverter<margelo::nitro::nitroark::PaymentTypes>::toJSI(runtime, arg.payment_type));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bolt12_offer"))) return false;
|
|
71
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "preimage"))) return false;
|
|
72
|
+
if (!JSIConverter<margelo::nitro::nitroark::PaymentTypes>::canConvert(runtime, obj.getProperty(runtime, "payment_type"))) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro
|
|
@@ -19,7 +19,9 @@ namespace margelo::nitro::nitroark {
|
|
|
19
19
|
prototype.registerHybridMethod("loadWallet", &HybridNitroArkSpec::loadWallet);
|
|
20
20
|
prototype.registerHybridMethod("isWalletLoaded", &HybridNitroArkSpec::isWalletLoaded);
|
|
21
21
|
prototype.registerHybridMethod("closeWallet", &HybridNitroArkSpec::closeWallet);
|
|
22
|
+
prototype.registerHybridMethod("registerAllConfirmedBoards", &HybridNitroArkSpec::registerAllConfirmedBoards);
|
|
22
23
|
prototype.registerHybridMethod("maintenance", &HybridNitroArkSpec::maintenance);
|
|
24
|
+
prototype.registerHybridMethod("maintenanceWithOnchain", &HybridNitroArkSpec::maintenanceWithOnchain);
|
|
23
25
|
prototype.registerHybridMethod("maintenanceRefresh", &HybridNitroArkSpec::maintenanceRefresh);
|
|
24
26
|
prototype.registerHybridMethod("sync", &HybridNitroArkSpec::sync);
|
|
25
27
|
prototype.registerHybridMethod("syncExits", &HybridNitroArkSpec::syncExits);
|
|
@@ -34,6 +36,8 @@ namespace margelo::nitro::nitroark {
|
|
|
34
36
|
prototype.registerHybridMethod("deriveKeypairFromMnemonic", &HybridNitroArkSpec::deriveKeypairFromMnemonic);
|
|
35
37
|
prototype.registerHybridMethod("verifyMessage", &HybridNitroArkSpec::verifyMessage);
|
|
36
38
|
prototype.registerHybridMethod("getVtxos", &HybridNitroArkSpec::getVtxos);
|
|
39
|
+
prototype.registerHybridMethod("getFirstExpiringVtxoBlockheight", &HybridNitroArkSpec::getFirstExpiringVtxoBlockheight);
|
|
40
|
+
prototype.registerHybridMethod("getNextRequiredRefreshBlockheight", &HybridNitroArkSpec::getNextRequiredRefreshBlockheight);
|
|
37
41
|
prototype.registerHybridMethod("getExpiringVtxos", &HybridNitroArkSpec::getExpiringVtxos);
|
|
38
42
|
prototype.registerHybridMethod("onchainBalance", &HybridNitroArkSpec::onchainBalance);
|
|
39
43
|
prototype.registerHybridMethod("onchainSync", &HybridNitroArkSpec::onchainSync);
|
|
@@ -48,10 +52,12 @@ namespace margelo::nitro::nitroark {
|
|
|
48
52
|
prototype.registerHybridMethod("validateArkoorAddress", &HybridNitroArkSpec::validateArkoorAddress);
|
|
49
53
|
prototype.registerHybridMethod("sendArkoorPayment", &HybridNitroArkSpec::sendArkoorPayment);
|
|
50
54
|
prototype.registerHybridMethod("sendLightningPayment", &HybridNitroArkSpec::sendLightningPayment);
|
|
55
|
+
prototype.registerHybridMethod("payOffer", &HybridNitroArkSpec::payOffer);
|
|
51
56
|
prototype.registerHybridMethod("sendLnaddr", &HybridNitroArkSpec::sendLnaddr);
|
|
52
57
|
prototype.registerHybridMethod("sendRoundOnchainPayment", &HybridNitroArkSpec::sendRoundOnchainPayment);
|
|
53
58
|
prototype.registerHybridMethod("bolt11Invoice", &HybridNitroArkSpec::bolt11Invoice);
|
|
54
59
|
prototype.registerHybridMethod("lightningReceiveStatus", &HybridNitroArkSpec::lightningReceiveStatus);
|
|
60
|
+
prototype.registerHybridMethod("lightningReceives", &HybridNitroArkSpec::lightningReceives);
|
|
55
61
|
prototype.registerHybridMethod("finishLightningReceive", &HybridNitroArkSpec::finishLightningReceive);
|
|
56
62
|
prototype.registerHybridMethod("offboardSpecific", &HybridNitroArkSpec::offboardSpecific);
|
|
57
63
|
prototype.registerHybridMethod("offboardAll", &HybridNitroArkSpec::offboardAll);
|
|
@@ -33,8 +33,10 @@ namespace margelo::nitro::nitroark { struct OnchainPaymentResult; }
|
|
|
33
33
|
namespace margelo::nitro::nitroark { struct BarkSendManyOutput; }
|
|
34
34
|
// Forward declaration of `ArkoorPaymentResult` to properly resolve imports.
|
|
35
35
|
namespace margelo::nitro::nitroark { struct ArkoorPaymentResult; }
|
|
36
|
-
// Forward declaration of `
|
|
37
|
-
namespace margelo::nitro::nitroark { struct
|
|
36
|
+
// Forward declaration of `Bolt11PaymentResult` to properly resolve imports.
|
|
37
|
+
namespace margelo::nitro::nitroark { struct Bolt11PaymentResult; }
|
|
38
|
+
// Forward declaration of `Bolt12PaymentResult` to properly resolve imports.
|
|
39
|
+
namespace margelo::nitro::nitroark { struct Bolt12PaymentResult; }
|
|
38
40
|
// Forward declaration of `LnurlPaymentResult` to properly resolve imports.
|
|
39
41
|
namespace margelo::nitro::nitroark { struct LnurlPaymentResult; }
|
|
40
42
|
// Forward declaration of `LightningReceive` to properly resolve imports.
|
|
@@ -49,12 +51,13 @@ namespace margelo::nitro::nitroark { struct LightningReceive; }
|
|
|
49
51
|
#include "NewAddressResult.hpp"
|
|
50
52
|
#include "BarkVtxo.hpp"
|
|
51
53
|
#include <vector>
|
|
54
|
+
#include <optional>
|
|
52
55
|
#include "OnchainBalanceResult.hpp"
|
|
53
56
|
#include "OnchainPaymentResult.hpp"
|
|
54
|
-
#include <optional>
|
|
55
57
|
#include "BarkSendManyOutput.hpp"
|
|
56
58
|
#include "ArkoorPaymentResult.hpp"
|
|
57
|
-
#include "
|
|
59
|
+
#include "Bolt11PaymentResult.hpp"
|
|
60
|
+
#include "Bolt12PaymentResult.hpp"
|
|
58
61
|
#include "LnurlPaymentResult.hpp"
|
|
59
62
|
#include "LightningReceive.hpp"
|
|
60
63
|
|
|
@@ -94,7 +97,9 @@ namespace margelo::nitro::nitroark {
|
|
|
94
97
|
virtual std::shared_ptr<Promise<void>> loadWallet(const std::string& datadir, const BarkCreateOpts& config) = 0;
|
|
95
98
|
virtual std::shared_ptr<Promise<bool>> isWalletLoaded() = 0;
|
|
96
99
|
virtual std::shared_ptr<Promise<void>> closeWallet() = 0;
|
|
100
|
+
virtual std::shared_ptr<Promise<void>> registerAllConfirmedBoards() = 0;
|
|
97
101
|
virtual std::shared_ptr<Promise<void>> maintenance() = 0;
|
|
102
|
+
virtual std::shared_ptr<Promise<void>> maintenanceWithOnchain() = 0;
|
|
98
103
|
virtual std::shared_ptr<Promise<void>> maintenanceRefresh() = 0;
|
|
99
104
|
virtual std::shared_ptr<Promise<void>> sync() = 0;
|
|
100
105
|
virtual std::shared_ptr<Promise<void>> syncExits() = 0;
|
|
@@ -109,6 +114,8 @@ namespace margelo::nitro::nitroark {
|
|
|
109
114
|
virtual std::shared_ptr<Promise<KeyPairResult>> deriveKeypairFromMnemonic(const std::string& mnemonic, const std::string& network, double index) = 0;
|
|
110
115
|
virtual std::shared_ptr<Promise<bool>> verifyMessage(const std::string& message, const std::string& signature, const std::string& publicKey) = 0;
|
|
111
116
|
virtual std::shared_ptr<Promise<std::vector<BarkVtxo>>> getVtxos() = 0;
|
|
117
|
+
virtual std::shared_ptr<Promise<std::optional<double>>> getFirstExpiringVtxoBlockheight() = 0;
|
|
118
|
+
virtual std::shared_ptr<Promise<std::optional<double>>> getNextRequiredRefreshBlockheight() = 0;
|
|
112
119
|
virtual std::shared_ptr<Promise<std::vector<BarkVtxo>>> getExpiringVtxos(double threshold) = 0;
|
|
113
120
|
virtual std::shared_ptr<Promise<OnchainBalanceResult>> onchainBalance() = 0;
|
|
114
121
|
virtual std::shared_ptr<Promise<void>> onchainSync() = 0;
|
|
@@ -122,11 +129,13 @@ namespace margelo::nitro::nitroark {
|
|
|
122
129
|
virtual std::shared_ptr<Promise<std::string>> boardAll() = 0;
|
|
123
130
|
virtual std::shared_ptr<Promise<void>> validateArkoorAddress(const std::string& address) = 0;
|
|
124
131
|
virtual std::shared_ptr<Promise<ArkoorPaymentResult>> sendArkoorPayment(const std::string& destination, double amountSat) = 0;
|
|
125
|
-
virtual std::shared_ptr<Promise<
|
|
132
|
+
virtual std::shared_ptr<Promise<Bolt11PaymentResult>> sendLightningPayment(const std::string& destination, std::optional<double> amountSat) = 0;
|
|
133
|
+
virtual std::shared_ptr<Promise<Bolt12PaymentResult>> payOffer(const std::string& offer, std::optional<double> amountSat) = 0;
|
|
126
134
|
virtual std::shared_ptr<Promise<LnurlPaymentResult>> sendLnaddr(const std::string& addr, double amountSat, const std::string& comment) = 0;
|
|
127
135
|
virtual std::shared_ptr<Promise<std::string>> sendRoundOnchainPayment(const std::string& destination, double amountSat) = 0;
|
|
128
136
|
virtual std::shared_ptr<Promise<std::string>> bolt11Invoice(double amountMsat) = 0;
|
|
129
|
-
virtual std::shared_ptr<Promise<std::optional<LightningReceive>>> lightningReceiveStatus(const std::string&
|
|
137
|
+
virtual std::shared_ptr<Promise<std::optional<LightningReceive>>> lightningReceiveStatus(const std::string& paymentHash) = 0;
|
|
138
|
+
virtual std::shared_ptr<Promise<std::vector<LightningReceive>>> lightningReceives(double pageSize, double pageIndex) = 0;
|
|
130
139
|
virtual std::shared_ptr<Promise<void>> finishLightningReceive(const std::string& bolt11) = 0;
|
|
131
140
|
virtual std::shared_ptr<Promise<std::string>> offboardSpecific(const std::vector<std::string>& vtxoIds, const std::string& destinationAddress) = 0;
|
|
132
141
|
virtual std::shared_ptr<Promise<std::string>> offboardAll(const std::string& destinationAddress) = 0;
|
|
@@ -30,9 +30,10 @@ namespace margelo::nitro::nitroark {
|
|
|
30
30
|
*/
|
|
31
31
|
enum class PaymentTypes {
|
|
32
32
|
BOLT11 SWIFT_NAME(bolt11) = 0,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
BOLT12 SWIFT_NAME(bolt12) = 1,
|
|
34
|
+
LNURL SWIFT_NAME(lnurl) = 2,
|
|
35
|
+
ARKOOR SWIFT_NAME(arkoor) = 3,
|
|
36
|
+
ONCHAIN SWIFT_NAME(onchain) = 4,
|
|
36
37
|
} CLOSED_ENUM;
|
|
37
38
|
|
|
38
39
|
} // namespace margelo::nitro::nitroark
|
|
@@ -46,6 +47,7 @@ namespace margelo::nitro {
|
|
|
46
47
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
47
48
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
48
49
|
case hashString("Bolt11"): return margelo::nitro::nitroark::PaymentTypes::BOLT11;
|
|
50
|
+
case hashString("Bolt12"): return margelo::nitro::nitroark::PaymentTypes::BOLT12;
|
|
49
51
|
case hashString("Lnurl"): return margelo::nitro::nitroark::PaymentTypes::LNURL;
|
|
50
52
|
case hashString("Arkoor"): return margelo::nitro::nitroark::PaymentTypes::ARKOOR;
|
|
51
53
|
case hashString("Onchain"): return margelo::nitro::nitroark::PaymentTypes::ONCHAIN;
|
|
@@ -56,6 +58,7 @@ namespace margelo::nitro {
|
|
|
56
58
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroark::PaymentTypes arg) {
|
|
57
59
|
switch (arg) {
|
|
58
60
|
case margelo::nitro::nitroark::PaymentTypes::BOLT11: return JSIConverter<std::string>::toJSI(runtime, "Bolt11");
|
|
61
|
+
case margelo::nitro::nitroark::PaymentTypes::BOLT12: return JSIConverter<std::string>::toJSI(runtime, "Bolt12");
|
|
59
62
|
case margelo::nitro::nitroark::PaymentTypes::LNURL: return JSIConverter<std::string>::toJSI(runtime, "Lnurl");
|
|
60
63
|
case margelo::nitro::nitroark::PaymentTypes::ARKOOR: return JSIConverter<std::string>::toJSI(runtime, "Arkoor");
|
|
61
64
|
case margelo::nitro::nitroark::PaymentTypes::ONCHAIN: return JSIConverter<std::string>::toJSI(runtime, "Onchain");
|
|
@@ -71,6 +74,7 @@ namespace margelo::nitro {
|
|
|
71
74
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
72
75
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
73
76
|
case hashString("Bolt11"):
|
|
77
|
+
case hashString("Bolt12"):
|
|
74
78
|
case hashString("Lnurl"):
|
|
75
79
|
case hashString("Arkoor"):
|
|
76
80
|
case hashString("Onchain"):
|
package/package.json
CHANGED
package/src/NitroArk.nitro.ts
CHANGED
|
@@ -40,16 +40,17 @@ export interface BarkSendManyOutput {
|
|
|
40
40
|
amountSat: number; // uint64_t -> number
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
interface BarkVtxo {
|
|
44
44
|
amount: number; // u64
|
|
45
45
|
expiry_height: number; // u32
|
|
46
46
|
server_pubkey: string;
|
|
47
47
|
exit_delta: number; // u16
|
|
48
48
|
anchor_point: string;
|
|
49
49
|
point: string;
|
|
50
|
+
state: string;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
export type PaymentTypes = 'Bolt11' | 'Lnurl' | 'Arkoor' | 'Onchain';
|
|
53
|
+
export type PaymentTypes = 'Bolt11' | 'Bolt12' | 'Lnurl' | 'Arkoor' | 'Onchain';
|
|
53
54
|
|
|
54
55
|
export interface ArkoorPaymentResult {
|
|
55
56
|
amount_sat: number; // u64
|
|
@@ -58,12 +59,18 @@ export interface ArkoorPaymentResult {
|
|
|
58
59
|
payment_type: PaymentTypes; // 'Arkoor'
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export interface
|
|
62
|
+
export interface Bolt11PaymentResult {
|
|
62
63
|
bolt11_invoice: string;
|
|
63
64
|
preimage: string;
|
|
64
65
|
payment_type: PaymentTypes; // 'Lightning'
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
export interface Bolt12PaymentResult {
|
|
69
|
+
bolt12_offer: string;
|
|
70
|
+
preimage: string;
|
|
71
|
+
payment_type: PaymentTypes; // 'Bolt12'
|
|
72
|
+
}
|
|
73
|
+
|
|
67
74
|
export interface LnurlPaymentResult {
|
|
68
75
|
lnurl: string;
|
|
69
76
|
bolt11_invoice: string;
|
|
@@ -123,7 +130,9 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
|
|
|
123
130
|
loadWallet(datadir: string, config: BarkCreateOpts): Promise<void>;
|
|
124
131
|
isWalletLoaded(): Promise<boolean>;
|
|
125
132
|
closeWallet(): Promise<void>;
|
|
133
|
+
registerAllConfirmedBoards(): Promise<void>;
|
|
126
134
|
maintenance(): Promise<void>;
|
|
135
|
+
maintenanceWithOnchain(): Promise<void>;
|
|
127
136
|
maintenanceRefresh(): Promise<void>;
|
|
128
137
|
sync(): Promise<void>;
|
|
129
138
|
syncExits(): Promise<void>;
|
|
@@ -153,6 +162,8 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
|
|
|
153
162
|
publicKey: string
|
|
154
163
|
): Promise<boolean>;
|
|
155
164
|
getVtxos(): Promise<BarkVtxo[]>;
|
|
165
|
+
getFirstExpiringVtxoBlockheight(): Promise<number | undefined>;
|
|
166
|
+
getNextRequiredRefreshBlockheight(): Promise<number | undefined>;
|
|
156
167
|
getExpiringVtxos(threshold: number): Promise<BarkVtxo[]>;
|
|
157
168
|
|
|
158
169
|
// --- Onchain Operations ---
|
|
@@ -189,7 +200,8 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
|
|
|
189
200
|
sendLightningPayment(
|
|
190
201
|
destination: string,
|
|
191
202
|
amountSat?: number
|
|
192
|
-
): Promise<
|
|
203
|
+
): Promise<Bolt11PaymentResult>;
|
|
204
|
+
payOffer(offer: string, amountSat?: number): Promise<Bolt12PaymentResult>;
|
|
193
205
|
sendLnaddr(
|
|
194
206
|
addr: string,
|
|
195
207
|
amountSat: number,
|
|
@@ -203,8 +215,12 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
|
|
|
203
215
|
// --- Lightning Invoicing ---
|
|
204
216
|
bolt11Invoice(amountMsat: number): Promise<string>; // Returns invoice string
|
|
205
217
|
lightningReceiveStatus(
|
|
206
|
-
|
|
218
|
+
paymentHash: string
|
|
207
219
|
): Promise<LightningReceive | undefined>;
|
|
220
|
+
lightningReceives(
|
|
221
|
+
pageSize: number,
|
|
222
|
+
pageIndex: number
|
|
223
|
+
): Promise<LightningReceive[]>;
|
|
208
224
|
finishLightningReceive(bolt11: string): Promise<void>; // Throws on error
|
|
209
225
|
|
|
210
226
|
// --- Offboarding / Exiting ---
|
package/src/index.tsx
CHANGED
|
@@ -5,10 +5,10 @@ import type {
|
|
|
5
5
|
BarkArkInfo,
|
|
6
6
|
BarkSendManyOutput,
|
|
7
7
|
ArkoorPaymentResult,
|
|
8
|
-
|
|
8
|
+
Bolt11PaymentResult,
|
|
9
|
+
Bolt12PaymentResult,
|
|
9
10
|
LnurlPaymentResult,
|
|
10
11
|
OnchainPaymentResult,
|
|
11
|
-
BarkVtxo,
|
|
12
12
|
OffchainBalanceResult,
|
|
13
13
|
OnchainBalanceResult,
|
|
14
14
|
NewAddressResult,
|
|
@@ -16,6 +16,22 @@ import type {
|
|
|
16
16
|
LightningReceive,
|
|
17
17
|
} from './NitroArk.nitro';
|
|
18
18
|
|
|
19
|
+
export type BarkVtxo = {
|
|
20
|
+
amount: number; // u64
|
|
21
|
+
expiry_height: number; // u32
|
|
22
|
+
server_pubkey: string;
|
|
23
|
+
exit_delta: number; // u16
|
|
24
|
+
anchor_point: string;
|
|
25
|
+
point: string;
|
|
26
|
+
state:
|
|
27
|
+
| 'Spendable'
|
|
28
|
+
| 'Spent'
|
|
29
|
+
| 'UnregisteredBoard'
|
|
30
|
+
| 'PendingLightningSend'
|
|
31
|
+
| 'PendingLightningRecv'
|
|
32
|
+
| 'Unknown';
|
|
33
|
+
};
|
|
34
|
+
|
|
19
35
|
// Create the hybrid object instance
|
|
20
36
|
export const NitroArkHybridObject =
|
|
21
37
|
NitroModules.createHybridObject<NitroArk>('NitroArk');
|
|
@@ -73,6 +89,14 @@ export function isWalletLoaded(): Promise<boolean> {
|
|
|
73
89
|
return NitroArkHybridObject.isWalletLoaded();
|
|
74
90
|
}
|
|
75
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Registers all confirmed boards.
|
|
94
|
+
* @returns A promise that resolves on success.
|
|
95
|
+
*/
|
|
96
|
+
export function registerAllConfirmedBoards(): Promise<void> {
|
|
97
|
+
return NitroArkHybridObject.registerAllConfirmedBoards();
|
|
98
|
+
}
|
|
99
|
+
|
|
76
100
|
/**
|
|
77
101
|
* Runs wallet maintenance tasks.
|
|
78
102
|
* @returns A promise that resolves on success.
|
|
@@ -81,6 +105,14 @@ export function maintenance(): Promise<void> {
|
|
|
81
105
|
return NitroArkHybridObject.maintenance();
|
|
82
106
|
}
|
|
83
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Runs wallet maintenance tasks with onchain data.
|
|
110
|
+
* @returns A promise that resolves on success.
|
|
111
|
+
*/
|
|
112
|
+
export function maintenanceWithOnchain(): Promise<void> {
|
|
113
|
+
return NitroArkHybridObject.maintenanceWithOnchain();
|
|
114
|
+
}
|
|
115
|
+
|
|
84
116
|
/**
|
|
85
117
|
* Refreshes vtxos that need to be refreshed.
|
|
86
118
|
* @returns A promise that resolves on success.
|
|
@@ -229,7 +261,25 @@ export function verifyMessage(
|
|
|
229
261
|
* @returns A promise resolving BarkVtxo[] array.
|
|
230
262
|
*/
|
|
231
263
|
export function getVtxos(): Promise<BarkVtxo[]> {
|
|
232
|
-
return NitroArkHybridObject.getVtxos()
|
|
264
|
+
return NitroArkHybridObject.getVtxos() as Promise<BarkVtxo[]>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Gets the first expiring VTXO blockheight for the loaded wallet.
|
|
269
|
+
* @returns A promise resolving to the first expiring VTXO blockheight.
|
|
270
|
+
*/
|
|
271
|
+
export function getFirstExpiringVtxoBlockheight(): Promise<number | undefined> {
|
|
272
|
+
return NitroArkHybridObject.getFirstExpiringVtxoBlockheight();
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Gets the next required refresh blockheight for the loaded wallet for the first expiring VTXO.
|
|
277
|
+
* @returns A promise resolving to the next required refresh blockheight.
|
|
278
|
+
*/
|
|
279
|
+
export function getNextRequiredRefreshBlockheight(): Promise<
|
|
280
|
+
number | undefined
|
|
281
|
+
> {
|
|
282
|
+
return NitroArkHybridObject.getNextRequiredRefreshBlockheight();
|
|
233
283
|
}
|
|
234
284
|
|
|
235
285
|
/**
|
|
@@ -239,7 +289,9 @@ export function getVtxos(): Promise<BarkVtxo[]> {
|
|
|
239
289
|
*/
|
|
240
290
|
|
|
241
291
|
export function getExpiringVtxos(threshold: number): Promise<BarkVtxo[]> {
|
|
242
|
-
return NitroArkHybridObject.getExpiringVtxos(threshold)
|
|
292
|
+
return NitroArkHybridObject.getExpiringVtxos(threshold) as Promise<
|
|
293
|
+
BarkVtxo[]
|
|
294
|
+
>;
|
|
243
295
|
}
|
|
244
296
|
|
|
245
297
|
// --- Onchain Operations ---
|
|
@@ -330,14 +382,26 @@ export function bolt11Invoice(amountMsat: number): Promise<string> {
|
|
|
330
382
|
|
|
331
383
|
/**
|
|
332
384
|
* Gets the status of a Lightning receive.
|
|
333
|
-
* @param
|
|
385
|
+
* @param paymentHash The payment hash of the Lightning receive.
|
|
334
386
|
* @returns A promise resolving to the Lightning receive status.
|
|
335
387
|
*/
|
|
336
|
-
|
|
337
388
|
export function lightningReceiveStatus(
|
|
338
|
-
|
|
389
|
+
paymentHash: string
|
|
339
390
|
): Promise<LightningReceive | undefined> {
|
|
340
|
-
return NitroArkHybridObject.lightningReceiveStatus(
|
|
391
|
+
return NitroArkHybridObject.lightningReceiveStatus(paymentHash);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Gets a page of Lightning receives.
|
|
396
|
+
* @param pageSize The number of items to retrieve.
|
|
397
|
+
* @param pageIndex The index of the page to retrieve.
|
|
398
|
+
* @returns A promise resolving to an array of Lightning receives.
|
|
399
|
+
*/
|
|
400
|
+
export function lightningReceives(
|
|
401
|
+
pageSize: number,
|
|
402
|
+
pageIndex: number
|
|
403
|
+
): Promise<LightningReceive[]> {
|
|
404
|
+
return NitroArkHybridObject.lightningReceives(pageSize, pageIndex);
|
|
341
405
|
}
|
|
342
406
|
|
|
343
407
|
/**
|
|
@@ -353,15 +417,28 @@ export function finishLightningReceive(bolt11: string): Promise<void> {
|
|
|
353
417
|
* Sends a Lightning payment.
|
|
354
418
|
* @param destination The Lightning invoice.
|
|
355
419
|
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
356
|
-
* @returns A promise resolving to a
|
|
420
|
+
* @returns A promise resolving to a Bolt11PaymentResult object
|
|
357
421
|
*/
|
|
358
422
|
export function sendLightningPayment(
|
|
359
423
|
destination: string,
|
|
360
424
|
amountSat?: number
|
|
361
|
-
): Promise<
|
|
425
|
+
): Promise<Bolt11PaymentResult> {
|
|
362
426
|
return NitroArkHybridObject.sendLightningPayment(destination, amountSat);
|
|
363
427
|
}
|
|
364
428
|
|
|
429
|
+
/**
|
|
430
|
+
* Sends a payment to a Bolt12 offer.
|
|
431
|
+
* @param offer The Bolt12 offer.
|
|
432
|
+
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
433
|
+
* @returns A promise resolving to a Bolt12PaymentResult object
|
|
434
|
+
*/
|
|
435
|
+
export function payOffer(
|
|
436
|
+
offer: string,
|
|
437
|
+
amountSat?: number
|
|
438
|
+
): Promise<Bolt12PaymentResult> {
|
|
439
|
+
return NitroArkHybridObject.payOffer(offer, amountSat);
|
|
440
|
+
}
|
|
441
|
+
|
|
365
442
|
/**
|
|
366
443
|
* Sends a payment to a Lightning Address.
|
|
367
444
|
* @param addr The Lightning Address.
|
|
@@ -465,7 +542,7 @@ export type {
|
|
|
465
542
|
BarkArkInfo,
|
|
466
543
|
BarkSendManyOutput,
|
|
467
544
|
ArkoorPaymentResult,
|
|
468
|
-
|
|
545
|
+
Bolt11PaymentResult,
|
|
469
546
|
LnurlPaymentResult,
|
|
470
547
|
OnchainPaymentResult,
|
|
471
548
|
PaymentTypes,
|