react-native-nitro-ark 0.0.37 → 0.0.39
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/android/src/main/jniLibs/x86_64/libcxxbridge1.a +0 -0
- package/cpp/NitroArk.hpp +195 -166
- package/cpp/generated/ark_cxx.h +55 -23
- package/lib/module/index.js +86 -92
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NitroArk.nitro.d.ts +29 -18
- package/lib/typescript/src/NitroArk.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +60 -66
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/ios/NitroArk-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.cpp +15 -15
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.hpp +31 -22
- package/nitrogen/generated/shared/c++/{Bolt11PaymentResult.hpp → LightningPaymentResult.hpp} +10 -10
- package/nitrogen/generated/shared/c++/OffchainBalanceResult.hpp +77 -0
- package/nitrogen/generated/shared/c++/OnchainBalanceResult.hpp +81 -0
- package/package.json +17 -11
- package/src/NitroArk.nitro.ts +47 -24
- package/src/index.tsx +101 -105
package/lib/module/index.js
CHANGED
|
@@ -67,11 +67,11 @@ export function sync() {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* Synchronizes the Ark-specific
|
|
70
|
+
* Synchronizes the Ark-specific exits.
|
|
71
71
|
* @returns A promise that resolves on success.
|
|
72
72
|
*/
|
|
73
|
-
export function
|
|
74
|
-
return NitroArkHybridObject.
|
|
73
|
+
export function syncExits() {
|
|
74
|
+
return NitroArkHybridObject.syncExits();
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -93,87 +93,107 @@ export function getArkInfo() {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Gets the
|
|
97
|
-
* @returns A promise resolving to the
|
|
96
|
+
* Gets the offchain balance for the loaded wallet.
|
|
97
|
+
* @returns A promise resolving to the OffchainBalanceResult object.
|
|
98
98
|
*/
|
|
99
|
-
export function
|
|
100
|
-
return NitroArkHybridObject.
|
|
99
|
+
export function offchainBalance() {
|
|
100
|
+
return NitroArkHybridObject.offchainBalance();
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
105
|
-
* @returns A promise resolving to the
|
|
104
|
+
* Derives the next keypair for the store.
|
|
105
|
+
* @returns A promise resolving to the hex-encoded public key string.
|
|
106
106
|
*/
|
|
107
|
-
export function
|
|
108
|
-
return NitroArkHybridObject.
|
|
107
|
+
export function deriveStoreNextKeypair() {
|
|
108
|
+
return NitroArkHybridObject.deriveStoreNextKeypair();
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
* Gets
|
|
113
|
-
* @
|
|
112
|
+
* Gets the wallet's VTXO public key (hex string).
|
|
113
|
+
* @param index Index of the VTXO pubkey to retrieve.
|
|
114
|
+
* @returns A promise resolving to the hex-encoded public key string.
|
|
114
115
|
*/
|
|
115
|
-
export function
|
|
116
|
-
return NitroArkHybridObject.
|
|
116
|
+
export function peakKeyPair(index) {
|
|
117
|
+
return NitroArkHybridObject.peakKeyPair(index);
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
|
-
* Gets the list of
|
|
121
|
+
* Gets the list of VTXOs as a JSON string for the loaded wallet.
|
|
121
122
|
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
122
|
-
* @returns A promise resolving
|
|
123
|
+
* @returns A promise resolving BarkVtxo[] array.
|
|
123
124
|
*/
|
|
124
|
-
export function
|
|
125
|
-
return NitroArkHybridObject.
|
|
125
|
+
export function getVtxos() {
|
|
126
|
+
return NitroArkHybridObject.getVtxos();
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
// --- Onchain Operations ---
|
|
130
|
+
|
|
128
131
|
/**
|
|
129
|
-
* Gets the
|
|
130
|
-
* @
|
|
131
|
-
* @returns A promise resolving to the hex-encoded public key string.
|
|
132
|
+
* Gets the onchain balance for the loaded wallet.
|
|
133
|
+
* @returns A promise resolving to the OnchainBalanceResult object.
|
|
132
134
|
*/
|
|
133
|
-
export function
|
|
134
|
-
return NitroArkHybridObject.
|
|
135
|
+
export function onchainBalance() {
|
|
136
|
+
return NitroArkHybridObject.onchainBalance();
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
/**
|
|
138
|
-
*
|
|
139
|
-
* @
|
|
140
|
-
* @returns A promise resolving to the JSON string of VTXOs.
|
|
140
|
+
* Synchronizes the onchain state of the wallet.
|
|
141
|
+
* @returns A promise that resolves on success.
|
|
141
142
|
*/
|
|
142
|
-
export function
|
|
143
|
-
return NitroArkHybridObject.
|
|
143
|
+
export function onchainSync() {
|
|
144
|
+
return NitroArkHybridObject.onchainSync();
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Gets the list of unspent onchain outputs as a JSON string for the loaded wallet.
|
|
149
|
+
* @returns A promise resolving to the JSON string of unspent outputs.
|
|
150
|
+
*/
|
|
151
|
+
export function onchainListUnspent() {
|
|
152
|
+
return NitroArkHybridObject.onchainListUnspent();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Gets the list of onchain UTXOs as a JSON string for the loaded wallet.
|
|
157
|
+
* @returns A promise resolving to the JSON string of UTXOs.
|
|
158
|
+
*/
|
|
159
|
+
export function onchainUtxos() {
|
|
160
|
+
return NitroArkHybridObject.onchainUtxos();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Gets a fresh onchain address for the loaded wallet.
|
|
165
|
+
* @returns A promise resolving to the Bitcoin address string.
|
|
166
|
+
*/
|
|
167
|
+
export function onchainAddress() {
|
|
168
|
+
return NitroArkHybridObject.onchainAddress();
|
|
169
|
+
}
|
|
147
170
|
|
|
148
171
|
/**
|
|
149
172
|
* Sends funds using the onchain wallet.
|
|
150
173
|
* @param destination The destination Bitcoin address.
|
|
151
174
|
* @param amountSat The amount to send in satoshis.
|
|
152
|
-
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
153
175
|
* @returns A promise resolving to the OnchainPaymentResult object
|
|
154
176
|
*/
|
|
155
|
-
export function
|
|
156
|
-
return NitroArkHybridObject.
|
|
177
|
+
export function onchainSend(destination, amountSat) {
|
|
178
|
+
return NitroArkHybridObject.onchainSend(destination, amountSat);
|
|
157
179
|
}
|
|
158
180
|
|
|
159
181
|
/**
|
|
160
182
|
* Sends all funds from the onchain wallet to a destination address.
|
|
161
183
|
* @param destination The destination Bitcoin address.
|
|
162
|
-
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
163
184
|
* @returns A promise resolving to the transaction ID string.
|
|
164
185
|
*/
|
|
165
|
-
export function
|
|
166
|
-
return NitroArkHybridObject.
|
|
186
|
+
export function onchainDrain(destination) {
|
|
187
|
+
return NitroArkHybridObject.onchainDrain(destination);
|
|
167
188
|
}
|
|
168
189
|
|
|
169
190
|
/**
|
|
170
191
|
* Sends funds to multiple recipients using the onchain wallet.
|
|
171
192
|
* @param outputs An array of objects containing destination address and amountSat.
|
|
172
|
-
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
173
193
|
* @returns A promise resolving to the transaction ID string.
|
|
174
194
|
*/
|
|
175
|
-
export function
|
|
176
|
-
return NitroArkHybridObject.
|
|
195
|
+
export function onchainSendMany(outputs) {
|
|
196
|
+
return NitroArkHybridObject.onchainSendMany(outputs);
|
|
177
197
|
}
|
|
178
198
|
|
|
179
199
|
// --- Lightning Operations ---
|
|
@@ -188,12 +208,33 @@ export function bolt11Invoice(amountMsat) {
|
|
|
188
208
|
}
|
|
189
209
|
|
|
190
210
|
/**
|
|
191
|
-
* Claims a
|
|
192
|
-
* @param bolt11 The
|
|
211
|
+
* Claims a Lightning payment.
|
|
212
|
+
* @param bolt11 The Lightning invoice string to claim.
|
|
193
213
|
* @returns A promise that resolves on success or rejects on error.
|
|
194
214
|
*/
|
|
195
|
-
export function
|
|
196
|
-
return NitroArkHybridObject.
|
|
215
|
+
export function finishLightningReceive(bolt11) {
|
|
216
|
+
return NitroArkHybridObject.finishLightningReceive(bolt11);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Sends a Lightning payment.
|
|
221
|
+
* @param destination The Lightning invoice.
|
|
222
|
+
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
223
|
+
* @returns A promise resolving to a LightningPaymentResult object
|
|
224
|
+
*/
|
|
225
|
+
export function sendLightningPayment(destination, amountSat) {
|
|
226
|
+
return NitroArkHybridObject.sendLightningPayment(destination, amountSat);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Sends a payment to a Lightning Address.
|
|
231
|
+
* @param addr The Lightning Address.
|
|
232
|
+
* @param amountSat The amount in satoshis to send.
|
|
233
|
+
* @param comment An optional comment.
|
|
234
|
+
* @returns A promise resolving to a LnurlPaymentResult object
|
|
235
|
+
*/
|
|
236
|
+
export function sendLnaddr(addr, amountSat, comment) {
|
|
237
|
+
return NitroArkHybridObject.sendLnaddr(addr, amountSat, comment);
|
|
197
238
|
}
|
|
198
239
|
|
|
199
240
|
// --- Ark Operations ---
|
|
@@ -225,36 +266,14 @@ export function sendArkoorPayment(destination, amountSat) {
|
|
|
225
266
|
return NitroArkHybridObject.sendArkoorPayment(destination, amountSat);
|
|
226
267
|
}
|
|
227
268
|
|
|
228
|
-
/**
|
|
229
|
-
* Sends a Bolt11 payment.
|
|
230
|
-
* @param destination The Bolt11 invoice.
|
|
231
|
-
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
232
|
-
* @returns A promise resolving to a Bolt11PaymentResult object
|
|
233
|
-
*/
|
|
234
|
-
export function sendBolt11Payment(destination, amountSat) {
|
|
235
|
-
return NitroArkHybridObject.sendBolt11Payment(destination, amountSat);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Sends a payment to a Lightning Address.
|
|
240
|
-
* @param addr The Lightning Address.
|
|
241
|
-
* @param amountSat The amount in satoshis to send.
|
|
242
|
-
* @param comment An optional comment.
|
|
243
|
-
* @returns A promise resolving to a LnurlPaymentResult object
|
|
244
|
-
*/
|
|
245
|
-
export function sendLnaddr(addr, amountSat, comment) {
|
|
246
|
-
return NitroArkHybridObject.sendLnaddr(addr, amountSat, comment);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
269
|
/**
|
|
250
270
|
* Sends an onchain payment via an Ark round.
|
|
251
271
|
* @param destination The destination Bitcoin address.
|
|
252
272
|
* @param amountSat The amount in satoshis to send.
|
|
253
|
-
* @param no_sync If true, skips synchronization with the wallet. Defaults to false.
|
|
254
273
|
* @returns A promise resolving to a JSON status string.
|
|
255
274
|
*/
|
|
256
|
-
export function
|
|
257
|
-
return NitroArkHybridObject.
|
|
275
|
+
export function sendRoundOnchainPayment(destination, amountSat) {
|
|
276
|
+
return NitroArkHybridObject.sendRoundOnchainPayment(destination, amountSat);
|
|
258
277
|
}
|
|
259
278
|
|
|
260
279
|
// --- Offboarding / Exiting ---
|
|
@@ -280,30 +299,5 @@ export function offboardAll(destinationAddress) {
|
|
|
280
299
|
return NitroArkHybridObject.offboardAll(destinationAddress);
|
|
281
300
|
}
|
|
282
301
|
|
|
283
|
-
/**
|
|
284
|
-
* Starts the exit process for specific VTXOs.
|
|
285
|
-
* @param vtxoIds Array of VtxoId strings to start exiting.
|
|
286
|
-
* @returns A promise resolving to a JSON status string.
|
|
287
|
-
*/
|
|
288
|
-
export function startExitForVtxos(vtxoIds) {
|
|
289
|
-
return NitroArkHybridObject.exitStartSpecific(vtxoIds);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Starts the exit process for all VTXOs in the wallet.
|
|
294
|
-
* @returns A promise resolving to a JSON status string.
|
|
295
|
-
*/
|
|
296
|
-
export function startExitForEntireWallet() {
|
|
297
|
-
return NitroArkHybridObject.exitStartAll();
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Progresses the exit process once and returns the current status.
|
|
302
|
-
* @returns A promise resolving to a JSON status string.
|
|
303
|
-
*/
|
|
304
|
-
export function exitProgressOnce() {
|
|
305
|
-
return NitroArkHybridObject.exitProgressOnce();
|
|
306
|
-
}
|
|
307
|
-
|
|
308
302
|
// --- Re-export types and enums ---
|
|
309
303
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NitroModules","NitroArkHybridObject","createHybridObject","createMnemonic","loadWallet","datadir","opts","closeWallet","isWalletLoaded","persistConfig","maintenance","sync","
|
|
1
|
+
{"version":3,"names":["NitroModules","NitroArkHybridObject","createHybridObject","createMnemonic","loadWallet","datadir","opts","closeWallet","isWalletLoaded","persistConfig","maintenance","sync","syncExits","syncRounds","getArkInfo","offchainBalance","deriveStoreNextKeypair","peakKeyPair","index","getVtxos","onchainBalance","onchainSync","onchainListUnspent","onchainUtxos","onchainAddress","onchainSend","destination","amountSat","onchainDrain","onchainSendMany","outputs","bolt11Invoice","amountMsat","finishLightningReceive","bolt11","sendLightningPayment","sendLnaddr","addr","comment","boardAmount","boardAll","sendArkoorPayment","sendRoundOnchainPayment","offboardSpecific","vtxoIds","destinationAddress","offboardAll"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAgBzD;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,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SAASe,uBAAuBA,CACrChB,WAAmB,EACnBC,SAAiB,EACA;EACjB,OAAO1B,oBAAoB,CAACyC,uBAAuB,CAAChB,WAAW,EAAEC,SAAS,CAAC;AAC7E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASgB,gBAAgBA,CAC9BC,OAAiB,EACjBC,kBAA0B,EACT;EACjB,OAAO5C,oBAAoB,CAAC0C,gBAAgB,CAACC,OAAO,EAAEC,kBAAkB,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACD,kBAA0B,EAAmB;EACvE,OAAO5C,oBAAoB,CAAC6C,WAAW,CAACD,kBAAkB,CAAC;AAC7D;;AAEA","ignoreList":[]}
|
|
@@ -43,7 +43,7 @@ export interface ArkoorPaymentResult {
|
|
|
43
43
|
vtxos: BarkVtxo[];
|
|
44
44
|
payment_type: PaymentTypes;
|
|
45
45
|
}
|
|
46
|
-
export interface
|
|
46
|
+
export interface LightningPaymentResult {
|
|
47
47
|
bolt11_invoice: string;
|
|
48
48
|
preimage: string;
|
|
49
49
|
payment_type: PaymentTypes;
|
|
@@ -60,41 +60,52 @@ export interface OnchainPaymentResult {
|
|
|
60
60
|
destination_address: string;
|
|
61
61
|
payment_type: PaymentTypes;
|
|
62
62
|
}
|
|
63
|
+
export interface OffchainBalanceResult {
|
|
64
|
+
spendable: number;
|
|
65
|
+
pending_lightning_send: number;
|
|
66
|
+
pending_exit: number;
|
|
67
|
+
}
|
|
68
|
+
export interface OnchainBalanceResult {
|
|
69
|
+
immature: number;
|
|
70
|
+
trusted_pending: number;
|
|
71
|
+
untrusted_pending: number;
|
|
72
|
+
confirmed: number;
|
|
73
|
+
}
|
|
63
74
|
export interface NitroArk extends HybridObject<{
|
|
64
75
|
ios: 'c++';
|
|
65
76
|
android: 'c++';
|
|
66
77
|
}> {
|
|
67
78
|
createMnemonic(): Promise<string>;
|
|
68
79
|
loadWallet(datadir: string, opts: BarkCreateOpts): Promise<void>;
|
|
69
|
-
closeWallet(): Promise<void>;
|
|
70
80
|
isWalletLoaded(): Promise<boolean>;
|
|
81
|
+
closeWallet(): Promise<void>;
|
|
71
82
|
persistConfig(opts: BarkConfigOpts): Promise<void>;
|
|
72
83
|
maintenance(): Promise<void>;
|
|
73
84
|
sync(): Promise<void>;
|
|
74
|
-
|
|
85
|
+
syncExits(): Promise<void>;
|
|
75
86
|
syncRounds(): Promise<void>;
|
|
76
87
|
getArkInfo(): Promise<BarkArkInfo>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
offchainBalance(): Promise<OffchainBalanceResult>;
|
|
89
|
+
deriveStoreNextKeypair(): Promise<string>;
|
|
90
|
+
peakKeyPair(index: number): Promise<string>;
|
|
91
|
+
getVtxos(): Promise<BarkVtxo[]>;
|
|
92
|
+
onchainBalance(): Promise<OnchainBalanceResult>;
|
|
93
|
+
onchainSync(): Promise<void>;
|
|
94
|
+
onchainListUnspent(): Promise<string>;
|
|
95
|
+
onchainUtxos(): Promise<string>;
|
|
96
|
+
onchainAddress(): Promise<string>;
|
|
97
|
+
onchainSend(destination: string, amountSat: number, feeRate?: number): Promise<OnchainPaymentResult>;
|
|
98
|
+
onchainDrain(destination: string, feeRate?: number): Promise<string>;
|
|
99
|
+
onchainSendMany(outputs: BarkSendManyOutput[], feeRate?: number): Promise<string>;
|
|
86
100
|
boardAmount(amountSat: number): Promise<string>;
|
|
87
101
|
boardAll(): Promise<string>;
|
|
88
102
|
sendArkoorPayment(destination: string, amountSat: number): Promise<ArkoorPaymentResult>;
|
|
89
|
-
|
|
103
|
+
sendLightningPayment(destination: string, amountSat?: number): Promise<LightningPaymentResult>;
|
|
90
104
|
sendLnaddr(addr: string, amountSat: number, comment: string): Promise<LnurlPaymentResult>;
|
|
91
|
-
|
|
105
|
+
sendRoundOnchainPayment(destination: string, amountSat: number): Promise<string>;
|
|
92
106
|
bolt11Invoice(amountMsat: number): Promise<string>;
|
|
93
|
-
|
|
107
|
+
finishLightningReceive(bolt11: string): Promise<void>;
|
|
94
108
|
offboardSpecific(vtxoIds: string[], destinationAddress: string): Promise<string>;
|
|
95
109
|
offboardAll(destinationAddress: string): Promise<string>;
|
|
96
|
-
exitStartSpecific(vtxoIds: string[]): Promise<string>;
|
|
97
|
-
exitStartAll(): Promise<string>;
|
|
98
|
-
exitProgressOnce(): Promise<string>;
|
|
99
110
|
}
|
|
100
111
|
//# 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,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAA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M,CAAC,CAAC;IACnD,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,4 @@
|
|
|
1
|
-
import type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult,
|
|
1
|
+
import type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, LightningPaymentResult, LnurlPaymentResult, OnchainPaymentResult, BarkVtxo, OffchainBalanceResult, OnchainBalanceResult } from './NitroArk.nitro';
|
|
2
2
|
export declare const NitroArkHybridObject: NitroArk;
|
|
3
3
|
/**
|
|
4
4
|
* Creates a new BIP39 mnemonic phrase.
|
|
@@ -40,10 +40,10 @@ export declare function maintenance(): Promise<void>;
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function sync(): Promise<void>;
|
|
42
42
|
/**
|
|
43
|
-
* Synchronizes the Ark-specific
|
|
43
|
+
* Synchronizes the Ark-specific exits.
|
|
44
44
|
* @returns A promise that resolves on success.
|
|
45
45
|
*/
|
|
46
|
-
export declare function
|
|
46
|
+
export declare function syncExits(): Promise<void>;
|
|
47
47
|
/**
|
|
48
48
|
* Synchronizes the rounds of the wallet.
|
|
49
49
|
* @returns A promise that resolves on success.
|
|
@@ -54,61 +54,72 @@ export declare function syncRounds(): Promise<void>;
|
|
|
54
54
|
* @returns A promise resolving to the BarkArkInfo object.
|
|
55
55
|
*/
|
|
56
56
|
export declare function getArkInfo(): Promise<BarkArkInfo>;
|
|
57
|
-
/**
|
|
58
|
-
* Gets the onchain balance for the loaded wallet.
|
|
59
|
-
* @returns A promise resolving to the onchain balance in satoshis.
|
|
60
|
-
*/
|
|
61
|
-
export declare function onchainBalance(): Promise<number>;
|
|
62
57
|
/**
|
|
63
58
|
* Gets the offchain balance for the loaded wallet.
|
|
64
|
-
* @returns A promise resolving to the
|
|
65
|
-
*/
|
|
66
|
-
export declare function offchainBalance(): Promise<number>;
|
|
67
|
-
/**
|
|
68
|
-
* Gets a fresh onchain address for the loaded wallet.
|
|
69
|
-
* @returns A promise resolving to the Bitcoin address string.
|
|
59
|
+
* @returns A promise resolving to the OffchainBalanceResult object.
|
|
70
60
|
*/
|
|
71
|
-
export declare function
|
|
61
|
+
export declare function offchainBalance(): Promise<OffchainBalanceResult>;
|
|
72
62
|
/**
|
|
73
|
-
*
|
|
74
|
-
* @
|
|
75
|
-
* @returns A promise resolving to the JSON string of UTXOs.
|
|
63
|
+
* Derives the next keypair for the store.
|
|
64
|
+
* @returns A promise resolving to the hex-encoded public key string.
|
|
76
65
|
*/
|
|
77
|
-
export declare function
|
|
66
|
+
export declare function deriveStoreNextKeypair(): Promise<string>;
|
|
78
67
|
/**
|
|
79
68
|
* Gets the wallet's VTXO public key (hex string).
|
|
80
|
-
* @param index Index of the VTXO pubkey to retrieve.
|
|
69
|
+
* @param index Index of the VTXO pubkey to retrieve.
|
|
81
70
|
* @returns A promise resolving to the hex-encoded public key string.
|
|
82
71
|
*/
|
|
83
|
-
export declare function
|
|
72
|
+
export declare function peakKeyPair(index: number): Promise<string>;
|
|
84
73
|
/**
|
|
85
74
|
* Gets the list of VTXOs as a JSON string for the loaded wallet.
|
|
86
75
|
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
87
|
-
* @returns A promise resolving
|
|
76
|
+
* @returns A promise resolving BarkVtxo[] array.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getVtxos(): Promise<BarkVtxo[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Gets the onchain balance for the loaded wallet.
|
|
81
|
+
* @returns A promise resolving to the OnchainBalanceResult object.
|
|
88
82
|
*/
|
|
89
|
-
export declare function
|
|
83
|
+
export declare function onchainBalance(): Promise<OnchainBalanceResult>;
|
|
84
|
+
/**
|
|
85
|
+
* Synchronizes the onchain state of the wallet.
|
|
86
|
+
* @returns A promise that resolves on success.
|
|
87
|
+
*/
|
|
88
|
+
export declare function onchainSync(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Gets the list of unspent onchain outputs as a JSON string for the loaded wallet.
|
|
91
|
+
* @returns A promise resolving to the JSON string of unspent outputs.
|
|
92
|
+
*/
|
|
93
|
+
export declare function onchainListUnspent(): Promise<string>;
|
|
94
|
+
/**
|
|
95
|
+
* Gets the list of onchain UTXOs as a JSON string for the loaded wallet.
|
|
96
|
+
* @returns A promise resolving to the JSON string of UTXOs.
|
|
97
|
+
*/
|
|
98
|
+
export declare function onchainUtxos(): Promise<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Gets a fresh onchain address for the loaded wallet.
|
|
101
|
+
* @returns A promise resolving to the Bitcoin address string.
|
|
102
|
+
*/
|
|
103
|
+
export declare function onchainAddress(): Promise<string>;
|
|
90
104
|
/**
|
|
91
105
|
* Sends funds using the onchain wallet.
|
|
92
106
|
* @param destination The destination Bitcoin address.
|
|
93
107
|
* @param amountSat The amount to send in satoshis.
|
|
94
|
-
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
95
108
|
* @returns A promise resolving to the OnchainPaymentResult object
|
|
96
109
|
*/
|
|
97
|
-
export declare function
|
|
110
|
+
export declare function onchainSend(destination: string, amountSat: number): Promise<OnchainPaymentResult>;
|
|
98
111
|
/**
|
|
99
112
|
* Sends all funds from the onchain wallet to a destination address.
|
|
100
113
|
* @param destination The destination Bitcoin address.
|
|
101
|
-
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
102
114
|
* @returns A promise resolving to the transaction ID string.
|
|
103
115
|
*/
|
|
104
|
-
export declare function
|
|
116
|
+
export declare function onchainDrain(destination: string): Promise<string>;
|
|
105
117
|
/**
|
|
106
118
|
* Sends funds to multiple recipients using the onchain wallet.
|
|
107
119
|
* @param outputs An array of objects containing destination address and amountSat.
|
|
108
|
-
* @param no_sync If true, skips synchronization with the blockchain. Defaults to false.
|
|
109
120
|
* @returns A promise resolving to the transaction ID string.
|
|
110
121
|
*/
|
|
111
|
-
export declare function
|
|
122
|
+
export declare function onchainSendMany(outputs: BarkSendManyOutput[]): Promise<string>;
|
|
112
123
|
/**
|
|
113
124
|
* Creates a Bolt 11 invoice.
|
|
114
125
|
* @param amountMsat The amount in millisatoshis for the invoice.
|
|
@@ -116,11 +127,26 @@ export declare function sendManyOnchain(outputs: BarkSendManyOutput[], no_sync?:
|
|
|
116
127
|
*/
|
|
117
128
|
export declare function bolt11Invoice(amountMsat: number): Promise<string>;
|
|
118
129
|
/**
|
|
119
|
-
* Claims a
|
|
120
|
-
* @param bolt11 The
|
|
130
|
+
* Claims a Lightning payment.
|
|
131
|
+
* @param bolt11 The Lightning invoice string to claim.
|
|
121
132
|
* @returns A promise that resolves on success or rejects on error.
|
|
122
133
|
*/
|
|
123
|
-
export declare function
|
|
134
|
+
export declare function finishLightningReceive(bolt11: string): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Sends a Lightning payment.
|
|
137
|
+
* @param destination The Lightning invoice.
|
|
138
|
+
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
139
|
+
* @returns A promise resolving to a LightningPaymentResult object
|
|
140
|
+
*/
|
|
141
|
+
export declare function sendLightningPayment(destination: string, amountSat?: number): Promise<LightningPaymentResult>;
|
|
142
|
+
/**
|
|
143
|
+
* Sends a payment to a Lightning Address.
|
|
144
|
+
* @param addr The Lightning Address.
|
|
145
|
+
* @param amountSat The amount in satoshis to send.
|
|
146
|
+
* @param comment An optional comment.
|
|
147
|
+
* @returns A promise resolving to a LnurlPaymentResult object
|
|
148
|
+
*/
|
|
149
|
+
export declare function sendLnaddr(addr: string, amountSat: number, comment: string): Promise<LnurlPaymentResult>;
|
|
124
150
|
/**
|
|
125
151
|
* Boards a specific amount from the onchain wallet into Ark.
|
|
126
152
|
* @param amountSat The amount in satoshis to board.
|
|
@@ -139,29 +165,13 @@ export declare function boardAll(): Promise<string>;
|
|
|
139
165
|
* @returns A promise resolving to the ArkoorPaymentResult object
|
|
140
166
|
*/
|
|
141
167
|
export declare function sendArkoorPayment(destination: string, amountSat: number): Promise<ArkoorPaymentResult>;
|
|
142
|
-
/**
|
|
143
|
-
* Sends a Bolt11 payment.
|
|
144
|
-
* @param destination The Bolt11 invoice.
|
|
145
|
-
* @param amountSat The amount in satoshis to send. Use 0 for invoice amount.
|
|
146
|
-
* @returns A promise resolving to a Bolt11PaymentResult object
|
|
147
|
-
*/
|
|
148
|
-
export declare function sendBolt11Payment(destination: string, amountSat?: number): Promise<Bolt11PaymentResult>;
|
|
149
|
-
/**
|
|
150
|
-
* Sends a payment to a Lightning Address.
|
|
151
|
-
* @param addr The Lightning Address.
|
|
152
|
-
* @param amountSat The amount in satoshis to send.
|
|
153
|
-
* @param comment An optional comment.
|
|
154
|
-
* @returns A promise resolving to a LnurlPaymentResult object
|
|
155
|
-
*/
|
|
156
|
-
export declare function sendLnaddr(addr: string, amountSat: number, comment: string): Promise<LnurlPaymentResult>;
|
|
157
168
|
/**
|
|
158
169
|
* Sends an onchain payment via an Ark round.
|
|
159
170
|
* @param destination The destination Bitcoin address.
|
|
160
171
|
* @param amountSat The amount in satoshis to send.
|
|
161
|
-
* @param no_sync If true, skips synchronization with the wallet. Defaults to false.
|
|
162
172
|
* @returns A promise resolving to a JSON status string.
|
|
163
173
|
*/
|
|
164
|
-
export declare function
|
|
174
|
+
export declare function sendRoundOnchainPayment(destination: string, amountSat: number): Promise<string>;
|
|
165
175
|
/**
|
|
166
176
|
* Offboards specific VTXOs to a destination address.
|
|
167
177
|
* @param vtxoIds Array of VtxoId strings to offboard.
|
|
@@ -177,21 +187,5 @@ export declare function offboardSpecific(vtxoIds: string[], destinationAddress:
|
|
|
177
187
|
* @returns A promise resolving to a JSON result string.
|
|
178
188
|
*/
|
|
179
189
|
export declare function offboardAll(destinationAddress: string): Promise<string>;
|
|
180
|
-
|
|
181
|
-
* Starts the exit process for specific VTXOs.
|
|
182
|
-
* @param vtxoIds Array of VtxoId strings to start exiting.
|
|
183
|
-
* @returns A promise resolving to a JSON status string.
|
|
184
|
-
*/
|
|
185
|
-
export declare function startExitForVtxos(vtxoIds: string[]): Promise<string>;
|
|
186
|
-
/**
|
|
187
|
-
* Starts the exit process for all VTXOs in the wallet.
|
|
188
|
-
* @returns A promise resolving to a JSON status string.
|
|
189
|
-
*/
|
|
190
|
-
export declare function startExitForEntireWallet(): Promise<string>;
|
|
191
|
-
/**
|
|
192
|
-
* Progresses the exit process once and returns the current status.
|
|
193
|
-
* @returns A promise resolving to a JSON status string.
|
|
194
|
-
*/
|
|
195
|
-
export declare function exitProgressOnce(): Promise<string>;
|
|
196
|
-
export type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, Bolt11PaymentResult, LnurlPaymentResult, OnchainPaymentResult, PaymentTypes, } from './NitroArk.nitro';
|
|
190
|
+
export type { NitroArk, BarkCreateOpts, BarkConfigOpts, BarkArkInfo, BarkSendManyOutput, ArkoorPaymentResult, LightningPaymentResult, LnurlPaymentResult, OnchainPaymentResult, PaymentTypes, OffchainBalanceResult, OnchainBalanceResult } from './NitroArk.nitro';
|
|
197
191
|
//# 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,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,cAAc,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CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAE9B;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,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,EACrB,MAAM,kBAAkB,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
// Common C++ types used in Swift
|
|
20
20
|
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
21
|
-
#include <NitroModules/
|
|
21
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
22
22
|
#include <NitroModules/RuntimeError.hpp>
|
|
23
23
|
#include <NitroModules/DateToChronoDate.hpp>
|
|
24
24
|
|