Account registration
Last updated
Last updated
The PKSA can register one or more accounts and do it either by issuing one command with multiple accounts or by issuing one command per account.
The PKSA sends the following message to the HAS:
app
: can contain any value identifying the PKSA
accounts
an array that can contain one or more account
objects
name
: the Hive account name
pok
: the current encrypted using the account private key and the HAS server public key (see )
This prevents malicious actors from creating a PKSA, registering accounts for which they do not have private keys, and sniffing requests relayed by the HAS.
When multiple accounts are registered at the same time, the HAS server will check that ALL provided accounts exist on the Hive blockchain and return an error if any of them does not exist and cannot be registered.
For each successfully registered account, the HAS server will reply with the following message:
account
: the account that has been successfully registered
Timing
The account registration can be performed before or after the HIVE applications will issue related authentication or transaction requests.
a) If the PKSA registration occurred before the requests are issued, it will receive those requests immediately.
b) If no PKSA is registered when the HAS receives authentication or transaction requests, it will queue them, waiting for a PKSA to register. If no PKSA registers before they expire, requests are discarded.
In both cases, (a) and (b), the APP will be notified of the requests' pending or expired status.
The sent to the HAS for each account enables it to verify that the PKSA has access to the private keys of the account it wants to register.