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