internal

package
v5.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient struct {
	BaseURL    *url.URL
	RestClient *http.Client
}

ApiClient a wrapper object around web3signer APIs. Please refer to the docs from Consensys' web3signer project.

func NewApiClient

func NewApiClient(baseEndpoint string) (*ApiClient, error)

NewApiClient method instantiates a new ApiClient object.

func (*ApiClient) GetPublicKeys

func (client *ApiClient) GetPublicKeys(ctx context.Context, url string) ([]string, error)

GetPublicKeys is a wrapper method around the web3signer publickeys api (this may be removed in the future or moved to another location due to its usage).

func (*ApiClient) GetServerStatus

func (client *ApiClient) GetServerStatus(ctx context.Context) (string, error)

GetServerStatus is a wrapper method around the web3signer upcheck api

func (*ApiClient) ReloadSignerKeys

func (client *ApiClient) ReloadSignerKeys(ctx context.Context) error

ReloadSignerKeys is a wrapper method around the web3signer reload api.

func (*ApiClient) Sign

func (client *ApiClient) Sign(ctx context.Context, pubKey string, request SignRequestJson) (bls.Signature, error)

Sign is a wrapper method around the web3signer sign api.

type HttpSignerClient

type HttpSignerClient interface {
	Sign(ctx context.Context, pubKey string, request SignRequestJson) (bls.Signature, error)
	GetPublicKeys(ctx context.Context, url string) ([]string, error)
}

HttpSignerClient defines the interface for interacting with a remote web3signer.

type SignRequestJson

type SignRequestJson []byte

type SignatureResponse

type SignatureResponse struct {
	Signature hexutil.Bytes `json:"signature"`
}

SignatureResponse is the struct representing the signing request response in json format

Jump to

Keyboard shortcuts

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