Hive Multisig SDK
  • Welcome!
  • Quick Start
  • WebSocket flow
    • 1 - Users connect to the Websocket
    • 2 - User A requests a transaction
    • 3 - User B receives the signature request
    • 4 - User B signs the transaction
    • 5 - User B broadcasts the transaction
    • 6 - Users both receive a successful broadcast notification
  • API
  • Utils
    • Encode Transaction
    • Decode Transaction
  • Static helpers
    • Get/Reset HiveMultisig instance
    • Get Signers
    • Get Authorities
    • Validate Initiator
  • Demo
Powered by GitBook
On this page
  • IDecodeTransaction object
  • ITransaction object
  1. Utils

Decode Transaction

We also provided a utility function to decode the encrypted transactions received from signature requests.

const data: IDecodeTransaction = {
         signatureRequest: message,
         username: 'user-b'
      };

const decodedTx:ITransaction = await multisig.utils.decodeTransaction(data);

Under the hood, decodeTransaction()will validate the authorities of the transaction and then decrypt the transaction through Keychain if it is valid.

Once the transaction has been decoded, the user can then sign the request.

IDecodeTransaction object

Property
Description
Type

signatureRequest

An array of SignatureRequest objects.

SignatureRequest[]

username

The username of the user that is decoding the transaction.

stringenum

ITransaction object

Property
Description
Type

signer

The Signer object received inside the SignatureRequest object.

Signer

signatureRequestId

The signature request id assigned by the backend.

number

transaction

A dhive Transaction object

dhive Transaction

method

The keyType used when initiating the transaction

KeychainKeyTypes enum

username

The username of the signer

string

PreviousEncode TransactionNextStatic helpers

Last updated 1 year ago