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