API Reference

To get the details of all networks indexed by Map3, use a get request to /v1/network. the response will be an array of Network objects.

Request

No parameters are required.

Responses
200 - Success

Array of Network objects.

401 - Unauthorized

If the API server has been configured to authenticate and a valid access token has not been provided in the request.

Example
curl -H "Authorization: Bearer \<AUTH TOKEN>" <https://api.map3.xyz/v1/network>
fetch("<https://api.map3.xyz/v1/network">, { "headers": {  
    "Authorization": "Bearer \<AUTH TOKEN>" } })

Get network by code

To get details of a network by its unique network code, a GET request can be sent to /v1/network?network_code= the response will be a Network object.

Request

code - The network code (e.g. ethereum)

Responses
200 - Success

A Network object.

404 - Not Found

If a network does not exist with the specified network code.

401 - Unauthorized

If the API server has been configured to authenticate and a valid access token has not been provided in the request.

Example
 curl -H "Authorization: Bearer \<AUTH TOKEN>" <https://api.map3.xyz/v1/network?network_code=ethereum>
fetch("<https://api.map3.xyz/v1/network?network_code=ethereum">, { "headers": {  
    "Authorization": "Bearer \<AUTH TOKEN>" } })

Network Schema

type locales = 'en' | 'es' | 'fr' | 'de' | 'it' | 'ja' | 'ko' | 'pt' | 'ru' | 'zh';

export type Description = {
    [locale in locales]?: string
}

export interface Links {
    explorer?: string;
    research?: string;
    website?: string;
    github?: string;
    medium?: string;
    twitter?: string;
    reddit?: string;
    whitepaper?: string;
}

export interface Verification {
    verified: boolean;
    type: string; 
    timestamp: string;
    proof: VerificationProof; 
}

// TODO extend VerificationProof to include different types 
type VerificationProof = AdminVerificationProof;

interface AdminVerificationProof  {
    signature: string;
    assertion: string;
}

enum TagName {
    STABLECOIN = 'stablecoin',
    STAKING = 'staking',
    WRAPPED = 'wrapped',
    LEVERAGED = 'leveraged',
    BULL = 'bull',
    BEAR = 'bear'
}

interface Tag {
    name: TagName;
    description: string;
}

type TokenListTagInfo = {
    [key in TagName]: Tag
}

interface Network {
    id: string;
    type: 'network';
    identifiers: {
        bip44?: number;
        chainId?: number;
    } | null;
    regex: {
        address: string;
        memo?: string;
    };
    networkCode: string;
    active: boolean;
    color: string | null;
    decimals: number;
    description: Description | null;// foreign keys
    links: Links | null; // foreign keys
    logo: Logos | null; // foreign keys
    name: string;
    spam: boolean;
    symbol: string;
    tags: TagName[] | []; // foreign keys
    type: ObjectType; // not persisted
    verifications: Verification[] | [] // foreign keys
    version: Version | string;
}

Example

{
  "active": true,
  "color": "#3c3c3d",
  "decimals": 18,
  "description": {
      "en": "Open source platform to write and distribute decentralized applications."
  },
  "id": "da5eb9b1-7e2b-4976-a260-07a3eab89618",
  "identifiers": {
    "bip44": 60,
    "chainId": 1
  },
  "links": {
    "explorer": "https://etherscan.io/",
    "research": "https://research.binance.com/en/projects/ethereum",
    "website": "https://ethereum.org/",
    "github": "https://github.com/ethereum",
    "twitter": "https://twitter.com/ethereum",
    "reddit": "https://reddit.com/r/ethereum",
    "whitepaper": "https://github.com/ethereum/wiki/wiki/White-Paper"
  },
  "logo": {
    "png": "https://raw.githubusercontent.com/map3xyz/assets/master/networks/ethereum/logo.png",
    "svg": "https://raw.githubusercontent.com/map3xyz/assets/master/networks/ethereum/logo.svg"
  },
  "name": "Ethereum",
  "networkCode": "ethereum",
  "regex": {
    "address": "^0x[a-fA-F0-9]{40}$"
  },
  "spam": false,
  "symbol": "ETH",
  "tags": [],
  "type": "network",
  "verifications": []
}