Ans

class Ans(val config: AptosConfig) : Ans

A class to handle all ANS operations

Constructors

Link copied to clipboard
constructor(config: AptosConfig)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun getExpiration(name: String): Option<Long>

Retrieve the expiration time of a domain name or subdomain name from the contract.

Link copied to clipboard
open suspend override fun getOwnerAddress(name: String): Option<AccountAddress>

Retrieve the owner address of a domain name or subdomain name from the contract.

Link copied to clipboard
open suspend override fun getPrimaryName(address: AccountAddressInput): Option<String>

Retrieve the primary name for an account. An account can have multiple names that target it, but only a single name that is primary. An account also may not have a primary name.

Link copied to clipboard
open suspend override fun getTargetAddress(name: String): Option<AccountAddress>

Retrieve the target address of a domain or subdomain name. This is the address the name points to for use on chain. Note, the target address can point to addresses that are not the owner of the name

Link copied to clipboard

Sets the target address of a domain or subdomain name. This is the address the name points to for use on chain. Note, the target address can point to addresses that are not the owner of the name