mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-11-21 05:19:56 +00:00
The pezkuwi-dev build treats any package with a src/ directory as its own: it requires our license header on every file and builds it. These are upstream files that must stay byte-identical to the source embedded in dist/, so they live in upstream-src/ instead, which neither the build nor the root tsconfig picks up.
39 lines
781 B
TypeScript
39 lines
781 B
TypeScript
import { Struct, Vector, str } from "scale-ts"
|
|
import { docs } from "./docs"
|
|
import { compactNumber, Hex, compactNumber as ty } from "../scale"
|
|
import { itemDeprecation } from "./deprecation"
|
|
|
|
export const runtimeApiMethod = {
|
|
name: str,
|
|
inputs: Vector(
|
|
Struct({
|
|
name: str,
|
|
type: ty,
|
|
}),
|
|
),
|
|
output: ty,
|
|
docs,
|
|
}
|
|
|
|
export const runtimeApiV15 = Struct({
|
|
name: str,
|
|
methods: Vector(Struct(runtimeApiMethod)),
|
|
docs,
|
|
})
|
|
|
|
export const runtimeApi = Struct({
|
|
name: str,
|
|
methods: Vector(
|
|
Struct({ ...runtimeApiMethod, deprecationInfo: itemDeprecation }),
|
|
),
|
|
docs,
|
|
version: compactNumber,
|
|
deprecationInfo: itemDeprecation,
|
|
})
|
|
|
|
export const viewFunction = Struct({
|
|
id: Hex(32),
|
|
...runtimeApiMethod,
|
|
deprecationInfo: itemDeprecation,
|
|
})
|