Documentation ¶
Index ¶
- Constants
- Variables
- type EncryptedExitData
- type ExitData
- type ExitMessage
- type ExitMessageDetails
- type MinipoolDepositSignatureData
- type MinipoolDepositSignatureRequest
- type V2ConstellationClient
- func (c *V2ConstellationClient) Deployments(ctx context.Context, logger *slog.Logger) (common.DeploymentsData, error)
- func (c *V2ConstellationClient) MinipoolDepositSignature(ctx context.Context, logger *slog.Logger, deployment string, ...) (MinipoolDepositSignatureData, error)
- func (c *V2ConstellationClient) Validators_Get(ctx context.Context, logger *slog.Logger, deployment string) (ValidatorsData, error)
- func (c *V2ConstellationClient) Validators_Patch(ctx context.Context, logger *slog.Logger, deployment string, ...) error
- func (c *V2ConstellationClient) Whitelist_Get(ctx context.Context, logger *slog.Logger, deployment string) (Whitelist_GetData, error)
- func (c *V2ConstellationClient) Whitelist_Post(ctx context.Context, logger *slog.Logger, deployment string) (Whitelist_PostData, error)
- type ValidatorStatus
- type ValidatorsData
- type Validators_PatchBody
- type Whitelist_GetData
- type Whitelist_PostData
Constants ¶
View Source
const ( // The node address cannot create more minipools MinipoolLimitReachedKey string = "minipool_limit_reached" // The node making the request isn't the user's whitelisted Constellation node IncorrectNodeAddressKey string = "incorrect_node_address" // The requesting node's owner doesn't have a node whitelisted for Constellation yet MissingWhitelistedNodeAddressKey string = "missing_whitelisted_node_address" // Nodeset.io is missing a signed exit message for a previous minipool MissingExitMessageKey string = "missing_exit_message" // A minipool with this address already exists AddressAlreadyRegisteredKey string = "address_already_registered" )
View Source
const ( // Key for the error code when an exit message already exists for the pubkey being submitted ExitMessageExistsKey string = "exit_message_exists" // Route for interacting with the list of validators ValidatorsPath string = "validators" )
View Source
const ( string = "node_unauthorized" // Route for requesting whitelist signature WhitelistPath string = "whitelist" )NodeUnauthorizedKey
View Source
const (
ConstellationPrefix string = "modules/constellation/"
)
View Source
const ( // Route for requesting the signature to create a minipool MinipoolDepositSignaturePath string = "minipool/deposit-signature" )
Variables ¶
View Source
var ( // The node address cannot create more minipools ErrMinipoolLimitReached error = errors.New("node address cannot create more minipools") // The node making the request isn't the user's whitelisted Constellation node ErrIncorrectNodeAddress error = errors.New("requester isn't the user's whitelisted Constellation node") // The requesting node's owner doesn't have a node whitelisted for Constellation yet ErrMissingWhitelistedNodeAddress error = errors.New("requesting node's owner doesn't have a node whitelisted for Constellation yet") // Nodeset.io is missing a signed exit message for a previous minipool ErrMissingExitMessage error = errors.New("nodeset.io is missing a signed exit message for a previous minipool") // A minipool with this address already exists ErrAddressAlreadyRegistered error = errors.New("a minipool with this address already exists") )
View Source
var ( // Exit message already exists for the pubkey being submitted ErrExitMessageExists error = errors.New("exit message already exists for the pubkey") )
View Source
var ( error = errors.New("node isn't authorized to register with Constellation") )ErrNodeUnauthorized
Functions ¶
This section is empty.
Types ¶
type EncryptedExitData ¶ added in v1.2.0
type EncryptedExitData struct { Pubkey string `json:"pubkey"` ExitMessage string `json:"exitMessage"` }
Data for a pubkey's encrypted voluntary exit message
type ExitData ¶
type ExitData struct { Pubkey string `json:"pubkey"` ExitMessage ExitMessage `json:"exitMessage"` }
Data for a pubkey's voluntary exit message
type ExitMessage ¶
type ExitMessage struct { Message ExitMessageDetails `json:"message"` Signature string `json:"signature"` }
Voluntary exit message
type ExitMessageDetails ¶
type ExitMessageDetails struct { Epoch string `json:"epoch"` ValidatorIndex string `json:"validatorIndex"` }
Details of an exit message
type MinipoolDepositSignatureData ¶
type MinipoolDepositSignatureData struct { // The signature for SuperNodeAccount.createMinipool() Signature string `json:"signature"` }
Response to a create minipool signature request
type MinipoolDepositSignatureRequest ¶
type MinipoolDepositSignatureRequest struct { // the EIP55-compliant hex string representing the address of the // minipool that will be created (the address to generate the signature for) MinipoolAddress ethcommon.Address `json:"minipoolAddress"` // a hex string (lower-case, no 0x prefix) representing the 32-byte salt used // to create minipoolAddress during CREATE2 calculation Salt string `json:"salt"` }
Request to generate signature for SuperNodeAccount.createMinipool()
type V2ConstellationClient ¶
type V2ConstellationClient struct {
// contains filtered or unexported fields
}
func NewV2ConstellationClient ¶
func NewV2ConstellationClient(commonClient *common.CommonNodeSetClient) *V2ConstellationClient
func (*V2ConstellationClient) Deployments ¶
func (c *V2ConstellationClient) Deployments(ctx context.Context, logger *slog.Logger) (common.DeploymentsData, error)
Gets the list of deployments available on the server
func (*V2ConstellationClient) MinipoolDepositSignature ¶
func (*V2ConstellationClient) Validators_Get ¶
func (c *V2ConstellationClient) Validators_Get(ctx context.Context, logger *slog.Logger, deployment string) (ValidatorsData, error)
Get a list of all of the pubkeys that have already been registered with NodeSet for this node on the provided deployment and vault
func (*V2ConstellationClient) Validators_Patch ¶
func (c *V2ConstellationClient) Validators_Patch(ctx context.Context, logger *slog.Logger, deployment string, exitData []common.EncryptedExitData) error
Submit signed exit data to NodeSet
func (*V2ConstellationClient) Whitelist_Get ¶
func (c *V2ConstellationClient) Whitelist_Get(ctx context.Context, logger *slog.Logger, deployment string) (Whitelist_GetData, error)
func (*V2ConstellationClient) Whitelist_Post ¶
func (c *V2ConstellationClient) Whitelist_Post(ctx context.Context, logger *slog.Logger, deployment string) (Whitelist_PostData, error)
type ValidatorStatus ¶
type ValidatorStatus struct { Pubkey beacon.ValidatorPubkey `json:"pubkey"` RequiresExitMessage bool `json:"requiresExitMessage"` }
Validator status info
type ValidatorsData ¶
type ValidatorsData struct {
Validators []ValidatorStatus `json:"validators"`
}
Response to a validators request
type Validators_PatchBody ¶
type Validators_PatchBody struct {
ExitData []EncryptedExitData `json:"exitData"`
}
Request body for submitting exit data
type Whitelist_GetData ¶
type Whitelist_GetData struct { // Whether the user has a whitelisted node Whitelisted bool `json:"whitelisted"` // The address of the whitelisted node for the user account Address ethcommon.Address `json:"address,omitempty"` }
Response to a whitelist GET request
type Whitelist_PostData ¶
type Whitelist_PostData struct { // The signature for Whitelist.addOperator() Signature string `json:"signature"` }
Response to a whitelist POST request
Click to show internal directories.
Click to hide internal directories.