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
  1. WebSocket flow

1 - Users connect to the Websocket

Start by identifying the keys in the WebSocket backend. This will sign a message through Keychain and send it to the backend. This will also return the pending signature requests and the multisig transaction results recorded by the backend while the user is offline.

Our backend associates each WebSocket connection with a single key. If you want a given user to be able to perform multisig with his active and his posting private keys, you need to initiate two subscriptions.

await multisig.wss.subscribe(data:SignerConnectMessage);

SignerConnectMessage object

Property
Description
Type

username

Subscribing username

string

keyType

The type of key subscribing to the WebSocket. Can be "Active" or "Posting"

KeychainKeyTypes enum

message

Message to be encrypted to verify the key on the WebSocket backend

string (optional) defaults to username

PreviousWebSocket flowNext2 - User A requests a transaction

Last updated 1 year ago