Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type Attestation
- type AttestationData
- type AttesterDuty
- type AttesterSlashing
- type BasicAuth
- type BeaconApiService
- func (a *BeaconApiService) GetBlock(ctx _context.Context, blockId string) (GetBlockResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetBlockAttestations(ctx _context.Context, blockId string) (GetBlockAttestationsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetBlockHeader(ctx _context.Context, blockId string) (GetBlockHeaderResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetBlockHeaders(ctx _context.Context, localVarOptionals *GetBlockHeadersOpts) (GetBlockHeadersResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetBlockRoot(ctx _context.Context, blockId string) (GetBlockRootResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetEpochCommittees(ctx _context.Context, stateId string, epoch string, ...) (GetEpochCommitteesResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetGenesis(ctx _context.Context) (GetGenesisResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetPoolAttestations(ctx _context.Context, localVarOptionals *GetPoolAttestationsOpts) (GetBlockAttestationsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetPoolAttesterSlashings(ctx _context.Context) (GetPoolAttesterSlashingsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetPoolProposerSlashings(ctx _context.Context) (GetPoolProposerSlashingsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetPoolVoluntaryExits(ctx _context.Context) (GetPoolVoluntaryExitsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetStateFinalityCheckpoints(ctx _context.Context, stateId string) (GetStateFinalityCheckpointsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetStateFork(ctx _context.Context, stateId string) (GetStateForkResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetStateRoot(ctx _context.Context, stateId string) (GetStateRootResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetStateValidator(ctx _context.Context, stateId string, validatorId string) (GetStateValidatorResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) GetStateValidators(ctx _context.Context, stateId string, ...) (GetStateValidatorsResponse, *_nethttp.Response, error)
- func (a *BeaconApiService) PublishBlock(ctx _context.Context, inlineObject InlineObject) (*_nethttp.Response, error)
- func (a *BeaconApiService) SubmitPoolAttestations(ctx _context.Context, inlineObject1 InlineObject1) (*_nethttp.Response, error)
- func (a *BeaconApiService) SubmitPoolAttesterSlashings(ctx _context.Context, inlineObject2 InlineObject2) (*_nethttp.Response, error)
- func (a *BeaconApiService) SubmitPoolProposerSlashings(ctx _context.Context, inlineObject3 InlineObject3) (*_nethttp.Response, error)
- func (a *BeaconApiService) SubmitPoolVoluntaryExit(ctx _context.Context, inlineObject4 InlineObject4) (*_nethttp.Response, error)
- type BeaconBlock
- type BeaconBlockAllOf
- type BeaconBlockAllOf1
- type BeaconBlockAllOf1Body
- type BeaconBlockAllOf1BodyData
- type BeaconBlockAllOf1BodyDeposits
- type BeaconState
- type Checkpoint
- type Committee
- type ConfigApiService
- func (a *ConfigApiService) GetDepositContract(ctx _context.Context) (GetDepositContractResponse, *_nethttp.Response, error)
- func (a *ConfigApiService) GetForkSchedule(ctx _context.Context) (GetForkScheduleResponse, *_nethttp.Response, error)
- func (a *ConfigApiService) GetSpec(ctx _context.Context) (GetSpecResponse, *_nethttp.Response, error)
- type Configuration
- type DebugApiService
- type ErrorMessage
- type EventsApiService
- type Fork
- type GenericOpenAPIError
- type GenesisTime
- type GetAggregatedAttestationResponse
- type GetAttesterDutiesResponse
- type GetAttesterDutiesResponseData
- type GetBlockAttestationsResponse
- type GetBlockAttestationsResponseData
- type GetBlockAttestationsResponseData1
- type GetBlockHeaderResponse
- type GetBlockHeadersOpts
- type GetBlockHeadersResponse
- type GetBlockHeadersResponseData
- type GetBlockHeadersResponseHeader
- type GetBlockResponse
- type GetBlockResponseData
- type GetBlockRootResponse
- type GetBlockRootResponseData
- type GetDebugChainHeadsResponse
- type GetDebugChainHeadsResponseData
- type GetDepositContractResponse
- type GetDepositContractResponseData
- type GetEpochCommitteesOpts
- type GetEpochCommitteesResponse
- type GetEpochCommitteesResponseData
- type GetForkScheduleResponse
- type GetGenesisResponse
- type GetGenesisResponseData
- type GetNetworkIdentityResponse
- type GetNetworkIdentityResponseData
- type GetNetworkIdentityResponseDataMetadata
- type GetPeerResponse
- type GetPeersResponse
- type GetPeersResponseData
- type GetPoolAttestationsOpts
- type GetPoolAttesterSlashingsResponse
- type GetPoolAttesterSlashingsResponseAttestation1
- type GetPoolAttesterSlashingsResponseData
- type GetPoolProposerSlashingsResponse
- type GetPoolProposerSlashingsResponseData
- type GetPoolVoluntaryExitsResponse
- type GetPoolVoluntaryExitsResponseData
- type GetPoolVoluntaryExitsResponseMessage
- type GetProposerDutiesResponse
- type GetProposerDutiesResponseData
- type GetSpecResponse
- type GetStateFinalityCheckpointsResponse
- type GetStateFinalityCheckpointsResponseData
- type GetStateFinalityCheckpointsResponseDataPreviousJustified
- type GetStateForkResponse
- type GetStateForkResponseData
- type GetStateResponse
- type GetStateResponseData
- type GetStateResponseDataEth1Data
- type GetStateRootResponse
- type GetStateRootResponseData
- type GetStateValidatorResponse
- type GetStateValidatorsOpts
- type GetStateValidatorsResponse
- type GetStateValidatorsResponseData
- type GetStateValidatorsResponseValidator
- type GetSyncingStatusResponse
- type GetSyncingStatusResponseData
- type GetVersionResponse
- type GetVersionResponseData
- type InlineObject
- type InlineObject1
- type InlineObject2
- type InlineObject3
- type InlineObject4
- type InlineObject5
- type InlineResponse400
- type InlineResponse500
- type NetworkIdentity
- type NodeApiService
- func (a *NodeApiService) GetHealth(ctx _context.Context) (*_nethttp.Response, error)
- func (a *NodeApiService) GetNetworkIdentity(ctx _context.Context) (GetNetworkIdentityResponse, *_nethttp.Response, error)
- func (a *NodeApiService) GetNodeVersion(ctx _context.Context) (GetVersionResponse, *_nethttp.Response, error)
- func (a *NodeApiService) GetPeer(ctx _context.Context, peerId string) (GetPeerResponse, *_nethttp.Response, error)
- func (a *NodeApiService) GetPeers(ctx _context.Context) (GetPeersResponse, *_nethttp.Response, error)
- func (a *NodeApiService) GetSyncingStatus(ctx _context.Context) (GetSyncingStatusResponse, *_nethttp.Response, error)
- type Peer
- type PrepareBeaconCommitteeSubnetOpts
- type ProduceAttestationDataResponse
- type ProduceBlockOpts
- type ProduceBlockResponse
- type ProposerDuty
- type ProposerSlashing
- type PublishAggregateAndProofOpts
- type ServerConfiguration
- type ServerVariable
- type SignedAggregateAndProof
- type SignedBeaconBlock
- type SignedBeaconBlockHeader
- type SignedVoluntaryExit
- type ValidatorApiService
- func (a *ValidatorApiService) GetAggregatedAttestation(ctx _context.Context, attestationDataRoot string, slot string) (GetAggregatedAttestationResponse, *_nethttp.Response, error)
- func (a *ValidatorApiService) GetAttesterDuties(ctx _context.Context, epoch string, index []string) (GetAttesterDutiesResponse, *_nethttp.Response, error)
- func (a *ValidatorApiService) GetProposerDuties(ctx _context.Context, epoch string) (GetProposerDutiesResponse, *_nethttp.Response, error)
- func (a *ValidatorApiService) PrepareBeaconCommitteeSubnet(ctx _context.Context, localVarOptionals *PrepareBeaconCommitteeSubnetOpts) (*_nethttp.Response, error)
- func (a *ValidatorApiService) ProduceAttestationData(ctx _context.Context, slot string, committeeIndex string) (ProduceAttestationDataResponse, *_nethttp.Response, error)
- func (a *ValidatorApiService) ProduceBlock(ctx _context.Context, slot string, randaoReveal string, ...) (ProduceBlockResponse, *_nethttp.Response, error)
- func (a *ValidatorApiService) PublishAggregateAndProof(ctx _context.Context, localVarOptionals *PublishAggregateAndProofOpts) (*_nethttp.Response, error)
- type ValidatorResponse
- type ValidatorStatus
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { BeaconApi *BeaconApiService ConfigApi *ConfigApiService DebugApi *DebugApiService EventsApi *EventsApiService NodeApi *NodeApiService ValidatorApi *ValidatorApiService // contains filtered or unexported fields }
APIClient manages communication with the Eth2 Beacon Node API API vDev - Eth2Spec v0.12.2 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type Attestation ¶
type Attestation struct { // Attester aggregation bits. AggregationBits string `json:"aggregation_bits,omitempty"` Signature string `json:"signature,omitempty"` Data GetBlockAttestationsResponseData `json:"data,omitempty"` }
Attestation The [`Attestation`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#attestation) object from the Eth2.0 spec.
type AttestationData ¶ added in v0.3.0
type AttestationData struct { Slot string `json:"slot,omitempty"` Index string `json:"index,omitempty"` BeaconBlockRoot string `json:"beacon_block_root,omitempty"` Source GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"source,omitempty"` Target GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"target,omitempty"` }
AttestationData The [`AttestationData`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#attestationdata) object from the Eth2.0 spec.
type AttesterDuty ¶
type AttesterDuty struct { // The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive._ Pubkey string `json:"pubkey,omitempty"` CommitteeIndex string `json:"committee_index,omitempty"` CommitteeLength string `json:"committee_length,omitempty"` ValidatorCommitteeIndex string `json:"validator_committee_index,omitempty"` Slot string `json:"slot,omitempty"` }
AttesterDuty struct for AttesterDuty
type AttesterSlashing ¶
type AttesterSlashing struct { Attestation1 GetPoolAttesterSlashingsResponseAttestation1 `json:"attestation_1,omitempty"` Attestation2 GetPoolAttesterSlashingsResponseAttestation1 `json:"attestation_2,omitempty"` }
AttesterSlashing The [`AttesterSlashing`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/core/0_beacon-chain.md#attesterslashing) object from the Eth2.0 spec.
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BeaconApiService ¶
type BeaconApiService service
BeaconApiService BeaconApi service
func (*BeaconApiService) GetBlock ¶
func (a *BeaconApiService) GetBlock(ctx _context.Context, blockId string) (GetBlockResponse, *_nethttp.Response, error)
GetBlock Get block Retrieves block details for given block id.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param blockId Block identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \\<slot\\>, \\<hex encoded blockRoot with 0x prefix\\>.
@return GetBlockResponse
func (*BeaconApiService) GetBlockAttestations ¶
func (a *BeaconApiService) GetBlockAttestations(ctx _context.Context, blockId string) (GetBlockAttestationsResponse, *_nethttp.Response, error)
GetBlockAttestations Get block attestations Retrieves attestation included in requested block.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param blockId Block identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \\<slot\\>, \\<hex encoded blockRoot with 0x prefix\\>.
@return GetBlockAttestationsResponse
func (*BeaconApiService) GetBlockHeader ¶
func (a *BeaconApiService) GetBlockHeader(ctx _context.Context, blockId string) (GetBlockHeaderResponse, *_nethttp.Response, error)
GetBlockHeader Get block header Retrieves block header for given block id.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param blockId Block identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \\<slot\\>, \\<hex encoded blockRoot with 0x prefix\\>.
@return GetBlockHeaderResponse
func (*BeaconApiService) GetBlockHeaders ¶
func (a *BeaconApiService) GetBlockHeaders(ctx _context.Context, localVarOptionals *GetBlockHeadersOpts) (GetBlockHeadersResponse, *_nethttp.Response, error)
GetBlockHeaders Get block headers Retrieves block headers matching given query. By default it will fetch current head slot blocks.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *GetBlockHeadersOpts - Optional Parameters:
- @param "Slot" (optional.Interface of string) -
- @param "ParentRoot" (optional.Interface of string) -
@return GetBlockHeadersResponse
func (*BeaconApiService) GetBlockRoot ¶
func (a *BeaconApiService) GetBlockRoot(ctx _context.Context, blockId string) (GetBlockRootResponse, *_nethttp.Response, error)
GetBlockRoot Get block root Retrieves hashTreeRoot of BeaconBlock/BeaconBlockHeader
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param blockId Block identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \\<slot\\>, \\<hex encoded blockRoot with 0x prefix\\>.
@return GetBlockRootResponse
func (*BeaconApiService) GetEpochCommittees ¶
func (a *BeaconApiService) GetEpochCommittees(ctx _context.Context, stateId string, epoch string, localVarOptionals *GetEpochCommitteesOpts) (GetEpochCommitteesResponse, *_nethttp.Response, error)
GetEpochCommittees Get all committees for epoch Retrieves the committees for the given state at the given epoch.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
- @param epoch Epoch for which to calculate committees. Defaults to beacon state epoch.
- @param optional nil or *GetEpochCommitteesOpts - Optional Parameters:
- @param "Index" (optional.Interface of string) - Committee index
- @param "Slot" (optional.Interface of string) -
@return GetEpochCommitteesResponse
func (*BeaconApiService) GetGenesis ¶
func (a *BeaconApiService) GetGenesis(ctx _context.Context) (GetGenesisResponse, *_nethttp.Response, error)
GetGenesis Retrieve details of the chain's genesis. Retrieve details of the chain's genesis which can be used to identify chain.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetGenesisResponse
func (*BeaconApiService) GetPoolAttestations ¶
func (a *BeaconApiService) GetPoolAttestations(ctx _context.Context, localVarOptionals *GetPoolAttestationsOpts) (GetBlockAttestationsResponse, *_nethttp.Response, error)
GetPoolAttestations Get Attestations from operations pool Retrieves attestations known by the node but not necessarily incorporated into any block
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *GetPoolAttestationsOpts - Optional Parameters:
- @param "Slot" (optional.String) -
- @param "CommitteeIndex" (optional.String) -
@return GetBlockAttestationsResponse
func (*BeaconApiService) GetPoolAttesterSlashings ¶
func (a *BeaconApiService) GetPoolAttesterSlashings(ctx _context.Context) (GetPoolAttesterSlashingsResponse, *_nethttp.Response, error)
GetPoolAttesterSlashings Get AttesterSlashings from operations pool Retrieves attester slashings known by the node but not necessarily incorporated into any block
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetPoolAttesterSlashingsResponse
func (*BeaconApiService) GetPoolProposerSlashings ¶
func (a *BeaconApiService) GetPoolProposerSlashings(ctx _context.Context) (GetPoolProposerSlashingsResponse, *_nethttp.Response, error)
GetPoolProposerSlashings Get ProposerSlashings from operations pool Retrieves proposer slashings known by the node but not necessarily incorporated into any block
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetPoolProposerSlashingsResponse
func (*BeaconApiService) GetPoolVoluntaryExits ¶
func (a *BeaconApiService) GetPoolVoluntaryExits(ctx _context.Context) (GetPoolVoluntaryExitsResponse, *_nethttp.Response, error)
GetPoolVoluntaryExits Get SignedVoluntaryExit from operations pool Retrieves voluntary exits known by the node but not necessarily incorporated into any block
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetPoolVoluntaryExitsResponse
func (*BeaconApiService) GetStateFinalityCheckpoints ¶
func (a *BeaconApiService) GetStateFinalityCheckpoints(ctx _context.Context, stateId string) (GetStateFinalityCheckpointsResponse, *_nethttp.Response, error)
GetStateFinalityCheckpoints Get state finality checkpoints Returns finality checkpoints for state with given 'stateId'. In case finality is not yet achieved, checkpoint should return epoch 0 and ZERO_HASH as root.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
@return GetStateFinalityCheckpointsResponse
func (*BeaconApiService) GetStateFork ¶
func (a *BeaconApiService) GetStateFork(ctx _context.Context, stateId string) (GetStateForkResponse, *_nethttp.Response, error)
GetStateFork Get Fork object for requested state Returns Fork(https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/beacon-chain.md#fork) object for state with given 'stateId'.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
@return GetStateForkResponse
func (*BeaconApiService) GetStateRoot ¶
func (a *BeaconApiService) GetStateRoot(ctx _context.Context, stateId string) (GetStateRootResponse, *_nethttp.Response, error)
GetStateRoot Get state SSZ HashTreeRoot Calculates HashTreeRoot for state with given 'stateId'. If stateId is root, same value will be returned.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
@return GetStateRootResponse
func (*BeaconApiService) GetStateValidator ¶
func (a *BeaconApiService) GetStateValidator(ctx _context.Context, stateId string, validatorId string) (GetStateValidatorResponse, *_nethttp.Response, error)
GetStateValidator Get validator from state by id Returns validator specified by state and id or public key along with status and balance.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
- @param validatorId Either hex encoded public key (with 0x prefix) or validator index
@return GetStateValidatorResponse
func (*BeaconApiService) GetStateValidators ¶
func (a *BeaconApiService) GetStateValidators(ctx _context.Context, stateId string, localVarOptionals *GetStateValidatorsOpts) (GetStateValidatorsResponse, *_nethttp.Response, error)
GetStateValidators Get validators from state Returns filterable list of validators with their balance, status and index.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
- @param optional nil or *GetStateValidatorsOpts - Optional Parameters:
- @param "Id" (optional.Interface of []string) - Either hex encoded public key (with 0x prefix) or validator index
- @param "Status" (optional.Interface of []string) - [Validator status specification](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ)
@return GetStateValidatorsResponse
func (*BeaconApiService) PublishBlock ¶ added in v0.3.0
func (a *BeaconApiService) PublishBlock(ctx _context.Context, inlineObject InlineObject) (*_nethttp.Response, error)
PublishBlock Publish a signed block. Instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be included in the beacon chain. The beacon node is not required to validate the signed `BeaconBlock`, and a successful response (20X) only indicates that the broadcast has been successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202)
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param inlineObject
func (*BeaconApiService) SubmitPoolAttestations ¶
func (a *BeaconApiService) SubmitPoolAttestations(ctx _context.Context, inlineObject1 InlineObject1) (*_nethttp.Response, error)
SubmitPoolAttestations Submit Attestation object to node Submits Attestation object to node. If attestation passes all validation constraints, node MUST publish attestation on appropriate subnet.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param inlineObject1
func (*BeaconApiService) SubmitPoolAttesterSlashings ¶
func (a *BeaconApiService) SubmitPoolAttesterSlashings(ctx _context.Context, inlineObject2 InlineObject2) (*_nethttp.Response, error)
SubmitPoolAttesterSlashings Submit AttesterSlashing object to node's pool Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param inlineObject2
func (*BeaconApiService) SubmitPoolProposerSlashings ¶
func (a *BeaconApiService) SubmitPoolProposerSlashings(ctx _context.Context, inlineObject3 InlineObject3) (*_nethttp.Response, error)
SubmitPoolProposerSlashings Submit ProposerSlashing object to node's pool Submits ProposerSlashing object to node's pool and if passes validation node MUST broadcast it to network.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param inlineObject3
func (*BeaconApiService) SubmitPoolVoluntaryExit ¶
func (a *BeaconApiService) SubmitPoolVoluntaryExit(ctx _context.Context, inlineObject4 InlineObject4) (*_nethttp.Response, error)
SubmitPoolVoluntaryExit Submit SignedVoluntaryExit object to node's pool Submits SignedVoluntaryExit object to node's pool and if passes validation node MUST broadcast it to network.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param inlineObject4
type BeaconBlock ¶
type BeaconBlock struct { Slot string `json:"slot,omitempty"` ProposerIndex string `json:"proposer_index,omitempty"` ParentRoot string `json:"parent_root,omitempty"` StateRoot string `json:"state_root,omitempty"` Body BeaconBlockAllOf1Body `json:"body,omitempty"` }
BeaconBlock The [`BeaconBlock`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblock) object from the Eth2.0 spec.
type BeaconBlockAllOf ¶
type BeaconBlockAllOf struct { Slot string `json:"slot,omitempty"` ProposerIndex string `json:"proposer_index,omitempty"` ParentRoot string `json:"parent_root,omitempty"` StateRoot string `json:"state_root,omitempty"` }
BeaconBlockAllOf struct for BeaconBlockAllOf
type BeaconBlockAllOf1 ¶
type BeaconBlockAllOf1 struct {
Body BeaconBlockAllOf1Body `json:"body,omitempty"`
}
BeaconBlockAllOf1 struct for BeaconBlockAllOf1
type BeaconBlockAllOf1Body ¶
type BeaconBlockAllOf1Body struct { RandaoReveal string `json:"randao_reveal,omitempty"` Eth1Data GetStateResponseDataEth1Data `json:"eth1_data,omitempty"` Graffiti string `json:"graffiti,omitempty"` ProposerSlashings []GetPoolProposerSlashingsResponseData `json:"proposer_slashings,omitempty"` AttesterSlashings []GetPoolAttesterSlashingsResponseData `json:"attester_slashings,omitempty"` Attestations []GetBlockAttestationsResponseData1 `json:"attestations,omitempty"` Deposits []BeaconBlockAllOf1BodyDeposits `json:"deposits,omitempty"` VoluntaryExits []GetPoolVoluntaryExitsResponseMessage `json:"voluntary_exits,omitempty"` }
BeaconBlockAllOf1Body The [`BeaconBlockBody`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblockbody) object from the Eth2.0 spec.
type BeaconBlockAllOf1BodyData ¶
type BeaconBlockAllOf1BodyData struct { // The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive._ Pubkey string `json:"pubkey,omitempty"` WithdrawalCredentials string `json:"withdrawal_credentials,omitempty"` Amount string `json:"amount,omitempty"` Signature string `json:"signature,omitempty"` }
BeaconBlockAllOf1BodyData The [`DepositData`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#depositdata) object from the Eth2.0 spec.
type BeaconBlockAllOf1BodyDeposits ¶
type BeaconBlockAllOf1BodyDeposits struct { // Branch in the deposit tree. Proof []string `json:"proof,omitempty"` Data BeaconBlockAllOf1BodyData `json:"data,omitempty"` }
BeaconBlockAllOf1BodyDeposits The [`Deposit`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#deposit) object from the Eth2.0 spec.
type BeaconState ¶ added in v0.3.0
type BeaconState struct { GenesisTime string `json:"genesis_time,omitempty"` GenesisValidatorsRoot string `json:"genesis_validators_root,omitempty"` Slot string `json:"slot,omitempty"` Fork GetStateForkResponseData `json:"fork,omitempty"` // The [`BeaconBlockHeader`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblockheader) object from the Eth2.0 spec. LatestBlockHeader map[string]interface{} `json:"latest_block_header,omitempty"` BlockRoots []string `json:"block_roots,omitempty"` StateRoots []string `json:"state_roots,omitempty"` HistoricalRoots []string `json:"historical_roots,omitempty"` Eth1Data GetStateResponseDataEth1Data `json:"eth1_data,omitempty"` Eth1DataVotes []map[string]interface{} `json:"eth1_data_votes,omitempty"` Eth1DepositIndex string `json:"eth1_deposit_index,omitempty"` Validators []map[string]interface{} `json:"validators,omitempty"` // Validator balances in gwei Balances []string `json:"balances,omitempty"` RandaoMixes []string `json:"randao_mixes,omitempty"` // Per-epoch sums of slashed effective balances Slashings []string `json:"slashings,omitempty"` PreviousEpochAttestations []map[string]interface{} `json:"previous_epoch_attestations,omitempty"` CurrentEpochAttestations []map[string]interface{} `json:"current_epoch_attestations,omitempty"` // Bit set for every recent justified epoch JustificationBits string `json:"justification_bits,omitempty"` PreviousJustifiedCheckpoint GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"previous_justified_checkpoint,omitempty"` CurrentJustifiedCheckpoint GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"current_justified_checkpoint,omitempty"` FinalizedCheckpoint GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"finalized_checkpoint,omitempty"` }
BeaconState The [`BeaconState`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblock) object from the Eth2.0 spec.
type Checkpoint ¶
type Checkpoint struct { Epoch string `json:"epoch,omitempty"` Root string `json:"root,omitempty"` }
Checkpoint The [`Checkpoint`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#checkpoint
type Committee ¶
type Committee struct { Index string `json:"index,omitempty"` Slot string `json:"slot,omitempty"` // List of validator indices assigned to this committee Validators []string `json:"validators,omitempty"` }
Committee Group of validators assigned to attest at specific slot and that have the same committee index (shard in phase 1)
type ConfigApiService ¶
type ConfigApiService service
ConfigApiService ConfigApi service
func (*ConfigApiService) GetDepositContract ¶
func (a *ConfigApiService) GetDepositContract(ctx _context.Context) (GetDepositContractResponse, *_nethttp.Response, error)
GetDepositContract Get deposit contract address. Retrieve deposit contract address and genesis fork version.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetDepositContractResponse
func (*ConfigApiService) GetForkSchedule ¶
func (a *ConfigApiService) GetForkSchedule(ctx _context.Context) (GetForkScheduleResponse, *_nethttp.Response, error)
GetForkSchedule Get scheduled upcoming forks. Retrieve all scheduled upcoming forks this node is aware of.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetForkScheduleResponse
func (*ConfigApiService) GetSpec ¶
func (a *ConfigApiService) GetSpec(ctx _context.Context) (GetSpecResponse, *_nethttp.Response, error)
GetSpec Get spec params. Retrieve specification configuration (without Phase 1 params) used on this node. [Specification params list](https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/mainnet.yaml) Values are returned with following format: - any value starting with 0x in the spec is returned as a hex string - all other values are returned as number
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetSpecResponse
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type DebugApiService ¶ added in v0.3.0
type DebugApiService service
DebugApiService DebugApi service
func (*DebugApiService) GetDebugChainHeads ¶ added in v0.3.0
func (a *DebugApiService) GetDebugChainHeads(ctx _context.Context) (GetDebugChainHeadsResponse, *_nethttp.Response, error)
GetDebugChainHeads Get fork choice leaves Retrieves all possible chain heads (leaves of fork choice tree).
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetDebugChainHeadsResponse
func (*DebugApiService) GetState ¶ added in v0.3.0
func (a *DebugApiService) GetState(ctx _context.Context, stateId string) (GetStateResponse, *_nethttp.Response, error)
GetState Get full BeaconState object Returns full BeaconState object for given stateId.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param stateId State identifier. Can be one of: \"head\" (canonical head in node's view), \"genesis\", \"finalized\", \"justified\", \\<slot\\>, \\<hex encoded stateRoot with 0x prefix\\>.
@return GetStateResponse
type ErrorMessage ¶ added in v0.3.0
type ErrorMessage struct { // Either specific error code in case of invalid request or http status code Code float32 `json:"code,omitempty"` // Message describing error Message string `json:"message,omitempty"` // Optional stacktraces, sent when node is in debug mode Stacktraces []string `json:"stacktraces,omitempty"` }
ErrorMessage struct for ErrorMessage
type EventsApiService ¶ added in v0.3.0
type EventsApiService service
EventsApiService EventsApi service
func (*EventsApiService) Eventstream ¶ added in v0.3.0
func (a *EventsApiService) Eventstream(ctx _context.Context, topics []string) (string, *_nethttp.Response, error)
Eventstream Subscribe to beacon node events Provides endpoint to subscribe to beacon node Server-Sent-Events stream. Consumers should use [eventsource](https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface) implementation to listen on those events.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param topics Event types to subscribe to
@return string
type Fork ¶
type Fork struct { // a fork version number PreviousVersion string `json:"previous_version,omitempty"` // a fork version number CurrentVersion string `json:"current_version,omitempty"` Epoch string `json:"epoch,omitempty"` }
Fork The [`Fork`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#fork) object from the Eth2.0 spec.
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type GetAggregatedAttestationResponse ¶ added in v0.3.0
type GetAggregatedAttestationResponse struct {
Data GetBlockAttestationsResponseData1 `json:"data,omitempty"`
}
GetAggregatedAttestationResponse struct for GetAggregatedAttestationResponse
type GetAttesterDutiesResponse ¶ added in v0.3.0
type GetAttesterDutiesResponse struct {
Data []GetAttesterDutiesResponseData `json:"data,omitempty"`
}
GetAttesterDutiesResponse struct for GetAttesterDutiesResponse
type GetAttesterDutiesResponseData ¶ added in v0.3.0
type GetAttesterDutiesResponseData struct { // The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive._ Pubkey string `json:"pubkey,omitempty"` CommitteeIndex string `json:"committee_index,omitempty"` CommitteeLength string `json:"committee_length,omitempty"` ValidatorCommitteeIndex string `json:"validator_committee_index,omitempty"` Slot string `json:"slot,omitempty"` }
GetAttesterDutiesResponseData struct for GetAttesterDutiesResponseData
type GetBlockAttestationsResponse ¶ added in v0.3.0
type GetBlockAttestationsResponse struct {
Data []GetBlockAttestationsResponseData1 `json:"data,omitempty"`
}
GetBlockAttestationsResponse struct for GetBlockAttestationsResponse
type GetBlockAttestationsResponseData ¶ added in v0.3.0
type GetBlockAttestationsResponseData struct { Slot string `json:"slot,omitempty"` Index string `json:"index,omitempty"` BeaconBlockRoot string `json:"beacon_block_root,omitempty"` Source GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"source,omitempty"` Target GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"target,omitempty"` }
GetBlockAttestationsResponseData The [`AttestationData`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#attestationdata) object from the Eth2.0 spec.
type GetBlockAttestationsResponseData1 ¶ added in v0.3.0
type GetBlockAttestationsResponseData1 struct { // Attester aggregation bits. AggregationBits string `json:"aggregation_bits,omitempty"` Signature string `json:"signature,omitempty"` Data GetBlockAttestationsResponseData `json:"data,omitempty"` }
GetBlockAttestationsResponseData1 The [`Attestation`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#attestation) object from the Eth2.0 spec.
type GetBlockHeaderResponse ¶ added in v0.3.0
type GetBlockHeaderResponse struct {
Data GetBlockHeadersResponseData `json:"data,omitempty"`
}
GetBlockHeaderResponse struct for GetBlockHeaderResponse
type GetBlockHeadersOpts ¶
GetBlockHeadersOpts Optional parameters for the method 'GetBlockHeaders'
type GetBlockHeadersResponse ¶ added in v0.3.0
type GetBlockHeadersResponse struct {
Data []GetBlockHeadersResponseData `json:"data,omitempty"`
}
GetBlockHeadersResponse struct for GetBlockHeadersResponse
type GetBlockHeadersResponseData ¶ added in v0.3.0
type GetBlockHeadersResponseData struct { Root string `json:"root,omitempty"` Canonical bool `json:"canonical,omitempty"` Header GetBlockHeadersResponseHeader `json:"header,omitempty"` }
GetBlockHeadersResponseData struct for GetBlockHeadersResponseData
type GetBlockHeadersResponseHeader ¶ added in v0.3.0
type GetBlockHeadersResponseHeader struct { // The [`BeaconBlockHeader`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblockheader) object from the Eth2.0 spec. Message map[string]interface{} `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
GetBlockHeadersResponseHeader The [`SignedBeaconBlockHeader`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedbeaconblockheader) object envelope from the Eth2.0 spec.
type GetBlockResponse ¶ added in v0.3.0
type GetBlockResponse struct {
Data GetBlockResponseData `json:"data,omitempty"`
}
GetBlockResponse struct for GetBlockResponse
type GetBlockResponseData ¶ added in v0.3.0
type GetBlockResponseData struct { // The [`BeaconBlock`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblock) object from the Eth2.0 spec. Message map[string]interface{} `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
GetBlockResponseData The [`SignedBeaconBlock`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the Eth2.0 spec.
type GetBlockRootResponse ¶ added in v0.3.0
type GetBlockRootResponse struct {
Data GetBlockRootResponseData `json:"data,omitempty"`
}
GetBlockRootResponse struct for GetBlockRootResponse
type GetBlockRootResponseData ¶ added in v0.3.0
type GetBlockRootResponseData struct {
Root interface{} `json:"root,omitempty"`
}
GetBlockRootResponseData struct for GetBlockRootResponseData
type GetDebugChainHeadsResponse ¶ added in v0.3.0
type GetDebugChainHeadsResponse struct {
Data []GetDebugChainHeadsResponseData `json:"data,omitempty"`
}
GetDebugChainHeadsResponse struct for GetDebugChainHeadsResponse
type GetDebugChainHeadsResponseData ¶ added in v0.3.0
type GetDebugChainHeadsResponseData struct { Root string `json:"root,omitempty"` Slot string `json:"slot,omitempty"` }
GetDebugChainHeadsResponseData struct for GetDebugChainHeadsResponseData
type GetDepositContractResponse ¶ added in v0.3.0
type GetDepositContractResponse struct {
Data GetDepositContractResponseData `json:"data,omitempty"`
}
GetDepositContractResponse struct for GetDepositContractResponse
type GetDepositContractResponseData ¶ added in v0.3.0
type GetDepositContractResponseData struct { // Id of Eth1 chain on which contract is deployed. ChainId int32 `json:"chain_id,omitempty"` Address string `json:"address,omitempty"` }
GetDepositContractResponseData struct for GetDepositContractResponseData
type GetEpochCommitteesOpts ¶
GetEpochCommitteesOpts Optional parameters for the method 'GetEpochCommittees'
type GetEpochCommitteesResponse ¶ added in v0.3.0
type GetEpochCommitteesResponse struct {
Data []GetEpochCommitteesResponseData `json:"data,omitempty"`
}
GetEpochCommitteesResponse struct for GetEpochCommitteesResponse
type GetEpochCommitteesResponseData ¶ added in v0.3.0
type GetEpochCommitteesResponseData struct { Index string `json:"index,omitempty"` Slot string `json:"slot,omitempty"` // List of validator indices assigned to this committee Validators []string `json:"validators,omitempty"` }
GetEpochCommitteesResponseData Group of validators assigned to attest at specific slot and that have the same committee index (shard in phase 1)
type GetForkScheduleResponse ¶ added in v0.3.0
type GetForkScheduleResponse struct {
Data []GetStateForkResponseData `json:"data,omitempty"`
}
GetForkScheduleResponse struct for GetForkScheduleResponse
type GetGenesisResponse ¶ added in v0.3.0
type GetGenesisResponse struct {
Data GetGenesisResponseData `json:"data,omitempty"`
}
GetGenesisResponse struct for GetGenesisResponse
type GetGenesisResponseData ¶ added in v0.3.0
type GetGenesisResponseData struct { GenesisTime string `json:"genesis_time,omitempty"` GenesisValidatorsRoot string `json:"genesis_validators_root,omitempty"` // a fork version number GenesisForkVersion string `json:"genesis_fork_version,omitempty"` }
GetGenesisResponseData struct for GetGenesisResponseData
type GetNetworkIdentityResponse ¶ added in v0.3.0
type GetNetworkIdentityResponse struct {
Data GetNetworkIdentityResponseData `json:"data,omitempty"`
}
GetNetworkIdentityResponse struct for GetNetworkIdentityResponse
type GetNetworkIdentityResponseData ¶ added in v0.3.0
type GetNetworkIdentityResponseData struct { // Cryptographic hash of a peer’s public key. [Read more](https://docs.libp2p.io/concepts/peer-id/) PeerId string `json:"peer_id,omitempty"` // Ethereum node record. [Read more](https://eips.ethereum.org/EIPS/eip-778) Enr string `json:"enr,omitempty"` P2pAddresses []string `json:"p2p_addresses,omitempty"` DiscoveryAddresses []string `json:"discovery_addresses,omitempty"` Metadata GetNetworkIdentityResponseDataMetadata `json:"metadata,omitempty"` }
GetNetworkIdentityResponseData struct for GetNetworkIdentityResponseData
type GetNetworkIdentityResponseDataMetadata ¶ added in v0.3.0
type GetNetworkIdentityResponseDataMetadata struct { SeqNumber interface{} `json:"seq_number,omitempty"` Attnets interface{} `json:"attnets,omitempty"` }
GetNetworkIdentityResponseDataMetadata Based on eth2 [Metadata object](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/p2p-interface.md#metadata)
type GetPeerResponse ¶ added in v0.3.0
type GetPeerResponse struct {
Data GetPeersResponseData `json:"data,omitempty"`
}
GetPeerResponse struct for GetPeerResponse
type GetPeersResponse ¶ added in v0.3.0
type GetPeersResponse struct {
Data []GetPeersResponseData `json:"data,omitempty"`
}
GetPeersResponse struct for GetPeersResponse
type GetPeersResponseData ¶ added in v0.3.0
type GetPeersResponseData struct { // Cryptographic hash of a peer’s public key. [Read more](https://docs.libp2p.io/concepts/peer-id/) PeerId string `json:"peer_id,omitempty"` // Ethereum node record. [Read more](https://eips.ethereum.org/EIPS/eip-778) Enr string `json:"enr,omitempty"` // [Read more](https://docs.libp2p.io/reference/glossary/#multiaddr) Address string `json:"address,omitempty"` State string `json:"state,omitempty"` Direction string `json:"direction,omitempty"` }
GetPeersResponseData struct for GetPeersResponseData
type GetPoolAttestationsOpts ¶
GetPoolAttestationsOpts Optional parameters for the method 'GetPoolAttestations'
type GetPoolAttesterSlashingsResponse ¶ added in v0.3.0
type GetPoolAttesterSlashingsResponse struct {
Data []GetPoolAttesterSlashingsResponseData `json:"data,omitempty"`
}
GetPoolAttesterSlashingsResponse struct for GetPoolAttesterSlashingsResponse
type GetPoolAttesterSlashingsResponseAttestation1 ¶ added in v0.3.0
type GetPoolAttesterSlashingsResponseAttestation1 struct { // Attesting validator indices AttestingIndices []string `json:"attesting_indices,omitempty"` Signature string `json:"signature,omitempty"` Data GetBlockAttestationsResponseData `json:"data,omitempty"` }
GetPoolAttesterSlashingsResponseAttestation1 The [`IndexedAttestation`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#indexedattestation) object from the Eth2.0 spec.
type GetPoolAttesterSlashingsResponseData ¶ added in v0.3.0
type GetPoolAttesterSlashingsResponseData struct { Attestation1 GetPoolAttesterSlashingsResponseAttestation1 `json:"attestation_1,omitempty"` Attestation2 GetPoolAttesterSlashingsResponseAttestation1 `json:"attestation_2,omitempty"` }
GetPoolAttesterSlashingsResponseData The [`AttesterSlashing`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/core/0_beacon-chain.md#attesterslashing) object from the Eth2.0 spec.
type GetPoolProposerSlashingsResponse ¶ added in v0.3.0
type GetPoolProposerSlashingsResponse struct {
Data []GetPoolProposerSlashingsResponseData `json:"data,omitempty"`
}
GetPoolProposerSlashingsResponse struct for GetPoolProposerSlashingsResponse
type GetPoolProposerSlashingsResponseData ¶ added in v0.3.0
type GetPoolProposerSlashingsResponseData struct { SignedHeader1 GetBlockHeadersResponseHeader `json:"signed_header_1,omitempty"` SignedHeader2 GetBlockHeadersResponseHeader `json:"signed_header_2,omitempty"` }
GetPoolProposerSlashingsResponseData The [`ProposerSlashing`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#proposerslashing) object from the Eth2.0 spec.
type GetPoolVoluntaryExitsResponse ¶ added in v0.3.0
type GetPoolVoluntaryExitsResponse struct {
Data []GetPoolVoluntaryExitsResponseData `json:"data,omitempty"`
}
GetPoolVoluntaryExitsResponse struct for GetPoolVoluntaryExitsResponse
type GetPoolVoluntaryExitsResponseData ¶ added in v0.3.0
type GetPoolVoluntaryExitsResponseData struct { Message GetPoolVoluntaryExitsResponseMessage `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
GetPoolVoluntaryExitsResponseData The [`SignedVoluntaryExit`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedvoluntaryexit) object from the Eth2.0 spec.
type GetPoolVoluntaryExitsResponseMessage ¶ added in v0.3.0
type GetPoolVoluntaryExitsResponseMessage struct { Epoch string `json:"epoch,omitempty"` ValidatorIndex string `json:"validator_index,omitempty"` }
GetPoolVoluntaryExitsResponseMessage The [`VoluntaryExit`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#voluntaryexit) object from the Eth2.0 spec.
type GetProposerDutiesResponse ¶ added in v0.3.0
type GetProposerDutiesResponse struct {
Data []GetProposerDutiesResponseData `json:"data,omitempty"`
}
GetProposerDutiesResponse struct for GetProposerDutiesResponse
type GetProposerDutiesResponseData ¶ added in v0.3.0
type GetProposerDutiesResponseData struct { // The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive._ Pubkey string `json:"pubkey,omitempty"` Slot string `json:"slot,omitempty"` }
GetProposerDutiesResponseData struct for GetProposerDutiesResponseData
type GetSpecResponse ¶ added in v0.3.0
type GetSpecResponse struct { // Key value mapping of Phase 0[spec variables](https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/mainnet.yaml). Values are returned with following format: - any value starting with 0x in the spec is returned as a hex string - all other values are returned as number Data map[string]interface{} `json:"data,omitempty"` }
GetSpecResponse struct for GetSpecResponse
type GetStateFinalityCheckpointsResponse ¶ added in v0.3.0
type GetStateFinalityCheckpointsResponse struct {
Data GetStateFinalityCheckpointsResponseData `json:"data,omitempty"`
}
GetStateFinalityCheckpointsResponse struct for GetStateFinalityCheckpointsResponse
type GetStateFinalityCheckpointsResponseData ¶ added in v0.3.0
type GetStateFinalityCheckpointsResponseData struct { PreviousJustified GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"previous_justified,omitempty"` CurrentJustified GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"current_justified,omitempty"` Finalized GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"finalized,omitempty"` }
GetStateFinalityCheckpointsResponseData struct for GetStateFinalityCheckpointsResponseData
type GetStateFinalityCheckpointsResponseDataPreviousJustified ¶ added in v0.3.0
type GetStateFinalityCheckpointsResponseDataPreviousJustified struct { Epoch string `json:"epoch,omitempty"` Root string `json:"root,omitempty"` }
GetStateFinalityCheckpointsResponseDataPreviousJustified The [`Checkpoint`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#checkpoint
type GetStateForkResponse ¶ added in v0.3.0
type GetStateForkResponse struct {
Data GetStateForkResponseData `json:"data,omitempty"`
}
GetStateForkResponse struct for GetStateForkResponse
type GetStateForkResponseData ¶ added in v0.3.0
type GetStateForkResponseData struct { // a fork version number PreviousVersion string `json:"previous_version,omitempty"` // a fork version number CurrentVersion string `json:"current_version,omitempty"` Epoch string `json:"epoch,omitempty"` }
GetStateForkResponseData The [`Fork`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#fork) object from the Eth2.0 spec.
type GetStateResponse ¶ added in v0.3.0
type GetStateResponse struct {
Data GetStateResponseData `json:"data,omitempty"`
}
GetStateResponse struct for GetStateResponse
type GetStateResponseData ¶ added in v0.3.0
type GetStateResponseData struct { GenesisTime string `json:"genesis_time,omitempty"` GenesisValidatorsRoot string `json:"genesis_validators_root,omitempty"` Slot string `json:"slot,omitempty"` Fork GetStateForkResponseData `json:"fork,omitempty"` // The [`BeaconBlockHeader`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblockheader) object from the Eth2.0 spec. LatestBlockHeader map[string]interface{} `json:"latest_block_header,omitempty"` BlockRoots []string `json:"block_roots,omitempty"` StateRoots []string `json:"state_roots,omitempty"` HistoricalRoots []string `json:"historical_roots,omitempty"` Eth1Data GetStateResponseDataEth1Data `json:"eth1_data,omitempty"` Eth1DataVotes []map[string]interface{} `json:"eth1_data_votes,omitempty"` Eth1DepositIndex string `json:"eth1_deposit_index,omitempty"` Validators []map[string]interface{} `json:"validators,omitempty"` // Validator balances in gwei Balances []string `json:"balances,omitempty"` RandaoMixes []string `json:"randao_mixes,omitempty"` // Per-epoch sums of slashed effective balances Slashings []string `json:"slashings,omitempty"` PreviousEpochAttestations []map[string]interface{} `json:"previous_epoch_attestations,omitempty"` CurrentEpochAttestations []map[string]interface{} `json:"current_epoch_attestations,omitempty"` // Bit set for every recent justified epoch JustificationBits string `json:"justification_bits,omitempty"` PreviousJustifiedCheckpoint GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"previous_justified_checkpoint,omitempty"` CurrentJustifiedCheckpoint GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"current_justified_checkpoint,omitempty"` FinalizedCheckpoint GetStateFinalityCheckpointsResponseDataPreviousJustified `json:"finalized_checkpoint,omitempty"` }
GetStateResponseData The [`BeaconState`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblock) object from the Eth2.0 spec.
type GetStateResponseDataEth1Data ¶ added in v0.3.0
type GetStateResponseDataEth1Data struct { DepositRoot string `json:"deposit_root,omitempty"` DepositCount string `json:"deposit_count,omitempty"` BlockHash string `json:"block_hash,omitempty"` }
GetStateResponseDataEth1Data The [`Eth1Data`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#eth1data) object from the Eth2.0 spec.
type GetStateRootResponse ¶ added in v0.3.0
type GetStateRootResponse struct {
Data GetStateRootResponseData `json:"data,omitempty"`
}
GetStateRootResponse struct for GetStateRootResponse
type GetStateRootResponseData ¶ added in v0.3.0
type GetStateRootResponseData struct {
Root string `json:"root,omitempty"`
}
GetStateRootResponseData struct for GetStateRootResponseData
type GetStateValidatorResponse ¶ added in v0.3.0
type GetStateValidatorResponse struct {
Data GetStateValidatorsResponseData `json:"data,omitempty"`
}
GetStateValidatorResponse struct for GetStateValidatorResponse
type GetStateValidatorsOpts ¶
GetStateValidatorsOpts Optional parameters for the method 'GetStateValidators'
type GetStateValidatorsResponse ¶ added in v0.3.0
type GetStateValidatorsResponse struct {
Data []GetStateValidatorsResponseData `json:"data,omitempty"`
}
GetStateValidatorsResponse struct for GetStateValidatorsResponse
type GetStateValidatorsResponseData ¶ added in v0.3.0
type GetStateValidatorsResponseData struct { Index string `json:"index,omitempty"` Balance string `json:"balance,omitempty"` // Possible statuses: - **pending_initialized** - When the first deposit is processed, but not enough funds are available (or not yet the end of the first epoch) to get validator into the activation queue. - **pending_queued** - When validator is waiting to get activated, and have enough funds etc. while in the queue, validator activation epoch keeps changing until it gets to the front and make it through (finalization is a requirement here too). - **active_ongoing** - When validator must be attesting, and have not initiated any exit. - **active_exiting** - When validator is still active, but filed a voluntary request to exit. - **active_slashed** - When validator is still active, but have a slashed status and is scheduled to exit. - **exited_unslashed** - When validator has reached reguler exit epoch, not being slashed, and doesn't have to attest any more, but cannot withdraw yet. - **exited_slashed** - When validator has reached reguler exit epoch, but was slashed, have to wait for a longer withdrawal period. - **withdrawal_possible** - After validator has exited, a while later is permitted to move funds, and is truly out of the system. - **withdrawal_done** - (not possible in phase0, except slashing full balance) - actually having moved funds away [Validator status specification](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ) Status string `json:"status,omitempty"` Validator GetStateValidatorsResponseValidator `json:"validator,omitempty"` }
GetStateValidatorsResponseData struct for GetStateValidatorsResponseData
type GetStateValidatorsResponseValidator ¶ added in v0.3.0
type GetStateValidatorsResponseValidator struct { // The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive._ Pubkey string `json:"pubkey,omitempty"` WithdrawalCredentials string `json:"withdrawal_credentials,omitempty"` EffectiveBalance string `json:"effective_balance,omitempty"` // Was validator slashed (not longer active). Slashed bool `json:"slashed,omitempty"` ActivationEligibilityEpoch string `json:"activation_eligibility_epoch,omitempty"` ActivationEpoch string `json:"activation_epoch,omitempty"` ExitEpoch string `json:"exit_epoch,omitempty"` WithdrawableEpoch string `json:"withdrawable_epoch,omitempty"` }
GetStateValidatorsResponseValidator struct for GetStateValidatorsResponseValidator
type GetSyncingStatusResponse ¶ added in v0.3.0
type GetSyncingStatusResponse struct {
Data GetSyncingStatusResponseData `json:"data,omitempty"`
}
GetSyncingStatusResponse struct for GetSyncingStatusResponse
type GetSyncingStatusResponseData ¶ added in v0.3.0
type GetSyncingStatusResponseData struct { HeadSlot interface{} `json:"head_slot,omitempty"` SyncDistance interface{} `json:"sync_distance,omitempty"` }
GetSyncingStatusResponseData struct for GetSyncingStatusResponseData
type GetVersionResponse ¶ added in v0.3.0
type GetVersionResponse struct {
Data GetVersionResponseData `json:"data,omitempty"`
}
GetVersionResponse struct for GetVersionResponse
type GetVersionResponseData ¶ added in v0.3.0
type GetVersionResponseData struct { // A string which uniquely identifies the client implementation and its version; similar to [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3). Version string `json:"version,omitempty"` }
GetVersionResponseData struct for GetVersionResponseData
type InlineObject ¶
type InlineObject struct { CommitteeIndex string `json:"committee_index,omitempty"` Slot string `json:"slot,omitempty"` // Signals to BN that a validator on the VC has been chosed for aggregator role. IsAggregator bool `json:"is_aggregator,omitempty"` }
InlineObject struct for InlineObject
type InlineObject1 ¶
type InlineObject1 struct { // Attester aggregation bits. AggregationBits string `json:"aggregation_bits,omitempty"` Signature string `json:"signature,omitempty"` Data GetBlockAttestationsResponseData `json:"data,omitempty"` }
InlineObject1 The [`Attestation`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#attestation) object from the Eth2.0 spec.
type InlineObject2 ¶
type InlineObject2 struct { Attestation1 GetPoolAttesterSlashingsResponseAttestation1 `json:"attestation_1,omitempty"` Attestation2 GetPoolAttesterSlashingsResponseAttestation1 `json:"attestation_2,omitempty"` }
InlineObject2 The [`AttesterSlashing`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/core/0_beacon-chain.md#attesterslashing) object from the Eth2.0 spec.
type InlineObject3 ¶
type InlineObject3 struct { SignedHeader1 GetBlockHeadersResponseHeader `json:"signed_header_1,omitempty"` SignedHeader2 GetBlockHeadersResponseHeader `json:"signed_header_2,omitempty"` }
InlineObject3 The [`ProposerSlashing`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#proposerslashing) object from the Eth2.0 spec.
type InlineObject4 ¶ added in v0.3.0
type InlineObject4 struct { Message GetPoolVoluntaryExitsResponseMessage `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
InlineObject4 The [`SignedVoluntaryExit`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedvoluntaryexit) object from the Eth2.0 spec.
type InlineObject5 ¶ added in v0.3.0
type InlineObject5 struct {
Data []map[string]interface{} `json:"data,omitempty"`
}
InlineObject5 struct for InlineObject5
type InlineResponse400 ¶ added in v0.3.0
type InlineResponse400 struct { // Either specific error code in case of invalid request or http status code Code float32 `json:"code,omitempty"` // Message describing error Message string `json:"message,omitempty"` // Optional stacktraces, sent when node is in debug mode Stacktraces []string `json:"stacktraces,omitempty"` }
InlineResponse400 struct for InlineResponse400
type InlineResponse500 ¶ added in v0.3.0
type InlineResponse500 struct { // Either specific error code in case of invalid request or http status code Code float32 `json:"code,omitempty"` // Message describing error Message string `json:"message,omitempty"` // Optional stacktraces, sent when node is in debug mode Stacktraces []string `json:"stacktraces,omitempty"` }
InlineResponse500 struct for InlineResponse500
type NetworkIdentity ¶
type NetworkIdentity struct { // Cryptographic hash of a peer’s public key. [Read more](https://docs.libp2p.io/concepts/peer-id/) PeerId string `json:"peer_id,omitempty"` // Ethereum node record. [Read more](https://eips.ethereum.org/EIPS/eip-778) Enr string `json:"enr,omitempty"` P2pAddresses []string `json:"p2p_addresses,omitempty"` DiscoveryAddresses []string `json:"discovery_addresses,omitempty"` Metadata GetNetworkIdentityResponseDataMetadata `json:"metadata,omitempty"` }
NetworkIdentity struct for NetworkIdentity
type NodeApiService ¶
type NodeApiService service
NodeApiService NodeApi service
func (*NodeApiService) GetHealth ¶
GetHealth Get health check Returns node health status in http status codes. Useful for load balancers.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
func (*NodeApiService) GetNetworkIdentity ¶
func (a *NodeApiService) GetNetworkIdentity(ctx _context.Context) (GetNetworkIdentityResponse, *_nethttp.Response, error)
GetNetworkIdentity Get node network identity Retrieves data about the node's network presence
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetNetworkIdentityResponse
func (*NodeApiService) GetNodeVersion ¶
func (a *NodeApiService) GetNodeVersion(ctx _context.Context) (GetVersionResponse, *_nethttp.Response, error)
GetNodeVersion Get version string of the running beacon node. Requests that the beacon node identify information about its implementation in a format similar to a [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) field.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetVersionResponse
func (*NodeApiService) GetPeer ¶
func (a *NodeApiService) GetPeer(ctx _context.Context, peerId string) (GetPeerResponse, *_nethttp.Response, error)
GetPeer Get peer Retrieves data about the given peer
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param peerId
@return GetPeerResponse
func (*NodeApiService) GetPeers ¶
func (a *NodeApiService) GetPeers(ctx _context.Context) (GetPeersResponse, *_nethttp.Response, error)
GetPeers Get node network peers Retrieves data about the node's network peers
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetPeersResponse
func (*NodeApiService) GetSyncingStatus ¶
func (a *NodeApiService) GetSyncingStatus(ctx _context.Context) (GetSyncingStatusResponse, *_nethttp.Response, error)
GetSyncingStatus Get node syncing status Requests the beacon node to describe if it's currently syncing or not, and if it is, what block it is up to.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetSyncingStatusResponse
type Peer ¶
type Peer struct { // Cryptographic hash of a peer’s public key. [Read more](https://docs.libp2p.io/concepts/peer-id/) PeerId string `json:"peer_id,omitempty"` // Ethereum node record. [Read more](https://eips.ethereum.org/EIPS/eip-778) Enr string `json:"enr,omitempty"` // [Read more](https://docs.libp2p.io/reference/glossary/#multiaddr) Address string `json:"address,omitempty"` State string `json:"state,omitempty"` Direction string `json:"direction,omitempty"` }
Peer struct for Peer
type PrepareBeaconCommitteeSubnetOpts ¶ added in v0.3.0
PrepareBeaconCommitteeSubnetOpts Optional parameters for the method 'PrepareBeaconCommitteeSubnet'
type ProduceAttestationDataResponse ¶ added in v0.3.0
type ProduceAttestationDataResponse struct {
Data GetBlockAttestationsResponseData `json:"data,omitempty"`
}
ProduceAttestationDataResponse struct for ProduceAttestationDataResponse
type ProduceBlockOpts ¶ added in v0.3.0
ProduceBlockOpts Optional parameters for the method 'ProduceBlock'
type ProduceBlockResponse ¶ added in v0.3.0
type ProduceBlockResponse struct { // The [`BeaconBlock`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblock) object from the Eth2.0 spec. Data map[string]interface{} `json:"data,omitempty"` }
ProduceBlockResponse struct for ProduceBlockResponse
type ProposerDuty ¶ added in v0.3.0
type ProposerDuty struct { // The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive._ Pubkey string `json:"pubkey,omitempty"` Slot string `json:"slot,omitempty"` }
ProposerDuty struct for ProposerDuty
type ProposerSlashing ¶
type ProposerSlashing struct { SignedHeader1 GetBlockHeadersResponseHeader `json:"signed_header_1,omitempty"` SignedHeader2 GetBlockHeadersResponseHeader `json:"signed_header_2,omitempty"` }
ProposerSlashing The [`ProposerSlashing`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#proposerslashing) object from the Eth2.0 spec.
type PublishAggregateAndProofOpts ¶ added in v0.3.0
PublishAggregateAndProofOpts Optional parameters for the method 'PublishAggregateAndProof'
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type SignedAggregateAndProof ¶
type SignedAggregateAndProof struct { Message map[string]interface{} `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
SignedAggregateAndProof The [`SignedAggregateAndProof`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/validator.md#signedaggregateandproof) object
type SignedBeaconBlock ¶
type SignedBeaconBlock struct { // The [`BeaconBlock`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblock) object from the Eth2.0 spec. Message map[string]interface{} `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
SignedBeaconBlock The [`SignedBeaconBlock`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the Eth2.0 spec.
type SignedBeaconBlockHeader ¶
type SignedBeaconBlockHeader struct { // The [`BeaconBlockHeader`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#beaconblockheader) object from the Eth2.0 spec. Message map[string]interface{} `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
SignedBeaconBlockHeader The [`SignedBeaconBlockHeader`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedbeaconblockheader) object envelope from the Eth2.0 spec.
type SignedVoluntaryExit ¶
type SignedVoluntaryExit struct { Message GetPoolVoluntaryExitsResponseMessage `json:"message,omitempty"` Signature string `json:"signature,omitempty"` }
SignedVoluntaryExit The [`SignedVoluntaryExit`](https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#signedvoluntaryexit) object from the Eth2.0 spec.
type ValidatorApiService ¶ added in v0.3.0
type ValidatorApiService service
ValidatorApiService ValidatorApi service
func (*ValidatorApiService) GetAggregatedAttestation ¶ added in v0.3.0
func (a *ValidatorApiService) GetAggregatedAttestation(ctx _context.Context, attestationDataRoot string, slot string) (GetAggregatedAttestationResponse, *_nethttp.Response, error)
GetAggregatedAttestation Get aggregated attestation Aggregates all attestations matching given attestation data root and slot
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param attestationDataRoot HashTreeRoot of AttestationData that validator want's aggregated
- @param slot
@return GetAggregatedAttestationResponse
func (*ValidatorApiService) GetAttesterDuties ¶ added in v0.3.0
func (a *ValidatorApiService) GetAttesterDuties(ctx _context.Context, epoch string, index []string) (GetAttesterDutiesResponse, *_nethttp.Response, error)
GetAttesterDuties Get attester duties Requests the beacon node to provide a set of attestation duties, which should be performed by validators, for a particular epoch. Duties should only need to be checked once per epoch, however a chain reorganization (of > MIN_SEED_LOOKAHEAD epochs) could occur, resulting in a change of duties. For full safety, you should monitor chain reorganizations events.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param epoch Should only be allowed 1 epoch ahead
- @param index Validator index
@return GetAttesterDutiesResponse
func (*ValidatorApiService) GetProposerDuties ¶ added in v0.3.0
func (a *ValidatorApiService) GetProposerDuties(ctx _context.Context, epoch string) (GetProposerDutiesResponse, *_nethttp.Response, error)
GetProposerDuties Get block proposers duties Request beacon node to provide all validators that are suppose to propose block in given epoch
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param epoch
@return GetProposerDutiesResponse
func (*ValidatorApiService) PrepareBeaconCommitteeSubnet ¶ added in v0.3.0
func (a *ValidatorApiService) PrepareBeaconCommitteeSubnet(ctx _context.Context, localVarOptionals *PrepareBeaconCommitteeSubnetOpts) (*_nethttp.Response, error)
PrepareBeaconCommitteeSubnet Signal beacon node to prepare for a committee subnet After beacon node receives this request, search using discv5 for peers related to this subnet and replace current peers with those ones if necessary If validator `is_aggregator`, beacon node must: - announce subnet topic subscription on gossipsub - aggregate attestations received on that subnet
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *PrepareBeaconCommitteeSubnetOpts - Optional Parameters:
- @param "InlineObject" (optional.Interface of []InlineObject) -
func (*ValidatorApiService) ProduceAttestationData ¶ added in v0.3.0
func (a *ValidatorApiService) ProduceAttestationData(ctx _context.Context, slot string, committeeIndex string) (ProduceAttestationDataResponse, *_nethttp.Response, error)
ProduceAttestationData Produce an attestation data Requests that the beacon node produce an AttestationData.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param slot The slot for which an attestation data should be created.
- @param committeeIndex The committee index for which an attestation data should be created.
@return ProduceAttestationDataResponse
func (*ValidatorApiService) ProduceBlock ¶ added in v0.3.0
func (a *ValidatorApiService) ProduceBlock(ctx _context.Context, slot string, randaoReveal string, localVarOptionals *ProduceBlockOpts) (ProduceBlockResponse, *_nethttp.Response, error)
ProduceBlock Produce a new block, without signature. Requests a beacon node to produce a valid block, which can then be signed by a validator.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param slot The slot for which the block should be proposed.
- @param randaoReveal The validator's randao reveal value.
- @param optional nil or *ProduceBlockOpts - Optional Parameters:
- @param "Graffiti" (optional.String) - Arbitrary data validator wants to include in block.
@return ProduceBlockResponse
func (*ValidatorApiService) PublishAggregateAndProof ¶ added in v0.3.0
func (a *ValidatorApiService) PublishAggregateAndProof(ctx _context.Context, localVarOptionals *PublishAggregateAndProofOpts) (*_nethttp.Response, error)
PublishAggregateAndProof Publish aggregate and proof Verifies given aggregate and proof and publishes it on appropriate gossipsub topic.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *PublishAggregateAndProofOpts - Optional Parameters:
- @param "InlineObject5" (optional.Interface of InlineObject5) -
type ValidatorResponse ¶
type ValidatorResponse struct { Index string `json:"index,omitempty"` Balance string `json:"balance,omitempty"` // Possible statuses: - **pending_initialized** - When the first deposit is processed, but not enough funds are available (or not yet the end of the first epoch) to get validator into the activation queue. - **pending_queued** - When validator is waiting to get activated, and have enough funds etc. while in the queue, validator activation epoch keeps changing until it gets to the front and make it through (finalization is a requirement here too). - **active_ongoing** - When validator must be attesting, and have not initiated any exit. - **active_exiting** - When validator is still active, but filed a voluntary request to exit. - **active_slashed** - When validator is still active, but have a slashed status and is scheduled to exit. - **exited_unslashed** - When validator has reached reguler exit epoch, not being slashed, and doesn't have to attest any more, but cannot withdraw yet. - **exited_slashed** - When validator has reached reguler exit epoch, but was slashed, have to wait for a longer withdrawal period. - **withdrawal_possible** - After validator has exited, a while later is permitted to move funds, and is truly out of the system. - **withdrawal_done** - (not possible in phase0, except slashing full balance) - actually having moved funds away [Validator status specification](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ) Status string `json:"status,omitempty"` Validator GetStateValidatorsResponseValidator `json:"validator,omitempty"` }
ValidatorResponse struct for ValidatorResponse
type ValidatorStatus ¶
type ValidatorStatus string
ValidatorStatus Possible statuses: - **pending_initialized** - When the first deposit is processed, but not enough funds are available (or not yet the end of the first epoch) to get validator into the activation queue. - **pending_queued** - When validator is waiting to get activated, and have enough funds etc. while in the queue, validator activation epoch keeps changing until it gets to the front and make it through (finalization is a requirement here too). - **active_ongoing** - When validator must be attesting, and have not initiated any exit. - **active_exiting** - When validator is still active, but filed a voluntary request to exit. - **active_slashed** - When validator is still active, but have a slashed status and is scheduled to exit. - **exited_unslashed** - When validator has reached reguler exit epoch, not being slashed, and doesn't have to attest any more, but cannot withdraw yet. - **exited_slashed** - When validator has reached reguler exit epoch, but was slashed, have to wait for a longer withdrawal period. - **withdrawal_possible** - After validator has exited, a while later is permitted to move funds, and is truly out of the system. - **withdrawal_done** - (not possible in phase0, except slashing full balance) - actually having moved funds away [Validator status specification](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ)
const ( PENDING_INITIALIZED ValidatorStatus = "pending_initialized" PENDING_QUEUED ValidatorStatus = "pending_queued" ACTIVE_ONGOING ValidatorStatus = "active_ongoing" ACTIVE_EXITING ValidatorStatus = "active_exiting" ACTIVE_SLASHED ValidatorStatus = "active_slashed" EXITED_UNSLASHED ValidatorStatus = "exited_unslashed" EXITED_SLASHED ValidatorStatus = "exited_slashed" WITHDRAWAL_POSSIBLE ValidatorStatus = "withdrawal_possible" WITHDRAWAL_DONE ValidatorStatus = "withdrawal_done" )
List of ValidatorStatus
Source Files ¶
- api_beacon.go
- api_config.go
- api_debug.go
- api_events.go
- api_node.go
- api_validator.go
- client.go
- configuration.go
- model_attestation.go
- model_attestation_data.go
- model_attester_duty.go
- model_attester_slashing.go
- model_beacon_block.go
- model_beacon_block_all_of.go
- model_beacon_block_all_of_1.go
- model_beacon_block_all_of_1_body.go
- model_beacon_block_all_of_1_body_data.go
- model_beacon_block_all_of_1_body_deposits.go
- model_beacon_state.go
- model_checkpoint.go
- model_committee.go
- model_error_message.go
- model_fork.go
- model_genesis_time.go
- model_get_aggregated_attestation_response.go
- model_get_attester_duties_response.go
- model_get_attester_duties_response_data.go
- model_get_block_attestations_response.go
- model_get_block_attestations_response_data.go
- model_get_block_attestations_response_data_1.go
- model_get_block_header_response.go
- model_get_block_headers_response.go
- model_get_block_headers_response_data.go
- model_get_block_headers_response_header.go
- model_get_block_response.go
- model_get_block_response_data.go
- model_get_block_root_response.go
- model_get_block_root_response_data.go
- model_get_debug_chain_heads_response.go
- model_get_debug_chain_heads_response_data.go
- model_get_deposit_contract_response.go
- model_get_deposit_contract_response_data.go
- model_get_epoch_committees_response.go
- model_get_epoch_committees_response_data.go
- model_get_fork_schedule_response.go
- model_get_genesis_response.go
- model_get_genesis_response_data.go
- model_get_network_identity_response.go
- model_get_network_identity_response_data.go
- model_get_network_identity_response_data_metadata.go
- model_get_peer_response.go
- model_get_peers_response.go
- model_get_peers_response_data.go
- model_get_pool_attester_slashings_response.go
- model_get_pool_attester_slashings_response_attestation_1.go
- model_get_pool_attester_slashings_response_data.go
- model_get_pool_proposer_slashings_response.go
- model_get_pool_proposer_slashings_response_data.go
- model_get_pool_voluntary_exits_response.go
- model_get_pool_voluntary_exits_response_data.go
- model_get_pool_voluntary_exits_response_message.go
- model_get_proposer_duties_response.go
- model_get_proposer_duties_response_data.go
- model_get_spec_response.go
- model_get_state_finality_checkpoints_response.go
- model_get_state_finality_checkpoints_response_data.go
- model_get_state_finality_checkpoints_response_data_previous_justified.go
- model_get_state_fork_response.go
- model_get_state_fork_response_data.go
- model_get_state_response.go
- model_get_state_response_data.go
- model_get_state_response_data_eth1_data.go
- model_get_state_root_response.go
- model_get_state_root_response_data.go
- model_get_state_validator_response.go
- model_get_state_validators_response.go
- model_get_state_validators_response_data.go
- model_get_state_validators_response_validator.go
- model_get_syncing_status_response.go
- model_get_syncing_status_response_data.go
- model_get_version_response.go
- model_get_version_response_data.go
- model_inline_object.go
- model_inline_object_1.go
- model_inline_object_2.go
- model_inline_object_3.go
- model_inline_object_4.go
- model_inline_object_5.go
- model_inline_response_400.go
- model_inline_response_500.go
- model_network_identity.go
- model_peer.go
- model_produce_attestation_data_response.go
- model_produce_block_response.go
- model_proposer_duty.go
- model_proposer_slashing.go
- model_signed_aggregate_and_proof.go
- model_signed_beacon_block.go
- model_signed_beacon_block_header.go
- model_signed_voluntary_exit.go
- model_validator_response.go
- model_validator_status.go
- response.go