signer

package
v1.18.4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAddressMismatch = errors.New("signer: address mismatch")

Functions

This section is empty.

Types

type MemorySigner

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

func NewFromKey

func NewFromKey(k tezos.PrivateKey) *MemorySigner

func (MemorySigner) GetKey

func (s MemorySigner) GetKey(_ context.Context, addr tezos.Address) (tezos.Key, error)

func (MemorySigner) ListAddresses

func (s MemorySigner) ListAddresses(_ context.Context) ([]tezos.Address, error)

func (MemorySigner) SignBlock

func (s MemorySigner) SignBlock(_ context.Context, addr tezos.Address, head *codec.BlockHeader) (tezos.Signature, error)

func (MemorySigner) SignMessage

func (s MemorySigner) SignMessage(_ context.Context, addr tezos.Address, msg string) (tezos.Signature, error)

func (MemorySigner) SignOperation

func (s MemorySigner) SignOperation(_ context.Context, addr tezos.Address, op *codec.Op) (tezos.Signature, error)

type Signer

type Signer interface {
	// Return a list of addresses the signer manages.
	ListAddresses(context.Context) ([]tezos.Address, error)

	// Returns the public key for a managed address. Required for reveal ops.
	GetKey(context.Context, tezos.Address) (tezos.Key, error)

	// Sign an arbitrary text message wrapped into a failing noop
	SignMessage(context.Context, tezos.Address, string) (tezos.Signature, error)

	// Sign an operation.
	SignOperation(context.Context, tezos.Address, *codec.Op) (tezos.Signature, error)

	// Sign a block header.
	SignBlock(context.Context, tezos.Address, *codec.BlockHeader) (tezos.Signature, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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