react-native-nitro-ark 0.0.58 → 0.0.60

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.
@@ -30,26 +30,32 @@ export interface BarkSendManyOutput {
30
30
  destination: string;
31
31
  amountSat: number;
32
32
  }
33
- export interface BarkVtxo {
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 LightningPaymentResult {
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;
@@ -89,6 +95,19 @@ export interface LightningReceive {
89
95
  invoice: string;
90
96
  preimage_revealed_at?: number;
91
97
  }
98
+ export interface BarkMovementRecipient {
99
+ recipient: string;
100
+ amount_sat: number;
101
+ }
102
+ export interface BarkMovement {
103
+ id: number;
104
+ kind: string;
105
+ fees: number;
106
+ spends: BarkVtxo[];
107
+ receives: BarkVtxo[];
108
+ recipients: BarkMovementRecipient[];
109
+ created_at: string;
110
+ }
92
111
  export interface NitroArk extends HybridObject<{
93
112
  ios: 'c++';
94
113
  android: 'c++';
@@ -98,7 +117,9 @@ export interface NitroArk extends HybridObject<{
98
117
  loadWallet(datadir: string, config: BarkCreateOpts): Promise<void>;
99
118
  isWalletLoaded(): Promise<boolean>;
100
119
  closeWallet(): Promise<void>;
120
+ registerAllConfirmedBoards(): Promise<void>;
101
121
  maintenance(): Promise<void>;
122
+ maintenanceWithOnchain(): Promise<void>;
102
123
  maintenanceRefresh(): Promise<void>;
103
124
  sync(): Promise<void>;
104
125
  syncExits(): Promise<void>;
@@ -112,7 +133,10 @@ export interface NitroArk extends HybridObject<{
112
133
  signMesssageWithMnemonic(message: string, mnemonic: string, network: string, index: number): Promise<string>;
113
134
  deriveKeypairFromMnemonic(mnemonic: string, network: string, index: number): Promise<KeyPairResult>;
114
135
  verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
115
- getVtxos(): Promise<BarkVtxo[]>;
136
+ movements(pageIndex: number, pageSize: number): Promise<BarkMovement[]>;
137
+ vtxos(): Promise<BarkVtxo[]>;
138
+ getFirstExpiringVtxoBlockheight(): Promise<number | undefined>;
139
+ getNextRequiredRefreshBlockheight(): Promise<number | undefined>;
116
140
  getExpiringVtxos(threshold: number): Promise<BarkVtxo[]>;
117
141
  onchainBalance(): Promise<OnchainBalanceResult>;
118
142
  onchainSync(): Promise<void>;
@@ -126,13 +150,16 @@ export interface NitroArk extends HybridObject<{
126
150
  boardAll(): Promise<string>;
127
151
  validateArkoorAddress(address: string): Promise<void>;
128
152
  sendArkoorPayment(destination: string, amountSat: number): Promise<ArkoorPaymentResult>;
129
- sendLightningPayment(destination: string, amountSat?: number): Promise<LightningPaymentResult>;
153
+ sendLightningPayment(destination: string, amountSat?: number): Promise<Bolt11PaymentResult>;
154
+ payOffer(offer: string, amountSat?: number): Promise<Bolt12PaymentResult>;
130
155
  sendLnaddr(addr: string, amountSat: number, comment: string): Promise<LnurlPaymentResult>;
131
156
  sendRoundOnchainPayment(destination: string, amountSat: number): Promise<string>;
132
157
  bolt11Invoice(amountMsat: number): Promise<string>;
133
- lightningReceiveStatus(payment: string): Promise<LightningReceive | undefined>;
158
+ lightningReceiveStatus(paymentHash: string): Promise<LightningReceive | undefined>;
159
+ lightningReceives(pageSize: number, pageIndex: number): Promise<LightningReceive[]>;
134
160
  finishLightningReceive(bolt11: string): Promise<void>;
135
161
  offboardSpecific(vtxoIds: string[], destinationAddress: string): Promise<string>;
136
162
  offboardAll(destinationAddress: string): Promise<string>;
137
163
  }
164
+ export {};
138
165
  //# 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,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;CA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,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, LightningPaymentResult, LnurlPaymentResult, OnchainPaymentResult, BarkVtxo, OffchainBalanceResult, OnchainBalanceResult, NewAddressResult, KeyPairResult, LightningReceive } from './NitroArk.nitro';
1
+ import type { NitroArk, BarkCreateOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, Bolt11PaymentResult, Bolt12PaymentResult, LnurlPaymentResult, OnchainPaymentResult, OffchainBalanceResult, OnchainBalanceResult, NewAddressResult, KeyPairResult, LightningReceive, BarkMovement } 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.
@@ -31,10 +40,22 @@ export declare function closeWallet(): Promise<void>;
31
40
  */
32
41
  export declare function isWalletLoaded(): Promise<boolean>;
33
42
  /**
34
- * Runs wallet maintenance tasks.
43
+ * Registers all confirmed boards.
44
+ * @returns A promise that resolves on success.
45
+ */
46
+ export declare function registerAllConfirmedBoards(): Promise<void>;
47
+ /**
48
+ * Runs wallet maintenance tasks for offchain.
49
+ * This includes refreshing vtxos that need to be refreshed.
35
50
  * @returns A promise that resolves on success.
36
51
  */
37
52
  export declare function maintenance(): Promise<void>;
53
+ /**
54
+ * Runs wallet maintenance tasks for both offchain and onchain.
55
+ * This includes refreshing vtxos that need to be refreshed.
56
+ * @returns A promise that resolves on success.
57
+ */
58
+ export declare function maintenanceWithOnchain(): Promise<void>;
38
59
  /**
39
60
  * Refreshes vtxos that need to be refreshed.
40
61
  * @returns A promise that resolves on success.
@@ -113,12 +134,29 @@ export declare function deriveKeypairFromMnemonic(mnemonic: string, network: str
113
134
  * @returns A promise resolving to true if the signature is valid, false otherwise.
114
135
  */
115
136
  export declare function verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
137
+ /**
138
+ * Gets a paginated list of wallet movements (balance changes).
139
+ * @param pageIndex The index of the page to retrieve (0-based).
140
+ * @param pageSize The number of movements per page.
141
+ * @returns A promise resolving to an array of BarkMovement objects.
142
+ */
143
+ export declare function movements(pageIndex: number, pageSize: number): Promise<BarkMovement[]>;
116
144
  /**
117
145
  * Gets the list of VTXOs as a JSON string for the loaded wallet.
118
146
  * @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
119
147
  * @returns A promise resolving BarkVtxo[] array.
120
148
  */
121
- export declare function getVtxos(): Promise<BarkVtxo[]>;
149
+ export declare function vtxos(): Promise<BarkVtxo[]>;
150
+ /**
151
+ * Gets the first expiring VTXO blockheight for the loaded wallet.
152
+ * @returns A promise resolving to the first expiring VTXO blockheight.
153
+ */
154
+ export declare function getFirstExpiringVtxoBlockheight(): Promise<number | undefined>;
155
+ /**
156
+ * Gets the next required refresh blockheight for the loaded wallet for the first expiring VTXO.
157
+ * @returns A promise resolving to the next required refresh blockheight.
158
+ */
159
+ export declare function getNextRequiredRefreshBlockheight(): Promise<number | undefined>;
122
160
  /**
123
161
  * Gets the list of expiring VTXOs as a JSON Object of type BarkVtxo.
124
162
  * @param threshold The block height threshold to check for expiring VTXOs.
@@ -177,10 +215,17 @@ export declare function onchainSendMany(outputs: BarkSendManyOutput[]): Promise<
177
215
  export declare function bolt11Invoice(amountMsat: number): Promise<string>;
178
216
  /**
179
217
  * Gets the status of a Lightning receive.
180
- * @param payment The payment hash of the Lightning receive.
218
+ * @param paymentHash The payment hash of the Lightning receive.
181
219
  * @returns A promise resolving to the Lightning receive status.
182
220
  */
183
- export declare function lightningReceiveStatus(payment: string): Promise<LightningReceive | undefined>;
221
+ export declare function lightningReceiveStatus(paymentHash: string): Promise<LightningReceive | undefined>;
222
+ /**
223
+ * Gets a page of Lightning receives.
224
+ * @param pageSize The number of items to retrieve.
225
+ * @param pageIndex The index of the page to retrieve.
226
+ * @returns A promise resolving to an array of Lightning receives.
227
+ */
228
+ export declare function lightningReceives(pageSize: number, pageIndex: number): Promise<LightningReceive[]>;
184
229
  /**
185
230
  * Claims a Lightning payment.
186
231
  * @param bolt11 The Lightning invoice string to claim.
@@ -191,9 +236,16 @@ export declare function finishLightningReceive(bolt11: string): Promise<void>;
191
236
  * Sends a Lightning payment.
192
237
  * @param destination The Lightning invoice.
193
238
  * @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
194
- * @returns A promise resolving to a LightningPaymentResult object
239
+ * @returns A promise resolving to a Bolt11PaymentResult object
240
+ */
241
+ export declare function sendLightningPayment(destination: string, amountSat?: number): Promise<Bolt11PaymentResult>;
242
+ /**
243
+ * Sends a payment to a Bolt12 offer.
244
+ * @param offer The Bolt12 offer.
245
+ * @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
246
+ * @returns A promise resolving to a Bolt12PaymentResult object
195
247
  */
196
- export declare function sendLightningPayment(destination: string, amountSat?: number): Promise<LightningPaymentResult>;
248
+ export declare function payOffer(offer: string, amountSat?: number): Promise<Bolt12PaymentResult>;
197
249
  /**
198
250
  * Sends a payment to a Lightning Address.
199
251
  * @param addr The Lightning Address.
@@ -248,5 +300,5 @@ export declare function offboardSpecific(vtxoIds: string[], destinationAddress:
248
300
  * @returns A promise resolving to a JSON result string.
249
301
  */
250
302
  export declare function offboardAll(destinationAddress: string): Promise<string>;
251
- export type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, LightningPaymentResult, LnurlPaymentResult, OnchainPaymentResult, PaymentTypes, OffchainBalanceResult, OnchainBalanceResult, NewAddressResult, KeyPairResult, LightningReceive, } from './NitroArk.nitro';
303
+ export type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, Bolt11PaymentResult, LnurlPaymentResult, OnchainPaymentResult, PaymentTypes, OffchainBalanceResult, OnchainBalanceResult, NewAddressResult, KeyPairResult, LightningReceive, BarkMovement, BarkMovementRecipient, } from './NitroArk.nitro';
252
304
  //# 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,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AA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AAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAID;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EAAE,EACjB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,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,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,kBAAkB,CAAC"}
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,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACb,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,EACD,WAAW,GACX,OAAO,GACP,mBAAmB,GACnB,sBAAsB,GACtB,sBAAsB,GACtB,SAAS,CAAC;CACf,CAAC;AAGF,eAAO,MAAM,oBAAoB,UACsB,CAAC;AAIxD;;;GAGG;AACH,wBAAgB,cAA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kMovement.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 `BarkVtxo` to properly resolve imports.
22
+ namespace margelo::nitro::nitroark { struct BarkVtxo; }
23
+ // Forward declaration of `BarkMovementRecipient` to properly resolve imports.
24
+ namespace margelo::nitro::nitroark { struct BarkMovementRecipient; }
25
+
26
+ #include <string>
27
+ #include "BarkVtxo.hpp"
28
+ #include <vector>
29
+ #include "BarkMovementRecipient.hpp"
30
+
31
+ namespace margelo::nitro::nitroark {
32
+
33
+ /**
34
+ * A struct which can be represented as a JavaScript object (BarkMovement).
35
+ */
36
+ struct BarkMovement {
37
+ public:
38
+ double id SWIFT_PRIVATE;
39
+ std::string kind SWIFT_PRIVATE;
40
+ double fees SWIFT_PRIVATE;
41
+ std::vector<BarkVtxo> spends SWIFT_PRIVATE;
42
+ std::vector<BarkVtxo> receives SWIFT_PRIVATE;
43
+ std::vector<BarkMovementRecipient> recipients SWIFT_PRIVATE;
44
+ std::string created_at SWIFT_PRIVATE;
45
+
46
+ public:
47
+ BarkMovement() = default;
48
+ explicit BarkMovement(double id, std::string kind, double fees, std::vector<BarkVtxo> spends, std::vector<BarkVtxo> receives, std::vector<BarkMovementRecipient> recipients, std::string created_at): id(id), kind(kind), fees(fees), spends(spends), receives(receives), recipients(recipients), created_at(created_at) {}
49
+ };
50
+
51
+ } // namespace margelo::nitro::nitroark
52
+
53
+ namespace margelo::nitro {
54
+
55
+ // C++ BarkMovement <> JS BarkMovement (object)
56
+ template <>
57
+ struct JSIConverter<margelo::nitro::nitroark::BarkMovement> final {
58
+ static inline margelo::nitro::nitroark::BarkMovement fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
59
+ jsi::Object obj = arg.asObject(runtime);
60
+ return margelo::nitro::nitroark::BarkMovement(
61
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "id")),
62
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "kind")),
63
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "fees")),
64
+ JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::fromJSI(runtime, obj.getProperty(runtime, "spends")),
65
+ JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::fromJSI(runtime, obj.getProperty(runtime, "receives")),
66
+ JSIConverter<std::vector<margelo::nitro::nitroark::BarkMovementRecipient>>::fromJSI(runtime, obj.getProperty(runtime, "recipients")),
67
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "created_at"))
68
+ );
69
+ }
70
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::BarkMovement& arg) {
71
+ jsi::Object obj(runtime);
72
+ obj.setProperty(runtime, "id", JSIConverter<double>::toJSI(runtime, arg.id));
73
+ obj.setProperty(runtime, "kind", JSIConverter<std::string>::toJSI(runtime, arg.kind));
74
+ obj.setProperty(runtime, "fees", JSIConverter<double>::toJSI(runtime, arg.fees));
75
+ obj.setProperty(runtime, "spends", JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::toJSI(runtime, arg.spends));
76
+ obj.setProperty(runtime, "receives", JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::toJSI(runtime, arg.receives));
77
+ obj.setProperty(runtime, "recipients", JSIConverter<std::vector<margelo::nitro::nitroark::BarkMovementRecipient>>::toJSI(runtime, arg.recipients));
78
+ obj.setProperty(runtime, "created_at", JSIConverter<std::string>::toJSI(runtime, arg.created_at));
79
+ return obj;
80
+ }
81
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
82
+ if (!value.isObject()) {
83
+ return false;
84
+ }
85
+ jsi::Object obj = value.getObject(runtime);
86
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
87
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "kind"))) return false;
88
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "fees"))) return false;
89
+ if (!JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::canConvert(runtime, obj.getProperty(runtime, "spends"))) return false;
90
+ if (!JSIConverter<std::vector<margelo::nitro::nitroark::BarkVtxo>>::canConvert(runtime, obj.getProperty(runtime, "receives"))) return false;
91
+ if (!JSIConverter<std::vector<margelo::nitro::nitroark::BarkMovementRecipient>>::canConvert(runtime, obj.getProperty(runtime, "recipients"))) return false;
92
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "created_at"))) return false;
93
+ return true;
94
+ }
95
+ };
96
+
97
+ } // namespace margelo::nitro
@@ -0,0 +1,71 @@
1
+ ///
2
+ /// BarkMovementRecipient.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
+
22
+
23
+ #include <string>
24
+
25
+ namespace margelo::nitro::nitroark {
26
+
27
+ /**
28
+ * A struct which can be represented as a JavaScript object (BarkMovementRecipient).
29
+ */
30
+ struct BarkMovementRecipient {
31
+ public:
32
+ std::string recipient SWIFT_PRIVATE;
33
+ double amount_sat SWIFT_PRIVATE;
34
+
35
+ public:
36
+ BarkMovementRecipient() = default;
37
+ explicit BarkMovementRecipient(std::string recipient, double amount_sat): recipient(recipient), amount_sat(amount_sat) {}
38
+ };
39
+
40
+ } // namespace margelo::nitro::nitroark
41
+
42
+ namespace margelo::nitro {
43
+
44
+ // C++ BarkMovementRecipient <> JS BarkMovementRecipient (object)
45
+ template <>
46
+ struct JSIConverter<margelo::nitro::nitroark::BarkMovementRecipient> final {
47
+ static inline margelo::nitro::nitroark::BarkMovementRecipient fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
48
+ jsi::Object obj = arg.asObject(runtime);
49
+ return margelo::nitro::nitroark::BarkMovementRecipient(
50
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recipient")),
51
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "amount_sat"))
52
+ );
53
+ }
54
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitroark::BarkMovementRecipient& arg) {
55
+ jsi::Object obj(runtime);
56
+ obj.setProperty(runtime, "recipient", JSIConverter<std::string>::toJSI(runtime, arg.recipient));
57
+ obj.setProperty(runtime, "amount_sat", JSIConverter<double>::toJSI(runtime, arg.amount_sat));
58
+ return obj;
59
+ }
60
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
61
+ if (!value.isObject()) {
62
+ return false;
63
+ }
64
+ jsi::Object obj = value.getObject(runtime);
65
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recipient"))) return false;
66
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "amount_sat"))) return false;
67
+ return true;
68
+ }
69
+ };
70
+
71
+ } // namespace margelo::nitro
@@ -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
  };
