saito-wasm 0.2.238 → 0.2.240

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "saito-wasm"
3
- version = "0.2.238"
3
+ version = "0.2.240"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.238",
3
+ "version": "0.2.240",
4
4
  "files": [
5
5
  "pkg/web/**/*",
6
6
  "pkg/node/**/*",
@@ -5,48 +5,52 @@
5
5
  */
6
6
  export function generate_private_key(): string;
7
7
  /**
8
+ * @returns {Promise<boolean>}
9
+ */
10
+ export function produce_block_without_gt(): Promise<boolean>;
11
+ /**
8
12
  * @param {bigint} peer_id
9
- * @param {boolean} initiate_handshake
13
+ * @param {string} public_key
10
14
  * @returns {Promise<void>}
11
15
  */
12
- export function process_new_peer(peer_id: bigint, initiate_handshake: boolean): Promise<void>;
16
+ export function remove_stun_peer(peer_id: bigint, public_key: string): Promise<void>;
13
17
  /**
14
- * @param {Array<any>} keys
15
- * @returns {Promise<WasmBalanceSnapshot>}
18
+ * @param {string | undefined} [url]
19
+ * @returns {Promise<WasmNetworkPeer>}
16
20
  */
17
- export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
21
+ export function create_network_peer(url?: string): Promise<WasmNetworkPeer>;
18
22
  /**
19
- * @param {Uint8Array} buffer
20
- * @param {WasmNetworkPeer} peer
21
- * @returns {Promise<Uint8Array>}
23
+ * @returns {Promise<boolean>}
22
24
  */
23
- export function process_msg_buffer_from_peer(buffer: Uint8Array, peer: WasmNetworkPeer): Promise<Uint8Array>;
25
+ export function produce_block_with_gt(): Promise<boolean>;
24
26
  /**
25
- * @param {string} config_json
27
+ * @returns {Promise<string>}
28
+ */
29
+ export function get_latest_block_hash(): Promise<string>;
30
+ /**
31
+ * @param {Uint8Array} buffer
26
32
  * @param {string} private_key
27
- * @param {number} log_level_num
28
- * @param {bigint} hasten_multiplier
29
- * @param {boolean} delete_old_blocks
30
- * @returns {Promise<any>}
33
+ * @returns {string}
31
34
  */
32
- export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
35
+ export function sign_buffer(buffer: Uint8Array, private_key: string): string;
33
36
  /**
34
- * @param {string} key
35
- * @returns {boolean}
37
+ * @returns {WasmNetwork}
36
38
  */
37
- export function isPublicKey(key: string): boolean;
39
+ export function get_network(): WasmNetwork;
38
40
  /**
39
- * @param {bigint} duration_in_ms
40
- * @returns {Promise<void>}
41
+ * @param {Uint8Array} buffer
42
+ * @returns {string}
41
43
  */
42
- export function process_timer_event(duration_in_ms: bigint): Promise<void>;
44
+ export function hash(buffer: Uint8Array): string;
43
45
  /**
44
- * @param {Uint8Array} hash
45
- * @param {bigint} block_id
46
- * @param {bigint} peer_id
46
+ * @returns {Promise<WasmBlockchain>}
47
+ */
48
+ export function get_blockchain(): Promise<WasmBlockchain>;
49
+ /**
50
+ * @param {bigint} duration_in_ms
47
51
  * @returns {Promise<void>}
48
52
  */
49
- export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_id: bigint): Promise<void>;
53
+ export function process_timer_event(duration_in_ms: bigint): Promise<void>;
50
54
  /**
51
55
  * @param {Uint8Array} buffer
52
56
  * @param {Uint8Array} hash
@@ -56,76 +60,72 @@ export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, p
56
60
  */
57
61
  export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, peer_id: bigint): Promise<void>;
58
62
  /**
59
- * @param {bigint} threshold
60
- * @returns {Promise<void>}
63
+ * @param {string} json
64
+ * @returns {Promise<number>}
61
65
  */
62
- export function write_issuance_file(threshold: bigint): Promise<void>;
66
+ export function evaluate_script(json: string): Promise<number>;
63
67
  /**
64
- * @param {string | undefined} [url]
65
- * @returns {Promise<WasmNetworkPeer>}
68
+ * @returns {Promise<void>}
66
69
  */
67
- export function create_network_peer(url?: string): Promise<WasmNetworkPeer>;
70
+ export function disable_producing_blocks_by_timer(): Promise<void>;
68
71
  /**
69
72
  * @returns {Promise<WasmWallet>}
70
73
  */
71
74
  export function get_wallet(): Promise<WasmWallet>;
72
75
  /**
73
- * @param {Uint8Array} buffer
74
- * @param {string} private_key
75
- * @returns {string}
76
- */
77
- export function sign_buffer(buffer: Uint8Array, private_key: string): string;
78
- /**
79
- * @returns {Promise<boolean>}
80
- */
81
- export function produce_block_with_gt(): Promise<boolean>;
82
- /**
83
- * @param {string} json
84
- * @returns {Promise<number>}
76
+ * @param {string} block_hash
77
+ * @returns {Promise<WasmBlock>}
85
78
  */
86
- export function evaluate_script(json: string): Promise<number>;
79
+ export function get_block(block_hash: string): Promise<WasmBlock>;
87
80
  /**
88
81
  * @returns {Promise<Array<any>>}
89
82
  */
