Developer Hub
Relation ProtocolRelation ONE APIRelation Graph API
中文
中文
  • 概述
  • 快速开始
    • 基于Relation Protocol 部署合约
    • 使用Graph Indexer部署Social Graph的查询服务
  • 关键概念
    • RDF
    • Semantic SBTs
    • Social Graph
  • Relation Protocol的架构
  • Schema Standard
    • 概述
    • schema如何约束智能合约
    • schema存储
    • schema列表
  • Contract Open Standard
    • 概述
    • Identity
      • Name Service
    • Relationship
      • Follow
      • Dao
    • Publication
      • Content
      • Privacy Content
  • Open Standard API
    • 介绍
    • EIP-6239
    • 业务接口
      • Identity
      • Relationship
      • Publication
  • Graph Indexer
    • 定义与用途
    • 事件监听
    • 解析数据
    • 构建图谱
  • 集成
    • 快速开始
    • 构建Relation Protocol社交图谱
    • Relation Protocol 资源列表
    • NameService 合约请求示例
    • Follow 合约请求示例
    • Dao 合约请求示例
    • Content 合约请求示例
    • PrivacyContent 合约请求示例
  • Relation Name Service
    • Name Service Api
  • 用例
  • 附录
    • 使用Hardhat部署合约
    • SemanticSBT部署工具
Powered by GitBook
On this page
  1. Relation Name Service

Name Service Api

1. Name List

查询某个地址持有的所有域名

  • 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

查询解析记录

  • 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

查询反向解析

  • 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