Metadata Structure

This page describes the structure of SELF metadata, which contains essential information about a SELF name including cross-chain addresses and identity details.

Overview

  1. The SELF metadata follows a standardized JSON structure that includes basic identity information and cross-chain address mappings.

    interface Metadata {
      name: string;
      description: string;
      image: string;
      email?: string;
      foreignAddresses: {
        [key: string]: ForeignAddressType;
      };
    }
    

Properties

Core Fields

FieldTypeRequiredDescription
namestringYesThe registered SELF name
descriptionstringYesA description of the SELF identity
imagestringYesURL or IPFS hash of the profile image
emailstringNoAssociated email address

Foreign Addresses

  1. The foreignAddresses object contains mappings between chain integration keys and their corresponding addresses. Each key corresponds to a supported blockchain network.

    {
      "foreignAddresses": {
        "btc": "bc1q...",
        "eth": "0x...",
        "sol": "..."
        // ... other chain addresses
      }
    }
    

Example

  1. Here's a complete example of a SELF metadata structure:

    {
      "name": "satoshi",
      "description": "SELF identity for Satoshi",
      "image": "ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco",
      "email": "satoshi@example.com",
      "foreignAddresses": {
        "btc": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
        "eth": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
        "sol": "5FHwkrdxkN8yPxmVZc1R6BkVoXHtGwsXHvi6Xo6JuXrX"
      }
    }
    

Usage

The metadata structure is used in several contexts:

  1. NFT Metadata: When viewing the SELF NFT on marketplaces
  2. Cross-chain Resolution: For resolving addresses across different networks
  3. Identity Information: For displaying user profile information in applications

For implementation details on working with SELF metadata, see the Cross-Chain Resolution guide.