saito-wasm 0.2.236 → 0.2.237

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