View Source Dpos.Tx.MultiSig (DPoS v0.4.0)

A Multi Sig transaction.

Example:

Tx.MultiSig
|> Tx.build(%{fee: 2000000000, timestamp: 73056420})
|> Tx.MultiSig.set_lifetime(3600)
|> Tx.MultiSig.set_min(2)
|> Tx.MultiSig.add_public_key("6267e1754d4b29cae9007fc0b3f0d435f981c90f70281ce053cb1c2243b848a2")
|> Tx.MultiSig.add_public_key("0bc54404ef644519592568687d2bc62593b912a57df319062bb7611b11009ebf")
|> Tx.MultiSig.add_public_key("b65aa5950acf1ade522bcf520f2b2491dcde2f312b4933f56443faff80ad8ebc")
|> Tx.sign(wallet)

Summary

Functions

Adds a public key to the keysgroup field of the multisignature.

Sets the lifetime in seconds of the multisignature.

Sets the minimum number of signatures required to validate a transaction.

Functions

Link to this function

add_public_key(tx, pub_key)

View Source
@spec add_public_key(Dpos.Tx.t(), String.t()) :: Dpos.Tx.t()

Adds a public key to the keysgroup field of the multisignature.

@spec set_lifetime(Dpos.Tx.t(), pos_integer()) :: Dpos.Tx.t()

Sets the lifetime in seconds of the multisignature.

The lifetime must be >= 3600 and <= 259200.

@spec set_min(Dpos.Tx.t(), pos_integer()) :: Dpos.Tx.t()

Sets the minimum number of signatures required to validate a transaction.

The minimum possible value is 2.