lookup Original Account Address
open suspend override fun lookupOriginalAccountAddress(authenticationKey: AccountAddressInput, ledgerVersion: Int?): Result<AccountAddressInput, AptosSdkError>
Retrieves the original account address for a given authentication key.
This function can resolve the address for both rotated and non-rotated keys.
Usage
// Note: An authentication key can be created from an account address
val authKey = AccountAddress.fromString("0x...")
val resolution = aptos.lookupOriginalAccountAddress(authKey)
when (resolution) {
is Result.Ok -> {
val address = resolution.value
println("Original account address: $address")
}
is Result.Err -> println("Error looking up address: ${resolution.error.message}")
}Content copied to clipboard
Return
A Result which is either Result.Ok containing the associated account address, or Result.Err containing an AptosSdkError.
Parameters
authentication Key
The authentication key to look up.
ledger Version
An optional ledger version to query; if not provided, it will use the latest version.