|
| 1 | +diff --git a/dist/cjs/index.d.ts b/dist/cjs/index.d.ts |
| 2 | +index e072ffe6156827581272398cf9acd9352d1b502b..ecec2991498332c287c47f35546932126141b001 100644 |
| 3 | +--- a/dist/cjs/index.d.ts |
| 4 | ++++ b/dist/cjs/index.d.ts |
| 5 | +@@ -23,6 +23,8 @@ export type SetupOption = { |
| 6 | + db?: string; |
| 7 | + /** Connection timeout in milliseconds */ |
| 8 | + timeout?: number; |
| 9 | ++ /** Upstream RPC timeout in milliseconds (chopsticks -> upstream/proxy). Forwarded as rpc-timeout. */ |
| 10 | ++ rpcTimeout?: number; |
| 11 | + /** Host address to bind the server to */ |
| 12 | + host?: string; |
| 13 | + /** Port number to bind the server to */ |
| 14 | +@@ -52,7 +54,7 @@ export type SetupConfig = Config & { |
| 15 | + * @param options - Setup options for the network |
| 16 | + * @returns Configuration object compatible with chopsticks |
| 17 | + */ |
| 18 | +-export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; |
| 19 | ++export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; |
| 20 | + /** |
| 21 | + * Sets up a blockchain network context using provided options |
| 22 | + * @param option - Setup options for the network |
| 23 | +diff --git a/dist/cjs/index.js b/dist/cjs/index.js |
| 24 | +index 68a4dfb2ef3443eaf662482bd64d66fbf0f904c2..dce2a4c1cb6a048adef2b41506c7d2b516eae5d7 100644 |
| 25 | +--- a/dist/cjs/index.js |
| 26 | ++++ b/dist/cjs/index.js |
| 27 | +@@ -57,7 +57,7 @@ function _export_star(from, to) { |
| 28 | + const logger = _chopsticks.defaultLogger.child({ |
| 29 | + name: 'utils' |
| 30 | + }); |
| 31 | +-const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ |
| 32 | ++const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ |
| 33 | + // random port if not specified |
| 34 | + port = port ?? Math.floor(Math.random() * 10000) + 10000; |
| 35 | + const config = { |
| 36 | +@@ -72,6 +72,7 @@ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, time |
| 37 | + db, |
| 38 | + 'wasm-override': wasmOverride, |
| 39 | + timeout, |
| 40 | ++ 'rpc-timeout': rpcTimeout, |
| 41 | + resume: resume ?? false, |
| 42 | + 'allow-unresolved-imports': allowUnresolvedImports, |
| 43 | + 'process-queued-messages': processQueuedMessages, |
| 44 | +diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts |
| 45 | +index e072ffe6156827581272398cf9acd9352d1b502b..ecec2991498332c287c47f35546932126141b001 100644 |
| 46 | +--- a/dist/esm/index.d.ts |
| 47 | ++++ b/dist/esm/index.d.ts |
| 48 | +@@ -23,6 +23,8 @@ export type SetupOption = { |
| 49 | + db?: string; |
| 50 | + /** Connection timeout in milliseconds */ |
| 51 | + timeout?: number; |
| 52 | ++ /** Upstream RPC timeout in milliseconds (chopsticks -> upstream/proxy). Forwarded as rpc-timeout. */ |
| 53 | ++ rpcTimeout?: number; |
| 54 | + /** Host address to bind the server to */ |
| 55 | + host?: string; |
| 56 | + /** Port number to bind the server to */ |
| 57 | +@@ -52,7 +54,7 @@ export type SetupConfig = Config & { |
| 58 | + * @param options - Setup options for the network |
| 59 | + * @returns Configuration object compatible with chopsticks |
| 60 | + */ |
| 61 | +-export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; |
| 62 | ++export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; |
| 63 | + /** |
| 64 | + * Sets up a blockchain network context using provided options |
| 65 | + * @param option - Setup options for the network |
| 66 | +diff --git a/dist/esm/index.js b/dist/esm/index.js |
| 67 | +index 6509ac6f609c0abcef9996b563181930ae933413..bb2db6a13d46f46cc5d1c7cee53708e3f53b08da 100644 |
| 68 | +--- a/dist/esm/index.js |
| 69 | ++++ b/dist/esm/index.js |
| 70 | +@@ -12,7 +12,7 @@ export * from './signFake.js'; |
| 71 | + * Creates a configuration object from setup options |
| 72 | + * @param options - Setup options for the network |
| 73 | + * @returns Configuration object compatible with chopsticks |
| 74 | +- */ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ |
| 75 | ++ */ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ |
| 76 | + // random port if not specified |
| 77 | + port = port ?? Math.floor(Math.random() * 10000) + 10000; |
| 78 | + const config = { |
| 79 | +@@ -27,6 +27,7 @@ export * from './signFake.js'; |
| 80 | + db, |
| 81 | + 'wasm-override': wasmOverride, |
| 82 | + timeout, |
| 83 | ++ 'rpc-timeout': rpcTimeout, |
| 84 | + resume: resume ?? false, |
| 85 | + 'allow-unresolved-imports': allowUnresolvedImports, |
| 86 | + 'process-queued-messages': processQueuedMessages, |
0 commit comments