Name Service
interface NameService
Aptos Name Service operations exposed as client.names.
Functions
Link copied to clipboard
abstract suspend fun buildClearTarget(sender: AccountAddressInput, name: String, options: TransactionOptions = TransactionOptions()): AptosResult<UnsignedTransaction.Simple>
Builds a transaction that removes the address target from name.
Link copied to clipboard
abstract suspend fun buildRegister(sender: AccountAddressInput, name: String, expiration: NameExpirationPolicy, transferable: Boolean = false, target: AccountAddressInput? = null, owner: AccountAddressInput? = null, options: TransactionOptions = TransactionOptions()): AptosResult<UnsignedTransaction.Simple>
Builds a domain or subdomain registration transaction.
Link copied to clipboard
abstract suspend fun buildRenew(sender: AccountAddressInput, name: String, options: TransactionOptions = TransactionOptions()): AptosResult<UnsignedTransaction.Simple>
Builds a renewal transaction for an existing name.
Link copied to clipboard
abstract suspend fun buildSetPrimary(sender: AccountAddressInput, name: String? = null, options: TransactionOptions = TransactionOptions()): AptosResult<UnsignedTransaction.Simple>
Set a primary name, or clear it when name is null.
Link copied to clipboard
abstract suspend fun buildSetTarget(sender: AccountAddressInput, name: String, target: AccountAddressInput, options: TransactionOptions = TransactionOptions()): AptosResult<UnsignedTransaction.Simple>
Link copied to clipboard
Returns the on-chain expiration timestamp in Unix seconds.
Link copied to clipboard
abstract suspend fun getAccountDomains(accountAddress: AccountAddressInput, page: PageRequest = PageRequest()): AptosResult<AptosPage<NameRecord>>
Returns top-level domains associated with an account.
Link copied to clipboard
abstract suspend fun getAccountNames(accountAddress: AccountAddressInput, page: PageRequest = PageRequest()): AptosResult<AptosPage<NameRecord>>
Returns all domains and subdomains associated with an account.
Link copied to clipboard
abstract suspend fun getAccountSubdomains(accountAddress: AccountAddressInput, page: PageRequest = PageRequest()): AptosResult<AptosPage<NameRecord>>
Returns subdomains associated with an account.
Link copied to clipboard
abstract suspend fun getDomainSubdomains(domain: String, page: PageRequest = PageRequest()): AptosResult<AptosPage<NameRecord>>
Returns indexed subdomains belonging to domain.
Link copied to clipboard
Returns the exact indexed name record.
Link copied to clipboard
Resolves the current owner of name.
Link copied to clipboard
Returns the account's primary name, if one is configured.
Link copied to clipboard
Resolves the address currently targeted by name.