saito-wasm 0.2.160 → 0.2.162

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.
@@ -1,30 +1,38 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @param {string} config_json
5
- * @param {string} private_key
6
- * @param {number} log_level_num
7
- * @param {bigint} hasten_multiplier
8
- * @param {boolean} delete_old_blocks
4
+ * @param {string} public_key
5
+ * @returns {Promise<Array<any>>}
6
+ */
7
+ export function get_account_slips(public_key: string): Promise<Array<any>>;
8
+ /**
9
+ * @param {bigint} peer_index
10
+ * @returns {Promise<WasmPeer | undefined>}
11
+ */
12
+ export function get_peer(peer_index: bigint): Promise<WasmPeer | undefined>;
13
+ /**
9
14
  * @returns {Promise<any>}
10
15
  */
11
- export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
16
+ export function get_confirmations(): Promise<any>;
12
17
  /**
13
- * @param {string} public_key
14
- * @param {bigint} amount
15
- * @param {bigint} fee
16
- * @param {boolean} force_merge
17
- * @returns {Promise<WasmTransaction>}
18
+ * @param {Uint8Array} buffer
19
+ * @param {number} msg_index
20
+ * @param {bigint} peer_index
21
+ * @returns {Promise<void>}
18
22
  */
19
- export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
23
+ export function send_api_error(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
20
24
  /**
21
- * @param {Array<any>} public_keys
22
- * @param {BigUint64Array} amounts
23
- * @param {bigint} fee
24
- * @param {boolean} _force_merge
25
- * @returns {Promise<WasmTransaction>}
25
+ * @param {number} major
26
+ * @param {number} minor
27
+ * @param {number} patch
28
+ * @returns {Promise<void>}
26
29
  */
27
- export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, _force_merge: boolean): Promise<WasmTransaction>;
30
+ export function set_wallet_version(major: number, minor: number, patch: number): Promise<void>;
31
+ /**
32
+ * @param {string} block_hash
33
+ * @returns {Promise<WasmBlock>}
34
+ */
35
+ export function get_block(block_hash: string): Promise<WasmBlock>;
28
36
  /**
29
37
  * @param {bigint} num
30
38
  * @param {bigint} deposit
@@ -36,25 +44,31 @@ export function create_transaction_with_multiple_payments(public_keys: Array<any
36
44
  */
37
45
  export function create_bound_transaction(num: bigint, deposit: bigint, tx_msg: Uint8Array, fee: bigint, recipient_public_key: string, nft_type: string): Promise<WasmTransaction>;
38
46
  /**
39
- * @param {bigint} amt
40
- * @param {string} slip1_utxo_key
41
- * @param {string} slip2_utxo_key
42
- * @param {string} slip3_utxo_key
43
- * @param {string} recipient_public_key
44
- * @param {Uint8Array} tx_msg
45
- * @returns {Promise<WasmTransaction>}
47
+ * @param {string} config_json
48
+ * @param {string} private_key
49
+ * @param {number} log_level_num
50
+ * @param {bigint} hasten_multiplier
51
+ * @param {boolean} delete_old_blocks
52
+ * @returns {Promise<any>}
46
53
  */
