Name Service

The Alias Service allows easy to remember and use names to be assigned to wallet addresses. Any provider operation which takes an address may also take an alias.

Alias also provides the ability for a reverse lookup, which determines the name for an address if it has been configured.

Create alias required authorities approval and verification, and small fees will be charge. Once the application is approved, alias will be recorded into blockchain.

Querying

provider . resolveName ( name )   => Promise<Address>
Returns a Promise which resolves to the address of that the alias resolves to (or null is not registered).
provider . lookupAddress ( address )   => Promise<string>
Returns a Promise which resolves to the alias that address resolves to (or null if not registered).
resolve an alias to an address
provider.resolveName("hello").then((address) => {
    console.log("Address:", address);
});
lookup the alias of an address
let address = "mxw12h2a2ky8cyldm5qhm6xluu0ggapeztzcypww4c";
provider.lookupAddress(address).then(function(name) {
    console.log("Name:", name);
    // "hello"
});