react-native-nitro-ark 0.0.51 → 0.0.53

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.
@@ -5,7 +5,7 @@ import type { HybridObject } from 'react-native-nitro-modules';
5
5
  // Note: BarkError is handled via Promise rejection, not exposed directly.
6
6
 
7
7
  export interface BarkConfigOpts {
8
- asp?: string;
8
+ ark?: string;
9
9
  esplora?: string;
10
10
  bitcoind?: string;
11
11
  bitcoind_cookie?: string;
@@ -26,7 +26,7 @@ export interface BarkCreateOpts {
26
26
 
27
27
  export interface BarkArkInfo {
28
28
  network: string;
29
- asp_pubkey: string;
29
+ server_pubkey: string;
30
30
  round_interval_secs: number; // u64
31
31
  vtxo_exit_delta: number; // u16
32
32
  vtxo_expiry_delta: number; // u16
@@ -43,7 +43,7 @@ export interface BarkSendManyOutput {
43
43
  export interface BarkVtxo {
44
44
  amount: number; // u64
45
45
  expiry_height: number; // u32
46
- asp_pubkey: string;
46
+ server_pubkey: string;
47
47
  exit_delta: number; // u16
48
48
  anchor_point: string;
49
49
  point: string;
@@ -81,6 +81,7 @@ export interface OnchainPaymentResult {
81
81
  export interface OffchainBalanceResult {
82
82
  spendable: number; // u64
83
83
  pending_lightning_send: number; // u64
84
+ pending_in_round: number; // u64
84
85
  pending_exit: number; // u64
85
86
  }
86
87
 
@@ -106,6 +107,13 @@ export interface KeyPairResult {
106
107
  secret_key: string;
107
108
  }
108
109
 
110
+ export interface LightningReceive {
111
+ payment_hash: string;
112
+ payment_preimage: string;
113
+ invoice: string;
114
+ preimage_revealed_at?: number;
115
+ }
116
+
109
117
  // --- Nitro Module Interface ---
110
118
 
111
119
  export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
@@ -174,6 +182,7 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
174
182
  // --- Ark & Lightning Payments ---
175
183
  boardAmount(amountSat: number): Promise<string>; // Returns JSON status
176
184
  boardAll(): Promise<string>; // Returns JSON status
185
+ validateArkoorAddress(address: string): Promise<void>;
177
186
  sendArkoorPayment(
178
187
  destination: string,
179
188
  amountSat: number
@@ -194,6 +203,9 @@ export interface NitroArk extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
194
203
 
195
204
  // --- Lightning Invoicing ---
196
205
  bolt11Invoice(amountMsat: number): Promise<string>; // Returns invoice string
206
+ lightningReceiveStatus(
207
+ payment: string
208
+ ): Promise<LightningReceive | undefined>;
197
209
  finishLightningReceive(bolt11: string): Promise<void>; // Throws on error
198
210
 
199
211
  // --- Offboarding / Exiting ---
package/src/index.tsx CHANGED
@@ -14,6 +14,7 @@ import type {
14
14
  OnchainBalanceResult,
15
15
  NewAddressResult,
16
16
  KeyPairResult,
17
+ LightningReceive,
17
18
  } from './NitroArk.nitro';
18
19
 
19
20
  // Create the hybrid object instance
@@ -334,6 +335,18 @@ export function bolt11Invoice(amountMsat: number): Promise<string> {
334
335
  return NitroArkHybridObject.bolt11Invoice(amountMsat);
335
336
  }
336
337
 
338
+ /**
339
+ * Gets the status of a Lightning receive.
340
+ * @param payment The payment hash of the Lightning receive.
341
+ * @returns A promise resolving to the Lightning receive status.
342
+ */
343
+
344
+ export function lightningReceiveStatus(
345
+ payment: string
346
+ ): Promise<LightningReceive | undefined> {
347
+ return NitroArkHybridObject.lightningReceiveStatus(payment);
348
+ }
349
+
337
350
  /**
338
351
  * Claims a Lightning payment.
339
352
  * @param bolt11 The Lightning invoice string to claim.
@@ -390,6 +403,15 @@ export function boardAll(): Promise<string> {
390
403
  return NitroArkHybridObject.boardAll();
391
404
  }
392
405
 
406
+ /**
407
+ * Validates an Arkoor address.
408
+ * @param address The Arkoor address to validate.
409
+ * @returns A promise resolving to void.
410
+ */
411
+ export function validateArkoorAddress(address: string): Promise<void> {
412
+ return NitroArkHybridObject.validateArkoorAddress(address);
413
+ }
414
+
393
415
  /**
394
416
  * Sends an Arkoor payment.
395
417
  * @param destination The destination Arkoor address.
@@ -458,4 +480,5 @@ export type {
458
480
  OnchainBalanceResult,
459
481
  NewAddressResult,
460
482
  KeyPairResult,
483
+ LightningReceive,
461
484
  } from './NitroArk.nitro';