解析 Unstoppable 域并返回地址(异步)。
选项:
currency
(可选):要查询的货币。 可用值:eth、0x1。 默认值:eth。
domain
(必填): 需要解析的域。你可以使用JS
、React
、curl
、Unity
来实现
// get polygon NFTs for address
const options = { currency: "eth", domain: "brad.crypto" };
const resolve = await Moralis.Web3API.resolve.resolveDomain(options);
import React from "react";
import { useMoralisWeb3Api } from "react-moralis";
const Web3Api = useMoralisWeb3Api();
const fetchDomain = async () => {
// get polygon NFTs for address
const options = { currency: "eth", domain: "brad.crypto" };
const resolve = await Web3Api.resolve.resolveDomain(options);
console.log(resolve);
};
curl -X "GET"
"https://deep-index.moralis.io/api/v2/resolve/brad.crypto?currency=eth"
-H "accept: application/json"
-H "X-API-Key: MY-API-KEY"
using System.Collections.Generic;
using Moralis.Web3Api.Models;
using MoralisWeb3ApiSdk;
public async void fetchDomain()
{
Resolve resolve = await MoralisInterface.GetClient().Web3Api.Resolve.ResolveDomain(domain: "brad.crypto" currency: "eth");
print(resolve.ToJson());
}
示例结果
{
"address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e"
}
反向解析地址并返回 ENS 域(如果存在)。
选项:
address
(必填):要反向解析的以太坊地址。你可以使用JS
、React
、curl
、Unity
来实现
// get ENS domain of an address
const options = { address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" };
const resolve = await Moralis.Web3API.resolve.resolveAddress(options);
import React from "react";
import { useMoralisWeb3Api } from "react-moralis";
const Web3Api = useMoralisWeb3Api();
const fetchAddress = async () => {
// get ENS domain of an address
const options = { address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" };
const resolve = await Web3Api.resolve.resolveAddress(options);
console.log(resolve);
};
curl -X "GET"
"https://deep-index.moralis.io/api/v2/resolve/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/reverse"
-H "accept: application/json"
-H "X-API-Key: MY-API-KEY"
using System.Collections.Generic;
using Moralis.Web3Api.Models;
using MoralisWeb3ApiSdk;
public async void fetchAddress()
{
Ens result = await MoralisInterface.GetClient().Web3Api.Resolve.ResolveAddress(address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
print(result.ToJson());
}
示例结果:
{
"name": "vitalik.eth"
}
安装MoralisSDK运行以下命令安装MoralisSDK,您可以使用npm或者yarnnpm install moralisyarn add moralisSDK初始化您需...
视图仅仅是存储在数据库中具有关联名称的Impala查询语言的语句。 它是以预定义的SQL查询形式的表的组合。 视图可以包含表的所有...
场景介绍关系型数据库是在 SQLite 基础上实现的本地数据操作机制,提供给用户无需编写原生 SQL 语句就能进行数据增删改查的方法...
Component.EstimateSizeListenerpublic static interface Component.EstimateSizeListener提供用于自定义尺寸(宽度/高度)估计...