I'm working for an exchange and have integrated a blockchain by using Rosetta. This project is really amazing and is well compatible with our current blockchain integration process. But there is a feature I want to request.
Is your feature request related to a problem? Please describe.
We will check the address that the customer input in the withdrawal process:
- customer might input an invalid address by mistake, in which case, we should remind him/her to do re-check. For example,
1JTxUeSwH5Ba2ib2UD6Whv5ZXB8RRjfRM8 is a valid address but 1JTxUeSwH5Ba2ib2UD6Whv5ZXB8RRjfRM9 is not.
- customer might input an address in the format which we don't support yet or are not ready to open to customers. For example, for Bitcoin, we support the withdrawal to P2PKH and P2SH address , but we don't support the withdrawal to P2WPKH and P2WSH address.
For the blockchain we have integrated via Rosetta, I used /account/balance to check if the address is valid or not; For invalid address, it would returninvalid account name. But I think it's just a workaround, and is not working for the case 2 above.
Describe the solution you'd like
I am wondering if Rosetta can add one more API, like /account/info:
- for case 1, it returns "invalid account"
- for case 2, it returns something like this:
{
"account_identifier": {
"address": "1JTxUeSwH5Ba2ib2UD6Whv5ZXB8RRjfRM8",
"sub_account": {
"address": "aabbcc",
"metadata": {}
},
"metadata": {},
"type": "P2PKH"
}
}
The type field is not in the metadata for it's not optional.
I'm working for an exchange and have integrated a blockchain by using Rosetta. This project is really amazing and is well compatible with our current blockchain integration process. But there is a feature I want to request.
Is your feature request related to a problem? Please describe.
We will check the address that the customer input in the withdrawal process:
1JTxUeSwH5Ba2ib2UD6Whv5ZXB8RRjfRM8is a valid address but1JTxUeSwH5Ba2ib2UD6Whv5ZXB8RRjfRM9is not.For the blockchain we have integrated via Rosetta, I used
/account/balanceto check if the address is valid or not; For invalid address, it would returninvalid account name. But I think it's just a workaround, and is not working for the case 2 above.Describe the solution you'd like
I am wondering if Rosetta can add one more API, like
/account/info:{ "account_identifier": { "address": "1JTxUeSwH5Ba2ib2UD6Whv5ZXB8RRjfRM8", "sub_account": { "address": "aabbcc", "metadata": {} }, "metadata": {}, "type": "P2PKH" } }The
typefield is not in themetadatafor it's not optional.