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