Transaction request
The APP can request the PKSA to sign and/or broadcast a transaction.
Before sending its request, the APP must create a "sign request data" object (sign_req_data
) it will send to the PKSA
sign_req_data
key_type
: the key type required to sign the transactions. It can be one ofposting
|active
ops
: an array of operations objects (see Hive API doc for more info)broadcast
:true
if the PKSA must broadcast the transaction to the blockchain.false
if the PKSA must return a signed transaction but not broadcast it to the blockchain.nonce
: current UNIX time in ms (Date.now()
in Javascript). If a transaction request ever fails, do NOT reuse thesign_req_data
object before first updating the nonce!
The APP must then encrypt the sign_req_data
object using the encryption key previously shared with the PKSA (auth_key
). By encrypting the sign_req_data
object, the HAS will be unaware of what's going on between the app and the PKSA and unable to tamper with the sign request process.
Finally, the APP sends its request to the HAS using the following message:
sign_req
account
: the Hive account namedata
: the Base64 representation of an encryptedsign_req_data
objecttoken
: the authentication token - Deprecated since protocol V1
The HAS will reply with a sign_wait
message:
sign_wait
uuid
: a unique identifier given by the HAS to the requestexpire
: UNIX time when the request will expire
Last updated