@acala-network/chopsticks-utils 1.4.1 → 1.4.2
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/dist/cjs/index.d.ts +4 -2
- package/dist/cjs/index.js +2 -1
- package/dist/esm/index.d.ts +4 -2
- package/dist/esm/index.js +2 -1
- package/package.json +3 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -21,8 +21,10 @@ export type SetupOption = {
|
|
|
21
21
|
wasmOverride?: string;
|
|
22
22
|
/** Path to database file */
|
|
23
23
|
db?: string;
|
|
24
|
-
/**
|
|
24
|
+
/** Timeout (ms) for the test-side WsProvider connecting to the in-process chopsticks server */
|
|
25
25
|
timeout?: number;
|
|
26
|
+
/** Timeout (ms) for chopsticks' own upstream RPC client (chopsticks → upstream/proxy). Forwarded as `rpc-timeout` in the chopsticks config */
|
|
27
|
+
rpcTimeout?: number;
|
|
26
28
|
/** Host address to bind the server to */
|
|
27
29
|
host?: string;
|
|
28
30
|
/** Port number to bind the server to */
|
|
@@ -52,7 +54,7 @@ export type SetupConfig = Config & {
|
|
|
52
54
|
* @param options - Setup options for the network
|
|
53
55
|
* @returns Configuration object compatible with chopsticks
|
|
54
56
|
*/
|
|
55
|
-
export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig;
|
|
57
|
+
export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig;
|
|
56
58
|
/**
|
|
57
59
|
* Sets up a blockchain network context using provided options
|
|
58
60
|
* @param option - Setup options for the network
|
package/dist/cjs/index.js
CHANGED
|
@@ -57,7 +57,7 @@ function _export_star(from, to) {
|
|
|
57
57
|
const logger = _chopsticks.defaultLogger.child({
|
|
58
58
|
name: 'utils'
|
|
59
59
|
});
|
|
60
|
-
const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{
|
|
60
|
+
const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{
|
|
61
61
|
// random port if not specified
|
|
62
62
|
port = port ?? Math.floor(Math.random() * 10000) + 10000;
|
|
63
63
|
const config = {
|
|
@@ -72,6 +72,7 @@ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, time
|
|
|
72
72
|
db,
|
|
73
73
|
'wasm-override': wasmOverride,
|
|
74
74
|
timeout,
|
|
75
|
+
'rpc-timeout': rpcTimeout,
|
|
75
76
|
resume: resume ?? false,
|
|
76
77
|
'allow-unresolved-imports': allowUnresolvedImports,
|
|
77
78
|
'process-queued-messages': processQueuedMessages,
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -21,8 +21,10 @@ export type SetupOption = {
|
|
|
21
21
|
wasmOverride?: string;
|
|
22
22
|
/** Path to database file */
|
|
23
23
|
db?: string;
|
|
24
|
-
/**
|
|
24
|
+
/** Timeout (ms) for the test-side WsProvider connecting to the in-process chopsticks server */
|
|
25
25
|
timeout?: number;
|
|
26
|
+
/** Timeout (ms) for chopsticks' own upstream RPC client (chopsticks → upstream/proxy). Forwarded as `rpc-timeout` in the chopsticks config */
|
|
27
|
+
rpcTimeout?: number;
|
|
26
28
|
/** Host address to bind the server to */
|
|
27
29
|
host?: string;
|
|
28
30
|
/** Port number to bind the server to */
|
|
@@ -52,7 +54,7 @@ export type SetupConfig = Config & {
|
|
|
52
54
|
* @param options - Setup options for the network
|
|
53
55
|
* @returns Configuration object compatible with chopsticks
|
|
54
56
|
*/
|
|
55
|
-
export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig;
|
|
57
|
+
export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig;
|
|
56
58
|
/**
|
|
57
59
|
* Sets up a blockchain network context using provided options
|
|
58
60
|
* @param option - Setup options for the network
|
package/dist/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export * from './signFake.js';
|
|
|
12
12
|
* Creates a configuration object from setup options
|
|
13
13
|
* @param options - Setup options for the network
|
|
14
14
|
* @returns Configuration object compatible with chopsticks
|
|
15
|
-
*/ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{
|
|
15
|
+
*/ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{
|
|
16
16
|
// random port if not specified
|
|
17
17
|
port = port ?? Math.floor(Math.random() * 10000) + 10000;
|
|
18
18
|
const config = {
|
|
@@ -27,6 +27,7 @@ export * from './signFake.js';
|
|
|
27
27
|
db,
|
|
28
28
|
'wasm-override': wasmOverride,
|
|
29
29
|
timeout,
|
|
30
|
+
'rpc-timeout': rpcTimeout,
|
|
30
31
|
resume: resume ?? false,
|
|
31
32
|
'allow-unresolved-imports': allowUnresolvedImports,
|
|
32
33
|
'process-queued-messages': processQueuedMessages,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acala-network/chopsticks-utils",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"author": "Acala Developers <hello@acala.network>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"depcheck": "npx depcheck"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@acala-network/chopsticks": "1.4.
|
|
17
|
-
"@acala-network/chopsticks-core": "1.4.
|
|
16
|
+
"@acala-network/chopsticks": "1.4.2",
|
|
17
|
+
"@acala-network/chopsticks-core": "1.4.2",
|
|
18
18
|
"@polkadot-labs/hdkd": "^0.0.19",
|
|
19
19
|
"@polkadot-labs/hdkd-helpers": "^0.0.19",
|
|
20
20
|
"@polkadot/api": "^16.4.1",
|