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