aptos-core
aptos-core copied to clipboard
[Feature Request] Address Validation Function
🚀 Feature Request
It would be nice to have a function that verify the validity of the address, checksum, etc.
Motivation
Is your feature request related to a problem? Please describe.
Pitch
Describe the solution you'd like
Describe alternatives you've considered
Are you willing to open a pull request? (See CONTRIBUTING)
Additional context
Validity of a network address or an account address?
And validity being that it is valid, or that it exists?
Validity being that it is valid, checksum checked, etc. Not that it exists on the blockchain.
I think I need a few more details on this.
The AccountAddress can be validated that it is valid, though there is no checksum involved.
The NetworkAddress can also be validated that it is valid, though there is no checksum involved.
Is this a request for the SDKs or CLI?
It is a request for the sdk. Basically check the validity of an address. For example, obviously a bitcoin address won't be valid for as a receiver address.
Got it, you want to verify that a string is a valid aptos address, which is a 32-byte hex encoded string.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
Hey all, +1 to this request as well.
@gregnazario Can you please confirm if there is a good regex that we should use in the meantime?
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.