@macalinao/zod-solana
Version:
Zod schemas for Solana types with @solana/kit integration
37 lines • 1.41 kB
TypeScript
import { z } from "zod";
/**
* Schema for Solana token metadata JSON
* Based on Metaplex Token Metadata Standard
*/
export declare const tokenMetadataSchema: z.ZodObject<{
name: z.ZodString;
symbol: z.ZodString;
description: z.ZodOptional<z.ZodString>;
image: z.ZodOptional<z.ZodString>;
animation_url: z.ZodOptional<z.ZodString>;
external_url: z.ZodOptional<z.ZodString>;
attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
trait_type: z.ZodString;
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
display_type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
properties: z.ZodOptional<z.ZodObject<{
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
uri: z.ZodString;
type: z.ZodString;
cdn: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>>;
category: z.ZodOptional<z.ZodString>;
creators: z.ZodOptional<z.ZodArray<z.ZodObject<{
address: z.ZodString;
share: z.ZodNumber;
}, z.core.$strip>>>;
}, z.core.$strip>>;
seller_fee_basis_points: z.ZodOptional<z.ZodNumber>;
collection: z.ZodOptional<z.ZodObject<{
name: z.ZodString;
family: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>;
export type TokenMetadata = z.infer<typeof tokenMetadataSchema>;
//# sourceMappingURL=token-metadata-schema.d.ts.map