mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
fix info schema
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.89-rc19",
|
||||
"version": "0.19.89-rc20",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { z } from 'zod';
|
||||
import { hexStringSchema } from './util-schemas.js';
|
||||
import { ethers } from 'ethers';
|
||||
|
||||
const infoSchema = z.object({
|
||||
blockNumber: z.number().int().nonnegative(),
|
||||
blockHash: hexStringSchema,
|
||||
blockHash: z.string().refine((v) => v.length === 0 || ethers.utils.isHexString(v), {
|
||||
message: 'blockHash must be a valid hex string or empty',
|
||||
}),
|
||||
timeRequest: z.number().int().nonnegative(),
|
||||
timeAnswer: z.number().int().nonnegative(),
|
||||
changes: z.number().int().nonnegative(),
|
||||
|
||||
Reference in New Issue
Block a user