saito-wasm 0.2.237 → 0.2.239

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