saito-wasm 0.2.228 → 0.2.229

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