Skip to main content
Multi-signature transactions allow multiple keys to sign the same transaction. This is useful for multi-sig accounts, escrow services, and collaborative operations.

Multi-Signature Basics

Hive accounts can have multiple keys with different weights for each authority level (owner, active, posting). A transaction requires enough signature weight to meet the threshold.

How Multi-Sig Works

  1. Authority Structure: Each account has owner, active, and posting authorities with configurable thresholds
  2. Key Weights: Each public key in an authority has a weight (default: 1)
  3. Threshold: Minimum total weight required for authorization
  4. Signatures: Transaction must collect enough signatures to meet or exceed threshold
For a standard account, the threshold is 1 and the single key has weight 1. Multi-sig accounts have thresholds greater than 1 or multiple keys.

Signing with Multiple Keys at Once

The simplest approach is to sign with all required keys in a single call:
Pass an array of PrivateKey objects to .sign() to add multiple signatures at once.

Sequential Signing (Collecting Signatures)

For distributed multi-sig workflows, signatures can be collected sequentially:
1

Create the transaction

2

First signer signs

3

Serialize and send to next signer

4

Next signer adds their signature

5

Broadcast when enough signatures collected

Using addSignature Method

You can also add pre-computed signatures directly:
The addSignature() method expects a 130-character hex signature string. Use this when working with external signing tools or hardware wallets.

Complete Multi-Sig Example

Here’s a complete example of a 2-of-3 multi-signature workflow:

Multi-Sig Account Setup

To create a multi-sig account authority structure:
Always test multi-sig configurations on testnet first! Incorrect setup can lock you out of your account.

Weighted Multi-Sig

You can assign different weights to different keys:

Transaction Expiration in Multi-Sig

For multi-sig workflows, consider longer expiration:
Maximum expiration is 24 hours (86,400,000 ms). Use longer expirations for multi-sig workflows that require coordination across time zones.

Verifying Signatures

Check how many signatures a transaction has:

Error Handling

Common Multi-Sig Patterns

Escrow Service

Corporate Account

Recovery Account

Next Steps