Documentation ¶
Index ¶
- type Account
- type BatchValidatorKeys
- type Client
- func (cli *Client) CreateValidatorKeys(accountId string, address string, count int) (*CreateValidatorKeysResponse, error)
- func (cli *Client) GenerateStakeTransaction(accountId string, address string, amount xc.AmountBlockchain) (*GenerateTransactionResponse, error)
- func (cli *Client) Get(path string, response any) error
- func (cli *Client) GetAllStakesByOwner(address string) ([]StakeAccount, error)
- func (cli *Client) GetAndPrint(path string) error
- func (cli *Client) GetStakesByOwner(address string) (*GetStakesResponse, error)
- func (cli *Client) GetStakesByValidator(validator string) (*GetStakesResponse, error)
- func (cli *Client) OperationsByOwner(address string) (*OperationsResponse, error)
- func (cli *Client) Post(path string, requestBody any, response any) error
- func (cli *Client) ResolveAccount(accountIdMaybe string) (*Account, error)
- func (cli *Client) Send(method string, path string, requestBody any, response any) error
- type CreateValidatorKeysRequest
- type CreateValidatorKeysResponse
- type CreateValidatorKeysResponse1
- type CreateValidatorKeysResponse2
- type DepositFormat
- type Error
- type GenerateTransactionRequest
- type GenerateTransactionResponse
- type GetAccountResponse
- type GetAccountsResponse
- type GetStakesResponse
- type Operation
- type OperationType
- type OperationsResponse
- type Pagination
- type StakeAccount
- type TransactionData
- type ValidatorKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchValidatorKeys ¶
type BatchValidatorKeys struct { Format string `json:"format"` PubKeys []string `json:"pubkeys"` WithdrawalCredentials []string `json:"withdrawal_credentials"` Signatures []string `json:"signatures"` DepositDataRoots []string `json:"deposit_data_roots"` }
BatchDepositData structure to hold batch deposit information
type Client ¶
func (*Client) CreateValidatorKeys ¶
func (*Client) GenerateStakeTransaction ¶
func (cli *Client) GenerateStakeTransaction(accountId string, address string, amount xc.AmountBlockchain) (*GenerateTransactionResponse, error)
func (*Client) GetAllStakesByOwner ¶
func (cli *Client) GetAllStakesByOwner(address string) ([]StakeAccount, error)
func (*Client) GetAndPrint ¶
func (*Client) GetStakesByOwner ¶
func (cli *Client) GetStakesByOwner(address string) (*GetStakesResponse, error)
func (*Client) GetStakesByValidator ¶
func (cli *Client) GetStakesByValidator(validator string) (*GetStakesResponse, error)
func (*Client) OperationsByOwner ¶
func (cli *Client) OperationsByOwner(address string) (*OperationsResponse, error)
func (*Client) ResolveAccount ¶
type CreateValidatorKeysRequest ¶
type CreateValidatorKeysRequest struct { Format DepositFormat `json:"format"` AccountID string `json:"account_id"` WithdrawalAddress string `json:"withdrawal_address"` FeeRecipientAddress string `json:"fee_recipient_address"` Number int `json:"number"` }
Deposit structure to hold deposit information
type CreateValidatorKeysResponse ¶
type CreateValidatorKeysResponse struct { Response1 *CreateValidatorKeysResponse1 Response2 *CreateValidatorKeysResponse2 }
type CreateValidatorKeysResponse1 ¶
type CreateValidatorKeysResponse1 struct {
Data []ValidatorKey `json:"data"`
}
Root structure to hold the data array
type CreateValidatorKeysResponse2 ¶
type CreateValidatorKeysResponse2 struct {
Data BatchValidatorKeys `json:"data"`
}
type GenerateTransactionResponse ¶
type GenerateTransactionResponse struct {
Data TransactionData `json:"data"`
}
Root structure to hold the data object
type GetAccountResponse ¶
type GetAccountResponse struct {
Data Account `json:"data"`
}
type GetAccountsResponse ¶
type GetAccountsResponse struct {
Data []Account `json:"data"`
}
type GetStakesResponse ¶
type GetStakesResponse struct { Data []StakeAccount `json:"data"` Pagination Pagination `json:"pagination"` }
type Operation ¶
type Operation struct { Type OperationType `json:"type"` Time time.Time `json:"time"` ValidatorAddress string `json:"validator_address"` ValidatorIndex int `json:"validator_index"` TxHash string `json:"tx_hash"` TxGasUsed string `json:"tx_gas_used"` TxEffectiveGasPrice string `json:"tx_effective_gas_price"` TxSender string `json:"tx_sender"` Proxies []string `json:"proxies"` Slot int `json:"slot"` Block int `json:"block"` BlockBaseFee string `json:"block_base_fee"` WithdrawalCredentials string `json:"withdrawal_credentials"` Amount string `json:"amount"` FeeRecipient string `json:"fee_recipient,omitempty"` // Optional field for consensus_withdrawal }
type OperationType ¶
type OperationType string
const DepositOperation OperationType = "deposit"
const WithdrawalOperation OperationType = "consensus_withdrawal"
type OperationsResponse ¶
type OperationsResponse struct {
Data []Operation `json:"data"`
}
type Pagination ¶
type StakeAccount ¶
type StakeAccount struct { ValidatorAddress string `json:"validator_address"` State string `json:"state"` DelegatedBlock int `json:"delegated_block"` DelegatedAt time.Time `json:"delegated_at"` ConsensusRewards string `json:"consensus_rewards"` ExecutionRewards string `json:"execution_rewards"` Rewards string `json:"rewards"` DepositTxSender string `json:"deposit_tx_sender"` WithdrawalCredentials string `json:"withdrawal_credentials"` IsKiln bool `json:"is_kiln"` UpdatedAt time.Time `json:"updated_at"` }
type TransactionData ¶
type TransactionData struct { UnsignedTxHash string `json:"unsigned_tx_hash"` UnsignedTxSerialized string `json:"unsigned_tx_serialized"` To string `json:"to"` ContractCallData string `json:"contract_call_data"` AmountWei string `json:"amount_wei"` Nonce int `json:"nonce"` GasLimit int `json:"gas_limit"` MaxPriorityFeePerGasWei string `json:"max_priority_fee_per_gas_wei"` MaxFeePerGasWei string `json:"max_fee_per_gas_wei"` ChainID int `json:"chain_id"` }
TransactionData structure to hold transaction information
type ValidatorKey ¶
type ValidatorKey struct { Format string `json:"format"` PubKey string `json:"pubkey"` WithdrawalCredentials string `json:"withdrawal_credentials"` Amount int64 `json:"amount"` Signature string `json:"signature"` DepositMessageRoot string `json:"deposit_message_root"` DepositDataRoot string `json:"deposit_data_root"` ForkVersion string `json:"fork_version"` NetworkName string `json:"network_name"` DepositCLIVersion string `json:"deposit_cli_version"` }
DepositData structure to hold individual deposit information
Click to show internal directories.
Click to hide internal directories.