saito-wasm 0.2.235 → 0.2.236

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