saito-wasm 0.2.161 → 0.2.163

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,40 +1,10 @@
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
9
- * @returns {Promise<any>}
10
- */
11
- export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
12
- /**
13
- * @param {string} public_key
14
- * @param {bigint} amount
15
- * @param {bigint} fee
16
- * @param {boolean} force_merge
17
- * @returns {Promise<WasmTransaction>}
18
- */
19
- export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
20
- /**
21
- * @param {Array<any>} public_keys
22
- * @param {BigUint64Array} amounts
23
- * @param {bigint} fee
24
- * @param {boolean} _force_merge
25
- * @returns {Promise<WasmTransaction>}
26
- */
27
- export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, _force_merge: boolean): Promise<WasmTransaction>;
28
- /**
29
- * @param {bigint} num
30
- * @param {bigint} deposit
31
- * @param {Uint8Array} tx_msg
32
- * @param {bigint} fee
33
- * @param {string} recipient_public_key
34
- * @param {string} nft_type
35
- * @returns {Promise<WasmTransaction>}
4
+ * @param {bigint} peer_index
5
+ * @returns {Promise<void>}
36
6
  */
37
- export function create_bound_transaction(num: bigint, deposit: bigint, tx_msg: Uint8Array, fee: bigint, recipient_public_key: string, nft_type: string): Promise<WasmTransaction>;
7
+ export function remove_stun_peer(peer_index: bigint): Promise<void>;
38
8
  /**
39
9
  * @param {bigint} amt
40
10
  * @param {string} slip1_utxo_key
@@ -46,147 +16,145 @@ export function create_bound_transaction(num: bigint, deposit: bigint, tx_msg: U
46
16
  */
47
17
  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>;
48
18
  /**
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>}
19
+ * @param {bigint} peer_index
20
+ * @param {string} ip
21
+ * @returns {Promise<void>}
56
22
  */
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>;
23
+ export function process_new_peer(peer_index: bigint, ip: string): Promise<void>;
58
24
  /**
59
- * @param {string} nft_id_hex
60
- * @param {Uint8Array} tx_msg
25
+ * @param {Array<any>} public_keys
26
+ * @param {BigUint64Array} amounts
27
+ * @param {bigint} fee
28
+ * @param {boolean} _force_merge
61
29
  * @returns {Promise<WasmTransaction>}
62
30
  */
63
- export function create_merge_bound_transaction(nft_id_hex: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
64
- /**
65
- * @returns {Promise<Array<any>>}
66
- */
67
- export function get_nft_list(): Promise<Array<any>>;
31
+ export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, _force_merge: boolean): Promise<WasmTransaction>;
68
32
  /**
69
- * @returns {Promise<string>}
33
+ * @param {string} config_json
34
+ * @param {string} private_key
35
+ * @param {number} log_level_num
36
+ * @param {bigint} hasten_multiplier
37
+ * @param {boolean} delete_old_blocks
38
+ * @returns {Promise<any>}
70
39
  */
71
- export function get_latest_block_hash(): Promise<string>;
40
+ export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
72
41
  /**
73
- * @param {string} block_hash
74
- * @returns {Promise<WasmBlock>}
42
+ * @returns {Promise<void>}
75
43
  */
76
- export function get_block(block_hash: string): Promise<WasmBlock>;
44
+ export function start_from_received_ghost_chain(): Promise<void>;
77
45
  /**
46
+ * @param {Uint8Array} hash
47
+ * @param {bigint} block_id
78
48
  * @param {bigint} peer_index
79
- * @param {string} ip
80
49
  * @returns {Promise<void>}
81
50
  */
82
- export function process_new_peer(peer_index: bigint, ip: string): Promise<void>;
51
+ export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
83
52
  /**
84
- * @param {bigint} peer_index
85
53
  * @param {string} public_key
86
- * @returns {Promise<void>}
54
+ * @param {bigint} amount
55
+ * @param {bigint} fee
56
+ * @param {boolean} force_merge
57
+ * @returns {Promise<WasmTransaction>}
87
58
  */
88
- export function process_stun_peer(peer_index: bigint, public_key: string): Promise<void>;
59
+ export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
89
60
  /**
61
+ * @param {Uint8Array} buffer
62
+ * @param {number} msg_index
90
63
  * @param {bigint} peer_index
91
64
  * @returns {Promise<void>}
92
65
  */
