UNPKG

@hyperlane-xyz/sdk

Version:

The official SDK for the Hyperlane Network

39 lines 1.66 kB
import { z } from 'zod'; import { ZChainName, ZUint } from '../metadata/customZodTypes.js'; import { TokenConnectionConfigSchema, } from './TokenConnection.js'; import { TokenStandard } from './TokenStandard.js'; export const TokenConfigSchema = z.object({ chainName: ZChainName.describe('The name of the chain, must correspond to a chain in the multiProvider chainMetadata'), standard: z .nativeEnum(TokenStandard) .describe('The type of token. See TokenStandard for valid values.'), decimals: ZUint.lt(256).describe('The decimals value (e.g. 18 for Eth)'), symbol: z.string().min(1).describe('The symbol of the token'), name: z.string().min(1).describe('The name of the token'), addressOrDenom: z .string() .min(1) .or(z.null()) .describe('The address or denom, or null for native tokens'), collateralAddressOrDenom: z .string() .min(1) .optional() .describe('The address or denom of the collateralized token'), igpTokenAddressOrDenom: z .string() .min(1) .optional() .describe('The address or denom of the token for IGP payments'), logoURI: z.string().optional().describe('The URI of the token logo'), connections: z .array(TokenConnectionConfigSchema) .optional() .describe('The list of token connections (e.g. warp or IBC)'), coinGeckoId: z .string() .optional() .describe('The CoinGecko id of the token, used for price lookups'), scale: ZUint.lt(256).optional().describe('The scaling factor of the token'), }); //# sourceMappingURL=IToken.js.map