title | description | keywords | sidebar_position | ||||
---|---|---|---|---|---|---|---|
AddressValidity |
Validates if a string is a legitimate external blockchain address. |
|
1 |
import Addresses from "./_addresses.mdx";
Assertion whether a given string represents a valid address on an external blockchain.
Network Type | Supported Chains |
---|---|
Mainnet | BTC (Bitcoin), DOGE (Dogecoin), XRP (XRP Ledger) |
Testnet | testBTC (Bitcoin Testnet v3), testDOGE , testXRP |
Field | Solidity Type | Description |
---|---|---|
addressStr |
string |
The address string to verify. |
Field | Solidity Type | Description |
---|---|---|
isValid |
bool |
Indicates whether the provided address is valid. |
standardAddress |
string |
The standardized form of the validated address if isValid ; otherwise, an empty string. |
standardAddressHash |
bytes32 |
The keccak256 hash of the standardAddress if isValid ; otherwise, a zero bytes32 string. |
The address is verified against the validity criteria specific to the chain identified by sourceId
. If the address meets all criteria:
isValid
is set totrue
.- The
standardAddress
and itsstandardAddressHash
are computed.
If the address is invalid:
isValid
is set tofalse
.- The
standardAddress
is empty andstandardAddressHash
is zero value.
:::note[Lowest used timestamp]
For the lowestUsedTimestamp
parameter, the value 0xffffffffffffffff
(equivalent to $ 2^{64} - 1 $) in hexadecimal) is used as the default.
:::
For the complete interface definition, see IAddressValidity
.