47
- export function create_send_bound_transaction(amt: bigint, slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, recipient_public_key: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
54
+ export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
48
55
  /**
49
- * @param {string} slip1_utxo_key
50
- * @param {string} slip2_utxo_key
51
- * @param {string} slip3_utxo_key
52
- * @param {number} left_count
53
- * @param {number} right_count
54
- * @param {Uint8Array} tx_msg
55
- * @returns {Promise<WasmTransaction>}
56
+ * @param {Uint8Array} buffer
57
+ * @param {string} signature
58
+ * @param {string} public_key
59
+ * @returns {boolean}
56
60
  */
57
- export function create_split_bound_transaction(slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, left_count: number, right_count: number, tx_msg: Uint8Array): Promise<WasmTransaction>;
61
+ export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
62
+ /**
63
+ * @returns {Promise<string>}
64
+ */
65
+ export function get_stats(): Promise<string>;
66
+ /**
67
+ * @param {bigint} peer_index
68
+ * @param {string} public_key
69
+ * @returns {Promise<void>}
70
+ */
71
+ export function process_stun_peer(peer_index: bigint, public_key: string): Promise<void>;
58
72
  /**
59
73
  * @param {string} nft_id_hex
60
74
  * @param {Uint8Array} tx_msg
@@ -62,18 +76,14 @@ export function create_split_bound_transaction(slip1_utxo_key: string, slip2_utx
62
76
  */
63
77
  export function create_merge_bound_transaction(nft_id_hex: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
64
78
  /**
65
- * @returns {Promise<Array<any>>}
66
- */
67
- export function get_nft_list(): Promise<Array<any>>;
68
- /**
69
- * @returns {Promise<string>}
79
+ * @param {WasmTransaction} tx
80
+ * @returns {Promise<void>}
70
81
  */
71
- export function get_latest_block_hash(): Promise<string>;
82
+ export function propagate_transaction(tx: WasmTransaction): Promise<void>;
72
83
  /**
73
- * @param {string} block_hash
74
- * @returns {Promise<WasmBlock>}
84
+ * @returns {Promise<Array<any>>}
75
85
  */
76
- export function get_block(block_hash: string): Promise<WasmBlock>;
86
+ export function get_nft_list(): Promise<Array<any>>;
77
87
  /**
78
88
  * @param {bigint} peer_index
79
89
  * @param {string} ip
@@ -81,194 +91,184 @@ export function get_block(block_hash: string): Promise<WasmBlock>;
81
91
  */
82
92
  export function process_new_peer(peer_index: bigint, ip: string): Promise<void>;
83
93
  /**
84
- * @param {bigint} peer_index
85
- * @param {string} public_key
94
+ * @param {WasmBalanceSnapshot} snapshot
86
95
  * @returns {Promise<void>}
87
96
  */
88
- export function process_stun_peer(peer_index: bigint, public_key: string): Promise<void>;
97
+ export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
89
98
  /**
90
99
  * @param {bigint} peer_index
91
100
  * @returns {Promise<void>}
92
101
  */
93
102
  export function remove_stun_peer(peer_index: bigint): Promise<void>;
94
103
  /**
95
- * @returns {Promise<bigint>}
104
+ * @param {bigint} amt
105
+ * @param {string} slip1_utxo_key
106
+ * @param {string} slip2_utxo_key
107
+ * @param {string} slip3_utxo_key
108
+ * @param {string} recipient_public_key
109
+ * @param {Uint8Array} tx_msg
110
+ * @returns {Promise<WasmTransaction>}
96
111
  */
97
- export function get_next_peer_index(): Promise<bigint>;
112
+ export function create_send_bound_transaction(amt: bigint, slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, recipient_public_key: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
98
113
  /**
99
- * @param {bigint} peer_index
100
- * @returns {Promise<void>}
114
+ * @param {Uint8Array} buffer
115
+ * @param {string} private_key
116
+ * @returns {string}
101
117
  */
102
- export function process_peer_disconnection(peer_index: bigint): Promise<void>;
118
+ export function sign_buffer(buffer: Uint8Array, private_key: string): string;
103
119
  /**
104
- * @param {Uint8Array} buffer
105
- * @param {bigint} peer_index
120
+ * @param {bigint} duration_in_ms
106
121
  * @returns {Promise<void>}
107
122
  */
108
- export function process_msg_buffer_from_peer(buffer: Uint8Array, peer_index: bigint): Promise<void>;
123
+ export function process_timer_event(duration_in_ms: bigint): Promise<void>;
109
124
  /**
110
- * @param {Uint8Array} buffer
111
- * @param {Uint8Array} hash
112
- * @param {bigint} block_id
113
- * @param {bigint} peer_index
114
- * @returns {Promise<void>}
125
+ * @returns {Promise<string>}
115
126
  */
116
- export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
127
+ export function get_peer_stats(): Promise<string>;
117
128
  /**
118
- * @param {Uint8Array} hash
119
- * @param {bigint} block_id
120
- * @param {bigint} peer_index
121
- * @returns {Promise<void>}
129
+ * @returns {Promise<string>}
122
130
  */
123
- export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
131
+ export function get_congestion_stats(): Promise<string>;
124
132
  /**
125
- * @param {bigint} duration_in_ms
133
+ * @param {bigint} threshold
126
134
  * @returns {Promise<void>}
127
135
  */
128
- export function process_timer_event(duration_in_ms: bigint): Promise<void>;
136
+ export function write_issuance_file(threshold: bigint): Promise<void>;
129
137
  /**
130
- * @param {bigint} current_time
131
- * @returns {Promise<void>}
138
+ * @returns {Promise<bigint>}
132
139
  */
133
- export function process_stat_interval(current_time: bigint): Promise<void>;
140
+ export function get_next_peer_index(): Promise<bigint>;
134
141
  /**
135
- * @param {Uint8Array} buffer
136
- * @returns {string}
142
+ * @returns {Promise<string>}
137
143
  */
138
- export function hash(buffer: Uint8Array): string;
144
+ export function get_latest_block_hash(): Promise<string>;
139
145
  /**
140
146
  * @param {Uint8Array} buffer
141
- * @param {string} private_key
142
- * @returns {string}
147
+ * @param {number} msg_index
148
+ * @param {bigint} peer_index
149
+ * @returns {Promise<void>}
143
150
  */
144
- export function sign_buffer(buffer: Uint8Array, private_key: string): string;
151
+ export function send_api_success(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
145
152
  /**
146
- * @param {Uint8Array} buffer
147
- * @param {string} signature
148
- * @param {string} public_key
149
- * @returns {boolean}
153
+ * @returns {Promise<boolean>}
150
154
  */
151
- export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
155
+ export function produce_block_with_gt(): Promise<boolean>;
152
156
  /**
153
- * @returns {Promise<Array<any>>}
157
+ * @param {string} slip1_utxo_key
158
+ * @param {string} slip2_utxo_key
159
+ * @param {string} slip3_utxo_key
160
+ * @param {number} left_count
161
+ * @param {number} right_count
162
+ * @param {Uint8Array} tx_msg
163
+ * @returns {Promise<WasmTransaction>}
154
164
  */
155
- export function get_peers(): Promise<Array<any>>;
165
+ export function create_split_bound_transaction(slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, left_count: number, right_count: number, tx_msg: Uint8Array): Promise<WasmTransaction>;
156
166
  /**
157
167
  * @param {bigint} peer_index
158
- * @returns {Promise<WasmPeer | undefined>}
168
+ * @returns {Promise<void>}
159
169
  */
160
- export function get_peer(peer_index: bigint): Promise<WasmPeer | undefined>;
170
+ export function process_peer_disconnection(peer_index: bigint): Promise<void>;
161
171
  /**
162
172
  * @param {string} public_key
163
- * @returns {Promise<Array<any>>}
164
- */
165
- export function get_account_slips(public_key: string): Promise<Array<any>>;
166
- /**
167
- * @param {Array<any>} keys
168
- * @returns {Promise<WasmBalanceSnapshot>}
169
- */
170
- export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
171
- /**
172
- * @param {WasmBalanceSnapshot} snapshot
173
- * @returns {Promise<void>}
173
+ * @param {bigint} amount
174
+ * @param {bigint} fee
175
+ * @param {boolean} force_merge
176
+ * @returns {Promise<WasmTransaction>}
174
177
  */
175
- export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
178
+ export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
176
179
  /**
177
- * @returns {string}
180
+ * @returns {Promise<boolean>}
178
181
  */
179
- export function generate_private_key(): string;
182
+ export function produce_block_without_gt(): Promise<boolean>;
180
183
  /**
181
184
  * @param {string} private_key
182
185
  * @returns {string}
183
186
  */
184
187
  export function generate_public_key(private_key: string): string;
185
188
  /**
186
- * @param {WasmTransaction} tx
187
- * @returns {Promise<void>}
189
+ * @returns {Promise<WasmWallet>}
188
190
  */
189
- export function propagate_transaction(tx: WasmTransaction): Promise<void>;
191
+ export function get_wallet(): Promise<WasmWallet>;
190
192
  /**
191
- * @param {Uint8Array} buffer
192
- * @param {number} msg_index
193
- * @param {bigint} peer_index
194
- * @returns {Promise<void>}
193
+ * @returns {Promise<Array<any>>}
195
194
  */
196
- export function send_api_call(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
195
+ export function get_mempool_txs(): Promise<Array<any>>;
197
196
  /**
198
- * @param {Uint8Array} buffer
199
- * @param {number} msg_index
200
- * @param {bigint} peer_index
201
197
  * @returns {Promise<void>}
202
198
  */
203
- export function send_api_success(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
199
+ export function start_from_received_ghost_chain(): Promise<void>;
204
200
  /**
205
- * @param {Uint8Array} buffer
206
- * @param {number} msg_index
207
- * @param {bigint} peer_index
201
+ * @param {bigint} current_time
208
202
  * @returns {Promise<void>}
209
203
  */
210
- export function send_api_error(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
204
+ export function process_stat_interval(current_time: bigint): Promise<void>;
211
205
  /**
212
- * @returns {Promise<WasmWallet>}
206
+ * @returns {string}
213
207
  */
214
- export function get_wallet(): Promise<WasmWallet>;
208
+ export function generate_private_key(): string;
215
209
  /**
216
- * @returns {Promise<WasmBlockchain>}
210
+ * @param {Uint8Array} buffer
211
+ * @param {Uint8Array} hash
212
+ * @param {bigint} block_id
213
+ * @param {bigint} peer_index
214
+ * @returns {Promise<void>}
217
215
  */
218
- export function get_blockchain(): Promise<WasmBlockchain>;
216
+ export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
219
217
  /**
220
218
  * @returns {Promise<Array<any>>}
221
219
  */
222
- export function get_mempool_txs(): Promise<Array<any>>;
220
+ export function get_peers(): Promise<Array<any>>;
223
221
  /**
224
- * @param {number} major
225
- * @param {number} minor
226
- * @param {number} patch
222
+ * @param {Uint8Array} buffer
223
+ * @param {bigint} peer_index
227
224
  * @returns {Promise<void>}
228
225
  */
229
- export function set_wallet_version(major: number, minor: number, patch: number): Promise<void>;
226
+ export function process_msg_buffer_from_peer(buffer: Uint8Array, peer_index: bigint): Promise<void>;
230
227
  /**
231
228
  * @param {string} key
232
229
  * @returns {boolean}
233
230
  */
234
231
  export function is_valid_public_key(key: string): boolean;
235
232
  /**
236
- * @param {bigint} threshold
237
- * @returns {Promise<void>}
238
- */
239
- export function write_issuance_file(threshold: bigint): Promise<void>;
240
- /**
241
- * @returns {Promise<void>}
242
- */
243
- export function disable_producing_blocks_by_timer(): Promise<void>;
244
- /**
245
- * @returns {Promise<boolean>}
246
- */
247
- export function produce_block_with_gt(): Promise<boolean>;
248
- /**
249
- * @returns {Promise<boolean>}
233
+ * @param {Array<any>} public_keys
234
+ * @param {BigUint64Array} amounts
235
+ * @param {bigint} fee
236
+ * @param {boolean} _force_merge
237
+ * @returns {Promise<WasmTransaction>}
250
238
  */
251
- export function produce_block_without_gt(): Promise<boolean>;
239
+ export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, _force_merge: boolean): Promise<WasmTransaction>;
252
240
  /**
253
- * @returns {Promise<string>}
241
+ * @returns {Promise<WasmBlockchain>}
254
242
  */
255
- export function get_stats(): Promise<string>;
243
+ export function get_blockchain(): Promise<WasmBlockchain>;
256
244
  /**
257
- * @returns {Promise<string>}
245
+ * @returns {Promise<void>}
258
246
  */
259
- export function get_peer_stats(): Promise<string>;
247
+ export function disable_producing_blocks_by_timer(): Promise<void>;
260
248
  /**
261
- * @returns {Promise<string>}
249
+ * @param {Uint8Array} buffer
250
+ * @returns {string}
262
251
  */
263
- export function get_congestion_stats(): Promise<string>;
252
+ export function hash(buffer: Uint8Array): string;
264
253
  /**
265
- * @returns {Promise<any>}
254
+ * @param {Uint8Array} hash
255
+ * @param {bigint} block_id
256
+ * @param {bigint} peer_index
257
+ * @returns {Promise<void>}
266
258
  */
267
- export function get_confirmations(): Promise<any>;
259
+ export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
268
260
  /**
261
+ * @param {Uint8Array} buffer
262
+ * @param {number} msg_index
263
+ * @param {bigint} peer_index
269
264
  * @returns {Promise<void>}
270
265
  */
271
- export function start_from_received_ghost_chain(): Promise<void>;
266
+ export function send_api_call(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
267
+ /**
268
+ * @param {Array<any>} keys
269
+ * @returns {Promise<WasmBalanceSnapshot>}
270
+ */
271
+ export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
272
272
  /**
273
273
  */
274
274
  export class SaitoWasm {
@@ -279,18 +279,18 @@ export class SaitoWasm {
279
279
  export class WasmBalanceSnapshot {
280
280
  free(): void;
281
281
  /**
282
- * @returns {string}
282
+ * @param {string} str
283
+ * @returns {WasmBalanceSnapshot}
283
284
  */
284
- get_file_name(): string;
285
+ static from_string(str: string): WasmBalanceSnapshot;
285
286
  /**
286
287
  * @returns {Array<any>}
287
288
  */
288
289
  get_entries(): Array<any>;
289
290
  /**
290
- * @param {string} str
291
- * @returns {WasmBalanceSnapshot}
291
+ * @returns {string}
292
292
  */
293
- static from_string(str: string): WasmBalanceSnapshot;
293
+ get_file_name(): string;
294
294
  /**
295
295
  * @returns {string}
296
296
  */
@@ -301,13 +301,6 @@ export class WasmBalanceSnapshot {
301
301
  export class WasmBlock {
302
302
  free(): void;
303
303
  /**
304
- */
305
- constructor();
306
- /**
307
- * @returns {Uint8Array}
308
- */
309
- serialize(): Uint8Array;
310
- /**
311
304
  * @param {Uint8Array} buffer
312
305
  * @returns {any}
313
306
  */
@@ -323,6 +316,13 @@ export class WasmBlock {
323
316
  */
324
317
  generate_lite_block(keylist: Array<any>): WasmBlock;
325
318
  /**
319
+ */
320
+ constructor();
321
+ /**
322
+ * @returns {Uint8Array}
323
+ */
324
+ serialize(): Uint8Array;
325
+ /**
326
326
  */
327
327
  readonly avg_fee_per_byte: bigint;
328
328
  /**
@@ -469,22 +469,38 @@ export class WasmBlock {
469
469
  export class WasmBlockchain {
470
470
  free(): void;
471
471
  /**
472
+ * @returns {Promise<string>}
473
+ */
474
+ get_fork_id(): Promise<string>;
475
+ /**
476
+ * @param {string} hash
472
477
  * @returns {Promise<void>}
473
478
  */
474
- reset(): Promise<void>;
479
+ set_fork_id(hash: string): Promise<void>;
480
+ /**
481
+ * @param {bigint} block_id
482
+ * @returns {Promise<Array<any>>}
483
+ */
484
+ get_hashes_at_id(block_id: bigint): Promise<Array<any>>;
475
485
  /**
476
486
  * @returns {Promise<bigint>}
477
487
  */
478
- get_last_block_id(): Promise<bigint>;
488
+ get_last_burnfee(): Promise<bigint>;
479
489
  /**
480
490
  * @returns {Promise<bigint>}
481
491
  */
482
- get_last_timestamp(): Promise<bigint>;
492
+ get_last_block_id(): Promise<bigint>;
483
493
  /**
484
- * @param {bigint} id
485
- * @returns {Promise<string>}
494
+ * @param {Function} reorg_cb
495
+ * @param {Function} add_block_cb
496
+ * @param {Function} confirm_cb
497
+ * @returns {Promise<void>}
486
498
  */
487
- get_longest_chain_hash_at(id: bigint): Promise<string>;
499
+ register_callback(reorg_cb: Function, add_block_cb: Function, confirm_cb: Function): Promise<void>;
500
+ /**
501
+ * @returns {Promise<bigint>}
502
+ */
503
+ get_last_timestamp(): Promise<bigint>;
488
504
  /**
489
505
  * @returns {Promise<string>}
490
506
  */
@@ -492,7 +508,7 @@ export class WasmBlockchain {
492
508
  /**
493
509
  * @returns {Promise<bigint>}
494
510
  */
495
- get_last_burnfee(): Promise<bigint>;
511
+ get_latest_block_id(): Promise<bigint>;
496
512
  /**
497
513
  * @returns {Promise<bigint>}
498
514
  */
@@ -504,28 +520,16 @@ export class WasmBlockchain {
504
520
  /**
505
521
  * @returns {Promise<bigint>}
506
522
  */
507
- get_lowest_acceptable_timestamp(): Promise<bigint>;
523
+ get_prune_after_blocks(): Promise<bigint>;
508
524
  /**
525
+ * @param {bigint} id
509
526
  * @returns {Promise<string>}
510
527
  */
511
- get_lowest_acceptable_block_hash(): Promise<string>;
512
- /**
513
- * @returns {Promise<bigint>}
514
- */
515
- get_lowest_acceptable_block_id(): Promise<bigint>;
528
+ get_longest_chain_hash_at(id: bigint): Promise<string>;
516
529
  /**
517
530
  * @returns {Promise<bigint>}
518
531
  */
519
- get_latest_block_id(): Promise<bigint>;
520
- /**
521
- * @returns {Promise<string>}
522
- */
523
- get_fork_id(): Promise<string>;
524
- /**
525
- * @param {string} hash
526
- * @returns {Promise<void>}
527
- */
528
- set_fork_id(hash: string): Promise<void>;
532
+ get_block_confirmation_limit(): Promise<bigint>;
529
533
  /**
530
534
  * @param {bigint} block_id
531
535
  * @returns {Promise<string>}
@@ -533,29 +537,25 @@ export class WasmBlockchain {
533
537
  get_longest_chain_hash_at_id(block_id: bigint): Promise<string>;
534
538
  /**
535
539
  * @param {bigint} block_id
536
- * @returns {Promise<Array<any>>}
537
- */
538
- get_hashes_at_id(block_id: bigint): Promise<Array<any>>;
539
- /**
540
- * @param {bigint} block_id
541
540
  * @returns {Promise<void>}
542
541
  */
543
542
  set_safe_to_prune_transaction(block_id: bigint): Promise<void>;
544
543
  /**
545
544
  * @returns {Promise<bigint>}
546
545
  */
547
- get_prune_after_blocks(): Promise<bigint>;
546
+ get_lowest_acceptable_block_id(): Promise<bigint>;
548
547
  /**
549
548
  * @returns {Promise<bigint>}
550
549
  */
551
- get_block_confirmation_limit(): Promise<bigint>;
550
+ get_lowest_acceptable_timestamp(): Promise<bigint>;
551
+ /**
552
+ * @returns {Promise<string>}
553
+ */
554
+ get_lowest_acceptable_block_hash(): Promise<string>;
552
555
  /**
553
- * @param {Function} reorg_cb
554
- * @param {Function} add_block_cb
555
- * @param {Function} confirm_cb
556
556
  * @returns {Promise<void>}
557
557
  */
558
- register_callback(reorg_cb: Function, add_block_cb: Function, confirm_cb: Function): Promise<void>;
558
+ reset(): Promise<void>;
559
559
  }
560
560
  /**
561
561
  */
@@ -658,15 +658,15 @@ export class WasmNFT {
658
658
  export class WasmPeer {
659
659
  free(): void;
660
660
  /**
661
- * @param {bigint} peer_index
662
- */
663
- constructor(peer_index: bigint);
664
- /**
665
661
  * @param {string} service
666
662
  * @returns {boolean}
667
663
  */
668
664
  has_service(service: string): boolean;
669
665
  /**
666
+ * @param {bigint} peer_index
667
+ */
668
+ constructor(peer_index: bigint);
669
+ /**
670
670
  */
671
671
  readonly key_list: Array<any>;
672
672
  /**
@@ -707,12 +707,12 @@ export class WasmPeerService {
707
707
  export class WasmPeerServiceList {
708
708
  free(): void;
709
709
  /**
710
- * @param {WasmPeerService} service
711
710
  */
712
- push(service: WasmPeerService): void;
711
+ constructor();
713
712
  /**
713
+ * @param {WasmPeerService} service
714
714
  */
715
- constructor();
715
+ push(service: WasmPeerService): void;
716
716
  }
717
717
  /**
718
718
  */
@@ -753,40 +753,40 @@ export class WasmStats {
753
753
  export class WasmTransaction {
754
754
  free(): void;
755
755
  /**
756
- */
757
- constructor();
758
- /**
759
756
  * @param {WasmSlip} slip
760
757
  */
761
758
  add_to_slip(slip: WasmSlip): void;
762
759
  /**
760
+ * @param {Uint8Array} buffer
761
+ * @returns {WasmTransaction}
762
+ */
763
+ static deserialize(buffer: Uint8Array): WasmTransaction;
764
+ /**
763
765
  * @param {WasmSlip} slip
764
766
  */
765
767
  add_from_slip(slip: WasmSlip): void;
766
768
  /**
767
- * @param {string} key
768
- * @returns {boolean}
769
769
  */
770
- is_from(key: string): boolean;
770
+ constructor();
771
+ /**
772
+ * @returns {Promise<void>}
773
+ */
774
+ sign(): Promise<void>;
771
775
  /**
772
776
  * @param {string} key
773
777
  * @returns {boolean}
774
778
  */
775
779
  is_to(key: string): boolean;
776
780
  /**
777
- * @returns {Promise<void>}
781
+ * @param {string} key
782
+ * @returns {boolean}
778
783
  */
779
- sign(): Promise<void>;
784
+ is_from(key: string): boolean;
780
785
  /**
781
786
  * @returns {Uint8Array}
782
787
  */
783
788
  serialize(): Uint8Array;
784
789
  /**
785
- * @param {Uint8Array} buffer
786
- * @returns {WasmTransaction}
787
- */
788
- static deserialize(buffer: Uint8Array): WasmTransaction;
789
- /**
790
790
  */
791
791
  data: Uint8Array;
792
792
  /**
@@ -819,18 +819,23 @@ export class WasmTransaction {
819
819
  export class WasmWallet {
820
820
  free(): void;
821
821
  /**
822
- * @returns {Promise<void>}
822
+ * @returns {Promise<bigint>}
823
823
  */
824
- save(): Promise<void>;
824
+ get_balance(): Promise<bigint>;
825
825
  /**
826
- * @param {boolean} keep_keys
826
+ * @returns {Promise<Array<any>>}
827
+ */
828
+ get_key_list(): Promise<Array<any>>;
829
+ /**
830
+ * @param {Array<any>} key_list
827
831
  * @returns {Promise<void>}
828
832
  */
829
- reset(keep_keys: boolean): Promise<void>;
833
+ set_key_list(key_list: Array<any>): Promise<void>;
830
834
  /**
835
+ * @param {WasmTransaction} tx
831
836
  * @returns {Promise<void>}
832
837
  */
833
- load(): Promise<void>;
838
+ add_to_pending(tx: WasmTransaction): Promise<void>;
834
839
  /**
835
840
  * @returns {Promise<string>}
836
841
  */
@@ -841,6 +846,10 @@ export class WasmWallet {
841
846
  */
842
847
  set_public_key(key: string): Promise<void>;
843
848
  /**
849
+ * @returns {Promise<Array<any>>}
850
+ */
851
+ get_pending_txs(): Promise<Array<any>>;
852
+ /**
844
853
  * @returns {Promise<string>}
845
854
  */
846
855
  get_private_key(): Promise<string>;
@@ -850,36 +859,18 @@ export class WasmWallet {
850
859
  */
851
860
  set_private_key(key: string): Promise<void>;
852
861
  /**
853
- * @returns {Promise<bigint>}
854
- */
855
- get_balance(): Promise<bigint>;
856
- /**
857
- * @returns {Promise<Array<any>>}
858
- */
859
- get_pending_txs(): Promise<Array<any>>;
860
- /**
861
- * @returns {Promise<Array<any>>}
862
- */
863
- get_slips(): Promise<Array<any>>;
864
- /**
865
- * @param {WasmWalletSlip} slip
866
862
  * @returns {Promise<void>}
867
863
  */
868
- add_slip(slip: WasmWalletSlip): Promise<void>;
864
+ load(): Promise<void>;
869
865
  /**
870
- * @param {WasmTransaction} tx
871
866
  * @returns {Promise<void>}
872
867
  */
873
- add_to_pending(tx: WasmTransaction): Promise<void>;
874
- /**
875
- * @returns {Promise<Array<any>>}
876
- */
877
- get_key_list(): Promise<Array<any>>;
868
+ save(): Promise<void>;
878
869
  /**
879
- * @param {Array<any>} key_list
870
+ * @param {boolean} keep_keys
880
871
  * @returns {Promise<void>}
881
872
  */
882
- set_key_list(key_list: Array<any>): Promise<void>;
873
+ reset(keep_keys: boolean): Promise<void>;
883
874
  /**
884
875
  * @param {string} slip1_hex
885
876
  * @param {string} slip2_hex
@@ -889,19 +880,20 @@ export class WasmWallet {
889
880
  * @returns {Promise<void>}
890
881
  */
891
882
  add_nft(slip1_hex: string, slip2_hex: string, slip3_hex: string, id_hex: string, sig_hex: string): Promise<void>;
892
- }
893
883
  /**
884
+ * @param {WasmWalletSlip} slip
885
+ * @returns {Promise<void>}
894
886
  */
895
- export class WasmWalletSlip {
896
- free(): void;
887
+ add_slip(slip: WasmWalletSlip): Promise<void>;
897
888
  /**
898
- * @returns {string}
889
+ * @returns {Promise<Array<any>>}
899
890
  */
900
- get_utxokey(): string;
891
+ get_slips(): Promise<Array<any>>;
892
+ }
901
893
  /**
902
- * @param {string} key
903
894
  */
904
- set_utxokey(key: string): void;
895
+ export class WasmWalletSlip {
896
+ free(): void;
905
897
  /**
906
898
  * @returns {bigint}
907
899
  */
@@ -911,6 +903,14 @@ export class WasmWalletSlip {
911
903
  */
912
904
  set_amount(amount: bigint): void;
913
905
  /**
906
+ * @returns {string}
907
+ */
908
+ get_utxokey(): string;
909
+ /**
910
+ * @param {string} key
911
+ */
912
+ set_utxokey(key: string): void;
913
+ /**
914
914
  * @returns {bigint}
915
915
  */
916
916
  get_block_id(): bigint;
@@ -919,29 +919,32 @@ export class WasmWalletSlip {
919
919
  */
920
920
  set_block_id(block_id: bigint): void;
921
921
  /**
922
- * @returns {bigint}
922
+ * @returns {number}
923
923
  */
924
- get_tx_ordinal(): bigint;
924
+ get_slip_type(): number;
925
925
  /**
926
- * @param {bigint} ordinal
926
+ * @param {number} slip_type
927
927
  */
928
- set_tx_ordinal(ordinal: bigint): void;
928
+ set_slip_type(slip_type: number): void;
929
929
  /**
930
930
  * @returns {number}
931
931
  */
932
932
  get_slip_index(): number;
933
933
  /**
934
+ * @returns {bigint}
935
+ */
936
+ get_tx_ordinal(): bigint;
937
+ /**
934
938
  * @param {number} index
935
939
  */
936
940
  set_slip_index(index: number): void;
937
941
  /**
938
- * @returns {boolean}
942
+ * @param {bigint} ordinal
939
943
  */
940
- is_spent(): boolean;
944
+ set_tx_ordinal(ordinal: bigint): void;
941
945
  /**
942
- * @param {boolean} spent
943
946
  */
944
- set_spent(spent: boolean): void;
947
+ constructor();
945
948
  /**
946
949
  * @returns {boolean}
947
950
  */
@@ -951,14 +954,11 @@ export class WasmWalletSlip {
951
954
  */
952
955
  set_lc(lc: boolean): void;
953
956
  /**
954
- * @returns {number}
955
- */
956
- get_slip_type(): number;
957
- /**
958
- * @param {number} slip_type
957
+ * @returns {boolean}
959
958
  */
960
- set_slip_type(slip_type: number): void;
959
+ is_spent(): boolean;
961
960
  /**
961
+ * @param {boolean} spent
962
962
  */
963
- constructor();
963
+ set_spent(spent: boolean): void;
964
964
  }