multisig

package
v1.0.0-beta.11....-851daf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package multisig provides functionality for creating multisig bundles.

Index

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

func (m *Multisig) AddSignature(bndl bundle.Bundle, inputAddr Trytes, key Trytes) ([]Trytes, error)

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

type MultisigInput struct {
	Address     Hash
	Balance     uint64
	SecuritySum int64
}

MultisigInput represents a multisig input.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL