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