Resolve "BCMR Adapter: Create BaseBCMR and HTTP implementation"
This commit is contained in:
committed by
Emergent Reasons
parent
6d0a36248d
commit
e4020a996c
@@ -0,0 +1,24 @@
|
||||
import { z } from 'zod/v4';
|
||||
|
||||
export const MetadataRegistrySchema = z
|
||||
.object({
|
||||
name: z.string(),
|
||||
description: z.string().optional(),
|
||||
uris: z
|
||||
.object({
|
||||
// Since 'icon' and 'web' are strongly recommended uri identifiers(https://github.com/bitjson/chip-bcmr?tab=readme-ov-file#recommended-uri-identifiers)
|
||||
// We require it as non optional.
|
||||
icon: z.url(),
|
||||
web: z.url(),
|
||||
})
|
||||
// Allows any other keys with any values.
|
||||
.catchall(z.unknown()),
|
||||
token: z.object({
|
||||
symbol: z.string(),
|
||||
category: z.string(),
|
||||
decimals: z.number().optional(),
|
||||
}),
|
||||
})
|
||||
.catchall(z.unknown());
|
||||
|
||||
export type MetadataRegistry = z.infer<typeof MetadataRegistrySchema>;
|
||||
Reference in New Issue
Block a user