Documentation ¶
Overview ¶
Package multisig provides functionality for creating multisig bundles.
Index ¶
- type Multisig
- func (m *Multisig) AddSignature(bndl bundle.Bundle, inputAddr Trytes, key Trytes) ([]Trytes, error)
- func (m *Multisig) Digest(seed Trytes, index uint64, security SecurityLevel, ...) (Trytes, error)
- func (m *Multisig) InitiateTransfer(input MultisigInput, transfers bundle.Transfers, remainderAddress *Trytes) (bundle.Bundle, error)
- func (m *Multisig) Key(seed Trytes, index uint64, security SecurityLevel, ...) (Trytes, error)
- func (m *Multisig) ValidateAddress(addr Trytes, digests []Trytes, spongeFunc ...SpongeFunction) (bool, error)
- type MultisigAddress
- type MultisigInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Multisig ¶
type Multisig struct { Address MultisigAddress API *API }
Multisig encapsulates the processes of generating and validating multisig components.
func NewMultisig ¶
func NewMultisig(api *API) *Multisig
NewMultisig creates a new Multisig object which uses the given API object.
func (*Multisig) AddSignature ¶
AddSignature returns cosigner signatures for the transactions.
func (*Multisig) Digest ¶
func (m *Multisig) Digest(seed Trytes, index uint64, security SecurityLevel, spongeFunc ...SpongeFunction) (Trytes, error)
Digest gets the digest of a seed under the given index and security.
func (*Multisig) InitiateTransfer ¶
func (m *Multisig) InitiateTransfer(input MultisigInput, transfers bundle.Transfers, remainderAddress *Trytes) (bundle.Bundle, error)
InitiateTransfer prepares a transfer by generating the bundle with the corresponding cosigner transactions. Does not contain signatures.
func (*Multisig) Key ¶
func (m *Multisig) Key(seed Trytes, index uint64, security SecurityLevel, spongeFunc ...SpongeFunction) (Trytes, error)
Key gets the key value of a seed.
func (*Multisig) ValidateAddress ¶
func (m *Multisig) ValidateAddress(addr Trytes, digests []Trytes, spongeFunc ...SpongeFunction) (bool, error)
ValidateAddress validates the given multisig address.
type MultisigAddress ¶
type MultisigAddress struct {
// contains filtered or unexported fields
}
MultisigAddress represents a multisig address.
func NewMultisigAddress ¶
func NewMultisigAddress(digests Trytes, spongeFunc ...SpongeFunction) (*MultisigAddress, error)
NewMultisigAddress creates a new multisig address object.
func (*MultisigAddress) Absorb ¶
func (m *MultisigAddress) Absorb(digests ...Trytes) error
Absorb absorbs the given key digests.
func (*MultisigAddress) Finalize ¶
func (m *MultisigAddress) Finalize(digest *string) (Trytes, error)
Finalize finalizes and returns the multisig address as trytes.
type MultisigInput ¶
MultisigInput represents a multisig input.