set Target Address
abstract suspend fun setTargetAddress(sender: AccountAddress, name: String, address: AccountAddressInput, options: InputGenerateTransactionOptions = InputGenerateTransactionOptions()): SimpleTransaction
Builds a transaction to set the target address for a domain or subdomain name.
Usage
val senderAddress = AccountAddress.fromString("0x...")
val name = "test.apt"
val targetAddress = AccountAddress.fromString("0x...")
val transaction = aptos.setTargetAddress(senderAddress, name, targetAddress)
// Sign and submit the transactionContent copied to clipboard
Return
A SimpleTransaction object ready to be signed and submitted.
Parameters
sender
The sender of the transaction, who must be the owner of the name.
name
The ANS name to update.
address
The new target address for the name.
options
Optional configuration for the transaction.