3 - User B receives the signature request

The user can receive signature requests either through subscribing to Websocket or through the following process.

When the user has successfully subscribed to the WebSocket, they may then proceed to subscribe to real-time signature request notifications.

const signRequestCallback:SignatureRequestCallback =  async (message: SignatureRequest) => {
   // the user can decode the transaction here
   console.log(message);
  };

await multisig.wss.onReceiveSignRequest(signRequestCallback);

SignatureRequestCallback type

FieldDescriptionType

SignatureRequestCallback

A function that accepts a SignatureRequest object as an argument.

function

SignatureRequest object

PropertyDescriptionType

id

An id assigned by the backend.

number

expirationDate

The expiration date set by the initiator.

Date

threshold

The minimum number of weight required before broadcasting the transaction.

number

keyType

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

KeychainKeyTypes enum

initiator

The username of transaction initiator.

string

broadcasted

The flag set by the backend when a transaction hahs been broadcasted. True when it is broadcasted otherwise False.

boolean

createdAt

Creation date of the request.

Date

signers

An array of Signer object

Signer object

status

The current status of the signature request set by the backend. It can be Pending, Expired, or Broadcasted.

string

Signer object

PropertyDescriptionType

id

An id assigned by the backend.

number

publicKey

The public key of the signer with respect to the keyType used in the transaction.

string

encrptedTransaction

The encrypted transaction string.

string

weight

The weight of the signer.

number

signature

The signature of the signer

string (optional)

Last updated