@lodestar/api
Version:
A Typescript REST client for the Ethereum Consensus API
31 lines • 1.57 kB
TypeScript
import { JsonPath } from "@chainsafe/ssz";
/**
* Serialize proof path to JSON.
* @param paths `[["finalized_checkpoint", 0, "root", 12000]]`
* @returns `['["finalized_checkpoint",0,"root",12000]']`
*/
export declare function querySerializeProofPathsArr(paths: JsonPath[]): string[];
/**
* Deserialize JSON proof path to proof path
* @param pathStrs `['["finalized_checkpoint",0,"root",12000]']`
* @returns `[["finalized_checkpoint", 0, "root", 12000]]`
*/
export declare function queryParseProofPathsArr(pathStrs: string | string[]): JsonPath[];
/**
* Deserialize single JSON proof path to proof path
* @param pathStr `'["finalized_checkpoint",0,"root",12000]'`
* @returns `["finalized_checkpoint", 0, "root", 12000]`
*/
export declare function queryParseProofPaths(pathStr: string): JsonPath;
export type U64 = number;
export type U64Str = string;
export declare function fromU64Str(u64Str: U64Str): number;
export declare function toU64Str(u64: U64): U64Str;
export declare function fromU64StrOpt(u64Str: U64Str | undefined): U64 | undefined;
export declare function toU64StrOpt(u64: U64 | undefined): U64Str | undefined;
export declare function toValidatorIdsStr(ids?: (string | number)[]): string[] | undefined;
export declare function fromValidatorIdsStr(ids?: string[]): (string | number)[] | undefined;
export declare function toGraffitiHex(utf8?: string): string | undefined;
export declare function fromGraffitiHex(hex?: string): string | undefined;
export declare function toBoolean(value: string): boolean;
//# sourceMappingURL=serdes.d.ts.map