Sha256: 214436068b9d7b0e95c76b1fa82e852f9840588139d23de85bea3e02afa08182
Contents?: true
Size: 1.79 KB
Versions: 1
Compression:
Stored size: 1.79 KB
Contents
export declare enum DATA_FIELD_TYPE { INTEGER = "integer", BOOLEAN = "boolean", STRING = "string", BINARY = "binary" } export declare type TSchema = TObject | TArray | IAnyOf | TDataTxItem | TPrimitive; export declare type TObjectField = [string | string[], TSchema]; export declare type TAnyOfItem = { schema: TSchema; key: number; strKey?: string; }; export declare type TObject = { type: 'object'; withLength?: TPrimitive; optional?: boolean; schema: TObjectField[]; }; export declare type TArray = { type: 'array'; items: TSchema; toBytes?: any; fromBytes?: any; }; export interface IAnyOf { type: 'anyOf'; toBytes?: any; fromBytes?: any; discriminatorField: string; discriminatorBytePos: number; valueField?: string; itemByKey: (key: string) => TAnyOfItem | undefined; itemByByteKey: (key: number) => TAnyOfItem | undefined; } export declare type TPrimitive = { type?: 'primitive'; toBytes: (...args: any) => any; fromBytes: (bytes: Uint8Array, start?: number) => any; }; export declare type TDataTxItem = { type: 'dataTxField'; items: Map<DATA_FIELD_TYPE, TSchema>; }; export declare function anyOf(items: [number, TSchema, string?][], options?: TAnyOfOptions): IAnyOf; export declare type TAnyOfOptions = { [P in Exclude<keyof AnyOfClass, 'type'>]?: AnyOfClass[P]; }; declare class AnyOfClass implements IAnyOf { private _items; type: 'anyOf'; toBytes?: any; fromBytes?: any; withLength?: TPrimitive; discriminatorField: string; discriminatorBytePos: number; valueField?: string; constructor(_items: [number, TSchema, string?][], options?: TAnyOfOptions); itemByKey(k: string): TAnyOfItem | undefined; itemByByteKey(k: number): TAnyOfItem | undefined; } export {};
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
waves_lib-0.1.0 | js/node_modules/@waves/marshall/dist/schemaTypes.d.ts |