@acala-network/chopsticks 1.1.1 → 1.2.0
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/cli.js +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/dry-run/dry-run-preimage.js +1 -1
- package/dist/cjs/plugins/dry-run/rpc.d.ts +1 -1
- package/dist/cjs/plugins/dry-run/rpc.js +1 -1
- package/dist/cjs/plugins/index.js +1 -1
- package/dist/cjs/plugins/run-block/cli.js +1 -1
- package/dist/cjs/plugins/run-block/rpc.d.ts +1 -1
- package/dist/cjs/plugins/run-block/rpc.js +2 -2
- package/dist/cjs/plugins/types.d.ts +2 -2
- package/dist/cjs/types.d.ts +2 -2
- package/dist/cjs/types.js +1 -1
- package/dist/cjs/utils/index.d.ts +1 -1
- package/dist/cjs/utils/index.js +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/context.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/dry-run/dry-run-preimage.js +1 -1
- package/dist/esm/plugins/dry-run/rpc.d.ts +1 -1
- package/dist/esm/plugins/dry-run/rpc.js +1 -1
- package/dist/esm/plugins/index.js +2 -2
- package/dist/esm/plugins/run-block/cli.js +1 -1
- package/dist/esm/plugins/run-block/rpc.d.ts +1 -1
- package/dist/esm/plugins/run-block/rpc.js +2 -2
- package/dist/esm/plugins/types.d.ts +2 -2
- package/dist/esm/rpc/index.js +1 -1
- package/dist/esm/types.d.ts +2 -2
- package/dist/esm/types.js +2 -2
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/utils/index.js +1 -1
- package/package.json +18 -18
package/dist/cjs/cli.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
+
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
5
6
|
const _dotenv = require("dotenv");
|
|
6
7
|
const _lodash = /*#__PURE__*/ _interop_require_default(require("lodash"));
|
|
7
8
|
const _yargs = /*#__PURE__*/ _interop_require_default(require("yargs"));
|
|
8
9
|
const _helpers = require("yargs/helpers");
|
|
9
10
|
const _zod = require("zod");
|
|
10
|
-
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
11
11
|
const _index = require("./index.js");
|
|
12
12
|
const _index1 = require("./plugins/index.js");
|
|
13
13
|
const _index2 = require("./schema/index.js");
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -18,8 +18,8 @@ _export(exports, {
|
|
|
18
18
|
});
|
|
19
19
|
require("@polkadot/api-augment");
|
|
20
20
|
_export_star(require("@acala-network/chopsticks-core"), exports);
|
|
21
|
-
const _setupwithserver = require("./setup-with-server.js");
|
|
22
21
|
const _index = require("./schema/index.js");
|
|
22
|
+
const _setupwithserver = require("./setup-with-server.js");
|
|
23
23
|
function _export_star(from, to) {
|
|
24
24
|
Object.keys(from).forEach(function(k) {
|
|
25
25
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "dryRunPreimage", {
|
|
|
8
8
|
return dryRunPreimage;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
11
12
|
const _util = require("@polkadot/util");
|
|
12
13
|
const _utilcrypto = require("@polkadot/util-crypto");
|
|
13
|
-
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
14
14
|
const _context = require("../../context.js");
|
|
15
15
|
const _logger = require("../../logger.js");
|
|
16
16
|
const _generatehtmldiff = require("../../utils/generate-html-diff.js");
|
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "rpc", {
|
|
|
8
8
|
return rpc;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _zod = require("zod");
|
|
12
11
|
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
12
|
+
const _zod = require("zod");
|
|
13
13
|
const _index = require("../../schema/index.js");
|
|
14
14
|
const _decoder = require("../../utils/decoder.js");
|
|
15
15
|
const _generatehtmldiff = require("../../utils/generate-html-diff.js");
|
|
@@ -29,9 +29,9 @@ _export(exports, {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
const _nodefs = require("node:fs");
|
|
32
|
+
const _nodepath = require("node:path");
|
|
32
33
|
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
33
34
|
const _lodash = /*#__PURE__*/ _interop_require_default(require("lodash"));
|
|
34
|
-
const _nodepath = require("node:path");
|
|
35
35
|
const _logger = require("../logger.js");
|
|
36
36
|
function _interop_require_default(obj) {
|
|
37
37
|
return obj && obj.__esModule ? obj : {
|
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "cli", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _nodefs = require("node:fs");
|
|
12
|
-
const _zod = require("zod");
|
|
13
12
|
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
13
|
+
const _zod = require("zod");
|
|
14
14
|
const _context = require("../../context.js");
|
|
15
15
|
const _index = require("../../schema/index.js");
|
|
16
16
|
const _generatehtmldiff = require("../../utils/generate-html-diff.js");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type Context, type RuntimeLog } from '@acala-network/chopsticks-core';
|
|
1
2
|
import type { HexString } from '@polkadot/util/types';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import { type Context, type RuntimeLog } from '@acala-network/chopsticks-core';
|
|
4
4
|
declare const schema: z.ZodObject<{
|
|
5
5
|
includeRaw: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
includeParsed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -16,9 +16,9 @@ _export(exports, {
|
|
|
16
16
|
return rpc;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
19
20
|
const _util = require("@polkadot/util");
|
|
20
21
|
const _zod = require("zod");
|
|
21
|
-
const _chopstickscore = require("@acala-network/chopsticks-core");
|
|
22
22
|
const _index = require("../../schema/index.js");
|
|
23
23
|
const schema = _zod.z.object({
|
|
24
24
|
includeRaw: _zod.z.boolean().optional(),
|
|
@@ -140,7 +140,7 @@ const rpc = async ({ chain }, [params])=>{
|
|
|
140
140
|
const timestamp = await newBlock.read('u64', meta.query.timestamp.now);
|
|
141
141
|
const events = await newBlock.read('Vec<EventRecord>', meta.query.system.events);
|
|
142
142
|
const parsedEvents = events?.map((event)=>{
|
|
143
|
-
let argObj
|
|
143
|
+
let argObj;
|
|
144
144
|
const len = event.event.data.names?.length ?? 0;
|
|
145
145
|
if (len > 0) {
|
|
146
146
|
argObj = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { rpc as dryRun } from './dry-run/index.js';
|
|
2
|
-
export { rpc as runBlock } from './run-block/index.js';
|
|
3
1
|
export type { DryRunParams } from './dry-run/index.js';
|
|
2
|
+
export { rpc as dryRun } from './dry-run/index.js';
|
|
4
3
|
export type { RunBlockParams } from './run-block/index.js';
|
|
4
|
+
export { rpc as runBlock } from './run-block/index.js';
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
13
|
-
export type { ChainProperties,
|
|
14
|
-
export * from '@acala-network/chopsticks-core/rpc/substrate/index.js';
|
|
13
|
+
export type { ChainProperties, Context, Handler, RuntimeVersion, SubscriptionManager, } from '@acala-network/chopsticks-core';
|
|
15
14
|
export * as DevRPC from '@acala-network/chopsticks-core/rpc/dev/index.js';
|
|
15
|
+
export * from '@acala-network/chopsticks-core/rpc/substrate/index.js';
|
|
16
16
|
export * from './plugins/types.js';
|
package/dist/cjs/types.js
CHANGED
|
@@ -19,8 +19,8 @@ Object.defineProperty(exports, "DevRPC", {
|
|
|
19
19
|
return _index;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
_export_star(require("@acala-network/chopsticks-core/rpc/substrate/index.js"), exports);
|
|
23
22
|
const _index = /*#__PURE__*/ _interop_require_wildcard(require("@acala-network/chopsticks-core/rpc/dev/index.js"));
|
|
23
|
+
_export_star(require("@acala-network/chopsticks-core/rpc/substrate/index.js"), exports);
|
|
24
24
|
_export_star(require("./plugins/types.js"), exports);
|
|
25
25
|
function _export_star(from, to) {
|
|
26
26
|
Object.keys(from).forEach(function(k) {
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
_export_star(require("./decoder.js"), exports);
|
|
6
|
+
_export_star(require("./fetch-storages.js"), exports);
|
|
6
7
|
_export_star(require("./generate-html-diff.js"), exports);
|
|
7
8
|
_export_star(require("./open-html.js"), exports);
|
|
8
9
|
_export_star(require("./override.js"), exports);
|
|
9
|
-
_export_star(require("./fetch-storages.js"), exports);
|
|
10
10
|
function _export_star(from, to) {
|
|
11
11
|
Object.keys(from).forEach(function(k) {
|
|
12
12
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
package/dist/esm/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { connectParachains, connectVertical, environment } from '@acala-network/chopsticks-core';
|
|
1
2
|
import { config as dotenvConfig } from 'dotenv';
|
|
2
3
|
import _ from 'lodash';
|
|
3
4
|
import yargs from 'yargs';
|
|
4
5
|
import { hideBin } from 'yargs/helpers';
|
|
5
6
|
import { z } from 'zod';
|
|
6
|
-
import { connectParachains, connectVertical, environment } from '@acala-network/chopsticks-core';
|
|
7
7
|
import { setupWithServer } from './index.js';
|
|
8
8
|
import { loadRpcMethodsByScripts, pluginExtendCli } from './plugins/index.js';
|
|
9
9
|
import { configSchema, fetchConfig, getYargsOptions } from './schema/index.js';
|
package/dist/esm/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './utils/tunnel.js';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultLogger, GenesisProvider, isUrl, setup, timeTravel } from '@acala-network/chopsticks-core';
|
|
3
3
|
import { SqliteDatabase } from '@acala-network/chopsticks-db';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import { apiFetching } from './logger.js';
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Block, newHeader, runTask, setStorage, taskHandler } from '@acala-network/chopsticks-core';
|
|
1
2
|
import { compactAddLength, hexToU8a } from '@polkadot/util';
|
|
2
3
|
import { blake2AsHex } from '@polkadot/util-crypto';
|
|
3
|
-
import { Block, newHeader, runTask, setStorage, taskHandler } from '@acala-network/chopsticks-core';
|
|
4
4
|
import { setupContext } from '../../context.js';
|
|
5
5
|
import { defaultLogger } from '../../logger.js';
|
|
6
6
|
import { generateHtmlDiffPreviewFile } from '../../utils/generate-html-diff.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { ResponseError } from '@acala-network/chopsticks-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
import { zHash, zHex } from '../../schema/index.js';
|
|
4
4
|
import { decodeStorageDiff } from '../../utils/decoder.js';
|
|
5
5
|
import { generateHtmlDiff } from '../../utils/generate-html-diff.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { lstatSync,
|
|
1
|
+
import { lstatSync, readdirSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
2
3
|
import { environment } from '@acala-network/chopsticks-core';
|
|
3
4
|
import _ from 'lodash';
|
|
4
|
-
import { resolve } from 'node:path';
|
|
5
5
|
import { defaultLogger } from '../logger.js';
|
|
6
6
|
const logger = defaultLogger.child({
|
|
7
7
|
name: 'plugin'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writeFileSync } from 'node:fs';
|
|
2
|
-
import { z } from 'zod';
|
|
3
2
|
import { runTask, taskHandler } from '@acala-network/chopsticks-core';
|
|
3
|
+
import { z } from 'zod';
|
|
4
4
|
import { setupContext } from '../../context.js';
|
|
5
5
|
import { configSchema, getYargsOptions } from '../../schema/index.js';
|
|
6
6
|
import { generateHtmlDiffPreviewFile } from '../../utils/generate-html-diff.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type Context, type RuntimeLog } from '@acala-network/chopsticks-core';
|
|
1
2
|
import type { HexString } from '@polkadot/util/types';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import { type Context, type RuntimeLog } from '@acala-network/chopsticks-core';
|
|
4
4
|
declare const schema: z.ZodObject<{
|
|
5
5
|
includeRaw: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
includeParsed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Block, compactHex, decodeKeyValue, runTask, taskHandler } from '@acala-network/chopsticks-core';
|
|
1
2
|
import { u8aToHex } from '@polkadot/util';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import { Block, compactHex, decodeKeyValue, runTask, taskHandler } from '@acala-network/chopsticks-core';
|
|
4
4
|
import { zHash, zHex } from '../../schema/index.js';
|
|
5
5
|
const schema = z.object({
|
|
6
6
|
includeRaw: z.boolean().optional(),
|
|
@@ -129,7 +129,7 @@ export const name = 'runBlock';
|
|
|
129
129
|
const timestamp = await newBlock.read('u64', meta.query.timestamp.now);
|
|
130
130
|
const events = await newBlock.read('Vec<EventRecord>', meta.query.system.events);
|
|
131
131
|
const parsedEvents = events?.map((event)=>{
|
|
132
|
-
let argObj
|
|
132
|
+
let argObj;
|
|
133
133
|
const len = event.event.data.names?.length ?? 0;
|
|
134
134
|
if (len > 0) {
|
|
135
135
|
argObj = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { rpc as dryRun } from './dry-run/index.js';
|
|
2
|
-
export { rpc as runBlock } from './run-block/index.js';
|
|
3
1
|
export type { DryRunParams } from './dry-run/index.js';
|
|
2
|
+
export { rpc as dryRun } from './dry-run/index.js';
|
|
4
3
|
export type { RunBlockParams } from './run-block/index.js';
|
|
4
|
+
export { rpc as runBlock } from './run-block/index.js';
|
package/dist/esm/rpc/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { allHandlers as coreHandlers, defaultLogger, ResponseError } from '@acala-network/chopsticks-core';
|
|
2
2
|
import { getRpcExtensionMethods, loadRpcExtensionMethod } from '../plugins/index.js';
|
|
3
3
|
const rpcLogger = defaultLogger.child({
|
|
4
4
|
name: 'rpc'
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
13
|
-
export type { ChainProperties,
|
|
14
|
-
export * from '@acala-network/chopsticks-core/rpc/substrate/index.js';
|
|
13
|
+
export type { ChainProperties, Context, Handler, RuntimeVersion, SubscriptionManager, } from '@acala-network/chopsticks-core';
|
|
15
14
|
export * as DevRPC from '@acala-network/chopsticks-core/rpc/dev/index.js';
|
|
15
|
+
export * from '@acala-network/chopsticks-core/rpc/substrate/index.js';
|
|
16
16
|
export * from './plugins/types.js';
|
package/dist/esm/types.js
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
* `export` below is for tsdoc.
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
|
-
*/ export * from '@acala-network/chopsticks-core/rpc/
|
|
13
|
-
export *
|
|
12
|
+
*/ export * as DevRPC from '@acala-network/chopsticks-core/rpc/dev/index.js';
|
|
13
|
+
export * from '@acala-network/chopsticks-core/rpc/substrate/index.js';
|
|
14
14
|
export * from './plugins/types.js';
|
package/dist/esm/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acala-network/chopsticks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"author": "Acala Developers <hello@acala.network>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"bin": "./chopsticks.cjs",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">=v22"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
@@ -15,33 +15,33 @@
|
|
|
15
15
|
"depcheck": "npx depcheck --ignore-patterns='*.test.ts'"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@acala-network/chopsticks-core": "1.
|
|
19
|
-
"@acala-network/chopsticks-db": "1.
|
|
18
|
+
"@acala-network/chopsticks-core": "1.2.0",
|
|
19
|
+
"@acala-network/chopsticks-db": "1.2.0",
|
|
20
20
|
"@pnpm/npm-conf": "^3.0.0",
|
|
21
|
-
"@polkadot/api": "^16.
|
|
22
|
-
"@polkadot/api-augment": "^16.
|
|
23
|
-
"@polkadot/rpc-provider": "^16.
|
|
24
|
-
"@polkadot/types": "^16.
|
|
25
|
-
"@polkadot/util": "^13.5.
|
|
26
|
-
"@polkadot/util-crypto": "^13.5.
|
|
27
|
-
"axios": "^1.
|
|
21
|
+
"@polkadot/api": "^16.4.1",
|
|
22
|
+
"@polkadot/api-augment": "^16.4.1",
|
|
23
|
+
"@polkadot/rpc-provider": "^16.4.1",
|
|
24
|
+
"@polkadot/types": "^16.4.1",
|
|
25
|
+
"@polkadot/util": "^13.5.3",
|
|
26
|
+
"@polkadot/util-crypto": "^13.5.3",
|
|
27
|
+
"axios": "^1.10.0",
|
|
28
28
|
"comlink": "^4.4.2",
|
|
29
|
-
"dotenv": "^16.
|
|
29
|
+
"dotenv": "^16.6.1",
|
|
30
30
|
"global-agent": "^3.0.0",
|
|
31
31
|
"js-yaml": "^4.1.0",
|
|
32
32
|
"jsondiffpatch": "^0.5.0",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
|
-
"ws": "^8.18.
|
|
34
|
+
"ws": "^8.18.3",
|
|
35
35
|
"yargs": "^18.0.0",
|
|
36
|
-
"zod": "^3.25.
|
|
36
|
+
"zod": "^3.25.76"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@swc/cli": "0.7.
|
|
40
|
-
"@swc/core": "^1.12.
|
|
39
|
+
"@swc/cli": "0.7.8",
|
|
40
|
+
"@swc/core": "^1.12.11",
|
|
41
41
|
"@types/global-agent": "^3.0.0",
|
|
42
42
|
"@types/js-yaml": "^4.0.9",
|
|
43
|
-
"@types/lodash": "^4.17.
|
|
44
|
-
"@types/node": "^24.0.
|
|
43
|
+
"@types/lodash": "^4.17.20",
|
|
44
|
+
"@types/node": "^24.0.13",
|
|
45
45
|
"@types/ws": "^8.18.1",
|
|
46
46
|
"@types/yargs": "^17.0.33",
|
|
47
47
|
"typescript": "^5.8.3"
|