remote

package
v1.19.9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteSigner

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

func New

func New(url string, client *http.Client) (*RemoteSigner, error)

New creates a new remote signer client and initializes it with the remote url. Users may pass an optional http client with a custom configuration, otherwise the http.DefaultClient is used.

func (RemoteSigner) AuthorizedKeys

func (s RemoteSigner) AuthorizedKeys(ctx context.Context) ([]tezos.Address, error)

AuthorizedKeys returns a list of addresses the remote signer accepts for authenticating requests.

func (RemoteSigner) GetKey

func (s RemoteSigner) GetKey(ctx context.Context, address tezos.Address) (tezos.Key, error)

GetKey returns the public key associated with address.

func (RemoteSigner) ListAddresses

func (s RemoteSigner) ListAddresses(ctx context.Context) ([]tezos.Address, error)

ListAddresses returns a list of addresses the remote signer can produce signatures for.

func (RemoteSigner) SignBlock

func (s RemoteSigner) SignBlock(ctx context.Context, address tezos.Address, head *codec.BlockHeader) (tezos.Signature, error)

SignOperation signs a block header for address using the configured remote signer's REST API. This call requires branch_id to be present.

func (RemoteSigner) SignMessage

func (s RemoteSigner) SignMessage(ctx context.Context, address tezos.Address, msg string) (tezos.Signature, error)

SignMessage signs msg for address by wrapping it into a failing noop operation with zero branch hash. This prevents unintended signature of message bytes that represent a valid transaction.

Note that most remote signers for Tezos do not support signing of operation kinds other than baking related operations.

func (RemoteSigner) SignOperation

func (s RemoteSigner) SignOperation(ctx context.Context, address tezos.Address, op *codec.Op) (tezos.Signature, error)

SignOperation signs operation op for address using the configured remote signer's REST API. For endorsements this call requires branch_id to be present.

Note that most remote signers for Tezos do not support signing of operation kinds other than baking related operations.

func (*RemoteSigner) WithAddress

func (s *RemoteSigner) WithAddress(addr tezos.Address) *RemoteSigner

func (*RemoteSigner) WithAuthKey

func (s *RemoteSigner) WithAuthKey(sk tezos.PrivateKey) *RemoteSigner

Jump to

Keyboard shortcuts

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