90
83
  export function get_mempool_txs(): Promise<Array<any>>;
91
84
  /**
92
- * @param {bigint} current_time
85
+ * @param {WasmBalanceSnapshot} snapshot
93
86
  * @returns {Promise<void>}
94
87
  */
95
- export function process_stat_interval(current_time: bigint): Promise<void>;
88
+ export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
89
+ /**
90
+ * @param {string} key
91
+ * @returns {boolean}
92
+ */
93
+ export function isPublicKey(key: string): boolean;
96
94
  /**
97
95
  * @param {bigint} peer_id
98
- * @param {string} public_key
99
96
  * @returns {Promise<void>}
100
97
  */
101
- export function remove_stun_peer(peer_id: bigint, public_key: string): Promise<void>;
98
+ export function process_peer_disconnection(peer_id: bigint): Promise<void>;
102
99
  /**
103
- * @param {string} block_hash
104
- * @returns {Promise<WasmBlock>}
100
+ * @param {string} config_json
101
+ * @param {string} private_key
102
+ * @param {number} log_level_num
103
+ * @param {bigint} hasten_multiplier
104
+ * @param {boolean} delete_old_blocks
105
+ * @returns {Promise<any>}
105
106
  */
106
- export function get_block(block_hash: string): Promise<WasmBlock>;
107
+ export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
107
108
  /**
109
+ * @param {bigint} current_time
108
110
  * @returns {Promise<void>}
109
111
  */
110
- export function disable_producing_blocks_by_timer(): Promise<void>;
111
- /**
112
- * @returns {Promise<string>}
113
- */
114
- export function get_latest_block_hash(): Promise<string>;
112
+ export function process_stat_interval(current_time: bigint): Promise<void>;
115
113
  /**
116
- * @returns {Promise<WasmBlockchain>}
114
+ * @param {bigint} threshold
115
+ * @returns {Promise<void>}
117
116
  */
118
- export function get_blockchain(): Promise<WasmBlockchain>;
117
+ export function write_issuance_file(threshold: bigint): Promise<void>;
119
118
  /**
120
- * @param {string} public_key
121
- * @returns {Promise<Array<any>>}
119
+ * @param {Array<any>} keys
120
+ * @returns {Promise<WasmBalanceSnapshot>}
122
121
  */
123
- export function get_account_slips(public_key: string): Promise<Array<any>>;
122
+ export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
124
123
  /**
125
124
  * @param {bigint} peer_id
125
+ * @param {boolean} initiate_handshake
126
126
  * @returns {Promise<void>}
127
127
  */
128
- export function process_peer_disconnection(peer_id: bigint): Promise<void>;
128
+ export function process_new_peer(peer_id: bigint, initiate_handshake: boolean): Promise<void>;
129
129
  /**
130
130
  * @param {Uint8Array} buffer
131
131
  * @param {string} signature
@@ -134,38 +134,38 @@ export function process_peer_disconnection(peer_id: bigint): Promise<void>;
134
134
  */
135
135
  export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
136
136
  /**
137
- * @param {bigint} peer_id
138
- * @param {string} public_key
139
- * @returns {Promise<void>}
137
+ * @param {Uint8Array} buffer
138
+ * @param {WasmNetworkPeer} peer
139
+ * @returns {Promise<Uint8Array>}
140
140
  */
141
- export function process_stun_peer(peer_id: bigint, public_key: string): Promise<void>;
141
+ export function process_msg_buffer_from_peer(buffer: Uint8Array, peer: WasmNetworkPeer): Promise<Uint8Array>;
142
142
  /**
143
- * @param {WasmBalanceSnapshot} snapshot
144
- * @returns {Promise<void>}
143
+ * @param {string} private_key
144
+ * @returns {string}
145
145
  */
146
- export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
146
+ export function generate_public_key(private_key: string): string;
147
147
  /**
148
148
  * @returns {Promise<Array<any>>}
149
149
  */
150
150
  export function get_nft_list(): Promise<Array<any>>;
151
151
  /**
152
- * @param {string} private_key
153
- * @returns {string}
154
- */
155
- export function generate_public_key(private_key: string): string;
156
- /**
157
- * @returns {WasmNetwork}
152
+ * @param {string} public_key
153
+ * @returns {Promise<Array<any>>}
158
154
  */
159
- export function get_network(): WasmNetwork;
155
+ export function get_account_slips(public_key: string): Promise<Array<any>>;
160
156
  /**
161
- * @returns {Promise<boolean>}
157
+ * @param {bigint} peer_id
158
+ * @param {string} public_key
159
+ * @returns {Promise<void>}
162
160
  */
163
- export function produce_block_without_gt(): Promise<boolean>;
161
+ export function process_stun_peer(peer_id: bigint, public_key: string): Promise<void>;
164
162
  /**
165
- * @param {Uint8Array} buffer
166
- * @returns {string}
163
+ * @param {Uint8Array} hash
164
+ * @param {bigint} block_id
165
+ * @param {bigint} peer_id
166
+ * @returns {Promise<void>}
167
167
  */
168
- export function hash(buffer: Uint8Array): string;
168
+ export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_id: bigint): Promise<void>;
169
169
  /**
170
170
  */
171
171
  export class SaitoWasm {