Documentation ¶
Index ¶
- Constants
- Variables
- type NodeAddressRequest
- type NodeSetClient
- func (c *NodeSetClient) DepositDataMeta(ctx context.Context, logger *slog.Logger, vault ethcommon.Address, ...) (stakewise.DepositDataMetaData, error)
- func (c *NodeSetClient) DepositData_Get(ctx context.Context, logger *slog.Logger, vault ethcommon.Address, ...) (stakewise.DepositDataData, error)
- func (c *NodeSetClient) DepositData_Post(ctx context.Context, logger *slog.Logger, ...) error
- func (c *NodeSetClient) Login(ctx context.Context, logger *slog.Logger, nonce string, ...) (core.LoginData, error)
- func (c *NodeSetClient) NodeAddress(ctx context.Context, logger *slog.Logger, email string, ...) error
- func (c *NodeSetClient) Nonce(ctx context.Context, logger *slog.Logger) (core.NonceData, error)
- func (c *NodeSetClient) Validators_Get(ctx context.Context, logger *slog.Logger, network string) (stakewise.ValidatorsData, error)
- func (c *NodeSetClient) Validators_Patch(ctx context.Context, logger *slog.Logger, exitData []common.ExitData, ...) error
Constants ¶
const ( // The provided network was invalid InvalidNetworkKey string = "invalid_network" )
const ( // Format for signing node address messages NodeAddressMessageFormat string = `{"email":"%s","node_address":"%s"}` )
const ( // Deposit data has withdrawal creds that don't match a StakeWise vault VaultNotFoundKey string = "vault_not_found" )
Variables ¶
var ( // The provided network was invalid ErrInvalidNetwork error = errors.New("the provided network was invalid") )
var ( // The requested StakeWise vault didn't exist ErrVaultNotFound error = errors.New("deposit data has withdrawal creds that don't match a StakeWise vault") )
Functions ¶
This section is empty.
Types ¶
type NodeAddressRequest ¶
type NodeAddressRequest struct { // The email address of the NodeSet account Email string `json:"email"` // The node's wallet address NodeAddress string `json:"node_address"` // Signature of the request Signature string `json:"signature"` // Must be 0x-prefixed hex encoded }
Request to register a node with the NodeSet server
type NodeSetClient ¶
type NodeSetClient struct {
*common.CommonNodeSetClient
}
Client for interacting with the NodeSet server
func NewNodeSetClient ¶
func NewNodeSetClient(baseUrl string, timeout time.Duration) *NodeSetClient
Creates a new NodeSet client baseUrl: The base URL to use for the client, for example [https://nodeset.io/api]
func (*NodeSetClient) DepositDataMeta ¶
func (c *NodeSetClient) DepositDataMeta(ctx context.Context, logger *slog.Logger, vault ethcommon.Address, network string) (stakewise.DepositDataMetaData, error)
Get the current version of the aggregated deposit data on the server
func (*NodeSetClient) DepositData_Get ¶
func (c *NodeSetClient) DepositData_Get(ctx context.Context, logger *slog.Logger, vault ethcommon.Address, network string) (stakewise.DepositDataData, error)
Get the aggregated deposit data from the server
func (*NodeSetClient) DepositData_Post ¶
func (c *NodeSetClient) DepositData_Post(ctx context.Context, logger *slog.Logger, depositData []beacon.ExtendedDepositData) error
Uploads deposit data to NodeSet
func (*NodeSetClient) Login ¶
func (c *NodeSetClient) Login(ctx context.Context, logger *slog.Logger, nonce string, address ethcommon.Address, signer func([]byte) ([]byte, error)) (core.LoginData, error)
Logs into the NodeSet server, starting a new session
func (*NodeSetClient) NodeAddress ¶
func (c *NodeSetClient) NodeAddress(ctx context.Context, logger *slog.Logger, email string, nodeWallet ethcommon.Address, signer func([]byte) ([]byte, error)) error
Registers the node with the NodeSet server. Assumes wallet validation has already been done and the actual wallet address is provided here; if it's not, the signature won't come from the node being registered so it will fail validation.
func (*NodeSetClient) Validators_Get ¶
func (c *NodeSetClient) Validators_Get(ctx context.Context, logger *slog.Logger, network string) (stakewise.ValidatorsData, error)
Get a list of all of the pubkeys that have already been registered with NodeSet for this node