HiveAuth
HomeGitHub
  • Introduction
    • Authentication
    • Signing and Broadcasting Transactions
    • Why use Hive Authentication Services?
  • Support
  • Developer documentation
    • Protocol description
      • Authentication
      • Transactions
      • Challenge
    • HAS for Applications
      • Connection
      • Encryption key (auth_key)
      • Authentication
        • Authentication request
        • Authentication payload
        • Authentication approval
        • Authentication refusal
        • Errors
        • Expiration
      • Transactions
        • Transaction request
        • Feedback to user
        • Transaction approval
        • Transaction refusal
        • Errors
        • Expiration
      • Challenge
        • Challenge request
        • Feedback to user
        • Challenge approval
        • Challenge refusal
        • Errors
        • Expiration
      • Attach
  • HAS for Wallets (PKSA)
    • Connection
    • Server Encryption Key retrieval
    • Proof of Key
    • Account registration
    • Authentication
      • Authentication payload
      • Authentications request
      • Feedback to user
      • Authentication approval
      • Authentication refusal
      • Errors
    • Transactions
      • Transaction request
      • Feedback to user
      • Transaction approval
      • Transaction refusal
      • Errors
    • Challenge
      • Challenge request
      • Feedback to user
      • Challenge approval
      • Challenge refusal
      • Errors
  • Tutorials
    • App code example
      • HAS Wrapper library
      • HTML code example
      • .NET code example
    • PKSA code example
      • Service Mode
  • Resources
    • Materials
Powered by GitBook
On this page
  • sign_req
  • sign_req_data
  1. HAS for Wallets (PKSA)
  2. Transactions

Transaction request

PreviousTransactionsNextFeedback to user

Last updated 1 year ago

When an APP sends a transaction request involving an account to the HAS, if the PKSA has registered that account with the HAS then it will receive the following message:

sign_req

{
    cmd: "sign_req" 
    account: string
    data: string
    uuid: string
    expire: number
    token: string // DEPRECATED - protocol < 1 only
}
  • account: the Hive account name

  • data: the Base64 representation of an encrypted object

  • uuid {string} the transaction request identifier

  • expire {Number} UNIX time when the request will expire

  • token: the authentication token - DEPRECATED since protocol v1

The structure of the sign_req_data object is:

sign_req_data

{
    key_type: string
    ops: Array
    broadcast: boolean
    nonce: number
}
  • key_type: the key type required to sign the transactions. It can be one of posting|active

  • ops: an array of operations

  • 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: UNIX time of the request

Before sending its sign_req request, the APP has encrypted the sign_req_data using the encryption key shared with the PKSA during the authentication process.

Only a PKSA having previously authenticated an account and having access to the encryption auth_key will be able to decrypt the operations to be put in a transaction and to be signed.

As the HAS has no access to the `auth_key`, it is completely unaware of what's going on between the APP and the PKSA.

sign_req_data