@typeberry/lib 0.5.3 → 0.5.4-472e282
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/package.json +8 -4
- package/packages/core/hash/hash.d.ts.map +1 -1
- package/packages/core/hash/hash.js +1 -0
- package/packages/core/networking/certificate.d.ts.map +1 -1
- package/packages/core/networking/certificate.js +1 -0
- package/packages/core/networking/package.json +1 -1
- package/packages/core/networking/setup.d.ts.map +1 -1
- package/packages/core/networking/setup.js +16 -12
- package/packages/core/numbers/index.d.ts +4 -0
- package/packages/core/numbers/index.d.ts.map +1 -1
- package/packages/core/numbers/index.js +4 -4
- package/packages/core/pvm-host-calls/host-calls-executor.d.ts +23 -17
- package/packages/core/pvm-host-calls/host-calls-executor.d.ts.map +1 -1
- package/packages/core/pvm-host-calls/host-calls-executor.js +23 -31
- package/packages/core/pvm-interpreter/ops/math-consts.d.ts +2 -3
- package/packages/core/pvm-interpreter/ops/math-consts.d.ts.map +1 -1
- package/packages/core/pvm-interpreter/ops/math-consts.js +2 -3
- package/packages/core/pvm-interpreter/ops/math-ops.js +3 -3
- package/packages/core/pvm-interpreter/ops/math-utils.js +13 -13
- package/packages/core/pvm-interpreter/ops/math-utils.test.js +17 -16
- package/packages/core/telemetry/package.json +1 -1
- package/packages/core/utils/compatibility.d.ts +0 -1
- package/packages/core/utils/compatibility.d.ts.map +1 -1
- package/packages/core/utils/compatibility.js +1 -2
- package/packages/core/utils/compatibility.test.js +6 -10
- package/packages/extensions/ipc/jamnp/handler.d.ts +5 -4
- package/packages/extensions/ipc/jamnp/handler.d.ts.map +1 -1
- package/packages/extensions/ipc/jamnp/handler.js +59 -34
- package/packages/extensions/ipc/jamnp/stream.d.ts +6 -4
- package/packages/extensions/ipc/jamnp/stream.d.ts.map +1 -1
- package/packages/jam/block/index.d.ts +11 -11
- package/packages/jam/block/index.d.ts.map +1 -1
- package/packages/jam/block/index.js +11 -11
- package/packages/jam/block/work-item.d.ts +13 -4
- package/packages/jam/block/work-item.d.ts.map +1 -1
- package/packages/jam/block/work-package.d.ts +3 -1
- package/packages/jam/block/work-package.d.ts.map +1 -1
- package/packages/jam/block/work-package.js +6 -2
- package/packages/jam/block/work-result.d.ts +3 -5
- package/packages/jam/block/work-result.d.ts.map +1 -1
- package/packages/jam/block/work-result.js +6 -0
- package/packages/jam/block-json/block.d.ts +125 -0
- package/packages/jam/block-json/block.d.ts.map +1 -1
- package/packages/jam/block-json/block.js +9 -2
- package/packages/jam/block-json/work-result.d.ts.map +1 -1
- package/packages/jam/block-json/work-result.js +6 -6
- package/packages/jam/database-lmdb/states.test.js +2 -3
- package/packages/jam/executor/index.d.ts +4 -0
- package/packages/jam/executor/index.d.ts.map +1 -0
- package/packages/jam/executor/index.js +2 -0
- package/packages/jam/{transition/accumulate → executor}/pvm-executor.d.ts +19 -16
- package/packages/jam/executor/pvm-executor.d.ts.map +1 -0
- package/packages/jam/{transition/accumulate → executor}/pvm-executor.js +46 -3
- package/packages/jam/fuzz-proto/v1/handler.d.ts +1 -1
- package/packages/jam/fuzz-proto/v1/handler.d.ts.map +1 -1
- package/packages/jam/fuzz-proto/v1/handler.js +43 -19
- package/packages/jam/fuzz-proto/v1/types.d.ts +1 -1
- package/packages/jam/in-core/externalities/refine.d.ts +24 -0
- package/packages/jam/in-core/externalities/refine.d.ts.map +1 -0
- package/packages/jam/in-core/externalities/refine.js +36 -0
- package/packages/jam/in-core/in-core.d.ts +60 -0
- package/packages/jam/in-core/in-core.d.ts.map +1 -0
- package/packages/jam/in-core/in-core.js +294 -0
- package/packages/jam/in-core/in-core.test.d.ts +2 -0
- package/packages/jam/in-core/in-core.test.d.ts.map +1 -0
- package/packages/jam/in-core/in-core.test.js +81 -0
- package/packages/jam/in-core/index.d.ts +2 -0
- package/packages/jam/in-core/index.d.ts.map +1 -0
- package/packages/jam/in-core/index.js +1 -0
- package/packages/jam/jam-host-calls/accumulate/bless.d.ts.map +1 -1
- package/packages/jam/jam-host-calls/accumulate/bless.js +6 -10
- package/packages/jam/jam-host-calls/accumulate/bless.test.js +32 -73
- package/packages/jam/jam-host-calls/accumulate/new.d.ts.map +1 -1
- package/packages/jam/jam-host-calls/accumulate/new.js +2 -4
- package/packages/jam/jam-host-calls/accumulate/new.test.js +4 -5
- package/packages/jam/jam-host-calls/general/fetch.d.ts +1 -57
- package/packages/jam/jam-host-calls/general/fetch.d.ts.map +1 -1
- package/packages/jam/jam-host-calls/general/fetch.js +6 -29
- package/packages/jam/jam-host-calls/general/fetch.test.js +2 -58
- package/packages/jam/jamnp-s/peers.d.ts.map +1 -1
- package/packages/jam/jamnp-s/peers.js +10 -0
- package/packages/jam/jamnp-s/protocol/ce-128-block-request.d.ts +1 -1
- package/packages/jam/jamnp-s/protocol/ce-128-block-request.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/ce-128-block-request.js +10 -8
- package/packages/jam/jamnp-s/protocol/ce-129-state-request.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/ce-129-state-request.js +11 -9
- package/packages/jam/jamnp-s/protocol/ce-131-ce-132-safrole-ticket-distribution.d.ts +3 -3
- package/packages/jam/jamnp-s/protocol/ce-131-ce-132-safrole-ticket-distribution.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/ce-131-ce-132-safrole-ticket-distribution.js +2 -2
- package/packages/jam/jamnp-s/protocol/ce-133-work-package-submission.d.ts +9 -9
- package/packages/jam/jamnp-s/protocol/ce-133-work-package-submission.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/ce-133-work-package-submission.js +2 -2
- package/packages/jam/jamnp-s/protocol/ce-134-work-package-sharing.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/ce-134-work-package-sharing.js +8 -6
- package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.d.ts +16 -16
- package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.js +2 -2
- package/packages/jam/jamnp-s/protocol/ce-135-work-report-distribution.test.js +2 -2
- package/packages/jam/jamnp-s/protocol/stream.d.ts +13 -7
- package/packages/jam/jamnp-s/protocol/stream.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/stream.js +5 -4
- package/packages/jam/jamnp-s/protocol/test-utils.d.ts +1 -1
- package/packages/jam/jamnp-s/protocol/test-utils.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/test-utils.js +9 -12
- package/packages/jam/jamnp-s/protocol/up-0-block-announcement.d.ts +2 -2
- package/packages/jam/jamnp-s/protocol/up-0-block-announcement.d.ts.map +1 -1
- package/packages/jam/jamnp-s/protocol/up-0-block-announcement.js +1 -1
- package/packages/jam/jamnp-s/stream-manager.d.ts.map +1 -1
- package/packages/jam/jamnp-s/stream-manager.js +7 -5
- package/packages/jam/jamnp-s/stream-manager.test.js +8 -5
- package/packages/jam/jamnp-s/tasks/sync.js +1 -1
- package/packages/jam/node/jam-config.d.ts +4 -1
- package/packages/jam/node/jam-config.d.ts.map +1 -1
- package/packages/jam/node/jam-config.js +6 -2
- package/packages/jam/node/main.d.ts.map +1 -1
- package/packages/jam/node/main.js +5 -4
- package/packages/jam/node/package.json +1 -1
- package/packages/jam/node/reader.d.ts +25 -25
- package/packages/jam/node/workers.d.ts +183 -183
- package/packages/jam/rpc-validation/types.d.ts +7 -3
- package/packages/jam/rpc-validation/types.d.ts.map +1 -1
- package/packages/jam/rpc-validation/validation.d.ts +254 -36
- package/packages/jam/rpc-validation/validation.d.ts.map +1 -1
- package/packages/jam/rpc-validation/validation.js +20 -2
- package/packages/jam/state/accumulation-queue.d.ts +26 -26
- package/packages/jam/state/assurances.d.ts +26 -26
- package/packages/jam/state/in-memory-state.d.ts.map +1 -1
- package/packages/jam/state/in-memory-state.js +2 -3
- package/packages/jam/state/privileged-services.d.ts +1 -1
- package/packages/jam/state/privileged-services.d.ts.map +1 -1
- package/packages/jam/state/privileged-services.js +1 -6
- package/packages/jam/state/service.d.ts +1 -1
- package/packages/jam/state/service.d.ts.map +1 -1
- package/packages/jam/state/statistics.d.ts +0 -8
- package/packages/jam/state/statistics.d.ts.map +1 -1
- package/packages/jam/state/statistics.js +14 -44
- package/packages/jam/state/statistics.test.js +1 -8
- package/packages/jam/state/test.utils.d.ts +1 -1
- package/packages/jam/state/test.utils.d.ts.map +1 -1
- package/packages/jam/state/test.utils.js +6 -25
- package/packages/jam/state-json/accounts.d.ts +10 -0
- package/packages/jam/state-json/accounts.d.ts.map +1 -1
- package/packages/jam/state-json/accounts.js +47 -19
- package/packages/jam/state-json/dump.d.ts.map +1 -1
- package/packages/jam/state-json/dump.js +5 -9
- package/packages/jam/state-json/dump.test.js +2 -10
- package/packages/jam/state-json/statistics.d.ts +1 -1
- package/packages/jam/state-json/statistics.d.ts.map +1 -1
- package/packages/jam/state-json/statistics.js +1 -13
- package/packages/jam/state-merkleization/in-memory-state-codec.d.ts +29 -31
- package/packages/jam/state-merkleization/in-memory-state-codec.d.ts.map +1 -1
- package/packages/jam/state-merkleization/serialize.d.ts +4 -4
- package/packages/jam/state-merkleization/serialize.d.ts.map +1 -1
- package/packages/jam/state-merkleization/serialize.js +5 -8
- package/packages/jam/state-merkleization/serialized-state-view.d.ts.map +1 -1
- package/packages/jam/state-merkleization/state-entries.test.js +1 -7
- package/packages/jam/state-vectors/index.d.ts +377 -5
- package/packages/jam/state-vectors/index.d.ts.map +1 -1
- package/packages/jam/state-vectors/index.js +3 -3
- package/packages/jam/transition/accumulate/accumulate-data.d.ts.map +1 -1
- package/packages/jam/transition/accumulate/accumulate-data.js +1 -2
- package/packages/jam/transition/accumulate/accumulate-queue.test.js +2 -2
- package/packages/jam/transition/accumulate/accumulate-state.d.ts +1 -2
- package/packages/jam/transition/accumulate/accumulate-state.d.ts.map +1 -1
- package/packages/jam/transition/accumulate/accumulate-utils.d.ts.map +1 -1
- package/packages/jam/transition/accumulate/accumulate-utils.js +2 -6
- package/packages/jam/transition/accumulate/accumulate-utils.test.js +4 -6
- package/packages/jam/transition/accumulate/accumulate.d.ts.map +1 -1
- package/packages/jam/transition/accumulate/accumulate.js +19 -33
- package/packages/jam/transition/accumulate/accumulate.test.js +2 -2
- package/packages/jam/transition/accumulate/accumulation-result-merge-utils.d.ts.map +1 -1
- package/packages/jam/transition/accumulate/accumulation-result-merge-utils.js +1 -2
- package/packages/jam/transition/accumulate/accumulation-result-merge-utils.test.js +1 -2
- package/packages/jam/transition/accumulate/index.d.ts +0 -1
- package/packages/jam/transition/accumulate/index.d.ts.map +1 -1
- package/packages/jam/transition/accumulate/index.js +0 -1
- package/packages/jam/transition/accumulate/operand.d.ts +7 -7
- package/packages/jam/transition/chain-stf.d.ts +3 -5
- package/packages/jam/transition/chain-stf.d.ts.map +1 -1
- package/packages/jam/transition/chain-stf.js +5 -29
- package/packages/jam/transition/disputes/disputes.test.data2.d.ts +3 -3
- package/packages/jam/transition/disputes/disputes.test.data2.d.ts.map +1 -1
- package/packages/jam/transition/disputes/disputes.test.data2.js +2 -2
- package/packages/jam/transition/externalities/accumulate-externalities.d.ts.map +1 -1
- package/packages/jam/transition/externalities/accumulate-externalities.js +22 -49
- package/packages/jam/transition/externalities/accumulate-externalities.test.js +8 -72
- package/packages/jam/transition/externalities/fetch-externalities.d.ts +8 -21
- package/packages/jam/transition/externalities/fetch-externalities.d.ts.map +1 -1
- package/packages/jam/transition/externalities/fetch-externalities.js +5 -53
- package/packages/jam/transition/externalities/fetch-externalities.test.js +201 -114
- package/packages/jam/transition/hasher.test.js +2 -2
- package/packages/jam/transition/reports/error.d.ts +3 -1
- package/packages/jam/transition/reports/error.d.ts.map +1 -1
- package/packages/jam/transition/reports/error.js +2 -0
- package/packages/jam/transition/reports/test.utils.d.ts.map +1 -1
- package/packages/jam/transition/reports/test.utils.js +2 -2
- package/packages/jam/transition/reports/verify-basic.d.ts.map +1 -1
- package/packages/jam/transition/reports/verify-basic.js +10 -0
- package/packages/jam/transition/reports/verify-basic.test.js +29 -0
- package/packages/jam/transition/statistics.d.ts +0 -7
- package/packages/jam/transition/statistics.d.ts.map +1 -1
- package/packages/jam/transition/statistics.js +2 -11
- package/packages/jam/transition/statistics.test.js +0 -40
- package/packages/workers/block-authorship/generator.test.d.ts +2 -0
- package/packages/workers/block-authorship/generator.test.d.ts.map +1 -0
- package/packages/workers/block-authorship/generator.test.js +200 -0
- package/packages/workers/block-authorship/main.d.ts.map +1 -1
- package/packages/workers/block-authorship/main.js +23 -4
- package/packages/workers/block-authorship/package.json +1 -1
- package/packages/workers/block-authorship/protocol.d.ts +53 -51
- package/packages/workers/block-authorship/protocol.d.ts.map +1 -1
- package/packages/workers/block-authorship/protocol.js +6 -3
- package/packages/workers/importer/importer.d.ts.map +1 -1
- package/packages/workers/importer/importer.js +0 -1
- package/packages/workers/importer/package.json +1 -1
- package/packages/workers/importer/protocol.d.ts +54 -54
- package/packages/workers/jam-network/protocol.d.ts +79 -79
- package/packages/jam/transition/accumulate/deferred-transfers.d.ts +0 -36
- package/packages/jam/transition/accumulate/deferred-transfers.d.ts.map +0 -1
- package/packages/jam/transition/accumulate/deferred-transfers.js +0 -95
- package/packages/jam/transition/accumulate/pvm-executor.d.ts.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ChainSpec } from "#@typeberry/config";
|
|
1
|
+
import type { ChainSpec, PvmBackend } from "#@typeberry/config";
|
|
2
2
|
import type { BlocksDb, StatesDb } from "#@typeberry/database";
|
|
3
|
+
import type { Blake2b } from "#@typeberry/hash";
|
|
3
4
|
import type { EnumerableState, State } from "#@typeberry/state";
|
|
4
5
|
import type WebSocket from "ws";
|
|
5
6
|
import type { z } from "zod";
|
|
@@ -62,11 +63,14 @@ export type SchemaMapUnknown = Record<MethodName, {
|
|
|
62
63
|
}>;
|
|
63
64
|
export type InputOf<M extends MethodName> = z.infer<SchemaMap[M]["input"]>;
|
|
64
65
|
export type OutputOf<M extends MethodName> = z.infer<SchemaMap[M]["output"]>;
|
|
65
|
-
export
|
|
66
|
+
export interface HandlerContext {
|
|
66
67
|
db: DatabaseContext;
|
|
67
68
|
chainSpec: ChainSpec;
|
|
69
|
+
pvmBackend: PvmBackend;
|
|
70
|
+
blake2b: Blake2b;
|
|
68
71
|
subscription: SubscriptionHandlerApi;
|
|
69
|
-
}
|
|
72
|
+
}
|
|
73
|
+
export type GenericHandler<I, O> = (input: I, context: HandlerContext) => Promise<O>;
|
|
70
74
|
export type Handler<M extends MethodName> = GenericHandler<InputOf<M>, OutputOf<M>>;
|
|
71
75
|
export type HandlerMap = {
|
|
72
76
|
[N in MethodName]: Handler<N>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/rpc-validation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/rpc-validation/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,6 +3,7 @@ export declare const JSON_RPC_VERSION = "2.0";
|
|
|
3
3
|
export declare namespace validation {
|
|
4
4
|
const hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
5
5
|
const slot: z.ZodNumber;
|
|
6
|
+
const coreIndex: z.ZodNumber;
|
|
6
7
|
const blobArray: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
7
8
|
const serviceId: z.ZodNumber;
|
|
8
9
|
const preimageLength: z.ZodNumber;
|
|
@@ -11,6 +12,10 @@ export declare namespace validation {
|
|
|
11
12
|
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
12
13
|
slot: z.ZodNumber;
|
|
13
14
|
}, z.z.core.$strip>;
|
|
15
|
+
const refineResult: z.ZodObject<{
|
|
16
|
+
report: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
17
|
+
exports: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
18
|
+
}, z.z.core.$strip>;
|
|
14
19
|
const parameters: z.ZodObject<{
|
|
15
20
|
V1: z.ZodObject<{
|
|
16
21
|
deposit_per_account: z.ZodNumber;
|
|
@@ -60,6 +65,212 @@ export declare namespace validation {
|
|
|
60
65
|
input: z.ZodTuple<[z.ZodString], null>;
|
|
61
66
|
output: z.ZodBoolean;
|
|
62
67
|
};
|
|
68
|
+
/** Non-standard typeberry extension methods. */
|
|
69
|
+
const customSchemas: {
|
|
70
|
+
typeberry_refineWorkPackage: {
|
|
71
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodArray<z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>>], null>;
|
|
72
|
+
output: z.ZodObject<{
|
|
73
|
+
report: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
74
|
+
exports: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
75
|
+
}, z.z.core.$strip>;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
/** JIP-2 (standardized) methods */
|
|
79
|
+
const jip2Schemas: {
|
|
80
|
+
beefyRoot: {
|
|
81
|
+
input: z.ZodTuple<[], null>;
|
|
82
|
+
output: z.ZodAny;
|
|
83
|
+
};
|
|
84
|
+
submitPreimage: {
|
|
85
|
+
input: z.ZodTuple<[], null>;
|
|
86
|
+
output: z.ZodAny;
|
|
87
|
+
};
|
|
88
|
+
submitWorkPackage: {
|
|
89
|
+
input: z.ZodTuple<[], null>;
|
|
90
|
+
output: z.ZodAny;
|
|
91
|
+
};
|
|
92
|
+
workReport: {
|
|
93
|
+
input: z.ZodTuple<[], null>;
|
|
94
|
+
output: z.ZodAny;
|
|
95
|
+
};
|
|
96
|
+
submitWorkPackageBundle: {
|
|
97
|
+
input: z.ZodTuple<[], null>;
|
|
98
|
+
output: z.ZodAny;
|
|
99
|
+
};
|
|
100
|
+
workPackageStatus: {
|
|
101
|
+
input: z.ZodTuple<[], null>;
|
|
102
|
+
output: z.ZodAny;
|
|
103
|
+
};
|
|
104
|
+
subscribeWorkPackageStatus: {
|
|
105
|
+
input: z.ZodTuple<[], null>;
|
|
106
|
+
output: z.ZodAny;
|
|
107
|
+
};
|
|
108
|
+
fetchWorkPackageSegments: {
|
|
109
|
+
input: z.ZodTuple<[], null>;
|
|
110
|
+
output: z.ZodAny;
|
|
111
|
+
};
|
|
112
|
+
fetchSegments: {
|
|
113
|
+
input: z.ZodTuple<[], null>;
|
|
114
|
+
output: z.ZodAny;
|
|
115
|
+
};
|
|
116
|
+
syncState: {
|
|
117
|
+
input: z.ZodTuple<[], null>;
|
|
118
|
+
output: z.ZodAny;
|
|
119
|
+
};
|
|
120
|
+
subscribeSyncStatus: {
|
|
121
|
+
input: z.ZodTuple<[], null>;
|
|
122
|
+
output: z.ZodAny;
|
|
123
|
+
};
|
|
124
|
+
bestBlock: {
|
|
125
|
+
input: z.ZodTuple<[], null>;
|
|
126
|
+
output: z.ZodObject<{
|
|
127
|
+
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
128
|
+
slot: z.ZodNumber;
|
|
129
|
+
}, z.z.core.$strip>;
|
|
130
|
+
};
|
|
131
|
+
finalizedBlock: {
|
|
132
|
+
input: z.ZodTuple<[], null>;
|
|
133
|
+
output: z.ZodObject<{
|
|
134
|
+
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
135
|
+
slot: z.ZodNumber;
|
|
136
|
+
}, z.z.core.$strip>;
|
|
137
|
+
};
|
|
138
|
+
listServices: {
|
|
139
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
140
|
+
output: z.ZodArray<z.ZodNumber>;
|
|
141
|
+
};
|
|
142
|
+
parameters: {
|
|
143
|
+
input: z.ZodTuple<[], null>;
|
|
144
|
+
output: z.ZodObject<{
|
|
145
|
+
V1: z.ZodObject<{
|
|
146
|
+
deposit_per_account: z.ZodNumber;
|
|
147
|
+
deposit_per_item: z.ZodNumber;
|
|
148
|
+
deposit_per_byte: z.ZodNumber;
|
|
149
|
+
min_turnaround_period: z.ZodNumber;
|
|
150
|
+
epoch_period: z.ZodNumber;
|
|
151
|
+
max_accumulate_gas: z.ZodNumber;
|
|
152
|
+
max_is_authorized_gas: z.ZodNumber;
|
|
153
|
+
max_refine_gas: z.ZodNumber;
|
|
154
|
+
block_gas_limit: z.ZodNumber;
|
|
155
|
+
recent_block_count: z.ZodNumber;
|
|
156
|
+
max_work_items: z.ZodNumber;
|
|
157
|
+
max_dependencies: z.ZodNumber;
|
|
158
|
+
max_tickets_per_block: z.ZodNumber;
|
|
159
|
+
max_lookup_anchor_age: z.ZodNumber;
|
|
160
|
+
tickets_attempts_number: z.ZodNumber;
|
|
161
|
+
auth_window: z.ZodNumber;
|
|
162
|
+
auth_queue_len: z.ZodNumber;
|
|
163
|
+
rotation_period: z.ZodNumber;
|
|
164
|
+
max_extrinsics: z.ZodNumber;
|
|
165
|
+
availability_timeout: z.ZodNumber;
|
|
166
|
+
val_count: z.ZodNumber;
|
|
167
|
+
max_input: z.ZodNumber;
|
|
168
|
+
max_refine_code_size: z.ZodNumber;
|
|
169
|
+
basic_piece_len: z.ZodNumber;
|
|
170
|
+
max_imports: z.ZodNumber;
|
|
171
|
+
max_is_authorized_code_size: z.ZodNumber;
|
|
172
|
+
max_exports: z.ZodNumber;
|
|
173
|
+
max_refine_memory: z.ZodNumber;
|
|
174
|
+
max_is_authorized_memory: z.ZodNumber;
|
|
175
|
+
segment_piece_count: z.ZodNumber;
|
|
176
|
+
max_report_elective_data: z.ZodNumber;
|
|
177
|
+
transfer_memo_size: z.ZodNumber;
|
|
178
|
+
epoch_tail_start: z.ZodNumber;
|
|
179
|
+
core_count: z.ZodNumber;
|
|
180
|
+
slot_period_sec: z.ZodNumber;
|
|
181
|
+
max_authorizer_code_size: z.ZodNumber;
|
|
182
|
+
max_service_code_size: z.ZodNumber;
|
|
183
|
+
}, z.z.core.$strip>;
|
|
184
|
+
}, z.z.core.$strip>;
|
|
185
|
+
};
|
|
186
|
+
parent: {
|
|
187
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
188
|
+
output: z.ZodObject<{
|
|
189
|
+
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
190
|
+
slot: z.ZodNumber;
|
|
191
|
+
}, z.z.core.$strip>;
|
|
192
|
+
};
|
|
193
|
+
serviceData: {
|
|
194
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber], null>;
|
|
195
|
+
output: z.ZodUnion<readonly [z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNull]>;
|
|
196
|
+
};
|
|
197
|
+
servicePreimage: {
|
|
198
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
199
|
+
output: z.ZodUnion<readonly [z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNull]>;
|
|
200
|
+
};
|
|
201
|
+
serviceRequest: {
|
|
202
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber], null>;
|
|
203
|
+
output: z.ZodUnion<readonly [z.ZodReadonly<z.ZodArray<z.ZodNumber>>, z.ZodNull]>;
|
|
204
|
+
};
|
|
205
|
+
serviceValue: {
|
|
206
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
207
|
+
output: z.ZodUnion<readonly [z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNull]>;
|
|
208
|
+
};
|
|
209
|
+
stateRoot: {
|
|
210
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
211
|
+
output: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
212
|
+
};
|
|
213
|
+
statistics: {
|
|
214
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
215
|
+
output: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
216
|
+
};
|
|
217
|
+
subscribeBestBlock: {
|
|
218
|
+
input: z.ZodTuple<[], null>;
|
|
219
|
+
output: z.ZodString;
|
|
220
|
+
};
|
|
221
|
+
subscribeFinalizedBlock: {
|
|
222
|
+
input: z.ZodTuple<[], null>;
|
|
223
|
+
output: z.ZodString;
|
|
224
|
+
};
|
|
225
|
+
subscribeServiceData: {
|
|
226
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodBoolean], null>;
|
|
227
|
+
output: z.ZodString;
|
|
228
|
+
};
|
|
229
|
+
subscribeServicePreimage: {
|
|
230
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodBoolean], null>;
|
|
231
|
+
output: z.ZodString;
|
|
232
|
+
};
|
|
233
|
+
subscribeServiceRequest: {
|
|
234
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodBoolean], null>;
|
|
235
|
+
output: z.ZodString;
|
|
236
|
+
};
|
|
237
|
+
subscribeServiceValue: {
|
|
238
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodBoolean], null>;
|
|
239
|
+
output: z.ZodString;
|
|
240
|
+
};
|
|
241
|
+
subscribeStatistics: {
|
|
242
|
+
input: z.ZodTuple<[z.ZodBoolean], null>;
|
|
243
|
+
output: z.ZodString;
|
|
244
|
+
};
|
|
245
|
+
unsubscribeBestBlock: {
|
|
246
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
247
|
+
output: z.ZodBoolean;
|
|
248
|
+
};
|
|
249
|
+
unsubscribeFinalizedBlock: {
|
|
250
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
251
|
+
output: z.ZodBoolean;
|
|
252
|
+
};
|
|
253
|
+
unsubscribeServiceData: {
|
|
254
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
255
|
+
output: z.ZodBoolean;
|
|
256
|
+
};
|
|
257
|
+
unsubscribeServicePreimage: {
|
|
258
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
259
|
+
output: z.ZodBoolean;
|
|
260
|
+
};
|
|
261
|
+
unsubscribeServiceRequest: {
|
|
262
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
263
|
+
output: z.ZodBoolean;
|
|
264
|
+
};
|
|
265
|
+
unsubscribeServiceValue: {
|
|
266
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
267
|
+
output: z.ZodBoolean;
|
|
268
|
+
};
|
|
269
|
+
unsubscribeStatistics: {
|
|
270
|
+
input: z.ZodTuple<[z.ZodString], null>;
|
|
271
|
+
output: z.ZodBoolean;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
63
274
|
const schemas: {
|
|
64
275
|
readonly beefyRoot: {
|
|
65
276
|
input: z.ZodTuple<[], null>;
|
|
@@ -106,26 +317,26 @@ export declare namespace validation {
|
|
|
106
317
|
output: z.ZodAny;
|
|
107
318
|
};
|
|
108
319
|
readonly bestBlock: {
|
|
109
|
-
|
|
110
|
-
|
|
320
|
+
input: z.ZodTuple<[], null>;
|
|
321
|
+
output: z.ZodObject<{
|
|
111
322
|
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
112
323
|
slot: z.ZodNumber;
|
|
113
324
|
}, z.z.core.$strip>;
|
|
114
325
|
};
|
|
115
326
|
readonly finalizedBlock: {
|
|
116
|
-
|
|
117
|
-
|
|
327
|
+
input: z.ZodTuple<[], null>;
|
|
328
|
+
output: z.ZodObject<{
|
|
118
329
|
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
119
330
|
slot: z.ZodNumber;
|
|
120
331
|
}, z.z.core.$strip>;
|
|
121
332
|
};
|
|
122
333
|
readonly listServices: {
|
|
123
|
-
|
|
124
|
-
|
|
334
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
335
|
+
output: z.ZodArray<z.ZodNumber>;
|
|
125
336
|
};
|
|
126
337
|
readonly parameters: {
|
|
127
|
-
|
|
128
|
-
|
|
338
|
+
input: z.ZodTuple<[], null>;
|
|
339
|
+
output: z.ZodObject<{
|
|
129
340
|
V1: z.ZodObject<{
|
|
130
341
|
deposit_per_account: z.ZodNumber;
|
|
131
342
|
deposit_per_item: z.ZodNumber;
|
|
@@ -168,63 +379,63 @@ export declare namespace validation {
|
|
|
168
379
|
}, z.z.core.$strip>;
|
|
169
380
|
};
|
|
170
381
|
readonly parent: {
|
|
171
|
-
|
|
172
|
-
|
|
382
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
383
|
+
output: z.ZodObject<{
|
|
173
384
|
header_hash: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
174
385
|
slot: z.ZodNumber;
|
|
175
386
|
}, z.z.core.$strip>;
|
|
176
387
|
};
|
|
177
388
|
readonly serviceData: {
|
|
178
|
-
|
|
179
|
-
|
|
389
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber], null>;
|
|
390
|
+
output: z.ZodUnion<readonly [z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNull]>;
|
|
180
391
|
};
|
|
181
392
|
readonly servicePreimage: {
|
|
182
|
-
|
|
183
|
-
|
|
393
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
394
|
+
output: z.ZodUnion<readonly [z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNull]>;
|
|
184
395
|
};
|
|
185
396
|
readonly serviceRequest: {
|
|
186
|
-
|
|
187
|
-
|
|
397
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber], null>;
|
|
398
|
+
output: z.ZodUnion<readonly [z.ZodReadonly<z.ZodArray<z.ZodNumber>>, z.ZodNull]>;
|
|
188
399
|
};
|
|
189
400
|
readonly serviceValue: {
|
|
190
|
-
|
|
191
|
-
|
|
401
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
402
|
+
output: z.ZodUnion<readonly [z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNull]>;
|
|
192
403
|
};
|
|
193
404
|
readonly stateRoot: {
|
|
194
|
-
|
|
195
|
-
|
|
405
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
406
|
+
output: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
196
407
|
};
|
|
197
408
|
readonly statistics: {
|
|
198
|
-
|
|
199
|
-
|
|
409
|
+
input: z.ZodTuple<[z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>], null>;
|
|
410
|
+
output: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
200
411
|
};
|
|
201
412
|
readonly subscribeBestBlock: {
|
|
202
|
-
|
|
203
|
-
|
|
413
|
+
input: z.ZodTuple<[], null>;
|
|
414
|
+
output: z.ZodString;
|
|
204
415
|
};
|
|
205
416
|
readonly subscribeFinalizedBlock: {
|
|
206
|
-
|
|
207
|
-
|
|
417
|
+
input: z.ZodTuple<[], null>;
|
|
418
|
+
output: z.ZodString;
|
|
208
419
|
};
|
|
209
420
|
readonly subscribeServiceData: {
|
|
210
|
-
|
|
211
|
-
|
|
421
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodBoolean], null>;
|
|
422
|
+
output: z.ZodString;
|
|
212
423
|
};
|
|
213
424
|
readonly subscribeServicePreimage: {
|
|
214
|
-
|
|
215
|
-
|
|
425
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodBoolean], null>;
|
|
426
|
+
output: z.ZodString;
|
|
216
427
|
};
|
|
217
428
|
readonly subscribeServiceRequest: {
|
|
218
|
-
|
|
219
|
-
|
|
429
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodNumber, z.ZodBoolean], null>;
|
|
430
|
+
output: z.ZodString;
|
|
220
431
|
};
|
|
221
432
|
readonly subscribeServiceValue: {
|
|
222
|
-
|
|
223
|
-
|
|
433
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodBoolean], null>;
|
|
434
|
+
output: z.ZodString;
|
|
224
435
|
};
|
|
225
436
|
readonly subscribeStatistics: {
|
|
226
|
-
|
|
227
|
-
|
|
437
|
+
input: z.ZodTuple<[z.ZodBoolean], null>;
|
|
438
|
+
output: z.ZodString;
|
|
228
439
|
};
|
|
229
440
|
readonly unsubscribeBestBlock: {
|
|
230
441
|
input: z.ZodTuple<[z.ZodString], null>;
|
|
@@ -254,6 +465,13 @@ export declare namespace validation {
|
|
|
254
465
|
input: z.ZodTuple<[z.ZodString], null>;
|
|
255
466
|
output: z.ZodBoolean;
|
|
256
467
|
};
|
|
468
|
+
readonly typeberry_refineWorkPackage: {
|
|
469
|
+
input: z.ZodTuple<[z.ZodNumber, z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>, z.ZodArray<z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>>], null>;
|
|
470
|
+
output: z.ZodObject<{
|
|
471
|
+
report: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
472
|
+
exports: z.ZodCodec<z.ZodBase64, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>;
|
|
473
|
+
}, z.z.core.$strip>;
|
|
474
|
+
};
|
|
257
475
|
};
|
|
258
476
|
const jsonRpcRequest: z.ZodObject<{
|
|
259
477
|
jsonrpc: z.ZodLiteral<"2.0">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/rpc-validation/validation.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,yBAAiB,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../packages/jam/rpc-validation/validation.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,yBAAiB,UAAU,CAAC;IAMnB,MAAM,IAAI,gGAOhB,CAAC;IACK,MAAM,IAAI,aAAM,CAAC;IACjB,MAAM,SAAS,aAAM,CAAC;IACtB,MAAM,SAAS,gGAGpB,CAAC;IACI,MAAM,SAAS,aAAM,CAAC;IACtB,MAAM,cAAc,aAAM,CAAC;IAC3B,MAAM,MAAM,sBAAc,CAAC;IAC3B,MAAM,eAAe;;;uBAG1B,CAAC;IAEI,MAAM,YAAY;;;uBAGvB,CAAC;IAEI,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAwCrB,CAAC;IAEI,MAAM,oBAAoB;;;KAGhC,CAAC;IAEK,MAAM,iBAAiB;;;KAG7B,CAAC;IAEF,gDAAgD;IACzC,MAAM,aAAa;;;;;;;;KAKzB,CAAC;IAEF,mCAAmC;IAC5B,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2FvB,CAAC;IAEK,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAG8D,CAAC;IAE5E,MAAM,cAAc;;;;;uBAKzB,CAAC;IAEI,MAAM,mBAAmB;;;;uBAAoC,CAAC;CACtE;AAED,eAAO,MAAM,oBAAoB;;;;;;;;CAQqE,CAAC"}
|
|
@@ -3,13 +3,15 @@ import z from "zod";
|
|
|
3
3
|
export const JSON_RPC_VERSION = "2.0";
|
|
4
4
|
export var validation;
|
|
5
5
|
(function (validation) {
|
|
6
|
-
const
|
|
6
|
+
const u16 = z.number().int().min(0).max(0xffff);
|
|
7
|
+
const u32 = z.number().int().min(0).max(0xffff_ffff);
|
|
7
8
|
const uint8Array = z.custom((v) => v instanceof Uint8Array); // this is needed because a simple z.instanceof(Uint8Array) automatically narrows the type down to Uint8Array<ArrayBuffer> whereas our Bytes.raw are effectively Uint8Array<ArrayBufferLike>
|
|
8
9
|
validation.hash = z.codec(z.base64(), uint8Array.refine((v) => v.length === HASH_SIZE, "Invalid hash length."), {
|
|
9
10
|
decode: (v) => Uint8Array.from(Buffer.from(v, "base64")),
|
|
10
11
|
encode: (v) => Buffer.from(v).toString("base64"),
|
|
11
12
|
});
|
|
12
13
|
validation.slot = u32;
|
|
14
|
+
validation.coreIndex = u16;
|
|
13
15
|
validation.blobArray = z.codec(z.base64(), uint8Array, {
|
|
14
16
|
decode: (v) => Uint8Array.from(Buffer.from(v, "base64")),
|
|
15
17
|
encode: (v) => Buffer.from(v).toString("base64"),
|
|
@@ -21,6 +23,10 @@ export var validation;
|
|
|
21
23
|
header_hash: validation.hash,
|
|
22
24
|
slot: validation.slot,
|
|
23
25
|
});
|
|
26
|
+
validation.refineResult = z.object({
|
|
27
|
+
report: validation.blobArray,
|
|
28
|
+
exports: validation.blobArray,
|
|
29
|
+
});
|
|
24
30
|
validation.parameters = z.object({
|
|
25
31
|
V1: z.object({
|
|
26
32
|
deposit_per_account: z.number(),
|
|
@@ -70,7 +76,15 @@ export var validation;
|
|
|
70
76
|
input: z.tuple([z.string()]),
|
|
71
77
|
output: z.boolean(),
|
|
72
78
|
};
|
|
73
|
-
|
|
79
|
+
/** Non-standard typeberry extension methods. */
|
|
80
|
+
validation.customSchemas = {
|
|
81
|
+
typeberry_refineWorkPackage: {
|
|
82
|
+
input: z.tuple([validation.coreIndex, validation.blobArray, z.array(validation.blobArray)]),
|
|
83
|
+
output: validation.refineResult,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
/** JIP-2 (standardized) methods */
|
|
87
|
+
validation.jip2Schemas = {
|
|
74
88
|
beefyRoot: validation.notImplementedSchema,
|
|
75
89
|
submitPreimage: validation.notImplementedSchema,
|
|
76
90
|
submitWorkPackage: validation.notImplementedSchema,
|
|
@@ -162,6 +176,10 @@ export var validation;
|
|
|
162
176
|
unsubscribeServiceValue: validation.unsubscribeSchema,
|
|
163
177
|
unsubscribeStatistics: validation.unsubscribeSchema,
|
|
164
178
|
};
|
|
179
|
+
validation.schemas = {
|
|
180
|
+
...validation.customSchemas,
|
|
181
|
+
...validation.jip2Schemas,
|
|
182
|
+
};
|
|
165
183
|
validation.jsonRpcRequest = z.object({
|
|
166
184
|
jsonrpc: z.literal(JSON_RPC_VERSION),
|
|
167
185
|
method: z.string(),
|
|
@@ -25,14 +25,14 @@ export declare class NotYetAccumulatedReport extends WithDebug {
|
|
|
25
25
|
readonly dependencies: KnownSizeArray<WorkPackageHash, `[0..${MAX_REPORT_DEPENDENCIES})`>;
|
|
26
26
|
static Codec: import("@typeberry/codec").Descriptor<NotYetAccumulatedReport, import("@typeberry/codec").ViewOf<NotYetAccumulatedReport, {
|
|
27
27
|
report: import("@typeberry/codec").Descriptor<WorkReport, import("@typeberry/codec").ViewOf<WorkReport, {
|
|
28
|
-
workPackageSpec: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
28
|
+
workPackageSpec: import("@typeberry/codec").Descriptor<import("@typeberry/block").WorkPackageSpec, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkPackageSpec, {
|
|
29
29
|
hash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"WorkPackageHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
30
30
|
length: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U32, import("@typeberry/bytes").Bytes<4>>;
|
|
31
31
|
erasureRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32>, import("@typeberry/bytes").Bytes<32>>;
|
|
32
32
|
exportsRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"ExportsRootHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
33
33
|
exportsCount: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U16, import("@typeberry/bytes").Bytes<2>>;
|
|
34
34
|
}>>;
|
|
35
|
-
context: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
35
|
+
context: import("@typeberry/codec").Descriptor<import("@typeberry/block").RefineContext, import("@typeberry/codec").ViewOf<import("@typeberry/block").RefineContext, {
|
|
36
36
|
anchor: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"HeaderHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
37
37
|
stateRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"StateRootHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
38
38
|
beefyRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"BeefyHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
@@ -44,32 +44,32 @@ export declare class NotYetAccumulatedReport extends WithDebug {
|
|
|
44
44
|
authorizerHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"AuthorizerHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
45
45
|
authorizationGasUsed: import("@typeberry/codec").Descriptor<bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">, import("@typeberry/numbers").U64>;
|
|
46
46
|
authorizationOutput: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").BytesBlob, import("@typeberry/bytes").BytesBlob>;
|
|
47
|
-
segmentRootLookup: import("@typeberry/codec").Descriptor<readonly import("@typeberry/block
|
|
47
|
+
segmentRootLookup: import("@typeberry/codec").Descriptor<readonly import("@typeberry/block").WorkPackageInfo[], import("@typeberry/codec").SequenceView<import("@typeberry/block").WorkPackageInfo, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkPackageInfo, {
|
|
48
48
|
workPackageHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"WorkPackageHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
49
49
|
segmentTreeRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"ExportsRootHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
50
50
|
}>>>;
|
|
51
|
-
results: import("@typeberry/codec").Descriptor<import("@typeberry/collections").FixedSizeArray<import("@typeberry/block
|
|
51
|
+
results: import("@typeberry/codec").Descriptor<import("@typeberry/collections").FixedSizeArray<import("@typeberry/block").WorkResult, import("@typeberry/numbers").U8>, import("@typeberry/codec").SequenceView<import("@typeberry/block").WorkResult, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkResult, {
|
|
52
52
|
serviceId: import("@typeberry/codec").Descriptor<number & import("@typeberry/numbers").WithBytesRepresentation<4> & import("@typeberry/utils").WithOpaque<"ServiceId[u32]">, import("@typeberry/bytes").Bytes<4>>;
|
|
53
53
|
codeHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"CodeHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
54
54
|
payloadHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32>, import("@typeberry/bytes").Bytes<32>>;
|
|
55
55
|
gas: import("@typeberry/codec").Descriptor<bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">, import("@typeberry/bytes").Bytes<8>>;
|
|
56
|
-
result: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
57
|
-
kind: import("@typeberry/block
|
|
56
|
+
result: import("@typeberry/codec").Descriptor<import("@typeberry/block").WorkExecResult, {
|
|
57
|
+
kind: import("@typeberry/block").WorkExecResultKind.ok;
|
|
58
58
|
okBlob: import("@typeberry/bytes").BytesBlob;
|
|
59
59
|
} | {
|
|
60
|
-
kind: import("@typeberry/block
|
|
60
|
+
kind: import("@typeberry/block").WorkExecResultKind.outOfGas;
|
|
61
61
|
} | {
|
|
62
|
-
kind: import("@typeberry/block
|
|
62
|
+
kind: import("@typeberry/block").WorkExecResultKind.panic;
|
|
63
63
|
} | {
|
|
64
|
-
kind: import("@typeberry/block
|
|
64
|
+
kind: import("@typeberry/block").WorkExecResultKind.incorrectNumberOfExports;
|
|
65
65
|
} | {
|
|
66
|
-
kind: import("@typeberry/block
|
|
66
|
+
kind: import("@typeberry/block").WorkExecResultKind.digestTooBig;
|
|
67
67
|
} | {
|
|
68
|
-
kind: import("@typeberry/block
|
|
68
|
+
kind: import("@typeberry/block").WorkExecResultKind.badCode;
|
|
69
69
|
} | {
|
|
70
|
-
kind: import("@typeberry/block
|
|
70
|
+
kind: import("@typeberry/block").WorkExecResultKind.codeOversize;
|
|
71
71
|
}>;
|
|
72
|
-
load: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
72
|
+
load: import("@typeberry/codec").Descriptor<import("@typeberry/block").WorkRefineLoad, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkRefineLoad, {
|
|
73
73
|
gasUsed: import("@typeberry/codec").Descriptor<bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">, import("@typeberry/numbers").U64>;
|
|
74
74
|
importedSegments: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U32, import("@typeberry/numbers").U32>;
|
|
75
75
|
extrinsicCount: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U32, import("@typeberry/numbers").U32>;
|
|
@@ -89,14 +89,14 @@ export declare class NotYetAccumulatedReport extends WithDebug {
|
|
|
89
89
|
export type AccumulationQueue = PerEpochBlock<readonly NotYetAccumulatedReport[]>;
|
|
90
90
|
export declare const accumulationQueueCodec: import("@typeberry/codec").Descriptor<readonly (readonly NotYetAccumulatedReport[])[] & import("@typeberry/utils").WithOpaque<"EpochLength">, import("@typeberry/codec").SequenceView<readonly NotYetAccumulatedReport[], import("@typeberry/codec").SequenceView<NotYetAccumulatedReport, import("@typeberry/codec").ViewOf<NotYetAccumulatedReport, {
|
|
91
91
|
report: import("@typeberry/codec").Descriptor<WorkReport, import("@typeberry/codec").ViewOf<WorkReport, {
|
|
92
|
-
workPackageSpec: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
92
|
+
workPackageSpec: import("@typeberry/codec").Descriptor<import("@typeberry/block").WorkPackageSpec, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkPackageSpec, {
|
|
93
93
|
hash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"WorkPackageHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
94
94
|
length: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U32, import("@typeberry/bytes").Bytes<4>>;
|
|
95
95
|
erasureRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32>, import("@typeberry/bytes").Bytes<32>>;
|
|
96
96
|
exportsRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"ExportsRootHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
97
97
|
exportsCount: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U16, import("@typeberry/bytes").Bytes<2>>;
|
|
98
98
|
}>>;
|
|
99
|
-
context: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
99
|
+
context: import("@typeberry/codec").Descriptor<import("@typeberry/block").RefineContext, import("@typeberry/codec").ViewOf<import("@typeberry/block").RefineContext, {
|
|
100
100
|
anchor: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"HeaderHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
101
101
|
stateRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"StateRootHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
102
102
|
beefyRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"BeefyHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
@@ -108,32 +108,32 @@ export declare const accumulationQueueCodec: import("@typeberry/codec").Descript
|
|
|
108
108
|
authorizerHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"AuthorizerHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
109
109
|
authorizationGasUsed: import("@typeberry/codec").Descriptor<bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">, import("@typeberry/numbers").U64>;
|
|
110
110
|
authorizationOutput: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").BytesBlob, import("@typeberry/bytes").BytesBlob>;
|
|
111
|
-
segmentRootLookup: import("@typeberry/codec").Descriptor<readonly import("@typeberry/block
|
|
111
|
+
segmentRootLookup: import("@typeberry/codec").Descriptor<readonly import("@typeberry/block").WorkPackageInfo[], import("@typeberry/codec").SequenceView<import("@typeberry/block").WorkPackageInfo, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkPackageInfo, {
|
|
112
112
|
workPackageHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"WorkPackageHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
113
113
|
segmentTreeRoot: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"ExportsRootHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
114
114
|
}>>>;
|
|
115
|
-
results: import("@typeberry/codec").Descriptor<import("@typeberry/collections").FixedSizeArray<import("@typeberry/block
|
|
115
|
+
results: import("@typeberry/codec").Descriptor<import("@typeberry/collections").FixedSizeArray<import("@typeberry/block").WorkResult, import("@typeberry/numbers").U8>, import("@typeberry/codec").SequenceView<import("@typeberry/block").WorkResult, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkResult, {
|
|
116
116
|
serviceId: import("@typeberry/codec").Descriptor<number & import("@typeberry/numbers").WithBytesRepresentation<4> & import("@typeberry/utils").WithOpaque<"ServiceId[u32]">, import("@typeberry/bytes").Bytes<4>>;
|
|
117
117
|
codeHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32> & import("@typeberry/utils").WithOpaque<"CodeHash">, import("@typeberry/bytes").Bytes<32>>;
|
|
118
118
|
payloadHash: import("@typeberry/codec").Descriptor<import("@typeberry/bytes").Bytes<32>, import("@typeberry/bytes").Bytes<32>>;
|
|
119
119
|
gas: import("@typeberry/codec").Descriptor<bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">, import("@typeberry/bytes").Bytes<8>>;
|
|
120
|
-
result: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
121
|
-
kind: import("@typeberry/block
|
|
120
|
+
result: import("@typeberry/codec").Descriptor<import("@typeberry/block").WorkExecResult, {
|
|
121
|
+
kind: import("@typeberry/block").WorkExecResultKind.ok;
|
|
122
122
|
okBlob: import("@typeberry/bytes").BytesBlob;
|
|
123
123
|
} | {
|
|
124
|
-
kind: import("@typeberry/block
|
|
124
|
+
kind: import("@typeberry/block").WorkExecResultKind.outOfGas;
|
|
125
125
|
} | {
|
|
126
|
-
kind: import("@typeberry/block
|
|
126
|
+
kind: import("@typeberry/block").WorkExecResultKind.panic;
|
|
127
127
|
} | {
|
|
128
|
-
kind: import("@typeberry/block
|
|
128
|
+
kind: import("@typeberry/block").WorkExecResultKind.incorrectNumberOfExports;
|
|
129
129
|
} | {
|
|
130
|
-
kind: import("@typeberry/block
|
|
130
|
+
kind: import("@typeberry/block").WorkExecResultKind.digestTooBig;
|
|
131
131
|
} | {
|
|
132
|
-
kind: import("@typeberry/block
|
|
132
|
+
kind: import("@typeberry/block").WorkExecResultKind.badCode;
|
|
133
133
|
} | {
|
|
134
|
-
kind: import("@typeberry/block
|
|
134
|
+
kind: import("@typeberry/block").WorkExecResultKind.codeOversize;
|
|
135
135
|
}>;
|
|
136
|
-
load: import("@typeberry/codec").Descriptor<import("@typeberry/block
|
|
136
|
+
load: import("@typeberry/codec").Descriptor<import("@typeberry/block").WorkRefineLoad, import("@typeberry/codec").ViewOf<import("@typeberry/block").WorkRefineLoad, {
|
|
137
137
|
gasUsed: import("@typeberry/codec").Descriptor<bigint & import("@typeberry/numbers").WithBytesRepresentation<8> & import("@typeberry/utils").WithOpaque<"ServiceGas[u64]">, import("@typeberry/numbers").U64>;
|
|
138
138
|
importedSegments: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U32, import("@typeberry/numbers").U32>;
|
|
139
139
|
extrinsicCount: import("@typeberry/codec").Descriptor<import("@typeberry/numbers").U32, import("@typeberry/numbers").U32>;
|