signer

package
v0.0.0-...-de82531 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedTxType       = errors.New("unsupported tx type")
	ErrUnknownInputType        = errors.New("unknown input type")
	ErrUnknownOutputType       = errors.New("unknown output type")
	ErrInvalidUTXOSigIndex     = errors.New("invalid UTXO signature index")
	ErrUnknownSupernetAuthType = errors.New("unknown supernet auth type")
	ErrUnknownOwnerType        = errors.New("unknown owner type")
	ErrUnknownCredentialType   = errors.New("unknown credential type")
)

Functions

func SignUnsigned

func SignUnsigned(
	ctx stdcontext.Context,
	signer Signer,
	utx txs.UnsignedTx,
) (*txs.Tx, error)

Types

type Backend

type Backend interface {
	GetUTXO(ctx stdcontext.Context, chainID, utxoID ids.ID) (*avax.UTXO, error)
	GetSupernetOwner(ctx stdcontext.Context, supernetID ids.ID) (fx.Owner, error)
}

type Signer

type Signer interface {
	// Sign adds as many missing signatures as possible to the provided
	// transaction.
	//
	// If there are already some signatures on the transaction, those signatures
	// will not be removed.
	//
	// If the signer doesn't have the ability to provide a required signature,
	// the signature slot will be skipped without reporting an error.
	Sign(ctx stdcontext.Context, tx *txs.Tx) error
}

func New

func New(kc keychain.Keychain, backend Backend) Signer

Jump to

Keyboard shortcuts

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