Author Topic: Using public 'Account Key' to find out 'Registered name' with API  (Read 1366 times)

0 Members and 1 Guest are viewing this topic.

Offline nethyb

  • Full Member
  • ***
  • Posts: 197
    • View Profile
  • BitShares: nethyb
..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.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
you can add them as contact accounts with random names
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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

Offline nethyb

  • Full Member
  • ***
  • Posts: 197
    • View Profile
  • BitShares: nethyb
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)