Hello, Cardano community.
I’m working as a front-end developer and got a form where users need to enter a Cardano address for receiving funds, this address needs to be validated. so the problem is I’m not knowledgeable enough of address types (notice that every wallet has its own type).
So if someone can give a guide on the best way to do it, and provide some example addresses for testing purposes?
(i tried to use multicoin-address-validator
npm package but is outdated, works only for shelly
)
Hi There!
Here is a brief documentation about the address types:
https://docs.cardano.org/en/latest/learn/types-addresses.html
And example how to generate them:
https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/keys_and_addresses.html
relevant commands in cardano-cli tool - part of Cardano node: https://github.com/input-output-hk/cardano-node/releases/tag/1.26.2:
$ cardano-cli
Era based commands
address Payment address commands
stake-address Stake address commands
key Key utility commands
also worth to check cardano-addresses which is part of cardano-wallet