Get Account

Requires wallet support.

The getaccount RPC returns the name of the account associated with the given address.

Parameter #1—a pai address

Name Type Presence Description
Address string (base58) Required
(exactly 1)
A P2PKH or P2SH pai address belonging either to a specific account or the default account (“”)

Result—an account name

Name Type Presence Description
result string Required
(exactly 1)
The name of an account, or an empty string (“”, the default account)

Example

pai-cli -testnet getaccount mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN

Result:

doc test

See also

  • GetAddressesByAccount: returns a list of every address assigned to a particular account.