93
- export function remove_stun_peer(peer_index: bigint): Promise<void>;
94
- /**
95
- * @returns {Promise<bigint>}
96
- */
97
- export function get_next_peer_index(): Promise<bigint>;
66
+ export function send_api_success(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
98
67
  /**
99
- * @param {bigint} peer_index
68
+ * @param {bigint} threshold
100
69
  * @returns {Promise<void>}
101
70
  */
102
- export function process_peer_disconnection(peer_index: bigint): Promise<void>;
71
+ export function write_issuance_file(threshold: bigint): Promise<void>;
103
72
  /**
104
- * @param {Uint8Array} buffer
105
- * @param {bigint} peer_index
106
- * @returns {Promise<void>}
73
+ * @returns {Promise<Array<any>>}
107
74
  */
108
- export function process_msg_buffer_from_peer(buffer: Uint8Array, peer_index: bigint): Promise<void>;
75
+ export function get_peers(): Promise<Array<any>>;
109
76
  /**
110
- * @param {Uint8Array} buffer
111
- * @param {Uint8Array} hash
112
- * @param {bigint} block_id
113
- * @param {bigint} peer_index
114
- * @returns {Promise<void>}
77
+ * @param {bigint} num
78
+ * @param {bigint} deposit
79
+ * @param {Uint8Array} tx_msg
80
+ * @param {bigint} fee
81
+ * @param {string} recipient_public_key
82
+ * @param {string} nft_type
83
+ * @returns {Promise<WasmTransaction>}
115
84
  */
116
- export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
85
+ export function create_bound_transaction(num: bigint, deposit: bigint, tx_msg: Uint8Array, fee: bigint, recipient_public_key: string, nft_type: string): Promise<WasmTransaction>;
117
86
  /**
118
- * @param {Uint8Array} hash
119
- * @param {bigint} block_id
120
- * @param {bigint} peer_index
87
+ * @param {WasmBalanceSnapshot} snapshot
121
88
  * @returns {Promise<void>}
122
89
  */
123
- export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
90
+ export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
124
91
  /**
125
- * @param {bigint} duration_in_ms
92
+ * @param {bigint} peer_index
126
93
  * @returns {Promise<void>}
127
94
  */
128
- export function process_timer_event(duration_in_ms: bigint): Promise<void>;
95
+ export function process_peer_disconnection(peer_index: bigint): Promise<void>;
129
96
  /**
130
- * @param {bigint} current_time
131
- * @returns {Promise<void>}
97
+ * @returns {Promise<any>}
132
98
  */
133
- export function process_stat_interval(current_time: bigint): Promise<void>;
99
+ export function get_confirmations(): Promise<any>;
134
100
  /**
135
101
  * @param {Uint8Array} buffer
136
102
  * @returns {string}
137
103
  */
138
104
  export function hash(buffer: Uint8Array): string;
139
105
  /**
140
- * @param {Uint8Array} buffer
141
- * @param {string} private_key
142
- * @returns {string}
106
+ * @returns {Promise<bigint>}
143
107
  */
144
- export function sign_buffer(buffer: Uint8Array, private_key: string): string;
108
+ export function get_next_peer_index(): Promise<bigint>;
145
109
  /**
146
- * @param {Uint8Array} buffer
147
- * @param {string} signature
148
- * @param {string} public_key
110
+ * @returns {Promise<string>}
111
+ */
112
+ export function get_peer_stats(): Promise<string>;
113
+ /**
114
+ * @param {string} key
149
115
  * @returns {boolean}
150
116
  */
151
- export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
117
+ export function is_valid_public_key(key: string): boolean;
152
118
  /**
153
- * @returns {Promise<Array<any>>}
119
+ * @param {string} nft_id_hex
120
+ * @param {Uint8Array} tx_msg
121
+ * @returns {Promise<WasmTransaction>}
154
122
  */
155
- export function get_peers(): Promise<Array<any>>;
123
+ export function create_merge_bound_transaction(nft_id_hex: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
156
124
  /**
157
- * @param {bigint} peer_index
158
- * @returns {Promise<WasmPeer | undefined>}
125
+ * @returns {Promise<boolean>}
159
126
  */
160
- export function get_peer(peer_index: bigint): Promise<WasmPeer | undefined>;
127
+ export function produce_block_with_gt(): Promise<boolean>;
161
128
  /**
162
- * @param {string} public_key
163
- * @returns {Promise<Array<any>>}
129
+ * @param {string} private_key
130
+ * @returns {string}
164
131
  */
165
- export function get_account_slips(public_key: string): Promise<Array<any>>;
132
+ export function generate_public_key(private_key: string): string;
166
133
  /**
167
- * @param {Array<any>} keys
168
- * @returns {Promise<WasmBalanceSnapshot>}
134
+ * @returns {Promise<WasmBlockchain>}
169
135
  */
170
- export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
136
+ export function get_blockchain(): Promise<WasmBlockchain>;
171
137
  /**
172
- * @param {WasmBalanceSnapshot} snapshot
138
+ * @param {bigint} peer_index
139
+ * @param {string} public_key
173
140
  * @returns {Promise<void>}
174
141
  */
175
- export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
142
+ export function process_stun_peer(peer_index: bigint, public_key: string): Promise<void>;
176
143
  /**
177
- * @returns {string}
144
+ * @param {Uint8Array} buffer
145
+ * @param {string} signature
146
+ * @param {string} public_key
147
+ * @returns {boolean}
178
148
  */
179
- export function generate_private_key(): string;
149
+ export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
180
150
  /**
181
- * @param {string} private_key
182
- * @returns {string}
151
+ * @returns {Promise<string>}
183
152
  */
184
- export function generate_public_key(private_key: string): string;
153
+ export function get_congestion_stats(): Promise<string>;
185
154
  /**
186
- * @param {WasmTransaction} tx
187
- * @returns {Promise<void>}
155
+ * @returns {Promise<Array<any>>}
188
156
  */
189
- export function propagate_transaction(tx: WasmTransaction): Promise<void>;
157
+ export function get_nft_list(): Promise<Array<any>>;
190
158
  /**
191
159
  * @param {Uint8Array} buffer
192
160
  * @param {number} msg_index
@@ -195,12 +163,19 @@ export function propagate_transaction(tx: WasmTransaction): Promise<void>;
195
163
  */
196
164
  export function send_api_call(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
197
165
  /**
198
- * @param {Uint8Array} buffer
199
- * @param {number} msg_index
200
- * @param {bigint} peer_index
166
+ * @param {WasmTransaction} tx
201
167
  * @returns {Promise<void>}
202
168
  */
203
- export function send_api_success(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
169
+ export function propagate_transaction(tx: WasmTransaction): Promise<void>;
170
+ /**
171
+ * @param {string} public_key
172
+ * @returns {Promise<Array<any>>}
173
+ */
174
+ export function get_account_slips(public_key: string): Promise<Array<any>>;
175
+ /**
176
+ * @returns {Promise<boolean>}
177
+ */
178
+ export function produce_block_without_gt(): Promise<boolean>;
204
179
  /**
205
180
  * @param {Uint8Array} buffer
206
181
  * @param {number} msg_index
@@ -209,66 +184,91 @@ export function send_api_success(buffer: Uint8Array, msg_index: number, peer_ind
209
184
  */
210
185
  export function send_api_error(buffer: Uint8Array, msg_index: number, peer_index: bigint): Promise<void>;
211
186
  /**
212
- * @returns {Promise<WasmWallet>}
187
+ * @param {bigint} current_time
188
+ * @returns {Promise<void>}
213
189
  */
214
- export function get_wallet(): Promise<WasmWallet>;
190
+ export function process_stat_interval(current_time: bigint): Promise<void>;
215
191
  /**
216
- * @returns {Promise<WasmBlockchain>}
192
+ * @param {string} slip1_utxo_key
193
+ * @param {string} slip2_utxo_key
194
+ * @param {string} slip3_utxo_key
195
+ * @param {number} left_count
196
+ * @param {number} right_count
197
+ * @param {Uint8Array} tx_msg
198
+ * @returns {Promise<WasmTransaction>}
217
199
  */
218
- export function get_blockchain(): Promise<WasmBlockchain>;
200
+ 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>;
219
201
  /**
220
- * @returns {Promise<Array<any>>}
202
+ * @returns {Promise<string>}
221
203
  */
222
- export function get_mempool_txs(): Promise<Array<any>>;
204
+ export function get_latest_block_hash(): Promise<string>;
223
205
  /**
224
- * @param {number} major
225
- * @param {number} minor
226
- * @param {number} patch
227
- * @returns {Promise<void>}
206
+ * @returns {Promise<string>}
228
207
  */
229
- export function set_wallet_version(major: number, minor: number, patch: number): Promise<void>;
208
+ export function get_stats(): Promise<string>;
230
209
  /**
231
- * @param {string} key
232
- * @returns {boolean}
210
+ * @param {Array<any>} keys
211
+ * @returns {Promise<WasmBalanceSnapshot>}
233
212
  */
234
- export function is_valid_public_key(key: string): boolean;
213
+ export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
235
214
  /**
236
- * @param {bigint} threshold
237
215
  * @returns {Promise<void>}
238
216
  */
239
- export function write_issuance_file(threshold: bigint): Promise<void>;
217
+ export function disable_producing_blocks_by_timer(): Promise<void>;
240
218
  /**
219
+ * @returns {string}
220
+ */
221
+ export function generate_private_key(): string;
222
+ /**
223
+ * @param {string} block_hash
224
+ * @returns {Promise<WasmBlock>}
225
+ */
226
+ export function get_block(block_hash: string): Promise<WasmBlock>;
227
+ /**
228
+ * @param {bigint} duration_in_ms
241
229
  * @returns {Promise<void>}
242
230
  */
243
- export function disable_producing_blocks_by_timer(): Promise<void>;
231
+ export function process_timer_event(duration_in_ms: bigint): Promise<void>;
244
232
  /**
245
- * @returns {Promise<boolean>}
233
+ * @returns {Promise<WasmWallet>}
246
234
  */
247
- export function produce_block_with_gt(): Promise<boolean>;
235
+ export function get_wallet(): Promise<WasmWallet>;
248
236
  /**
249
- * @returns {Promise<boolean>}
237
+ * @param {Uint8Array} buffer
238
+ * @param {bigint} peer_index
239
+ * @returns {Promise<void>}
250
240
  */
251
- export function produce_block_without_gt(): Promise<boolean>;
241
+ export function process_msg_buffer_from_peer(buffer: Uint8Array, peer_index: bigint): Promise<void>;
252
242
  /**
253
- * @returns {Promise<string>}
243
+ * @returns {Promise<Array<any>>}
254
244
  */
255
- export function get_stats(): Promise<string>;
245
+ export function get_mempool_txs(): Promise<Array<any>>;
256
246
  /**
257
- * @returns {Promise<string>}
247
+ * @param {number} major
248
+ * @param {number} minor
249
+ * @param {number} patch
250
+ * @returns {Promise<void>}
258
251
  */
259
- export function get_peer_stats(): Promise<string>;
252
+ export function set_wallet_version(major: number, minor: number, patch: number): Promise<void>;
260
253
  /**
261
- * @returns {Promise<string>}
254
+ * @param {Uint8Array} buffer
255
+ * @param {string} private_key
256
+ * @returns {string}
262
257
  */
263
- export function get_congestion_stats(): Promise<string>;
258
+ export function sign_buffer(buffer: Uint8Array, private_key: string): string;
264
259
  /**
265
- * @returns {Promise<any>}
260
+ * @param {bigint} peer_index
261
+ * @returns {Promise<WasmPeer | undefined>}
266
262
  */
267
- export function get_confirmations(): Promise<any>;
263
+ export function get_peer(peer_index: bigint): Promise<WasmPeer | undefined>;
268
264
  /**
265
+ * @param {Uint8Array} buffer
266
+ * @param {Uint8Array} hash
267
+ * @param {bigint} block_id
268
+ * @param {bigint} peer_index
269
269
  * @returns {Promise<void>}
270
270
  */
271
- export function start_from_received_ghost_chain(): Promise<void>;
271
+ export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, peer_index: bigint): Promise<void>;
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
  }