Documentation ¶
Index ¶
- type RemoteSigner
- func (s RemoteSigner) AuthorizedKeys(ctx context.Context) ([]tezos.Address, error)
- func (s RemoteSigner) GetKey(ctx context.Context, address tezos.Address) (tezos.Key, error)
- func (s RemoteSigner) ListAddresses(ctx context.Context) ([]tezos.Address, error)
- func (s RemoteSigner) SignBlock(ctx context.Context, address tezos.Address, head *codec.BlockHeader) (tezos.Signature, error)
- func (s RemoteSigner) SignMessage(ctx context.Context, address tezos.Address, msg string) (tezos.Signature, error)
- func (s RemoteSigner) SignOperation(ctx context.Context, address tezos.Address, op *codec.Op) (tezos.Signature, error)
- func (s *RemoteSigner) WithAddress(addr tezos.Address) *RemoteSigner
- func (s *RemoteSigner) WithAuthKey(sk tezos.PrivateKey) *RemoteSigner
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 ¶
AuthorizedKeys returns a list of addresses the remote signer accepts for authenticating requests.
func (RemoteSigner) ListAddresses ¶
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