@@ -1,5 +1,5 @@
1
1
  ///
2
- /// LightningPaymentResult.hpp
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 (LightningPaymentResult).
30
+ * A struct which can be represented as a JavaScript object (Bolt11PaymentResult).
31
31
  */
32
- struct LightningPaymentResult {
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
- LightningPaymentResult() = default;
40
- explicit LightningPaymentResult(std::string bolt11_invoice, std::string preimage, PaymentTypes payment_type): bolt11_invoice(bolt11_invoice), preimage(preimage), payment_type(payment_type) {}
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++ LightningPaymentResult <> JS LightningPaymentResult (object)
47
+ // C++ Bolt11PaymentResult <> JS Bolt11PaymentResult (object)
48
48
  template <>
49
- struct JSIConverter<margelo::nitro::nitroark::LightningPaymentResult> final {
50
- static inline margelo::nitro::nitroark::LightningPaymentResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
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::LightningPaymentResult(
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::LightningPaymentResult& arg) {
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);
@@ -33,7 +35,10 @@ namespace margelo::nitro::nitroark {
33
35
  prototype.registerHybridMethod("signMesssageWithMnemonic", &HybridNitroArkSpec::signMesssageWithMnemonic);
34
36
  prototype.registerHybridMethod("deriveKeypairFromMnemonic", &HybridNitroArkSpec::deriveKeypairFromMnemonic);
35
37
  prototype.registerHybridMethod("verifyMessage", &HybridNitroArkSpec::verifyMessage);
36
- prototype.registerHybridMethod("getVtxos", &HybridNitroArkSpec::getVtxos);
38
+ prototype.registerHybridMethod("movements", &HybridNitroArkSpec::movements);
39
+ prototype.registerHybridMethod("vtxos", &HybridNitroArkSpec::vtxos);
40
+ prototype.registerHybridMethod("getFirstExpiringVtxoBlockheight", &HybridNitroArkSpec::getFirstExpiringVtxoBlockheight);
41
+ prototype.registerHybridMethod("getNextRequiredRefreshBlockheight", &HybridNitroArkSpec::getNextRequiredRefreshBlockheight);
37
42
  prototype.registerHybridMethod("getExpiringVtxos", &HybridNitroArkSpec::getExpiringVtxos);
38
43
  prototype.registerHybridMethod("onchainBalance", &HybridNitroArkSpec::onchainBalance);
39
44
  prototype.registerHybridMethod("onchainSync", &HybridNitroArkSpec::onchainSync);
@@ -48,10 +53,12 @@ namespace margelo::nitro::nitroark {
48
53
  prototype.registerHybridMethod("validateArkoorAddress", &HybridNitroArkSpec::validateArkoorAddress);
49
54
  prototype.registerHybridMethod("sendArkoorPayment", &HybridNitroArkSpec::sendArkoorPayment);
50
55
  prototype.registerHybridMethod("sendLightningPayment", &HybridNitroArkSpec::sendLightningPayment);
56
+ prototype.registerHybridMethod("payOffer", &HybridNitroArkSpec::payOffer);
51
57
  prototype.registerHybridMethod("sendLnaddr", &HybridNitroArkSpec::sendLnaddr);
52
58
  prototype.registerHybridMethod("sendRoundOnchainPayment", &HybridNitroArkSpec::sendRoundOnchainPayment);
53
59
  prototype.registerHybridMethod("bolt11Invoice", &HybridNitroArkSpec::bolt11Invoice);
54
60
  prototype.registerHybridMethod("lightningReceiveStatus", &HybridNitroArkSpec::lightningReceiveStatus);
61
+ prototype.registerHybridMethod("lightningReceives", &HybridNitroArkSpec::lightningReceives);
55
62
  prototype.registerHybridMethod("finishLightningReceive", &HybridNitroArkSpec::finishLightningReceive);
56
63
  prototype.registerHybridMethod("offboardSpecific", &HybridNitroArkSpec::offboardSpecific);
57
64
  prototype.registerHybridMethod("offboardAll", &HybridNitroArkSpec::offboardAll);