Usage
1. Resolve a domain name
You can get address from domain name with a single request:
Multichain address resolution
Domain resolution for other chains can be provided by adding coinType
param to getAddress()
.
2. Resolve an address
There are optional parameters in the method to select your target chain or TLD (top-level Domain).
By providing chain IDs, you can resolve addresses on selected chains and get an available domain name from all TLDs deployed on these chains.
By providing TLDs, address can be resolved from the selected TLDs and get an available TLD primary name.
3. Record
Domain text records can be fetched by providing domain name and the key. For example, the avatar record of spaceid.bnb
is returned from this method given key name avatar
:
4. Metadata
Domain metadata can be fetched by SDK directly.
Use your own RPC
We are using popular public RPC services by default to make it easier to use. But in some cases developers may prefer to use arbitrary RPC, so we provide optional parameter rpcUrl
for each function that allows developers to use their own RPC to make requests.
For example, you can put custom rpcUrl as a parameter in getAddress
function.
For other functions, it's also possible to have a custom rpcUrl
in the request.
Last updated