saito-wasm 0.2.234 → 0.2.235

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