Files
pezkuwi-api/packages/bizinikiwi-bindings/upstream-src/codecs/metadata/runtime-api.ts
T
Satoshi Qazi Muhammed a9d1026736 chore(papi): keep the upstream sources in upstream-src/
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.
2026-10-19 21:17:25 +04:00

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,
})