BitShares Forum
Main => Technical Support => Topic started by: daydream on January 07, 2015, 07:38:55 pm
-
Hello,
I'm implementing Bitshares client and encounter a issue with BTS address validating rpc call:
the rpc call validate_address only work for account key and not for BTS addresses (account public address or addresses created by calling wallet_address_create accountName).
- validate_address accountKey : return true
- validate_address BTSaddress , it always return false
I need to validate BTS address
Any help is appreciated, thanks a lot.
-
This call only checks if something is a valid public key. It is misnamed.
Also, it doesn't check that it belongs to an account or is in your wallet or anything. It literally just checks if a public key is well-formed.
-
Hello,
I'm implementing Bitshares client and encounter a issue with BTS address validating rpc call:
the rpc call validate_address only work for account key and not for BTS addresses (account public address or addresses created by calling wallet_address_create accountName).
- validate_address accountKey : return true
- validate_address BTSaddress , it always return false
I need to validate BTS address
Any help is appreciated, thanks a lot.
have you tried looking at:
wallet_get_account <bts public name>
wallet_get_account_public_address <bts public name>
i believe this is exactly what you want.
>>> wallet_get_account_public_address asfdasdfsfdsfasfsafsdfsdfs
20006 unknown_account: unknown account
Unknown account name!
{"account_name":"asfdasdfsfdsfasfsafsdfsdfs"}
th_a wallet.cpp:1315 get_account
{}
th_a wallet.cpp:1334 get_account
{"account_name":"asfdasdfsfdsfasfsafsdfsdfs"}
th_a wallet_api.cpp:771 wallet_get_account_public_address
{}
th_a common_api_client.cpp:4575 wallet_get_account_public_address
{"command":"wallet_get_account_public_address"}
th_a cli.cpp:579 execute_command
>>> wallet_get_account_public_address yaksbeard
BTS7GQB9CABxXKLGmP75b6sBc1DhsRtHGfHY