@secondts/bark-react-native 0.2.0-beta.2 → 0.3.0
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/README.md +2 -2
- package/cpp/generated/bark.cpp +1885 -1182
- package/cpp/generated/bark.hpp +63 -0
- package/lib/commonjs/WalletNotifications.js +82 -0
- package/lib/commonjs/WalletNotifications.js.map +1 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +1540 -442
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/commonjs/index.js +13 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/WalletNotifications.js +77 -0
- package/lib/module/WalletNotifications.js.map +1 -0
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +1539 -442
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/WalletNotifications.d.ts +41 -0
- package/lib/typescript/commonjs/src/WalletNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +147 -84
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +822 -185
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/WalletNotifications.d.ts +41 -0
- package/lib/typescript/module/src/WalletNotifications.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +147 -84
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +822 -185
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/WalletNotifications.ts +86 -0
- package/src/generated/bark-ffi.ts +305 -253
- package/src/generated/bark.ts +3946 -1581
- package/src/index.tsx +3 -0
package/cpp/generated/bark.hpp
CHANGED
|
@@ -21,6 +21,10 @@ class NativeBark : public jsi::HostObject {
|
|
|
21
21
|
jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
22
22
|
jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
23
23
|
jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
24
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_clone_notificationholder(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
25
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_free_notificationholder(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
26
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_notificationholder_cancel_next_notification_wait(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
27
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_notificationholder_next_notification(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
24
28
|
jsi::Value cpp_uniffi_bark_ffi_fn_clone_onchainwallet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
25
29
|
jsi::Value cpp_uniffi_bark_ffi_fn_free_onchainwallet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
26
30
|
jsi::Value cpp_uniffi_bark_ffi_fn_constructor_onchainwallet_custom(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -52,6 +56,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
52
56
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_board_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
53
57
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_lightning_receive_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
54
58
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_lightning_send_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
59
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_all_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
55
60
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
56
61
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
57
62
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -65,6 +70,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
65
70
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_get_vtxos_to_refresh(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
66
71
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_has_pending_exits(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
67
72
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_history(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
73
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_history_by_payment_method(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
68
74
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_import_vtxo(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
69
75
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_lightning_receive_status(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
70
76
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_list_claimable_exits(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -80,12 +86,14 @@ class NativeBark : public jsi::HostObject {
|
|
|
80
86
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_new_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
81
87
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_new_address_with_index(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
82
88
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_next_round_start_time(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
89
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_notifications(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
83
90
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_offboard_all(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
84
91
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_offboard_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
85
92
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
86
93
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
87
94
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
88
95
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_peak_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
96
|
+
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_peek_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
89
97
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_pending_board_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
90
98
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_pending_boards(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
91
99
|
jsi::Value cpp_uniffi_bark_ffi_fn_method_wallet_pending_exits_total_sats(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -118,10 +126,60 @@ class NativeBark : public jsi::HostObject {
|
|
|
118
126
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_generate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
119
127
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_validate_ark_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
120
128
|
jsi::Value cpp_uniffi_bark_ffi_fn_func_validate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
129
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_u8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
130
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_u8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
131
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_u8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
132
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_u8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
133
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_i8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
134
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_i8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
135
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_i8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
136
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_i8(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
137
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_u16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
138
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_u16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
139
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_u16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
140
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_u16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
141
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_i16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
142
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_i16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
143
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_i16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
144
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_i16(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
145
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_u32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
146
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_u32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
147
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_u32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
148
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_u32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
149
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_i32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
150
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_i32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
151
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_i32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
152
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_i32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
153
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_u64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
154
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_u64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
155
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_u64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
156
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_u64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
157
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_i64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
158
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_i64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
159
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_i64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
160
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_i64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
161
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_f32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
162
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_f32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
163
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_f32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
164
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_f32(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
165
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_f64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
166
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_f64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
167
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_f64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
168
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_f64(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
169
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_rust_buffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
170
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_rust_buffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
171
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_rust_buffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
172
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_rust_buffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
173
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_poll_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
174
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_cancel_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
175
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_free_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
176
|
+
jsi::Value cpp_ffi_bark_ffi_rust_future_complete_void(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
121
177
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_extract_tx_from_psbt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
122
178
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_generate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
123
179
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_validate_ark_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
124
180
|
jsi::Value cpp_uniffi_bark_ffi_checksum_func_validate_mnemonic(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
181
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_notificationholder_cancel_next_notification_wait(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
182
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_notificationholder_next_notification(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
125
183
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_onchainwallet_balance(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
126
184
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_onchainwallet_new_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
127
185
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_onchainwallet_send(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -143,6 +201,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
143
201
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
144
202
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
145
203
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
204
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_all_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
146
205
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
147
206
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
148
207
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -156,6 +215,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
156
215
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_get_vtxos_to_refresh(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
157
216
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_has_pending_exits(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
158
217
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_history(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
218
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_history_by_payment_method(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
159
219
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_import_vtxo(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
160
220
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
161
221
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -171,12 +231,14 @@ class NativeBark : public jsi::HostObject {
|
|
|
171
231
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_new_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
172
232
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_new_address_with_index(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
173
233
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_next_round_start_time(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
234
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_notifications(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
174
235
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_offboard_all(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
175
236
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
176
237
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
177
238
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
178
239
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
179
240
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_peak_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
241
|
+
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_peek_address(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
180
242
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_pending_board_vtxos(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
181
243
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_pending_boards(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
182
244
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_wallet_pending_exits_total_sats(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -220,6 +282,7 @@ class NativeBark : public jsi::HostObject {
|
|
|
220
282
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
221
283
|
jsi::Value cpp_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
222
284
|
jsi::Value cpp_ffi_bark_ffi_uniffi_contract_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
285
|
+
jsi::Value cpp_uniffi_internal_fn_method_notificationholder_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
223
286
|
jsi::Value cpp_uniffi_internal_fn_method_onchainwallet_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
224
287
|
jsi::Value cpp_uniffi_internal_fn_method_wallet_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
225
288
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WalletNotifications = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Wraps the pull-based {@link NotificationHolderInterface} into a subscribe/unsubscribe API.
|
|
9
|
+
*
|
|
10
|
+
* The internal polling loop starts when the first listener subscribes and stops when the
|
|
11
|
+
* last listener unsubscribes. Re-subscribing after all listeners have been removed creates
|
|
12
|
+
* a fresh {@link NotificationHolderInterface} and restarts the loop.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const notifications = new WalletNotifications(wallet);
|
|
17
|
+
*
|
|
18
|
+
* const unsubscribe = notifications.subscribe((event) => {
|
|
19
|
+
* switch (event.tag) {
|
|
20
|
+
* case WalletNotification_Tags.MovementCreated:
|
|
21
|
+
* console.log('movement created', event.inner.movement);
|
|
22
|
+
* break;
|
|
23
|
+
* case WalletNotification_Tags.MovementUpdated:
|
|
24
|
+
* console.log('movement updated', event.inner.movement);
|
|
25
|
+
* break;
|
|
26
|
+
* case WalletNotification_Tags.ChannelLagging:
|
|
27
|
+
* console.log('channel lagging');
|
|
28
|
+
* break;
|
|
29
|
+
* }
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* // later…
|
|
33
|
+
* unsubscribe();
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
class WalletNotifications {
|
|
37
|
+
holder = null;
|
|
38
|
+
listeners = new Set();
|
|
39
|
+
constructor(wallet) {
|
|
40
|
+
this.wallet = wallet;
|
|
41
|
+
}
|
|
42
|
+
subscribe(listener) {
|
|
43
|
+
this.listeners.add(listener);
|
|
44
|
+
if (this.listeners.size === 1) {
|
|
45
|
+
this.startLoop();
|
|
46
|
+
}
|
|
47
|
+
return () => {
|
|
48
|
+
this.listeners.delete(listener);
|
|
49
|
+
if (this.listeners.size === 0) {
|
|
50
|
+
this.holder?.cancelNextNotificationWait();
|
|
51
|
+
this.holder = null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
startLoop() {
|
|
56
|
+
const localHolder = this.wallet.notifications();
|
|
57
|
+
this.holder = localHolder;
|
|
58
|
+
(async () => {
|
|
59
|
+
try {
|
|
60
|
+
while (true) {
|
|
61
|
+
const event = await localHolder.nextNotification();
|
|
62
|
+
if (event == null) break;
|
|
63
|
+
for (const listener of this.listeners) {
|
|
64
|
+
try {
|
|
65
|
+
listener(event);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
console.error('Wallet notification listener failed', err);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {
|
|
72
|
+
console.error('Wallet notification loop failed', err);
|
|
73
|
+
} finally {
|
|
74
|
+
if (this.holder === localHolder) {
|
|
75
|
+
this.holder = null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.WalletNotifications = WalletNotifications;
|
|
82
|
+
//# sourceMappingURL=WalletNotifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WalletNotifications","holder","listeners","Set","constructor","wallet","subscribe","listener","add","size","startLoop","delete","cancelNextNotificationWait","localHolder","notifications","event","nextNotification","err","console","error","exports"],"sourceRoot":"../../src","sources":["WalletNotifications.ts"],"mappings":";;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,CAAC;EACvBC,MAAM,GAAuC,IAAI;EACxCC,SAAS,GAAG,IAAIC,GAAG,CAAsC,CAAC;EAE3EC,WAAWA,CAAkBC,MAAuB,EAAE;IAAA,KAAzBA,MAAuB,GAAvBA,MAAuB;EAAG;EAEvDC,SAASA,CAACC,QAA6C,EAAe;IACpE,IAAI,CAACL,SAAS,CAACM,GAAG,CAACD,QAAQ,CAAC;IAE5B,IAAI,IAAI,CAACL,SAAS,CAACO,IAAI,KAAK,CAAC,EAAE;MAC7B,IAAI,CAACC,SAAS,CAAC,CAAC;IAClB;IAEA,OAAO,MAAM;MACX,IAAI,CAACR,SAAS,CAACS,MAAM,CAACJ,QAAQ,CAAC;MAC/B,IAAI,IAAI,CAACL,SAAS,CAACO,IAAI,KAAK,CAAC,EAAE;QAC7B,IAAI,CAACR,MAAM,EAAEW,0BAA0B,CAAC,CAAC;QACzC,IAAI,CAACX,MAAM,GAAG,IAAI;MACpB;IACF,CAAC;EACH;EAEQS,SAASA,CAAA,EAAS;IACxB,MAAMG,WAAW,GAAG,IAAI,CAACR,MAAM,CAACS,aAAa,CAAC,CAAC;IAC/C,IAAI,CAACb,MAAM,GAAGY,WAAW;IAEzB,CAAC,YAAY;MACX,IAAI;QACF,OAAO,IAAI,EAAE;UACX,MAAME,KAAK,GAAG,MAAMF,WAAW,CAACG,gBAAgB,CAAC,CAAC;UAClD,IAAID,KAAK,IAAI,IAAI,EAAE;UACnB,KAAK,MAAMR,QAAQ,IAAI,IAAI,CAACL,SAAS,EAAE;YACrC,IAAI;cACFK,QAAQ,CAACQ,KAAK,CAAC;YACjB,CAAC,CAAC,OAAOE,GAAG,EAAE;cACZC,OAAO,CAACC,KAAK,CAAC,qCAAqC,EAAEF,GAAG,CAAC;YAC3D;UACF;QACF;MACF,CAAC,CAAC,OAAOA,GAAG,EAAE;QACZC,OAAO,CAACC,KAAK,CAAC,iCAAiC,EAAEF,GAAG,CAAC;MACvD,CAAC,SAAS;QACR,IAAI,IAAI,CAAChB,MAAM,KAAKY,WAAW,EAAE;UAC/B,IAAI,CAACZ,MAAM,GAAG,IAAI;QACpB;MACF;IACF,CAAC,EAAE,CAAC;EACN;AACF;AAACmB,OAAA,CAAApB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeBark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeBark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;AACA;;AAqoBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAClBL,MAAM,EAErB;AA8JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|