UNPKG

@leetswap/sdk-canto

Version:

🛠 An SDK for building applications on top of LeetSwap on Canto.

238 lines (237 loc) • 11.2 kB
export declare const tokenlistSchema: { readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly $id: "https://uniswap.org/tokenlist.schema.json"; readonly title: "Uniswap Token List"; readonly description: "Schema for lists of tokens compatible with the Uniswap Interface"; readonly definitions: { readonly Version: { readonly type: "object"; readonly description: "The version of the list, used in change detection"; readonly examples: readonly [{ readonly major: 1; readonly minor: 0; readonly patch: 0; }]; readonly additionalProperties: false; readonly properties: { readonly major: { readonly type: "integer"; readonly description: "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed."; readonly minimum: 0; readonly examples: readonly [1, 2]; }; readonly minor: { readonly type: "integer"; readonly description: "The minor version of the list. Must be incremented when tokens are added to the list."; readonly minimum: 0; readonly examples: readonly [0, 1]; }; readonly patch: { readonly type: "integer"; readonly description: "The patch version of the list. Must be incremented for any changes to the list."; readonly minimum: 0; readonly examples: readonly [0, 1]; }; }; readonly required: readonly ["major", "minor", "patch"]; }; readonly TagIdentifier: { readonly type: "string"; readonly description: "The unique identifier of a tag"; readonly minLength: 1; readonly maxLength: 12; readonly pattern: "^[\\w]+$"; readonly examples: readonly ["compound", "stablecoin"]; }; readonly ExtensionIdentifier: { readonly type: "string"; readonly description: "The name of a token extension property"; readonly minLength: 1; readonly maxLength: 30; readonly pattern: "^[\\w]+$"; readonly examples: readonly ["color", "is_fee_on_transfer", "aliases"]; }; readonly ExtensionValue: { readonly anyOf: readonly [{ readonly type: "string"; readonly minLength: 1; readonly maxLength: 42; readonly examples: readonly ["#00000"]; }, { readonly type: "boolean"; readonly examples: readonly [true]; }, { readonly type: "number"; readonly examples: readonly [15]; }, { readonly type: "null"; }]; }; readonly TagDefinition: { readonly type: "object"; readonly description: "Definition of a tag that can be associated with a token via its identifier"; readonly additionalProperties: false; readonly properties: { readonly name: { readonly type: "string"; readonly description: "The name of the tag"; readonly pattern: "^[ \\w]+$"; readonly minLength: 1; readonly maxLength: 20; }; readonly description: { readonly type: "string"; readonly description: "A user-friendly description of the tag"; readonly pattern: "^[ \\w\\.,]+$"; readonly minLength: 1; readonly maxLength: 200; }; }; readonly required: readonly ["name", "description"]; readonly examples: readonly [{ readonly name: "Stablecoin"; readonly description: "A token with value pegged to another asset"; }]; }; readonly TokenInfo: { readonly type: "object"; readonly description: "Metadata for a single token in a token list"; readonly additionalProperties: false; readonly properties: { readonly chainId: { readonly type: "integer"; readonly description: "The chain ID of the Ethereum network where this token is deployed"; readonly minimum: 1; readonly examples: readonly [1, 42]; }; readonly address: { readonly type: "string"; readonly description: "The checksummed address of the token on the specified chain ID"; readonly pattern: "^0x[a-fA-F0-9]{40}$"; readonly examples: readonly ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]; }; readonly decimals: { readonly type: "integer"; readonly description: "The number of decimals for the token balance"; readonly minimum: 0; readonly maximum: 255; readonly examples: readonly [18]; }; readonly name: { readonly type: "string"; readonly description: "The name of the token"; readonly minLength: 1; readonly maxLength: 40; readonly pattern: "^[ \\w.'+\\-%/À-ÖØ-öø-ÿ\\:]+$"; readonly examples: readonly ["USD Coin"]; }; readonly symbol: { readonly type: "string"; readonly description: "The symbol for the token; must be alphanumeric"; readonly pattern: "^[a-zA-Z0-9+\\-%/\\$\\.]+$"; readonly minLength: 1; readonly maxLength: 20; readonly examples: readonly ["USDC"]; }; readonly logoURI: { readonly type: "string"; readonly description: "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64"; readonly format: "uri"; readonly examples: readonly ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]; }; readonly tags: { readonly type: "array"; readonly description: "An array of tag identifiers associated with the token; tags are defined at the list level"; readonly items: { readonly $ref: "#/definitions/TagIdentifier"; }; readonly maxLength: 10; readonly examples: readonly ["stablecoin", "compound"]; }; readonly extensions: { readonly type: "object"; readonly description: "An object containing any arbitrary or vendor-specific token metadata"; readonly propertyNames: { readonly $ref: "#/definitions/ExtensionIdentifier"; }; readonly additionalProperties: { readonly $ref: "#/definitions/ExtensionValue"; }; readonly maxProperties: 10; readonly examples: readonly [{ readonly color: "#000000"; readonly is_verified_by_me: true; }]; }; }; readonly required: readonly ["chainId", "address", "decimals", "name", "symbol"]; }; }; readonly type: "object"; readonly additionalProperties: false; readonly properties: { readonly name: { readonly type: "string"; readonly description: "The name of the token list"; readonly minLength: 1; readonly maxLength: 20; readonly pattern: "^[\\w ]+$"; readonly examples: readonly ["My Token List"]; }; readonly timestamp: { readonly type: "string"; readonly format: "date-time"; readonly description: "The timestamp of this list version; i.e. when this immutable version of the list was created"; }; readonly version: { readonly $ref: "#/definitions/Version"; }; readonly tokens: { readonly type: "array"; readonly description: "The list of tokens included in the list"; readonly items: { readonly $ref: "#/definitions/TokenInfo"; }; readonly minItems: 1; readonly maxItems: 10000; }; readonly keywords: { readonly type: "array"; readonly description: "Keywords associated with the contents of the list; may be used in list discoverability"; readonly items: { readonly type: "string"; readonly description: "A keyword to describe the contents of the list"; readonly minLength: 1; readonly maxLength: 20; readonly pattern: "^[\\w ]+$"; readonly examples: readonly ["compound", "lending", "personal tokens"]; }; readonly maxItems: 20; readonly uniqueItems: true; }; readonly tags: { readonly type: "object"; readonly description: "A mapping of tag identifiers to their name and description"; readonly propertyNames: { readonly $ref: "#/definitions/TagIdentifier"; }; readonly additionalProperties: { readonly $ref: "#/definitions/TagDefinition"; }; readonly maxProperties: 20; readonly examples: readonly [{ readonly stablecoin: { readonly name: "Stablecoin"; readonly description: "A token with value pegged to another asset"; }; }]; }; readonly logoURI: { readonly type: "string"; readonly description: "A URI for the logo of the token list; prefer SVG or PNG of size 256x256"; readonly format: "uri"; readonly examples: readonly ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]; }; }; readonly required: readonly ["name", "timestamp", "version", "tokens"]; };