saito-wasm 0.2.237 → 0.2.238

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