BitShares Forum

Main => Technical Support => Topic started by: nethyb on August 31, 2014, 03:01:30 pm

Title: Using public 'Account Key' to find out 'Registered name' with API
Post by: nethyb on August 31, 2014, 03:01:30 pm
With TITAN and registered names can I reliably ask miners to provide me with the 'Account Key' associated with their 'Registered Name' which they can find in the GUI under 'My Accounts' -> account -> Keys and then use blockchain_get_account to find out that registered name.

I'll then use this registered name in my wallet_transfer call to pay miners...
I understand I currently must use a registered name with wallet_transfer  API call as it does not allow transfers to  Account Key/Public Keys

Or does the 'Account Key' associated with a particular 'Registered Name' change regularly as part of TITAN?
I notice I have many public keys in my wallet when I issue
Code: [Select]
wallet_account_list_public_keys
i.e.
Code: [Select]
blockchain_get_account BTSX6LntkCfDLvwPrr13az5kYmivVYnJrSA7pmNF9kxNFFjeMqDgE7returns 'nethyb' as the registered name

Will blockchain_get_account BTSX6LntkCfDLvwPrr13az5kYmivVYnJrSA7pmNF9kxNFFjeMqDgE7 always return nethyb?

(Note: Asking miners to supply a BTSX address / Account Key - greatly simplifies the BTSX pool customation work I have to do in addition to providing basic obscufication of pool users on pool website reports)
Title: Re: Using public 'Account Key' to find out 'Registered name' with API
Post by: xeroc on August 31, 2014, 04:17:54 pm
Registering a name is nothing more than letting the blockchain know that a name is connected to a particular account key ... when getting account details from the blockchain it will return the associated accountkey .. key and name are linked indefinitly by the blockchain
Title: Re: Using public 'Account Key' to find out 'Registered name' with API
Post by: toast on August 31, 2014, 09:13:33 pm
you can add them as contact accounts with random names
Title: Re: Using public 'Account Key' to find out 'Registered name' with API
Post by: nethyb on September 01, 2014, 03:35:04 pm
..I have considered using contacts, but didn't want to bloat the wallet with potentially hundreds of contacts...

I'll use the reverse lookup - as I take it from xeroc's comment ...

If I use blockchain_get_account BTSX6LntkCfDLvwPrr13az5kYmivVYnJrSA7pmNF9kxNFFjeMqDgE7 , it will forever and always return nethyb as the register name. 

thanks.