saito-wasm 0.2.233 → 0.2.234

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