Validate a blockchain address
/v1/blockchain-manager/address/validateChecks whether an address has a valid format for the given network: its encoding, length, prefix and checksum. Use it to reject a mistyped address before registering it in the address book or sending a withdrawal to it.
A well-formed request always returns 200: valid says whether the address is valid and, when
it is not, error says why. This includes an address of another network and a network the
validator does not support: in that case supported is false, the address could not be
checked and valid is false. In production the address is checked against the mainnet
format of the network; in the other environments testnet addresses are also accepted.
It does not tell whether the address exists on the blockchain, whether it belongs to anyone or
whether funds can be withdrawn to it.
Authorization
ApiKeyAuth For accessing these endpoints a valid API key must be sent in the X-Api-Key header.
In: header
Query Parameters
Network identifier (e.g. bitcoin, ethereum). Only letters and digits.
^[A-Za-z0-9]+$1 <= length <= 128The address to validate. Surrounding spaces are trimmed; no whitespace is allowed inside it.
1 <= length <= 500Response Body
application/json
application/json
application/json
curl --request GET \ --url 'https://gateway.bit2me.com/v1/blockchain-manager/address/validate?network=bitcoin&address=bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'{ "error": "Invalid bitcoin Bech32 address", "supported": true, "valid": false}Remove address book entry DELETE
Removes an address book entry of the authenticated user, identified by its UUID. The removal is a soft-removal: the entry moves to `disabled` state and is kept for audit purposes, so it no longer appears in the address book list, the entry detail or the withdrawal destination selector. Only entries in `validating` or `verified` state can be removed.
Create a withdrawal draft POST
Creates a draft withdrawal order that must be accepted before it is submitted to the blockchain. The draft takes the destination address, network, tag and fees from the address book entry referenced by `addressBookId`, and debits the user's pocket of that currency with the highest balance; the caller only specifies how much to withdraw, either in the cryptocurrency or in a fiat currency. Checks the balance (including the network fee), the minimum amount for the network and that the user is allowed to withdraw. Nothing is debited yet. The draft expires at `expiresAt`; after that it cannot be accepted and a new one has to be created.