multisig

package
v1.6.3-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(template core.Address, required uint8, pubs ...[]byte) types.Address

Address compute account address based on the size of the public keys.

Types

type Aggregator

type Aggregator struct {
	// contains filtered or unexported fields
}

Aggregator is a signature accumulator.

func NewAggregator

func NewAggregator(unsigned []byte) *Aggregator

func SelfSpawn

func SelfSpawn(
	ref uint8,
	pk ed25519.PrivateKey,
	template types.Address,
	required uint8,
	pubs []ed25519.PublicKey,
	nonce core.Nonce,
	opts ...sdk.Opt,
) *Aggregator

SelfSpawn returns accumulator for self-spawn transaction.

func Spawn

func Spawn(
	ref uint8,
	pk ed25519.PrivateKey,
	principal, template types.Address,
	args scale.Encodable,
	nonce core.Nonce,
	opts ...sdk.Opt,
) *Aggregator

Spawn returns accumulator for spawn transaction.

func Spend

func Spend(
	ref uint8,
	pk ed25519.PrivateKey,
	principal, to types.Address,
	amount uint64,
	nonce types.Nonce,
	opts ...sdk.Opt,
) *Aggregator

Spend creates spend transaction.

func (*Aggregator) Add

func (tx *Aggregator) Add(parts ...multisig.Part)

Add signature parts to the accumulator.

func (*Aggregator) Part

func (tx *Aggregator) Part(ref uint8) *multisig.Part

Part returns signature part from ref public key.

func (*Aggregator) Raw

func (tx *Aggregator) Raw() []byte

Raw returns full raw transaction including payload and signature.

Jump to

Keyboard shortcuts

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