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