saito-wasm 0.2.239 → 0.2.242
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 +1 -1
- package/package.json +1 -1
- package/pkg/node/index.d.ts +157 -102
- package/pkg/node/index.js +523 -368
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +15 -4
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +172 -106
- package/pkg/web/index.js +507 -351
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +15 -4
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-785d0781d8caf60c → saito-wasm-5f70c6a4e79426c7}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-785d0781d8caf60c → saito-wasm-5f70c6a4e79426c7}/js/msg_handler.js +0 -0
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -20,7 +20,9 @@ export function __wbg_wasmwallet_free(a: number): void;
|
|
|
20
20
|
export function __wbg_wasmwalletslip_free(a: number): void;
|
|
21
21
|
export function create_network_peer(a: number, b: number): number;
|
|
22
22
|
export function disable_producing_blocks_by_timer(): number;
|
|
23
|
+
export function enable_producing_blocks_by_timer(): number;
|
|
23
24
|
export function evaluate_script(a: number): number;
|
|
25
|
+
export function evaluate_script_with_transaction(a: number, b: number): number;
|
|
24
26
|
export function generate_private_key(): number;
|
|
25
27
|
export function generate_public_key(a: number, b: number): void;
|
|
26
28
|
export function get_account_slips(a: number): number;
|
|
@@ -31,10 +33,13 @@ export function get_latest_block_hash(): number;
|
|
|
31
33
|
export function get_mempool_txs(): number;
|
|
32
34
|
export function get_network(): number;
|
|
33
35
|
export function get_nft_list(): number;
|
|
36
|
+
export function get_script_address(a: number, b: number): void;
|
|
37
|
+
export function get_script_hash(a: number, b: number): void;
|
|
34
38
|
export function get_wallet(): number;
|
|
35
39
|
export function hash(a: number): number;
|
|
36
40
|
export function initialize(a: number, b: number, c: number, d: number, e: number): number;
|
|
37
41
|
export function isPublicKey(a: number): number;
|
|
42
|
+
export function merge_witness(a: number, b: number, c: number): void;
|
|
38
43
|
export function process_failed_block_fetch(a: number, b: number, c: number): number;
|
|
39
44
|
export function process_fetched_block(a: number, b: number, c: number, d: number): number;
|
|
40
45
|
export function process_msg_buffer_from_peer(a: number, b: number): number;
|
|
@@ -43,8 +48,8 @@ export function process_peer_disconnection(a: number): number;
|
|
|
43
48
|
export function process_stat_interval(a: number): number;
|
|
44
49
|
export function process_stun_peer(a: number, b: number): number;
|
|
45
50
|
export function process_timer_event(a: number): number;
|
|
46
|
-
export function produce_block_with_gt(): number;
|
|
47
|
-
export function produce_block_without_gt(): number;
|
|
51
|
+
export function produce_block_with_gt(a: number, b: number): number;
|
|
52
|
+
export function produce_block_without_gt(a: number, b: number): number;
|
|
48
53
|
export function remove_stun_peer(a: number, b: number): number;
|
|
49
54
|
export function sign_buffer(a: number, b: number, c: number): void;
|
|
50
55
|
export function update_from_balance_snapshot(a: number): number;
|
|
@@ -110,7 +115,10 @@ export function wasmblock_total_rebroadcast_slips(a: number): number;
|
|
|
110
115
|
export function wasmblock_total_work(a: number): number;
|
|
111
116
|
export function wasmblock_treasury(a: number): number;
|
|
112
117
|
export function wasmblockchain_get(a: number): number;
|
|
118
|
+
export function wasmblockchain_get_block(a: number, b: number, c: number): number;
|
|
119
|
+
export function wasmblockchain_get_block_by_id(a: number, b: number, c: number): number;
|
|
113
120
|
export function wasmblockchain_get_block_confirmation_limit(a: number): number;
|
|
121
|
+
export function wasmblockchain_get_blocks(a: number, b: number, c: number): number;
|
|
114
122
|
export function wasmblockchain_get_fork_id(a: number): number;
|
|
115
123
|
export function wasmblockchain_get_genesis_block_id(a: number): number;
|
|
116
124
|
export function wasmblockchain_get_genesis_timestamp(a: number): number;
|
|
@@ -174,7 +182,10 @@ export function wasmnft_slip2(a: number): number;
|
|
|
174
182
|
export function wasmnft_slip3(a: number): number;
|
|
175
183
|
export function wasmnft_ticker(a: number): number;
|
|
176
184
|
export function wasmnft_tx_sig(a: number): number;
|
|
185
|
+
export function wasmpeer_get_host(a: number): number;
|
|
177
186
|
export function wasmpeer_get_key_list(a: number): number;
|
|
187
|
+
export function wasmpeer_get_port(a: number): number;
|
|
188
|
+
export function wasmpeer_get_protocol(a: number): number;
|
|
178
189
|
export function wasmpeer_get_public_key(a: number): number;
|
|
179
190
|
export function wasmpeer_get_services(a: number): number;
|
|
180
191
|
export function wasmpeer_get_status(a: number): number;
|
|
@@ -292,8 +303,8 @@ export function rustsecp256k1_v0_10_0_default_illegal_callback_fn(a: number, b:
|
|
|
292
303
|
export function __wbindgen_malloc(a: number, b: number): number;
|
|
293
304
|
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
|
|
294
305
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
295
|
-
export function
|
|
306
|
+
export function _dyn_core_9b3796e30d99ddb7___ops__function__FnMut_______Output______as_wasm_bindgen_9c0a948636c8b8c4___closure__WasmClosure___describe__invoke___wasm_bindgen_9c0a948636c8b8c4___JsValue_____(a: number, b: number, c: number): void;
|
|
296
307
|
export function __wbindgen_free(a: number, b: number, c: number): void;
|
|
297
308
|
export function __wbindgen_exn_store(a: number): void;
|
|
298
|
-
export function
|
|
309
|
+
export function wasm_bindgen_9c0a948636c8b8c4___convert__closures__invoke2_mut___wasm_bindgen_9c0a948636c8b8c4___JsValue__wasm_bindgen_9c0a948636c8b8c4___JsValue_____(a: number, b: number, c: number, d: number): void;
|
|
299
310
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
package/pkg/node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saito-wasm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.242",
|
|
4
4
|
"files": [
|
|
5
5
|
"index_bg.wasm",
|
|
6
6
|
"index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"types": "index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"node-fetch": "3.3.0",
|
|
13
|
+
"cross-env": "7.0.3"
|
|
14
14
|
}
|
|
15
15
|
}
|
package/pkg/web/index.d.ts
CHANGED
|
@@ -1,157 +1,178 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
5
|
-
* @param {string} private_key
|
|
4
|
+
* @param {string} json
|
|
6
5
|
* @returns {string}
|
|
7
6
|
*/
|
|
8
|
-
export function
|
|
7
|
+
export function get_script_address(json: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} script_json
|
|
10
|
+
* @param {string} witness_json
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
export function merge_witness(script_json: string, witness_json: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* @param {string} public_key
|
|
16
|
+
* @returns {Promise<Array<any>>}
|
|
17
|
+
*/
|
|
18
|
+
export function get_account_slips(public_key: string): Promise<Array<any>>;
|
|
19
|
+
/**
|
|
20
|
+
* @param {Array<any>} keys
|
|
21
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
22
|
+
*/
|
|
23
|
+
export function get_balance_snapshot(keys: Array<any>): Promise<WasmBalanceSnapshot>;
|
|
9
24
|
/**
|
|
10
25
|
* @param {bigint} threshold
|
|
11
26
|
* @returns {Promise<void>}
|
|
12
27
|
*/
|
|
13
28
|
export function write_issuance_file(threshold: bigint): Promise<void>;
|
|
14
29
|
/**
|
|
15
|
-
* @param {bigint} peer_id
|
|
16
|
-
* @param {string} public_key
|
|
17
30
|
* @returns {Promise<void>}
|
|
18
31
|
*/
|
|
19
|
-
export function
|
|
32
|
+
export function disable_producing_blocks_by_timer(): Promise<void>;
|
|
20
33
|
/**
|
|
34
|
+
* @returns {Promise<void>}
|
|
35
|
+
*/
|
|
36
|
+
export function enable_producing_blocks_by_timer(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* @param {(Uint8Array)[] | undefined} [extra_txs]
|
|
39
|
+
* @returns {Promise<boolean>}
|
|
40
|
+
*/
|
|
41
|
+
export function produce_block_with_gt(extra_txs?: (Uint8Array)[]): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* @param {(Uint8Array)[] | undefined} [extra_txs]
|
|
21
44
|
* @returns {Promise<boolean>}
|
|
22
45
|
*/
|
|
23
|
-
export function produce_block_without_gt(): Promise<boolean>;
|
|
46
|
+
export function produce_block_without_gt(extra_txs?: (Uint8Array)[]): Promise<boolean>;
|
|
24
47
|
/**
|
|
25
48
|
* @param {WasmBalanceSnapshot} snapshot
|
|
26
49
|
* @returns {Promise<void>}
|
|
27
50
|
*/
|
|
28
51
|
export function update_from_balance_snapshot(snapshot: WasmBalanceSnapshot): Promise<void>;
|
|
29
52
|
/**
|
|
30
|
-
* @returns {
|
|
53
|
+
* @returns {string}
|
|
31
54
|
*/
|
|
32
|
-
export function
|
|
55
|
+
export function generate_private_key(): string;
|
|
33
56
|
/**
|
|
34
|
-
* @param {
|
|
35
|
-
* @
|
|
36
|
-
* @param {bigint} peer_id
|
|
37
|
-
* @returns {Promise<void>}
|
|
57
|
+
* @param {string} private_key
|
|
58
|
+
* @returns {string}
|
|
38
59
|
*/
|
|
39
|
-
export function
|
|
60
|
+
export function generate_public_key(private_key: string): string;
|
|
40
61
|
/**
|
|
41
|
-
* @
|
|
42
|
-
* @returns {Promise<WasmBlock>}
|
|
62
|
+
* @returns {Promise<WasmWallet>}
|
|
43
63
|
*/
|
|
44
|
-
export function
|
|
64
|
+
export function get_wallet(): Promise<WasmWallet>;
|
|
45
65
|
/**
|
|
46
|
-
* @
|
|
47
|
-
* @returns {boolean}
|
|
66
|
+
* @returns {WasmNetwork}
|
|
48
67
|
*/
|
|
49
|
-
export function
|
|
68
|
+
export function get_network(): WasmNetwork;
|
|
50
69
|
/**
|
|
51
|
-
* @
|
|
52
|
-
* @returns {string}
|
|
70
|
+
* @returns {Promise<WasmBlockchain>}
|
|
53
71
|
*/
|
|
54
|
-
export function
|
|
72
|
+
export function get_blockchain(): Promise<WasmBlockchain>;
|
|
55
73
|
/**
|
|
56
|
-
* @
|
|
57
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
74
|
+
* @returns {Promise<Array<any>>}
|
|
58
75
|
*/
|
|
59
|
-
export function
|
|
76
|
+
export function get_mempool_txs(): Promise<Array<any>>;
|
|
60
77
|
/**
|
|
61
|
-
* @param {
|
|
62
|
-
* @param {string} signature
|
|
63
|
-
* @param {string} public_key
|
|
78
|
+
* @param {string} key
|
|
64
79
|
* @returns {boolean}
|
|
65
80
|
*/
|
|
66
|
-
export function
|
|
81
|
+
export function isPublicKey(key: string): boolean;
|
|
67
82
|
/**
|
|
68
|
-
* @
|
|
83
|
+
* @param {string | undefined} [url]
|
|
84
|
+
* @returns {Promise<WasmNetworkPeer>}
|
|
69
85
|
*/
|
|
70
|
-
export function
|
|
86
|
+
export function create_network_peer(url?: string): Promise<WasmNetworkPeer>;
|
|
71
87
|
/**
|
|
72
|
-
* @
|
|
88
|
+
* @param {string} config_json
|
|
89
|
+
* @param {string} private_key
|
|
90
|
+
* @param {number} log_level_num
|
|
91
|
+
* @param {bigint} hasten_multiplier
|
|
92
|
+
* @param {boolean} delete_old_blocks
|
|
93
|
+
* @returns {Promise<any>}
|
|
73
94
|
*/
|
|
74
|
-
export function
|
|
95
|
+
export function initialize(config_json: string, private_key: string, log_level_num: number, hasten_multiplier: bigint, delete_old_blocks: boolean): Promise<any>;
|
|
75
96
|
/**
|
|
76
|
-
* @
|
|
77
|
-
* @returns {Promise<void>}
|
|
97
|
+
* @returns {Promise<Array<any>>}
|
|
78
98
|
*/
|
|
79
|
-
export function
|
|
99
|
+
export function get_nft_list(): Promise<Array<any>>;
|
|
80
100
|
/**
|
|
81
|
-
* @
|
|
101
|
+
* @param {bigint} duration_in_ms
|
|
102
|
+
* @returns {Promise<void>}
|
|
82
103
|
*/
|
|
83
|
-
export function
|
|
104
|
+
export function process_timer_event(duration_in_ms: bigint): Promise<void>;
|
|
84
105
|
/**
|
|
85
|
-
* @param {bigint}
|
|
86
|
-
* @param {string} public_key
|
|
106
|
+
* @param {bigint} current_time
|
|
87
107
|
* @returns {Promise<void>}
|
|
88
108
|
*/
|
|
89
|
-
export function
|
|
109
|
+
export function process_stat_interval(current_time: bigint): Promise<void>;
|
|
90
110
|
/**
|
|
91
|
-
* @param {
|
|
92
|
-
* @
|
|
93
|
-
* @returns {Promise<void>}
|
|
111
|
+
* @param {Uint8Array} buffer
|
|
112
|
+
* @returns {string}
|
|
94
113
|
*/
|
|
95
|
-
export function
|
|
114
|
+
export function hash(buffer: Uint8Array): string;
|
|
96
115
|
/**
|
|
116
|
+
* @param {Uint8Array} buffer
|
|
97
117
|
* @param {string} private_key
|
|
98
118
|
* @returns {string}
|
|
99
119
|
*/
|
|
100
|
-
export function
|
|
120
|
+
export function sign_buffer(buffer: Uint8Array, private_key: string): string;
|
|
101
121
|
/**
|
|
102
|
-
* @param {
|
|
103
|
-
* @
|
|
122
|
+
* @param {Uint8Array} buffer
|
|
123
|
+
* @param {string} signature
|
|
124
|
+
* @param {string} public_key
|
|
125
|
+
* @returns {boolean}
|
|
104
126
|
*/
|
|
105
|
-
export function
|
|
127
|
+
export function verify_signature(buffer: Uint8Array, signature: string, public_key: string): boolean;
|
|
106
128
|
/**
|
|
107
|
-
* @
|
|
129
|
+
* @param {string} json
|
|
130
|
+
* @returns {Promise<number>}
|
|
108
131
|
*/
|
|
109
|
-
export function
|
|
132
|
+
export function evaluate_script(json: string): Promise<number>;
|
|
110
133
|
/**
|
|
111
|
-
* @param {
|
|
112
|
-
* @param {
|
|
113
|
-
* @
|
|
114
|
-
* @param {bigint} peer_id
|
|
115
|
-
* @returns {Promise<void>}
|
|
134
|
+
* @param {string} json
|
|
135
|
+
* @param {WasmTransaction} tx
|
|
136
|
+
* @returns {Promise<number>}
|
|
116
137
|
*/
|
|
117
|
-
export function
|
|
138
|
+
export function evaluate_script_with_transaction(json: string, tx: WasmTransaction): Promise<number>;
|
|
118
139
|
/**
|
|
119
140
|
* @param {string} json
|
|
120
|
-
* @returns {
|
|
141
|
+
* @returns {string}
|
|
121
142
|
*/
|
|
122
|
-
export function
|
|
143
|
+
export function get_script_hash(json: string): string;
|
|
123
144
|
/**
|
|
124
|
-
* @
|
|
125
|
-
* @returns {Promise<void>}
|
|
145
|
+
* @returns {Promise<string>}
|
|
126
146
|
*/
|
|
127
|
-
export function
|
|
147
|
+
export function get_latest_block_hash(): Promise<string>;
|
|
128
148
|
/**
|
|
129
|
-
* @param {string}
|
|
130
|
-
* @returns {Promise<
|
|
149
|
+
* @param {string} block_hash
|
|
150
|
+
* @returns {Promise<WasmBlock>}
|
|
131
151
|
*/
|
|
132
|
-
export function
|
|
152
|
+
export function get_block(block_hash: string): Promise<WasmBlock>;
|
|
133
153
|
/**
|
|
134
|
-
* @param {
|
|
135
|
-
* @param {
|
|
136
|
-
* @
|
|
137
|
-
* @param {bigint} hasten_multiplier
|
|
138
|
-
* @param {boolean} delete_old_blocks
|
|
139
|
-
* @returns {Promise<any>}
|
|
154
|
+
* @param {bigint} peer_id
|
|
155
|
+
* @param {boolean} initiate_handshake
|
|
156
|
+
* @returns {Promise<void>}
|
|
140
157
|
*/
|
|
141
|
-
export function
|
|
158
|
+
export function process_new_peer(peer_id: bigint, initiate_handshake: boolean): Promise<void>;
|
|
142
159
|
/**
|
|
143
|
-
* @
|
|
160
|
+
* @param {bigint} peer_id
|
|
161
|
+
* @param {string} public_key
|
|
162
|
+
* @returns {Promise<void>}
|
|
144
163
|
*/
|
|
145
|
-
export function
|
|
164
|
+
export function process_stun_peer(peer_id: bigint, public_key: string): Promise<void>;
|
|
146
165
|
/**
|
|
147
|
-
* @param {bigint}
|
|
166
|
+
* @param {bigint} peer_id
|
|
167
|
+
* @param {string} public_key
|
|
148
168
|
* @returns {Promise<void>}
|
|
149
169
|
*/
|
|
150
|
-
export function
|
|
170
|
+
export function remove_stun_peer(peer_id: bigint, public_key: string): Promise<void>;
|
|
151
171
|
/**
|
|
152
|
-
* @
|
|
172
|
+
* @param {bigint} peer_id
|
|
173
|
+
* @returns {Promise<void>}
|
|
153
174
|
*/
|
|
154
|
-
export function
|
|
175
|
+
export function process_peer_disconnection(peer_id: bigint): Promise<void>;
|
|
155
176
|
/**
|
|
156
177
|
* @param {Uint8Array} buffer
|
|
157
178
|
* @param {WasmNetworkPeer} peer
|
|
@@ -159,13 +180,20 @@ export function generate_private_key(): string;
|
|
|
159
180
|
*/
|
|
160
181
|
export function process_msg_buffer_from_peer(buffer: Uint8Array, peer: WasmNetworkPeer): Promise<Uint8Array>;
|
|
161
182
|
/**
|
|
162
|
-
* @
|
|
183
|
+
* @param {Uint8Array} buffer
|
|
184
|
+
* @param {Uint8Array} hash
|
|
185
|
+
* @param {bigint} block_id
|
|
186
|
+
* @param {bigint} peer_id
|
|
187
|
+
* @returns {Promise<void>}
|
|
163
188
|
*/
|
|
164
|
-
export function
|
|
189
|
+
export function process_fetched_block(buffer: Uint8Array, hash: Uint8Array, block_id: bigint, peer_id: bigint): Promise<void>;
|
|
165
190
|
/**
|
|
166
|
-
* @
|
|
191
|
+
* @param {Uint8Array} hash
|
|
192
|
+
* @param {bigint} block_id
|
|
193
|
+
* @param {bigint} peer_id
|
|
194
|
+
* @returns {Promise<void>}
|
|
167
195
|
*/
|
|
168
|
-
export function
|
|
196
|
+
export function process_failed_block_fetch(hash: Uint8Array, block_id: bigint, peer_id: bigint): Promise<void>;
|
|
169
197
|
/**
|
|
170
198
|
*/
|
|
171
199
|
export class SaitoWasm {
|
|
@@ -366,6 +394,12 @@ export class WasmBlock {
|
|
|
366
394
|
export class WasmBlockchain {
|
|
367
395
|
free(): void;
|
|
368
396
|
/**
|
|
397
|
+
* @param {number} count
|
|
398
|
+
* @param {boolean} include_offchain
|
|
399
|
+
* @returns {Promise<Array<any>>}
|
|
400
|
+
*/
|
|
401
|
+
get_blocks(count: number, include_offchain: boolean): Promise<Array<any>>;
|
|
402
|
+
/**
|
|
369
403
|
* @returns {Promise<string>}
|
|
370
404
|
*/
|
|
371
405
|
get_fork_id(): Promise<string>;
|
|
@@ -376,6 +410,12 @@ export class WasmBlockchain {
|
|
|
376
410
|
set_fork_id(hash: string): Promise<void>;
|
|
377
411
|
/**
|
|
378
412
|
* @param {bigint} block_id
|
|
413
|
+
* @param {boolean} include_transactions
|
|
414
|
+
* @returns {Promise<WasmBlock>}
|
|
415
|
+
*/
|
|
416
|
+
get_block_by_id(block_id: bigint, include_transactions: boolean): Promise<WasmBlock>;
|
|
417
|
+
/**
|
|
418
|
+
* @param {bigint} block_id
|
|
379
419
|
* @returns {Promise<Array<any>>}
|
|
380
420
|
*/
|
|
381
421
|
get_hashes_at_id(block_id: bigint): Promise<Array<any>>;
|
|
@@ -455,13 +495,19 @@ export class WasmBlockchain {
|
|
|
455
495
|
*/
|
|
456
496
|
get_lowest_acceptable_block_hash(): Promise<string>;
|
|
457
497
|
/**
|
|
458
|
-
* @returns {any}
|
|
459
|
-
*/
|
|
460
|
-
get(): any;
|
|
461
|
-
/**
|
|
462
498
|
* @returns {Promise<void>}
|
|
463
499
|
*/
|
|
464
500
|
reset(): Promise<void>;
|
|
501
|
+
/**
|
|
502
|
+
* @param {string} block_hash
|
|
503
|
+
* @param {boolean} include_transactions
|
|
504
|
+
* @returns {Promise<WasmBlock>}
|
|
505
|
+
*/
|
|
506
|
+
get_block(block_hash: string, include_transactions: boolean): Promise<WasmBlock>;
|
|
507
|
+
/**
|
|
508
|
+
* @returns {any}
|
|
509
|
+
*/
|
|
510
|
+
get(): any;
|
|
465
511
|
}
|
|
466
512
|
/**
|
|
467
513
|
*/
|
|
@@ -577,9 +623,6 @@ export class WasmNetwork {
|
|
|
577
623
|
*/
|
|
578
624
|
propagateTransaction(wtx: WasmTransaction): Promise<void>;
|
|
579
625
|
/**
|
|
580
|
-
*/
|
|
581
|
-
constructor();
|
|
582
|
-
/**
|
|
583
626
|
* @param {string} key
|
|
584
627
|
* @returns {Promise<WasmPeer | undefined>}
|
|
585
628
|
*/
|
|
@@ -589,6 +632,9 @@ export class WasmNetwork {
|
|
|
589
632
|
*/
|
|
590
633
|
getPeers(): Promise<Array<any>>;
|
|
591
634
|
/**
|
|
635
|
+
*/
|
|
636
|
+
constructor();
|
|
637
|
+
/**
|
|
592
638
|
*/
|
|
593
639
|
readonly api: WasmNetworkApi;
|
|
594
640
|
/**
|
|
@@ -630,14 +676,14 @@ export class WasmNetworkPeer {
|
|
|
630
676
|
*/
|
|
631
677
|
get_public_key(): Promise<string>;
|
|
632
678
|
/**
|
|
633
|
-
* @returns {bigint}
|
|
634
|
-
*/
|
|
635
|
-
get_id(): bigint;
|
|
636
|
-
/**
|
|
637
679
|
* @returns {Promise<string>}
|
|
638
680
|
*/
|
|
639
681
|
get_url(): Promise<string>;
|
|
640
682
|
/**
|
|
683
|
+
* @returns {bigint}
|
|
684
|
+
*/
|
|
685
|
+
get_id(): bigint;
|
|
686
|
+
/**
|
|
641
687
|
* @param {bigint} peer_id
|
|
642
688
|
*/
|
|
643
689
|
constructor(peer_id: bigint);
|
|
@@ -652,12 +698,21 @@ export class WasmPeer {
|
|
|
652
698
|
*/
|
|
653
699
|
has_service(service: string): boolean;
|
|
654
700
|
/**
|
|
701
|
+
*/
|
|
702
|
+
readonly host: string;
|
|
703
|
+
/**
|
|
655
704
|
*/
|
|
656
705
|
readonly id: bigint;
|
|
657
706
|
/**
|
|
658
707
|
*/
|
|
659
708
|
readonly key_list: Array<any>;
|
|
660
709
|
/**
|
|
710
|
+
*/
|
|
711
|
+
readonly port: number;
|
|
712
|
+
/**
|
|
713
|
+
*/
|
|
714
|
+
readonly protocol: string;
|
|
715
|
+
/**
|
|
661
716
|
*/
|
|
662
717
|
readonly public_key: string;
|
|
663
718
|
/**
|
|
@@ -748,6 +803,10 @@ export class WasmSlip {
|
|
|
748
803
|
export class WasmTransaction {
|
|
749
804
|
free(): void;
|
|
750
805
|
/**
|
|
806
|
+
* @returns {Promise<void>}
|
|
807
|
+
*/
|
|
808
|
+
sign(): Promise<void>;
|
|
809
|
+
/**
|
|
751
810
|
* @param {WasmSlip} slip
|
|
752
811
|
*/
|
|
753
812
|
add_to_slip(slip: WasmSlip): void;
|
|
@@ -771,10 +830,6 @@ export class WasmTransaction {
|
|
|
771
830
|
*/
|
|
772
831
|
constructor();
|
|
773
832
|
/**
|
|
774
|
-
* @returns {Promise<void>}
|
|
775
|
-
*/
|
|
776
|
-
sign(): Promise<void>;
|
|
777
|
-
/**
|
|
778
833
|
* @param {string} key
|
|
779
834
|
* @returns {boolean}
|
|
780
835
|
*/
|
|
@@ -950,10 +1005,6 @@ export class WasmWallet {
|
|
|
950
1005
|
*/
|
|
951
1006
|
createAtomizeBoundTransaction(slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, tx_msg: Uint8Array): Promise<WasmTransaction>;
|
|
952
1007
|
/**
|
|
953
|
-
* @returns {any}
|
|
954
|
-
*/
|
|
955
|
-
get(): any;
|
|
956
|
-
/**
|
|
957
1008
|
* @param {Array<any>} public_keys
|
|
958
1009
|
* @param {BigUint64Array} amounts
|
|
959
1010
|
* @param {bigint} fee
|
|
@@ -993,6 +1044,10 @@ export class WasmWallet {
|
|
|
993
1044
|
* @returns {Promise<Array<any>>}
|
|
994
1045
|
*/
|
|
995
1046
|
get_slips(): Promise<Array<any>>;
|
|
1047
|
+
/**
|
|
1048
|
+
* @returns {any}
|
|
1049
|
+
*/
|
|
1050
|
+
get(): any;
|
|
996
1051
|
}
|
|
997
1052
|
/**
|
|
998
1053
|
*/
|
|
@@ -1090,7 +1145,9 @@ export interface InitOutput {
|
|
|
1090
1145
|
readonly __wbg_wasmwalletslip_free: (a: number) => void;
|
|
1091
1146
|
readonly create_network_peer: (a: number, b: number) => number;
|
|
1092
1147
|
readonly disable_producing_blocks_by_timer: () => number;
|
|
1148
|
+
readonly enable_producing_blocks_by_timer: () => number;
|
|
1093
1149
|
readonly evaluate_script: (a: number) => number;
|
|
1150
|
+
readonly evaluate_script_with_transaction: (a: number, b: number) => number;
|
|
1094
1151
|
readonly generate_private_key: () => number;
|
|
1095
1152
|
readonly generate_public_key: (a: number, b: number) => void;
|
|
1096
1153
|
readonly get_account_slips: (a: number) => number;
|
|
@@ -1101,10 +1158,13 @@ export interface InitOutput {
|
|
|
1101
1158
|
readonly get_mempool_txs: () => number;
|
|
1102
1159
|
readonly get_network: () => number;
|
|
1103
1160
|
readonly get_nft_list: () => number;
|
|
1161
|
+
readonly get_script_address: (a: number, b: number) => void;
|
|
1162
|
+
readonly get_script_hash: (a: number, b: number) => void;
|
|
1104
1163
|
readonly get_wallet: () => number;
|
|
1105
1164
|
readonly hash: (a: number) => number;
|
|
1106
1165
|
readonly initialize: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
1107
1166
|
readonly isPublicKey: (a: number) => number;
|
|
1167
|
+
readonly merge_witness: (a: number, b: number, c: number) => void;
|
|
1108
1168
|
readonly process_failed_block_fetch: (a: number, b: number, c: number) => number;
|
|
1109
1169
|
readonly process_fetched_block: (a: number, b: number, c: number, d: number) => number;
|
|
1110
1170
|
readonly process_msg_buffer_from_peer: (a: number, b: number) => number;
|
|
@@ -1113,8 +1173,8 @@ export interface InitOutput {
|
|
|
1113
1173
|
readonly process_stat_interval: (a: number) => number;
|
|
1114
1174
|
readonly process_stun_peer: (a: number, b: number) => number;
|
|
1115
1175
|
readonly process_timer_event: (a: number) => number;
|
|
1116
|
-
readonly produce_block_with_gt: () => number;
|
|
1117
|
-
readonly produce_block_without_gt: () => number;
|
|
1176
|
+
readonly produce_block_with_gt: (a: number, b: number) => number;
|
|
1177
|
+
readonly produce_block_without_gt: (a: number, b: number) => number;
|
|
1118
1178
|
readonly remove_stun_peer: (a: number, b: number) => number;
|
|
1119
1179
|
readonly sign_buffer: (a: number, b: number, c: number) => void;
|
|
1120
1180
|
readonly update_from_balance_snapshot: (a: number) => number;
|
|
@@ -1180,7 +1240,10 @@ export interface InitOutput {
|
|
|
1180
1240
|
readonly wasmblock_total_work: (a: number) => number;
|
|
1181
1241
|
readonly wasmblock_treasury: (a: number) => number;
|
|
1182
1242
|
readonly wasmblockchain_get: (a: number) => number;
|
|
1243
|
+
readonly wasmblockchain_get_block: (a: number, b: number, c: number) => number;
|
|
1244
|
+
readonly wasmblockchain_get_block_by_id: (a: number, b: number, c: number) => number;
|
|
1183
1245
|
readonly wasmblockchain_get_block_confirmation_limit: (a: number) => number;
|
|
1246
|
+
readonly wasmblockchain_get_blocks: (a: number, b: number, c: number) => number;
|
|
1184
1247
|
readonly wasmblockchain_get_fork_id: (a: number) => number;
|
|
1185
1248
|
readonly wasmblockchain_get_genesis_block_id: (a: number) => number;
|
|
1186
1249
|
readonly wasmblockchain_get_genesis_timestamp: (a: number) => number;
|
|
@@ -1244,7 +1307,10 @@ export interface InitOutput {
|
|
|
1244
1307
|
readonly wasmnft_slip3: (a: number) => number;
|
|
1245
1308
|
readonly wasmnft_ticker: (a: number) => number;
|
|
1246
1309
|
readonly wasmnft_tx_sig: (a: number) => number;
|
|
1310
|
+
readonly wasmpeer_get_host: (a: number) => number;
|
|
1247
1311
|
readonly wasmpeer_get_key_list: (a: number) => number;
|
|
1312
|
+
readonly wasmpeer_get_port: (a: number) => number;
|
|
1313
|
+
readonly wasmpeer_get_protocol: (a: number) => number;
|
|
1248
1314
|
readonly wasmpeer_get_public_key: (a: number) => number;
|
|
1249
1315
|
readonly wasmpeer_get_services: (a: number) => number;
|
|
1250
1316
|
readonly wasmpeer_get_status: (a: number) => number;
|
|
@@ -1362,10 +1428,10 @@ export interface InitOutput {
|
|
|
1362
1428
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1363
1429
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1364
1430
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
1365
|
-
readonly
|
|
1431
|
+
readonly _dyn_core_9b3796e30d99ddb7___ops__function__FnMut_______Output______as_wasm_bindgen_9c0a948636c8b8c4___closure__WasmClosure___describe__invoke___wasm_bindgen_9c0a948636c8b8c4___JsValue_____: (a: number, b: number, c: number) => void;
|
|
1366
1432
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1367
1433
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1368
|
-
readonly
|
|
1434
|
+
readonly wasm_bindgen_9c0a948636c8b8c4___convert__closures__invoke2_mut___wasm_bindgen_9c0a948636c8b8c4___JsValue__wasm_bindgen_9c0a948636c8b8c4___JsValue_____: (a: number, b: number, c: number, d: number) => void;
|
|
1369
1435
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
1370
1436
|
}
|
|
1371
1437
|
|