saito-wasm 0.2.224 → 0.2.225
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 +2 -8
- package/package.json +1 -1
- package/pkg/node/index.d.ts +126 -126
- package/pkg/node/index.js +642 -642
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +139 -139
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +267 -267
- package/pkg/web/index.js +589 -589
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +139 -139
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-af267c5838dfb3cd → saito-wasm-174cc7c423b30661}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-af267c5838dfb3cd → saito-wasm-174cc7c423b30661}/js/msg_handler.js +0 -0
package/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "saito-wasm"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.225"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
|
|
6
6
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
@@ -16,7 +16,7 @@ serde-wasm-bindgen = { version = "=0.6.5" }
|
|
|
16
16
|
web-sys = "=0.3.69"
|
|
17
17
|
async-trait = "=0.1.80"
|
|
18
18
|
hex = "=0.4.3"
|
|
19
|
-
tokio = "=1.
|
|
19
|
+
tokio = "=1.51.0"
|
|
20
20
|
js-sys = { version = "=0.3.69" }
|
|
21
21
|
lazy_static = "=1.4.0"
|
|
22
22
|
console_log = { version = "=1.0.0", features = ["color"] }
|
|
@@ -35,11 +35,5 @@ rayon = "=1.10.0"
|
|
|
35
35
|
[package.metadata.wasm-pack.profile.release]
|
|
36
36
|
wasm-opt = ['-Oz']
|
|
37
37
|
|
|
38
|
-
[profile.release]
|
|
39
|
-
lto = "thin"
|
|
40
|
-
codegen-units = 1
|
|
41
|
-
opt-level = 3
|
|
42
|
-
panic = "abort"
|
|
43
|
-
|
|
44
38
|
[features]
|
|
45
39
|
default = []
|
package/package.json
CHANGED
package/pkg/node/index.d.ts
CHANGED
|
@@ -2,51 +2,46 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* @param {Uint8Array} buffer
|
|
5
|
-
* @param {
|
|
6
|
-
* @
|
|
5
|
+
* @param {string} signature
|
|
6
|
+
* @param {string} public_key
|
|
7
|
+
* @returns {boolean}
|
|
7
8
|
*/
|
|
8
|
-
export function
|
|
9
|
+
export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
|
|
9
10
|
/**
|
|
10
|
-
* @
|
|
11
|
+
* @param {string} public_key
|
|
12
|
+
* @returns {Promise<void>}
|
|
11
13
|
*/
|
|
12
|
-
export function
|
|
14
|
+
export function process_stun_peer(public_key: string): Promise<void>;
|
|
13
15
|
/**
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {bigint} block_id
|
|
16
|
-
* @param {string} key
|
|
16
|
+
* @param {bigint} threshold
|
|
17
17
|
* @returns {Promise<void>}
|
|
18
18
|
*/
|
|
19
|
-
export function
|
|
19
|
+
export function write_issuance_file(threshold: bigint): Promise<void>;
|
|
20
20
|
/**
|
|
21
|
-
* @
|
|
21
|
+
* @param {WasmBalanceSnapshot} snapshot
|
|
22
|
+
* @returns {Promise<void>}
|
|
22
23
|
*/
|
|
23
|
-
export function
|
|
24
|
+
export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
|
|
24
25
|
/**
|
|
25
|
-
* @
|
|
26
|
+
* @param {string} block_hash
|
|
27
|
+
* @returns {Promise<WasmBlock>}
|
|
26
28
|
*/
|
|
27
|
-
export function
|
|
29
|
+
export function get_block(block_hash: string): Promise<WasmBlock>;
|
|
28
30
|
/**
|
|
29
|
-
* @param {
|
|
30
|
-
* @
|
|
31
|
-
* @param {bigint} fee
|
|
32
|
-
* @param {boolean} _force_merge
|
|
33
|
-
* @returns {Promise<WasmTransaction>}
|
|
31
|
+
* @param {string} key
|
|
32
|
+
* @returns {boolean}
|
|
34
33
|
*/
|
|
35
|
-
export function
|
|
34
|
+
export function isPublicKey(key: string): boolean;
|
|
36
35
|
/**
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {bigint} deposit
|
|
36
|
+
* @param {string} nft_id_hex
|
|
39
37
|
* @param {Uint8Array} tx_msg
|
|
40
|
-
* @param {bigint} _fee
|
|
41
|
-
* @param {string} recipient_public_key
|
|
42
|
-
* @param {string} nft_type
|
|
43
38
|
* @returns {Promise<WasmTransaction>}
|
|
44
39
|
*/
|
|
45
|
-
export function
|
|
40
|
+
export function create_merge_bound_transaction(nft_id_hex: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
|
|
46
41
|
/**
|
|
47
|
-
* @returns {Promise<
|
|
42
|
+
* @returns {Promise<WasmBlockchain>}
|
|
48
43
|
*/
|
|
49
|
-
export function
|
|
44
|
+
export function get_blockchain(): Promise<WasmBlockchain>;
|
|
50
45
|
/**
|
|
51
46
|
* @param {string} slip1_utxo_key
|
|
52
47
|
* @param {string} slip2_utxo_key
|
|
@@ -54,57 +49,37 @@ export function disable_producing_blocks_by_timer(): Promise<void>;
|
|
|
54
49
|
* @param {Uint8Array} tx_msg
|
|
55
50
|
* @returns {Promise<WasmTransaction>}
|
|
56
51
|
*/
|
|
57
|
-
export function
|
|
52
|
+
export function create_atomize_bound_transaction(slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
|
|
58
53
|
/**
|
|
59
|
-
* @param {
|
|
60
|
-
* @returns {
|
|
54
|
+
* @param {bigint} duration_in_ms
|
|
55
|
+
* @returns {Promise<void>}
|
|
61
56
|
*/
|
|
62
|
-
export function
|
|
57
|
+
export function process_timer_event(duration_in_ms: bigint): Promise<void>;
|
|
63
58
|
/**
|
|
64
|
-
* @
|
|
65
|
-
* @param {string} slip2_utxo_key
|
|
66
|
-
* @param {string} slip3_utxo_key
|
|
67
|
-
* @param {Uint8Array} tx_msg
|
|
68
|
-
* @returns {Promise<WasmTransaction>}
|
|
59
|
+
* @returns {Promise<any>}
|
|
69
60
|
*/
|
|
70
|
-
export function
|
|
61
|
+
export function get_confirmations(): Promise<any>;
|
|
71
62
|
/**
|
|
72
|
-
* @
|
|
73
|
-
* @returns {Promise<void>}
|
|
63
|
+
* @returns {Promise<string>}
|
|
74
64
|
*/
|
|
75
|
-
export function
|
|
65
|
+
export function get_stats(): Promise<string>;
|
|
76
66
|
/**
|
|
77
|
-
* @returns {
|
|
67
|
+
* @returns {Promise<string>}
|
|
78
68
|
*/
|
|
79
|
-
export function
|
|
69
|
+
export function get_latest_block_hash(): Promise<string>;
|
|
80
70
|
/**
|
|
81
|
-
* @
|
|
82
|
-
* @param {string} slip2_utxo_key
|
|
83
|
-
* @param {string} slip3_utxo_key
|
|
84
|
-
* @param {number} left_count
|
|
85
|
-
* @param {number} right_count
|
|
86
|
-
* @param {Uint8Array} tx_msg
|
|
87
|
-
* @returns {Promise<WasmTransaction>}
|
|
71
|
+
* @returns {Promise<WasmWallet>}
|
|
88
72
|
*/
|
|
89
|
-
export function
|
|
73
|
+
export function get_wallet(): Promise<WasmWallet>;
|
|
90
74
|
/**
|
|
91
|
-
* @param {
|
|
92
|
-
* @param {Uint8Array} hash
|
|
93
|
-
* @param {bigint} block_id
|
|
94
|
-
* @param {string} key
|
|
75
|
+
* @param {bigint} current_time
|
|
95
76
|
* @returns {Promise<void>}
|
|
96
77
|
*/
|
|
97
|
-
export function
|
|
78
|
+
export function process_stat_interval(current_time: bigint): Promise<void>;
|
|
98
79
|
/**
|
|
99
|
-
* @
|
|
100
|
-
* @param {string} slip1_utxo_key
|
|
101
|
-
* @param {string} slip2_utxo_key
|
|
102
|
-
* @param {string} slip3_utxo_key
|
|
103
|
-
* @param {string} recipient_public_key
|
|
104
|
-
* @param {Uint8Array} tx_msg
|
|
105
|
-
* @returns {Promise<WasmTransaction>}
|
|
80
|
+
* @returns {Promise<void>}
|
|
106
81
|
*/
|
|
107
|
-
export function
|
|
82
|
+
export function start_from_received_ghost_chain(): Promise<void>;
|
|
108
83
|
/**
|
|
109
84
|
* @param {string} config_json
|
|
110
85
|
* @param {string} private_key
|
|
@@ -115,101 +90,124 @@ export function create_send_bound_transaction(amt: bigint, slip1_utxo_key: strin
|
|
|
115
90
|
*/
|
|
116
91
|
export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
|
|
117
92
|
/**
|
|
118
|
-
* @
|
|
119
|
-
* @returns {Promise<void>}
|
|
93
|
+
* @returns {Promise<Array<any>>}
|
|
120
94
|
*/
|
|
121
|
-
export function
|
|
95
|
+
export function get_nft_list(): Promise<Array<any>>;
|
|
122
96
|
/**
|
|
123
|
-
* @
|
|
97
|
+
* @param {bigint} amt
|
|
98
|
+
* @param {string} slip1_utxo_key
|
|
99
|
+
* @param {string} slip2_utxo_key
|
|
100
|
+
* @param {string} slip3_utxo_key
|
|
101
|
+
* @param {string} recipient_public_key
|
|
102
|
+
* @param {Uint8Array} tx_msg
|
|
103
|
+
* @returns {Promise<WasmTransaction>}
|
|
124
104
|
*/
|
|
125
|
-
export function
|
|
105
|
+
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>;
|
|
126
106
|
/**
|
|
127
|
-
* @
|
|
107
|
+
* @param {string} slip1_utxo_key
|
|
108
|
+
* @param {string} slip2_utxo_key
|
|
109
|
+
* @param {string} slip3_utxo_key
|
|
110
|
+
* @param {Uint8Array} tx_msg
|
|
111
|
+
* @returns {Promise<WasmTransaction>}
|
|
128
112
|
*/
|
|
129
|
-
export function
|
|
113
|
+
export function create_remove_bound_transaction(slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
|
|
130
114
|
/**
|
|
131
|
-
* @returns {
|
|
115
|
+
* @returns {WasmNetwork}
|
|
132
116
|
*/
|
|
133
|
-
export function
|
|
117
|
+
export function get_network(): WasmNetwork;
|
|
134
118
|
/**
|
|
135
|
-
* @param {string} private_key
|
|
136
119
|
* @returns {string}
|
|
137
120
|
*/
|
|
138
|
-
export function
|
|
139
|
-
/**
|
|
140
|
-
* @param {bigint} threshold
|
|
141
|
-
* @returns {Promise<void>}
|
|
142
|
-
*/
|
|
143
|
-
export function write_issuance_file(threshold: bigint): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* @param {bigint} current_time
|
|
146
|
-
* @returns {Promise<void>}
|
|
147
|
-
*/
|
|
148
|
-
export function process_stat_interval(current_time: bigint): Promise<void>;
|
|
149
|
-
/**
|
|
150
|
-
* @param {string} key
|
|
151
|
-
* @returns {boolean}
|
|
152
|
-
*/
|
|
153
|
-
export function isPublicKey(key: string): boolean;
|
|
121
|
+
export function generate_private_key(): string;
|
|
154
122
|
/**
|
|
155
|
-
* @param {
|
|
156
|
-
* @
|
|
123
|
+
* @param {Array<any>} public_keys
|
|
124
|
+
* @param {BigUint64Array} amounts
|
|
125
|
+
* @param {bigint} fee
|
|
126
|
+
* @param {boolean} _force_merge
|
|
127
|
+
* @returns {Promise<WasmTransaction>}
|
|
157
128
|
*/
|
|
158
|
-
export function
|
|
129
|
+
export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, _force_merge: boolean): Promise<WasmTransaction>;
|
|
159
130
|
/**
|
|
160
|
-
* @param {
|
|
131
|
+
* @param {bigint} num
|
|
132
|
+
* @param {bigint} deposit
|
|
161
133
|
* @param {Uint8Array} tx_msg
|
|
134
|
+
* @param {bigint} _fee
|
|
135
|
+
* @param {string} recipient_public_key
|
|
136
|
+
* @param {string} nft_type
|
|
162
137
|
* @returns {Promise<WasmTransaction>}
|
|
163
138
|
*/
|
|
164
|
-
export function
|
|
165
|
-
/**
|
|
166
|
-
* @returns {string}
|
|
167
|
-
*/
|
|
168
|
-
export function generate_private_key(): string;
|
|
139
|
+
export function create_bound_transaction(num: bigint, deposit: bigint, tx_msg: Uint8Array, _fee: bigint, recipient_public_key: string, nft_type: string): Promise<WasmTransaction>;
|
|
169
140
|
/**
|
|
170
141
|
* @param {string} public_key
|
|
171
142
|
* @returns {Promise<void>}
|
|
172
143
|
*/
|
|
173
144
|
export function remove_stun_peer(public_key: string): Promise<void>;
|
|
174
145
|
/**
|
|
175
|
-
* @param {Uint8Array} buffer
|
|
176
|
-
* @param {string} signature
|
|
177
146
|
* @param {string} public_key
|
|
178
|
-
* @
|
|
147
|
+
* @param {bigint} amount
|
|
148
|
+
* @param {bigint} fee
|
|
149
|
+
* @param {boolean} force_merge
|
|
150
|
+
* @returns {Promise<WasmTransaction>}
|
|
179
151
|
*/
|
|
180
|
-
export function
|
|
152
|
+
export function create_transaction(public_key: string, amount: bigint, fee: bigint, force_merge: boolean): Promise<WasmTransaction>;
|
|
181
153
|
/**
|
|
154
|
+
* @param {string} public_key
|
|
182
155
|
* @returns {Promise<Array<any>>}
|
|
183
156
|
*/
|
|
184
|
-
export function
|
|
157
|
+
export function get_account_slips(public_key: string): Promise<Array<any>>;
|
|
185
158
|
/**
|
|
186
|
-
* @
|
|
187
|
-
* @returns {Promise<WasmBlock>}
|
|
159
|
+
* @returns {Promise<Array<any>>}
|
|
188
160
|
*/
|
|
189
|
-
export function
|
|
161
|
+
export function get_mempool_txs(): Promise<Array<any>>;
|
|
190
162
|
/**
|
|
191
|
-
* @param {
|
|
192
|
-
* @
|
|
163
|
+
* @param {Uint8Array} buffer
|
|
164
|
+
* @param {Uint8Array} hash
|
|
165
|
+
* @param {bigint} block_id
|
|
166
|
+
* @param {string} key
|
|
167
|
+
* @returns {Promise<void>}
|
|
193
168
|
*/
|
|
194
|
-
export function
|
|
169
|
+
export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, key: string): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* @param {Uint8Array} buffer
|
|
172
|
+
* @param {WasmNetworkPeer} peer
|
|
173
|
+
* @returns {Promise<Uint8Array>}
|
|
174
|
+
*/
|
|
175
|
+
export function process_msg_buffer_from_peer(buffer: Uint8Array, peer: WasmNetworkPeer): Promise<Uint8Array>;
|
|
195
176
|
/**
|
|
196
177
|
* @param {Array<any>} keys
|
|
197
178
|
* @returns {Promise<WasmBalanceSnapshot>}
|
|
198
179
|
*/
|
|
199
180
|
export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
|
|
200
181
|
/**
|
|
182
|
+
* @returns {Promise<void>}
|
|
183
|
+
*/
|
|
184
|
+
export function disable_producing_blocks_by_timer(): Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* @param {string} private_key
|
|
187
|
+
* @returns {string}
|
|
188
|
+
*/
|
|
189
|
+
export function generate_public_key(private_key: string): string;
|
|
190
|
+
/**
|
|
191
|
+
* @param {Uint8Array} hash
|
|
192
|
+
* @param {bigint} block_id
|
|
193
|
+
* @param {string} key
|
|
194
|
+
* @returns {Promise<void>}
|
|
195
|
+
*/
|
|
196
|
+
export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, key: string): Promise<void>;
|
|
197
|
+
/**
|
|
201
198
|
* @param {string} key
|
|
202
199
|
* @returns {Promise<void>}
|
|
203
200
|
*/
|
|
204
201
|
export function process_peer_disconnection(key: string): Promise<void>;
|
|
205
202
|
/**
|
|
206
|
-
* @
|
|
203
|
+
* @param {Uint8Array} buffer
|
|
204
|
+
* @returns {string}
|
|
207
205
|
*/
|
|
208
|
-
export function
|
|
206
|
+
export function hash(buffer: Uint8Array): string;
|
|
209
207
|
/**
|
|
210
|
-
* @returns {Promise<
|
|
208
|
+
* @returns {Promise<string>}
|
|
211
209
|
*/
|
|
212
|
-
export function
|
|
210
|
+
export function get_congestion_stats(): Promise<string>;
|
|
213
211
|
/**
|
|
214
212
|
* @param {Uint8Array} buffer
|
|
215
213
|
* @param {string} private_key
|
|
@@ -217,26 +215,28 @@ export function start_from_received_ghost_chain(): Promise<void>;
|
|
|
217
215
|
*/
|
|
218
216
|
export function sign_buffer(buffer: Uint8Array, private_key: string): string;
|
|
219
217
|
/**
|
|
220
|
-
* @
|
|
218
|
+
* @param {string} slip1_utxo_key
|
|
219
|
+
* @param {string} slip2_utxo_key
|
|
220
|
+
* @param {string} slip3_utxo_key
|
|
221
|
+
* @param {number} left_count
|
|
222
|
+
* @param {number} right_count
|
|
223
|
+
* @param {Uint8Array} tx_msg
|
|
224
|
+
* @returns {Promise<WasmTransaction>}
|
|
221
225
|
*/
|
|
222
|
-
export function
|
|
226
|
+
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>;
|
|
223
227
|
/**
|
|
224
|
-
* @param {
|
|
225
|
-
* @
|
|
226
|
-
* @param {bigint} fee
|
|
227
|
-
* @param {boolean} force_merge
|
|
228
|
-
* @returns {Promise<WasmTransaction>}
|
|
228
|
+
* @param {WasmNetworkPeer} peer
|
|
229
|
+
* @returns {Promise<void>}
|
|
229
230
|
*/
|
|
230
|
-
export function
|
|
231
|
+
export function process_new_peer(peer: WasmNetworkPeer): Promise<void>;
|
|
231
232
|
/**
|
|
232
|
-
* @returns {Promise<
|
|
233
|
+
* @returns {Promise<boolean>}
|
|
233
234
|
*/
|
|
234
|
-
export function
|
|
235
|
+
export function produce_block_without_gt(): Promise<boolean>;
|
|
235
236
|
/**
|
|
236
|
-
* @
|
|
237
|
-
* @returns {Promise<void>}
|
|
237
|
+
* @returns {Promise<boolean>}
|
|
238
238
|
*/
|
|
239
|
-
export function
|
|
239
|
+
export function produce_block_with_gt(): Promise<boolean>;
|
|
240
240
|
/**
|
|
241
241
|
*/
|
|
242
242
|
export class SaitoWasm {
|