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
-
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
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | The registered SELF name |
description | string | Yes | A description of the SELF identity |
image | string | Yes | URL or IPFS hash of the profile image |
email | string | No | Associated email address |
Foreign Addresses
-
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
-
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" } }
For a complete list of supported chains and their integration keys, see the Supported Chains documentation.
Usage
The metadata structure is used in several contexts:
- NFT Metadata: When viewing the SELF NFT on marketplaces
- Cross-chain Resolution: For resolving addresses across different networks
- Identity Information: For displaying user profile information in applications
For implementation details on working with SELF metadata, see the Cross-Chain Resolution guide.