saito-wasm 0.2.231 → 0.2.232

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