Skip to content

Commit

Permalink
update type package to v0.0.22 (#223)
Browse files Browse the repository at this point in the history
* update type package to v0.0.22

* update version
  • Loading branch information
ALPAC-4 authored Nov 12, 2024
1 parent b869da7 commit 299862d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@initia/initia-registry-types",
"version": "0.0.21",
"version": "0.0.22",
"description": "The package provides TypeScript type definitions and Zod integration for initia-registry.",
"types": "./dist/types/index.d.ts",
"exports": {
Expand Down
10 changes: 9 additions & 1 deletion _packages/types/src/types/Chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface Chain {
$schema?: string;
chain_name: string;
chain_id: string;
evm_chain_id?: number;
pre_fork_chain_name?: string;
pretty_name?: string;
website?: string;
Expand Down Expand Up @@ -193,7 +194,14 @@ export interface Chain {
grpc?: Endpoint[];
wss?: Endpoint[];
"grpc-web"?: Endpoint[];
"evm-http-jsonrpc"?: Endpoint[];
/**
* Evm json rpc uri
*/
"json-rpc"?: SecureEndpoint[];
/**
* Evm json rpc websocket uri
*/
"json-rpc-websocket"?: Endpoint[];
};
explorers?: Explorer[];
faucets?: Faucet[];
Expand Down
18 changes: 17 additions & 1 deletion _packages/types/src/zods/Chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const ChainSchema = z
.optional(),
chain_name: z.string().regex(new RegExp("[a-z0-9]+")),
chain_id: z.string().regex(new RegExp("[a-z0-9]+")),
evm_chain_id: z.number().optional(),
pre_fork_chain_name: z.string().regex(new RegExp("[a-z0-9]+")).optional(),
pretty_name: z.string().optional(),
website: z.string().url().optional(),
Expand Down Expand Up @@ -402,7 +403,21 @@ export const ChainSchema = z
.strict()
)
.optional(),
"evm-http-jsonrpc": z
"json-rpc": z
.array(
z
.object({
address: z.string().url().regex(new RegExp("^https://.")),
provider: z.string().optional(),
archive: z.boolean().default(false),
authorizedUser: z.string().optional(),
indexForSkip: z.number().optional(),
})
.strict()
)
.describe("Evm json rpc uri")
.optional(),
"json-rpc-websocket": z
.array(
z
.object({
Expand All @@ -414,6 +429,7 @@ export const ChainSchema = z
})
.strict()
)
.describe("Evm json rpc websocket uri")
.optional(),
})
.strict(),
Expand Down

0 comments on commit 299862d

Please sign in to comment.