Developer Hub
Relation ProtocolRelation ONE APIRelation Graph API
English
English
  • Overview
  • QUICK START
    • Deploy a Semantic SBT contract leveraging Relation Protocol
    • Deploying query services using Graph Indexer
  • KEY CONCEPTS
    • RDF
    • Semantic SBTs
    • Social Graph
  • Architecture
  • Schema Standard
    • Overview
    • How schemas limit smart contracts
    • Store schema
    • List of schemas
  • Contract Open Standard
    • Overview
    • Identity
      • Name Service
    • Relationship
      • Follow
      • Dao
    • Publication
      • Content
      • Privacy Content
  • Open Standard API
    • Introduction
    • EIP-6239
    • Business Interface
      • Identity
      • Relationship
      • Publication
  • Graph Indexer
    • Definition and usage
    • Listen to events
    • To parse RDF data
    • To build a social graph
  • Integrations
    • Quick start
    • Construct a social graph with Relation Protocol
    • List of resources
    • NameService contract guide
    • Follow contract guide
    • Dao contract guide
    • Content contract guide
    • PrivacyContent contract guide
  • Relation Name Service
    • Name Service Api
  • Use Case
  • APPENDIX
    • Deploy a contract using Hardhat
    • SemanticSBT Deployment tool
Powered by GitBook
On this page
  1. Relation Name Service

Name Service Api

1. Name List

Returns all names held by the address

  • host: https://testnet.relationlabs.ai

  • path: /name/list

  • method: GET

  • query params: address

  • example:

curl --location 'https://testnet.relationlabs.ai/name/list?address=0x247b8cdf5ff2ed74ba5da461f96f0f5b275cdeda'
{
  "code": "0",
  "desc": "success",
  "data": [
    {
      "name": "relation.soul",
      "rdfData": ":Soul_0x247b8cdf5ff2ed74ba5da461f96f0f5b275cdeda p:resolved :Name_relation.soul.",
      "transactionHash": "0x8711dee7907daf0a4e9f6b1763c1b3a90f144627cb1b041c29f706f08993545a",
      "resolved": true
    },
    {
      "name": "relationlabs.soul",
      "rdfData": ":Soul_0x247b8cdf5ff2ed74ba5da461f96f0f5b275cdeda p:hold :Name_relationlabs.soul.",
      "transactionHash": "0xa74578e59d0e16329c0308f6597b15a217d061c36b2c8dc1750423bb1eaa879c",
      "resolved": false
    }
  ]
}

2. Resolve

Return the resolve record

  • host: https://testnet.relationlabs.ai

  • path: /name/resolve

  • method: GET

  • query params: name

  • example:

curl --location 'https://testnet.relationlabs.ai/name/resolve?name=relation.soul'
{
  "code": "0",
  "desc": "success",
  "data": {
    "address": "0x247b8cdf5ff2ed74ba5da461f96f0f5b275cdeda"
  }
}

3. ReverseResolve

Return the reverse resolve record

  • host: https://testnet.relationlabs.ai

  • path: /name/reverseResolve

  • method: GET

  • query params: address

  • example:

curl --location 'https://testnet.relationlabs.ai/name/reverseResolve?address=0x247b8cdf5ff2ed74ba5da461f96f0f5b275cdeda'
{
  "code": "0",
  "desc": "success",
  "data": {
    "name": "relation.soul"
  }
}

Last updated 2 years ago