react-native-nitro-ark 0.0.64 → 0.0.66
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/x86_64/libcxxbridge1.a +0 -0
- package/cpp/NitroArk.hpp +8 -38
- package/cpp/generated/ark_cxx.h +7 -6
- package/lib/module/index.js +3 -11
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NitroArk.nitro.d.ts +7 -5
- package/lib/typescript/src/NitroArk.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/shared/c++/ArkoorPaymentResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/BarkArkInfo.hpp +33 -13
- package/nitrogen/generated/shared/c++/BarkConfigOpts.hpp +8 -0
- package/nitrogen/generated/shared/c++/BarkCreateOpts.hpp +8 -0
- package/nitrogen/generated/shared/c++/BarkMovement.hpp +8 -0
- package/nitrogen/generated/shared/c++/BarkMovementRecipient.hpp +8 -0
- package/nitrogen/generated/shared/c++/BarkSendManyOutput.hpp +8 -0
- package/nitrogen/generated/shared/c++/BarkVtxo.hpp +8 -0
- package/nitrogen/generated/shared/c++/Bolt11Invoice.hpp +8 -0
- package/nitrogen/generated/shared/c++/Bolt11PaymentResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/Bolt12PaymentResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.cpp +1 -2
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/KeyPairResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/LightningReceive.hpp +8 -0
- package/nitrogen/generated/shared/c++/LnurlPaymentResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/NewAddressResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/OffchainBalanceResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/OnchainBalanceResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/OnchainPaymentResult.hpp +8 -0
- package/package.json +4 -4
- package/src/NitroArk.nitro.ts +7 -5
- package/src/index.tsx +4 -18
|
Binary file
|
package/cpp/NitroArk.hpp
CHANGED
|
@@ -155,10 +155,10 @@ public:
|
|
|
155
155
|
return Promise<bool>::async([]() { return bark_cxx::is_wallet_loaded(); });
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
std::shared_ptr<Promise<void>>
|
|
158
|
+
std::shared_ptr<Promise<void>> syncPendingBoards() override {
|
|
159
159
|
return Promise<void>::async([]() {
|
|
160
160
|
try {
|
|
161
|
-
bark_cxx::
|
|
161
|
+
bark_cxx::sync_pending_boards();
|
|
162
162
|
} catch (const rust::Error& e) {
|
|
163
163
|
throw std::runtime_error(e.what());
|
|
164
164
|
}
|
|
@@ -234,11 +234,14 @@ public:
|
|
|
234
234
|
BarkArkInfo info;
|
|
235
235
|
info.network = std::string(rust_info.network.data(), rust_info.network.length());
|
|
236
236
|
info.server_pubkey = std::string(rust_info.server_pubkey.data(), rust_info.server_pubkey.length());
|
|
237
|
-
info.
|
|
237
|
+
info.round_interval = static_cast<double>(rust_info.round_interval);
|
|
238
|
+
info.nb_round_nonces = static_cast<double>(rust_info.nb_round_nonces);
|
|
238
239
|
info.vtxo_exit_delta = static_cast<double>(rust_info.vtxo_exit_delta);
|
|
239
240
|
info.vtxo_expiry_delta = static_cast<double>(rust_info.vtxo_expiry_delta);
|
|
240
|
-
info.
|
|
241
|
-
info.
|
|
241
|
+
info.htlc_send_expiry_delta = static_cast<double>(rust_info.htlc_send_expiry_delta);
|
|
242
|
+
info.max_vtxo_amount = static_cast<double>(rust_info.max_vtxo_amount);
|
|
243
|
+
info.max_arkoor_depth = static_cast<double>(rust_info.max_arkoor_depth);
|
|
244
|
+
info.required_board_confirmations = static_cast<double>(rust_info.required_board_confirmations);
|
|
242
245
|
return info;
|
|
243
246
|
} catch (const rust::Error& e) {
|
|
244
247
|
throw std::runtime_error(e.what());
|
|
@@ -720,40 +723,7 @@ public:
|
|
|
720
723
|
});
|
|
721
724
|
}
|
|
722
725
|
|
|
723
|
-
std::shared_ptr<Promise<std::vector<LightningReceive>>> lightningReceives() override {
|
|
724
|
-
return Promise<std::vector<LightningReceive>>::async([]() {
|
|
725
|
-
try {
|
|
726
|
-
rust::Vec<bark_cxx::LightningReceive> receives_rs = bark_cxx::lightning_receives();
|
|
727
|
-
|
|
728
|
-
std::vector<LightningReceive> receives;
|
|
729
|
-
receives.reserve(receives_rs.size());
|
|
730
|
-
|
|
731
|
-
for (const auto& receive_rs : receives_rs) {
|
|
732
|
-
LightningReceive receive;
|
|
733
|
-
receive.payment_hash = std::string(receive_rs.payment_hash.data(), receive_rs.payment_hash.length());
|
|
734
|
-
receive.payment_preimage =
|
|
735
|
-
std::string(receive_rs.payment_preimage.data(), receive_rs.payment_preimage.length());
|
|
736
|
-
receive.invoice = std::string(receive_rs.invoice.data(), receive_rs.invoice.length());
|
|
737
|
-
|
|
738
|
-
if (receive_rs.preimage_revealed_at != nullptr) {
|
|
739
|
-
receive.preimage_revealed_at = static_cast<double>(*receive_rs.preimage_revealed_at);
|
|
740
|
-
delete receive_rs.preimage_revealed_at;
|
|
741
|
-
} else {
|
|
742
|
-
receive.preimage_revealed_at = std::nullopt;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
receives.push_back(std::move(receive));
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
return receives;
|
|
749
|
-
} catch (const rust::Error& e) {
|
|
750
|
-
throw std::runtime_error(e.what());
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
|
|
755
726
|
// --- Ark Operations ---
|
|
756
|
-
|
|
757
727
|
std::shared_ptr<Promise<std::string>> boardAmount(double amountSat) override {
|
|
758
728
|
return Promise<std::string>::async([amountSat]() {
|
|
759
729
|
try {
|
package/cpp/generated/ark_cxx.h
CHANGED
|
@@ -936,11 +936,14 @@ struct OnchainPaymentResult final {
|
|
|
936
936
|
struct CxxArkInfo final {
|
|
937
937
|
::rust::String network;
|
|
938
938
|
::rust::String server_pubkey;
|
|
939
|
-
::std::uint64_t
|
|
939
|
+
::std::uint64_t round_interval CXX_DEFAULT_VALUE(0);
|
|
940
|
+
::std::uint16_t nb_round_nonces CXX_DEFAULT_VALUE(0);
|
|
940
941
|
::std::uint16_t vtxo_exit_delta CXX_DEFAULT_VALUE(0);
|
|
941
942
|
::std::uint16_t vtxo_expiry_delta CXX_DEFAULT_VALUE(0);
|
|
942
|
-
::std::uint16_t
|
|
943
|
-
::std::uint64_t
|
|
943
|
+
::std::uint16_t htlc_send_expiry_delta CXX_DEFAULT_VALUE(0);
|
|
944
|
+
::std::uint64_t max_vtxo_amount CXX_DEFAULT_VALUE(0);
|
|
945
|
+
::std::uint16_t max_arkoor_depth CXX_DEFAULT_VALUE(0);
|
|
946
|
+
::std::uint8_t required_board_confirmations CXX_DEFAULT_VALUE(0);
|
|
944
947
|
|
|
945
948
|
using IsRelocatable = ::std::true_type;
|
|
946
949
|
};
|
|
@@ -1119,9 +1122,7 @@ bool verify_message(::rust::Str message, ::rust::Str signature, ::rust::Str publ
|
|
|
1119
1122
|
|
|
1120
1123
|
::bark_cxx::LightningReceive const *lightning_receive_status(::rust::String payment_hash);
|
|
1121
1124
|
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
void register_all_confirmed_boards();
|
|
1125
|
+
void sync_pending_boards();
|
|
1125
1126
|
|
|
1126
1127
|
void maintenance();
|
|
1127
1128
|
|
package/lib/module/index.js
CHANGED
|
@@ -52,11 +52,11 @@ export function isWalletLoaded() {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* Registers all confirmed boards.
|
|
55
|
+
* Registers all confirmed boards with the server.
|
|
56
56
|
* @returns A promise that resolves on success.
|
|
57
57
|
*/
|
|
58
|
-
export function
|
|
59
|
-
return NitroArkHybridObject.
|
|
58
|
+
export function syncPendingBoards() {
|
|
59
|
+
return NitroArkHybridObject.syncPendingBoards();
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
@@ -330,14 +330,6 @@ export function lightningReceiveStatus(paymentHash) {
|
|
|
330
330
|
return NitroArkHybridObject.lightningReceiveStatus(paymentHash);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
/**
|
|
334
|
-
* Gets a list of Lightning receives.
|
|
335
|
-
* @returns A promise resolving to an array of Lightning receives.
|
|
336
|
-
*/
|
|
337
|
-
export function lightningReceives() {
|
|
338
|
-
return NitroArkHybridObject.lightningReceives();
|
|
339
|
-
}
|
|
340
|
-
|
|
341
333
|
/**
|
|
342
334
|
* Checks and claims a Lightning payment.
|
|
343
335
|
* @param paymentHash The payment hash of the Lightning payment.
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NitroModules","NitroArkHybridObject","createHybridObject","createMnemonic","createWallet","datadir","opts","loadWallet","config","closeWallet","isWalletLoaded","
|
|
1
|
+
{"version":3,"names":["NitroModules","NitroArkHybridObject","createHybridObject","createMnemonic","createWallet","datadir","opts","loadWallet","config","closeWallet","isWalletLoaded","syncPendingBoards","maintenance","maintenanceWithOnchain","maintenanceRefresh","sync","syncExits","syncPastRounds","getArkInfo","offchainBalance","deriveStoreNextKeypair","peakKeyPair","index","newAddress","signMessage","message","signMesssageWithMnemonic","mnemonic","network","deriveKeypairFromMnemonic","verifyMessage","signature","publicKey","movements","vtxos","getFirstExpiringVtxoBlockheight","getNextRequiredRefreshBlockheight","getExpiringVtxos","threshold","onchainBalance","onchainSync","onchainListUnspent","onchainUtxos","onchainAddress","onchainSend","destination","amountSat","onchainDrain","onchainSendMany","outputs","bolt11Invoice","amountMsat","lightningReceiveStatus","paymentHash","checkAndClaimLnReceive","wait","checkAndClaimAllOpenLnReceives","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;AAqDzD;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,iBAAiBA,CAAA,EAAkB;EACjD,OAAOV,oBAAoB,CAACU,iBAAiB,CAAC,CAAC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAA,EAAkB;EAC3C,OAAOX,oBAAoB,CAACW,WAAW,CAAC,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAA,EAAkB;EACtD,OAAOZ,oBAAoB,CAACY,sBAAsB,CAAC,CAAC;AACtD;;AAEA;AACA;AACA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C;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAC/BtB,WAAmB,EACnBC,SAAiB,EACa;EAC9B,OAAO7C,oBAAoB,CAACkE,iBAAiB,CAACtB,WAAW,EAAEC,SAAS,CAAC;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASsB,uBAAuBA,CACrCvB,WAAmB,EACnBC,SAAiB,EACA;EACjB,OAAO7C,oBAAoB,CAACmE,uBAAuB,CAACvB,WAAW,EAAEC,SAAS,CAAC;AAC7E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASuB,gBAAgBA,CAC9BC,OAAiB,EACjBC,kBAA0B,EACT;EACjB,OAAOtE,oBAAoB,CAACoE,gBAAgB,CAACC,OAAO,EAAEC,kBAAkB,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACD,kBAA0B,EAAmB;EACvE,OAAOtE,oBAAoB,CAACuE,WAAW,CAACD,kBAAkB,CAAC;AAC7D;;AAEA","ignoreList":[]}
|
|
@@ -20,11 +20,14 @@ export interface BarkCreateOpts {
|
|
|
20
20
|
export interface BarkArkInfo {
|
|
21
21
|
network: string;
|
|
22
22
|
server_pubkey: string;
|
|
23
|
-
|
|
23
|
+
round_interval: number;
|
|
24
|
+
nb_round_nonces: number;
|
|
24
25
|
vtxo_exit_delta: number;
|
|
25
26
|
vtxo_expiry_delta: number;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
htlc_send_expiry_delta: number;
|
|
28
|
+
max_vtxo_amount: number;
|
|
29
|
+
max_arkoor_depth: number;
|
|
30
|
+
required_board_confirmations: number;
|
|
28
31
|
}
|
|
29
32
|
export interface BarkSendManyOutput {
|
|
30
33
|
destination: string;
|
|
@@ -123,7 +126,7 @@ export interface NitroArk extends HybridObject<{
|
|
|
123
126
|
loadWallet(datadir: string, config: BarkCreateOpts): Promise<void>;
|
|
124
127
|
isWalletLoaded(): Promise<boolean>;
|
|
125
128
|
closeWallet(): Promise<void>;
|
|
126
|
-
|
|
129
|
+
syncPendingBoards(): Promise<void>;
|
|
127
130
|
maintenance(): Promise<void>;
|
|
128
131
|
maintenanceWithOnchain(): Promise<void>;
|
|
129
132
|
maintenanceRefresh(): Promise<void>;
|
|
@@ -162,7 +165,6 @@ export interface NitroArk extends HybridObject<{
|
|
|
162
165
|
sendRoundOnchainPayment(destination: string, amountSat: number): Promise<string>;
|
|
163
166
|
bolt11Invoice(amountMsat: number): Promise<Bolt11Invoice>;
|
|
164
167
|
lightningReceiveStatus(paymentHash: string): Promise<LightningReceive | undefined>;
|
|
165
|
-
lightningReceives(): Promise<LightningReceive[]>;
|
|
166
168
|
checkAndClaimLnReceive(paymentHash: string, wait: boolean): Promise<void>;
|
|
167
169
|
checkAndClaimAllOpenLnReceives(wait: boolean): Promise<void>;
|
|
168
170
|
offboardSpecific(vtxoIds: string[], destinationAddress: string): Promise<string>;
|
|
@@ -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,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAA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|
exit_delta: number;
|
|
7
7
|
anchor_point: string;
|
|
8
8
|
point: string;
|
|
9
|
-
state: 'Spendable' | 'Spent' | '
|
|
9
|
+
state: 'Spendable' | 'Spent' | 'Locked' | 'unknown';
|
|
10
10
|
};
|
|
11
11
|
export interface BarkMovementRecipient {
|
|
12
12
|
recipient: string;
|
|
@@ -53,10 +53,10 @@ export declare function closeWallet(): Promise<void>;
|
|
|
53
53
|
*/
|
|
54
54
|
export declare function isWalletLoaded(): Promise<boolean>;
|
|
55
55
|
/**
|
|
56
|
-
* Registers all confirmed boards.
|
|
56
|
+
* Registers all confirmed boards with the server.
|
|
57
57
|
* @returns A promise that resolves on success.
|
|
58
58
|
*/
|
|
59
|
-
export declare function
|
|
59
|
+
export declare function syncPendingBoards(): Promise<void>;
|
|
60
60
|
/**
|
|
61
61
|
* Runs wallet maintenance tasks for offchain.
|
|
62
62
|
* This includes refreshing vtxos that need to be refreshed.
|
|
@@ -230,11 +230,6 @@ export declare function bolt11Invoice(amountMsat: number): Promise<Bolt11Invoice
|
|
|
230
230
|
* @returns A promise resolving to the Lightning receive status.
|
|
231
231
|
*/
|
|
232
232
|
export declare function lightningReceiveStatus(paymentHash: string): Promise<LightningReceive | undefined>;
|
|
233
|
-
/**
|
|
234
|
-
* Gets a list of Lightning receives.
|
|
235
|
-
* @returns A promise resolving to an array of Lightning receives.
|
|
236
|
-
*/
|
|
237
|
-
export declare function lightningReceives(): Promise<LightningReceive[]>;
|
|
238
233
|
/**
|
|
239
234
|
* Checks and claims a Lightning payment.
|
|
240
235
|
* @param paymentHash The payment hash of the Lightning payment.
|
|
@@ -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,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EACA,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,2BAA2B,GAC3B,mBAAmB,GACnB,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,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AoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,kBAAkB,CAAC"}
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `BarkVtxo` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { struct BarkVtxo; }
|
|
@@ -74,6 +79,9 @@ namespace margelo::nitro {
|
|
|
74
79
|
return false;
|
|
75
80
|
}
|
|
76
81
|
jsi::Object obj = value.getObject(runtime);
|
|
82
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
77
85
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "amount_sat"))) return false;
|
|
78
86
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "destination_pubkey"))) return false;
|
|
79
87
|
if (!JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::canConvert(runtime, obj.getProperty(runtime, "vtxos"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -31,15 +36,18 @@ namespace margelo::nitro::nitroark {
|
|
|
31
36
|
public:
|
|
32
37
|
std::string network SWIFT_PRIVATE;
|
|
33
38
|
std::string server_pubkey SWIFT_PRIVATE;
|
|
34
|
-
double
|
|
39
|
+
double round_interval SWIFT_PRIVATE;
|
|
40
|
+
double nb_round_nonces SWIFT_PRIVATE;
|
|
35
41
|
double vtxo_exit_delta SWIFT_PRIVATE;
|
|
36
42
|
double vtxo_expiry_delta SWIFT_PRIVATE;
|
|
37
|
-
double
|
|
38
|
-
double
|
|
43
|
+
double htlc_send_expiry_delta SWIFT_PRIVATE;
|
|
44
|
+
double max_vtxo_amount SWIFT_PRIVATE;
|
|
45
|
+
double max_arkoor_depth SWIFT_PRIVATE;
|
|
46
|
+
double required_board_confirmations SWIFT_PRIVATE;
|
|
39
47
|
|
|
40
48
|
public:
|
|
41
49
|
BarkArkInfo() = default;
|
|
42
|
-
explicit BarkArkInfo(std::string network, std::string server_pubkey, double
|
|
50
|
+
explicit BarkArkInfo(std::string network, std::string server_pubkey, double round_interval, double nb_round_nonces, double vtxo_exit_delta, double vtxo_expiry_delta, double htlc_send_expiry_delta, double max_vtxo_amount, double max_arkoor_depth, double required_board_confirmations): network(network), server_pubkey(server_pubkey), round_interval(round_interval), nb_round_nonces(nb_round_nonces), vtxo_exit_delta(vtxo_exit_delta), vtxo_expiry_delta(vtxo_expiry_delta), htlc_send_expiry_delta(htlc_send_expiry_delta), max_vtxo_amount(max_vtxo_amount), max_arkoor_depth(max_arkoor_depth), required_board_confirmations(required_board_confirmations) {}
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
} // namespace margelo::nitro::nitroark
|
|
@@ -54,22 +62,28 @@ namespace margelo::nitro {
|
|
|
54
62
|
return margelo::nitro::nitroark::BarkArkInfo(
|
|
55
63
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "network")),
|
|
56
64
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "server_pubkey")),
|
|
57
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
65
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "round_interval")),
|
|
66
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "nb_round_nonces")),
|
|
58
67
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "vtxo_exit_delta")),
|
|
59
68
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "vtxo_expiry_delta")),
|
|
60
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
61
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
69
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "htlc_send_expiry_delta")),
|
|
70
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "max_vtxo_amount")),
|
|
71
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "max_arkoor_depth")),
|
|
72
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "required_board_confirmations"))
|
|
62
73
|
);
|
|
63
74
|
}
|
|
64
75
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::BarkArkInfo& arg) {
|
|
65
76
|
jsi::Object obj(runtime);
|
|
66
77
|
obj.setProperty(runtime, "network", JSIConverter<std::string>::toJSI(runtime, arg.network));
|
|
67
78
|
obj.setProperty(runtime, "server_pubkey", JSIConverter<std::string>::toJSI(runtime, arg.server_pubkey));
|
|
68
|
-
obj.setProperty(runtime, "
|
|
79
|
+
obj.setProperty(runtime, "round_interval", JSIConverter<double>::toJSI(runtime, arg.round_interval));
|
|
80
|
+
obj.setProperty(runtime, "nb_round_nonces", JSIConverter<double>::toJSI(runtime, arg.nb_round_nonces));
|
|
69
81
|
obj.setProperty(runtime, "vtxo_exit_delta", JSIConverter<double>::toJSI(runtime, arg.vtxo_exit_delta));
|
|
70
82
|
obj.setProperty(runtime, "vtxo_expiry_delta", JSIConverter<double>::toJSI(runtime, arg.vtxo_expiry_delta));
|
|
71
|
-
obj.setProperty(runtime, "
|
|
72
|
-
obj.setProperty(runtime, "
|
|
83
|
+
obj.setProperty(runtime, "htlc_send_expiry_delta", JSIConverter<double>::toJSI(runtime, arg.htlc_send_expiry_delta));
|
|
84
|
+
obj.setProperty(runtime, "max_vtxo_amount", JSIConverter<double>::toJSI(runtime, arg.max_vtxo_amount));
|
|
85
|
+
obj.setProperty(runtime, "max_arkoor_depth", JSIConverter<double>::toJSI(runtime, arg.max_arkoor_depth));
|
|
86
|
+
obj.setProperty(runtime, "required_board_confirmations", JSIConverter<double>::toJSI(runtime, arg.required_board_confirmations));
|
|
73
87
|
return obj;
|
|
74
88
|
}
|
|
75
89
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -77,13 +91,19 @@ namespace margelo::nitro {
|
|
|
77
91
|
return false;
|
|
78
92
|
}
|
|
79
93
|
jsi::Object obj = value.getObject(runtime);
|
|
94
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
80
97
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "network"))) return false;
|
|
81
98
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "server_pubkey"))) return false;
|
|
82
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "
|
|
99
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "round_interval"))) return false;
|
|
100
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "nb_round_nonces"))) return false;
|
|
83
101
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "vtxo_exit_delta"))) return false;
|
|
84
102
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "vtxo_expiry_delta"))) return false;
|
|
85
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "
|
|
86
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "
|
|
103
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "htlc_send_expiry_delta"))) return false;
|
|
104
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "max_vtxo_amount"))) return false;
|
|
105
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "max_arkoor_depth"))) return false;
|
|
106
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "required_board_confirmations"))) return false;
|
|
87
107
|
return true;
|
|
88
108
|
}
|
|
89
109
|
};
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -81,6 +86,9 @@ namespace margelo::nitro {
|
|
|
81
86
|
return false;
|
|
82
87
|
}
|
|
83
88
|
jsi::Object obj = value.getObject(runtime);
|
|
89
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
84
92
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "ark"))) return false;
|
|
85
93
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "esplora"))) return false;
|
|
86
94
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "bitcoind"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `BarkConfigOpts` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { struct BarkConfigOpts; }
|
|
@@ -77,6 +82,9 @@ namespace margelo::nitro {
|
|
|
77
82
|
return false;
|
|
78
83
|
}
|
|
79
84
|
jsi::Object obj = value.getObject(runtime);
|
|
85
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
80
88
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "regtest"))) return false;
|
|
81
89
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "signet"))) return false;
|
|
82
90
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "bitcoin"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `BarkVtxo` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { struct BarkVtxo; }
|
|
@@ -83,6 +88,9 @@ namespace margelo::nitro {
|
|
|
83
88
|
return false;
|
|
84
89
|
}
|
|
85
90
|
jsi::Object obj = value.getObject(runtime);
|
|
91
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
86
94
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
87
95
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "kind"))) return false;
|
|
88
96
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "fees"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recipient"))) return false;
|
|
66
74
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "amount_sat"))) return false;
|
|
67
75
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "destination"))) return false;
|
|
66
74
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "amountSat"))) return false;
|
|
67
75
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -77,6 +82,9 @@ namespace margelo::nitro {
|
|
|
77
82
|
return false;
|
|
78
83
|
}
|
|
79
84
|
jsi::Object obj = value.getObject(runtime);
|
|
85
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
80
88
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "amount"))) return false;
|
|
81
89
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "expiry_height"))) return false;
|
|
82
90
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "server_pubkey"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -65,6 +70,9 @@ namespace margelo::nitro {
|
|
|
65
70
|
return false;
|
|
66
71
|
}
|
|
67
72
|
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
68
76
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "payment_request"))) return false;
|
|
69
77
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "payment_secret"))) return false;
|
|
70
78
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "payment_hash"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PaymentTypes` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { enum class PaymentTypes; }
|
|
@@ -67,6 +72,9 @@ namespace margelo::nitro {
|
|
|
67
72
|
return false;
|
|
68
73
|
}
|
|
69
74
|
jsi::Object obj = value.getObject(runtime);
|
|
75
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
70
78
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bolt11_invoice"))) return false;
|
|
71
79
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "preimage"))) return false;
|
|
72
80
|
if (!JSIConverter<margelo::nitro::nitroark::PaymentTypes>::canConvert(runtime, obj.getProperty(runtime, "payment_type"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PaymentTypes` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { enum class PaymentTypes; }
|
|
@@ -67,6 +72,9 @@ namespace margelo::nitro {
|
|
|
67
72
|
return false;
|
|
68
73
|
}
|
|
69
74
|
jsi::Object obj = value.getObject(runtime);
|
|
75
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
70
78
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bolt12_offer"))) return false;
|
|
71
79
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "preimage"))) return false;
|
|
72
80
|
if (!JSIConverter<margelo::nitro::nitroark::PaymentTypes>::canConvert(runtime, obj.getProperty(runtime, "payment_type"))) return false;
|
|
@@ -19,7 +19,7 @@ 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("
|
|
22
|
+
prototype.registerHybridMethod("syncPendingBoards", &HybridNitroArkSpec::syncPendingBoards);
|
|
23
23
|
prototype.registerHybridMethod("maintenance", &HybridNitroArkSpec::maintenance);
|
|
24
24
|
prototype.registerHybridMethod("maintenanceWithOnchain", &HybridNitroArkSpec::maintenanceWithOnchain);
|
|
25
25
|
prototype.registerHybridMethod("maintenanceRefresh", &HybridNitroArkSpec::maintenanceRefresh);
|
|
@@ -58,7 +58,6 @@ namespace margelo::nitro::nitroark {
|
|
|
58
58
|
prototype.registerHybridMethod("sendRoundOnchainPayment", &HybridNitroArkSpec::sendRoundOnchainPayment);
|
|
59
59
|
prototype.registerHybridMethod("bolt11Invoice", &HybridNitroArkSpec::bolt11Invoice);
|
|
60
60
|
prototype.registerHybridMethod("lightningReceiveStatus", &HybridNitroArkSpec::lightningReceiveStatus);
|
|
61
|
-
prototype.registerHybridMethod("lightningReceives", &HybridNitroArkSpec::lightningReceives);
|
|
62
61
|
prototype.registerHybridMethod("checkAndClaimLnReceive", &HybridNitroArkSpec::checkAndClaimLnReceive);
|
|
63
62
|
prototype.registerHybridMethod("checkAndClaimAllOpenLnReceives", &HybridNitroArkSpec::checkAndClaimAllOpenLnReceives);
|
|
64
63
|
prototype.registerHybridMethod("offboardSpecific", &HybridNitroArkSpec::offboardSpecific);
|
|
@@ -103,7 +103,7 @@ namespace margelo::nitro::nitroark {
|
|
|
103
103
|
virtual std::shared_ptr<Promise<void>> loadWallet(const std::string& datadir, const BarkCreateOpts& config) = 0;
|
|
104
104
|
virtual std::shared_ptr<Promise<bool>> isWalletLoaded() = 0;
|
|
105
105
|
virtual std::shared_ptr<Promise<void>> closeWallet() = 0;
|
|
106
|
-
virtual std::shared_ptr<Promise<void>>
|
|
106
|
+
virtual std::shared_ptr<Promise<void>> syncPendingBoards() = 0;
|
|
107
107
|
virtual std::shared_ptr<Promise<void>> maintenance() = 0;
|
|
108
108
|
virtual std::shared_ptr<Promise<void>> maintenanceWithOnchain() = 0;
|
|
109
109
|
virtual std::shared_ptr<Promise<void>> maintenanceRefresh() = 0;
|
|
@@ -142,7 +142,6 @@ namespace margelo::nitro::nitroark {
|
|
|
142
142
|
virtual std::shared_ptr<Promise<std::string>> sendRoundOnchainPayment(const std::string& destination, double amountSat) = 0;
|
|
143
143
|
virtual std::shared_ptr<Promise<Bolt11Invoice>> bolt11Invoice(double amountMsat) = 0;
|
|
144
144
|
virtual std::shared_ptr<Promise<std::optional<LightningReceive>>> lightningReceiveStatus(const std::string& paymentHash) = 0;
|
|
145
|
-
virtual std::shared_ptr<Promise<std::vector<LightningReceive>>> lightningReceives() = 0;
|
|
146
145
|
virtual std::shared_ptr<Promise<void>> checkAndClaimLnReceive(const std::string& paymentHash, bool wait) = 0;
|
|
147
146
|
virtual std::shared_ptr<Promise<void>> checkAndClaimAllOpenLnReceives(bool wait) = 0;
|
|
148
147
|
virtual std::shared_ptr<Promise<std::string>> offboardSpecific(const std::vector<std::string>& vtxoIds, const std::string& destinationAddress) = 0;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "public_key"))) return false;
|
|
66
74
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "secret_key"))) return false;
|
|
67
75
|
return true;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -69,6 +74,9 @@ namespace margelo::nitro {
|
|
|
69
74
|
return false;
|
|
70
75
|
}
|
|
71
76
|
jsi::Object obj = value.getObject(runtime);
|
|
77
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
72
80
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "payment_hash"))) return false;
|
|
73
81
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "payment_preimage"))) return false;
|
|
74
82
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "invoice"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PaymentTypes` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { enum class PaymentTypes; }
|
|
@@ -70,6 +75,9 @@ namespace margelo::nitro {
|
|
|
70
75
|
return false;
|
|
71
76
|
}
|
|
72
77
|
jsi::Object obj = value.getObject(runtime);
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
73
81
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "lnurl"))) return false;
|
|
74
82
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bolt11_invoice"))) return false;
|
|
75
83
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "preimage"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -65,6 +70,9 @@ namespace margelo::nitro {
|
|
|
65
70
|
return false;
|
|
66
71
|
}
|
|
67
72
|
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
68
76
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "user_pubkey"))) return false;
|
|
69
77
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "ark_id"))) return false;
|
|
70
78
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "address"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -71,6 +76,9 @@ namespace margelo::nitro {
|
|
|
71
76
|
return false;
|
|
72
77
|
}
|
|
73
78
|
jsi::Object obj = value.getObject(runtime);
|
|
79
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
74
82
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "spendable"))) return false;
|
|
75
83
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "pending_lightning_send"))) return false;
|
|
76
84
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "pending_in_round"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -68,6 +73,9 @@ namespace margelo::nitro {
|
|
|
68
73
|
return false;
|
|
69
74
|
}
|
|
70
75
|
jsi::Object obj = value.getObject(runtime);
|
|
76
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
71
79
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "immature"))) return false;
|
|
72
80
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "trusted_pending"))) return false;
|
|
73
81
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "untrusted_pending"))) return false;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
20
25
|
|
|
21
26
|
// Forward declaration of `PaymentTypes` to properly resolve imports.
|
|
22
27
|
namespace margelo::nitro::nitroark { enum class PaymentTypes; }
|
|
@@ -70,6 +75,9 @@ namespace margelo::nitro {
|
|
|
70
75
|
return false;
|
|
71
76
|
}
|
|
72
77
|
jsi::Object obj = value.getObject(runtime);
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
73
81
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "txid"))) return false;
|
|
74
82
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "amount_sat"))) return false;
|
|
75
83
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "destination_address"))) return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-ark",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"description": "Pure C++ Nitro Modules for Ark client",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"eslint-config-prettier": "^10.1.1",
|
|
83
83
|
"eslint-plugin-prettier": "^5.2.3",
|
|
84
84
|
"jest": "^29.7.0",
|
|
85
|
-
"nitrogen": "^0.
|
|
85
|
+
"nitrogen": "^0.31.2",
|
|
86
86
|
"prettier": "^3.0.3",
|
|
87
87
|
"react": "19.1.0",
|
|
88
88
|
"react-native": "0.81.4",
|
|
89
89
|
"react-native-builder-bob": "^0.40.13",
|
|
90
|
-
"react-native-nitro-modules": "^0.
|
|
90
|
+
"react-native-nitro-modules": "^0.31.2",
|
|
91
91
|
"release-it": "^17.10.0",
|
|
92
92
|
"turbo": "^1.10.7",
|
|
93
93
|
"typescript": "^5.2.2"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"react": "*",
|
|
97
97
|
"react-native": "*",
|
|
98
|
-
"react-native-nitro-modules": "^0.
|
|
98
|
+
"react-native-nitro-modules": "^0.31.2"
|
|
99
99
|
},
|
|
100
100
|
"workspaces": [
|
|
101
101
|
"example"
|
package/src/NitroArk.nitro.ts
CHANGED
|
@@ -27,11 +27,14 @@ export interface BarkCreateOpts {
|
|
|
27
27
|
export interface BarkArkInfo {
|
|
28
28
|
network: string;
|
|
29
29
|
server_pubkey: string;
|
|
30
|
-
|
|
30
|
+
round_interval: number; // u64
|
|
31
|
+
nb_round_nonces: number; // u16
|
|
31
32
|
vtxo_exit_delta: number; // u16
|
|
32
33
|
vtxo_expiry_delta: number; // u16
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
htlc_send_expiry_delta: number; // u16
|
|
35
|
+
max_vtxo_amount: number; // u64
|
|
36
|
+
max_arkoor_depth: number; // u16
|
|
37
|
+
required_board_confirmations: number; // u8
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
// Helper interface for sendManyOnchain
|
|
@@ -152,7 +155,7 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
|
|
|
152
155
|
loadWallet(datadir: string, config: BarkCreateOpts): Promise<void>;
|
|
153
156
|
isWalletLoaded(): Promise<boolean>;
|
|
154
157
|
closeWallet(): Promise<void>;
|
|
155
|
-
|
|
158
|
+
syncPendingBoards(): Promise<void>;
|
|
156
159
|
maintenance(): Promise<void>;
|
|
157
160
|
maintenanceWithOnchain(): Promise<void>;
|
|
158
161
|
maintenanceRefresh(): Promise<void>;
|
|
@@ -240,7 +243,6 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
|
|
|
240
243
|
lightningReceiveStatus(
|
|
241
244
|
paymentHash: string
|
|
242
245
|
): Promise<LightningReceive | undefined>;
|
|
243
|
-
lightningReceives(): Promise<LightningReceive[]>;
|
|
244
246
|
checkAndClaimLnReceive(paymentHash: string, wait: boolean): Promise<void>; // Throws on error
|
|
245
247
|
checkAndClaimAllOpenLnReceives(wait: boolean): Promise<void>; // Throws on error
|
|
246
248
|
|
package/src/index.tsx
CHANGED
|
@@ -24,13 +24,7 @@ export type BarkVtxo = {
|
|
|
24
24
|
exit_delta: number; // u16
|
|
25
25
|
anchor_point: string;
|
|
26
26
|
point: string;
|
|
27
|
-
state:
|
|
28
|
-
| 'Spendable'
|
|
29
|
-
| 'Spent'
|
|
30
|
-
| 'UnregisteredBoard'
|
|
31
|
-
| 'PendingLightningSend'
|
|
32
|
-
| 'PendingLightningRecv'
|
|
33
|
-
| 'Unknown';
|
|
27
|
+
state: 'Spendable' | 'Spent' | 'Locked' | 'unknown';
|
|
34
28
|
};
|
|
35
29
|
|
|
36
30
|
export interface BarkMovementRecipient {
|
|
@@ -115,11 +109,11 @@ export function isWalletLoaded(): Promise<boolean> {
|
|
|
115
109
|
}
|
|
116
110
|
|
|
117
111
|
/**
|
|
118
|
-
* Registers all confirmed boards.
|
|
112
|
+
* Registers all confirmed boards with the server.
|
|
119
113
|
* @returns A promise that resolves on success.
|
|
120
114
|
*/
|
|
121
|
-
export function
|
|
122
|
-
return NitroArkHybridObject.
|
|
115
|
+
export function syncPendingBoards(): Promise<void> {
|
|
116
|
+
return NitroArkHybridObject.syncPendingBoards();
|
|
123
117
|
}
|
|
124
118
|
|
|
125
119
|
/**
|
|
@@ -426,14 +420,6 @@ export function lightningReceiveStatus(
|
|
|
426
420
|
return NitroArkHybridObject.lightningReceiveStatus(paymentHash);
|
|
427
421
|
}
|
|
428
422
|
|
|
429
|
-
/**
|
|
430
|
-
* Gets a list of Lightning receives.
|
|
431
|
-
* @returns A promise resolving to an array of Lightning receives.
|
|
432
|
-
*/
|
|
433
|
-
export function lightningReceives(): Promise<LightningReceive[]> {
|
|
434
|
-
return NitroArkHybridObject.lightningReceives();
|
|
435
|
-
}
|
|
436
|
-
|
|
437
423
|
/**
|
|
438
424
|
* Checks and claims a Lightning payment.
|
|
439
425
|
* @param paymentHash The payment hash of the Lightning payment.
|