Interface CharacterMetadata

interface CharacterMetadata {
    attributes?: {
        display_type?: "string" | "number" | "boolean" | "date";
        trait_type?: string;
        value: null | string | number | boolean;
    }[];
    avatars?: string[];
    banners?: {
        address: string;
        mime_type: string;
    }[];
    bio?: string;
    connected_accounts?: string[];
    connected_avatars?: string[];
    name?: string;
    type?: "character" | "note" | "linklist";
    websites?: string[];
}

Hierarchy (view full)

Properties

attributes?: {
    display_type?: "string" | "number" | "boolean" | "date";
    trait_type?: string;
    value: null | string | number | boolean;
}[]

Custom attributes.

Type declaration

  • Optional display_type?: "string" | "number" | "boolean" | "date"
  • Optional trait_type?: string
  • value: null | string | number | boolean

Example

[{ value: "post", trait_type: "type" }, { value: "https://example.com", trait_type: "URL" }, { value: 1546360800, trait_type: 'Birthday', "display_type": "date" }]
avatars?: string[]

The avatars of this character. The first avatar is the primary avatar.

Example

['ipfs://Qm...', 'ipfs://Qm...']
banners?: {
    address: string;
    mime_type: string;
}[]

The banners of this character.

Type declaration

  • address: string

    The address (url) of this banner.

  • mime_type: string

    The mime type of this banner file.

Example

[{ address: 'ipfs://Qm...', mime_type: 'image/png' }]
bio?: string

The bio of this character.

connected_accounts?: string[]

The social links of this character. It should follow the csb:// scheme.

The format is csb://account:<identity>@<platform>.

Example

['csb://account:someone@twitter', 'csb://account:someone@github']
connected_avatars?: string[]

The special connected avatars of this character. it should follow the csb:// scheme.

Use case: use an NFT as avatar.

The format is csb://asset:<contract_address>-<token_id>@<network>.

Example

['csb://asset:0x5452c7fb99d99fab3cc1875e9da9829cb50f7a13-753@ethereum']
name?: string

The name of this character.

type?: "character" | "note" | "linklist"
websites?: string[]

The websites of this character.

Example

['https://example.com', 'https://example.org']

Generated using TypeDoc