fromStringStrict

NOTE: This function has strict parsing behavior. For relaxed behavior, please use the [fromString] function.

Creates an instance of AccountAddress from a hex string.

This function allows only the strictest formats defined by AIP-40. In short this means only the following formats are accepted:

  • LONG

  • SHORT for special addresses

Where:

  • LONG is defined as 0x + 64 hex characters.

  • SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.

This means the following are not accepted:

  • SHORT for non-special addresses.

  • Any address without a leading 0x.

Learn more about the different address formats by reading AIP-40: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.

Return

An instance of AccountAddress.

Parameters

input

A hex string representing an account address.