rocketpool

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstallerURL = "https://github.com/rocket-pool/smartnode-install/releases/latest/download/install.sh"

	GlobalConfigFile = "config.yml"
	UserConfigFile   = "settings.yml"
	ComposeFile      = "docker-compose.yml"

	APIContainerSuffix = "_api"
	APIBinPath         = "/go/bin/rocketpool"

	DebugColor = color.FgYellow
)

Config

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Rocket Pool client

func NewClient

func NewClient(configPath, daemonPath, hostAddress, user, keyPath, passphrasePath, knownhostsFile, gasPrice, gasLimit string) (*Client, error)

Create new Rocket Pool client

func NewClientFromCtx

func NewClientFromCtx(c *cli.Context) (*Client, error)

Create new Rocket Pool client from CLI context

func (*Client) ApproveRPLToJoinTNDAO added in v1.0.0

func (c *Client) ApproveRPLToJoinTNDAO() (api.JoinTNDAOApproveResponse, error)

Join the oracle DAO (requires an executed invite proposal)

func (*Client) AuctionLots added in v1.0.0

func (c *Client) AuctionLots() (api.AuctionLotsResponse, error)

Get RPL lots for auction

func (*Client) AuctionStatus added in v1.0.0

func (c *Client) AuctionStatus() (api.AuctionStatusResponse, error)

Get RPL auction status

func (*Client) BidOnLot added in v1.0.0

func (c *Client) BidOnLot(lotIndex uint64, amountWei *big.Int) (api.BidOnLotResponse, error)

Bid on a lot

func (*Client) CanBidOnLot added in v1.0.0

func (c *Client) CanBidOnLot(lotIndex uint64) (api.CanBidOnLotResponse, error)

Check whether the node can bid on a lot

func (*Client) CanCancelTNDAOProposal added in v1.0.0

func (c *Client) CanCancelTNDAOProposal(proposalId uint64) (api.CanCancelTNDAOProposalResponse, error)

Check whether the node can cancel a proposal

func (*Client) CanClaimFromLot added in v1.0.0

func (c *Client) CanClaimFromLot(lotIndex uint64) (api.CanClaimFromLotResponse, error)

Check whether the node can claim RPL from a lot

func (*Client) CanCloseMinipool

func (c *Client) CanCloseMinipool(address common.Address) (api.CanCloseMinipoolResponse, error)

Check whether a minipool can be closed

func (*Client) CanCreateLot added in v1.0.0

func (c *Client) CanCreateLot() (api.CanCreateLotResponse, error)

Check whether the node can create a new lot

func (*Client) CanDissolveMinipool

func (c *Client) CanDissolveMinipool(address common.Address) (api.CanDissolveMinipoolResponse, error)

Check whether a minipool can be dissolved

func (*Client) CanExecuteTNDAOProposal added in v1.0.0

func (c *Client) CanExecuteTNDAOProposal(proposalId uint64) (api.CanExecuteTNDAOProposalResponse, error)

Check whether the node can execute a proposal

func (*Client) CanExitMinipool

func (c *Client) CanExitMinipool(address common.Address) (api.CanExitMinipoolResponse, error)

Check whether a minipool can be exited

func (*Client) CanJoinTNDAO added in v1.0.0

func (c *Client) CanJoinTNDAO() (api.CanJoinTNDAOResponse, error)

Check whether the node can join the oracle DAO

func (*Client) CanLeaveTNDAO added in v1.0.0

func (c *Client) CanLeaveTNDAO() (api.CanLeaveTNDAOResponse, error)

Check whether the node can leave the oracle DAO

func (*Client) CanNodeBurn

func (c *Client) CanNodeBurn(amountWei *big.Int, token string) (api.CanNodeBurnResponse, error)

Check whether the node can burn tokens

func (*Client) CanNodeDeposit

func (c *Client) CanNodeDeposit(amountWei *big.Int) (api.CanNodeDepositResponse, error)

Check whether the node can make a deposit

func (*Client) CanNodeSend

func (c *Client) CanNodeSend(amountWei *big.Int, token string) (api.CanNodeSendResponse, error)

Check whether the node can send tokens

func (*Client) CanNodeStakeRpl added in v1.0.0

func (c *Client) CanNodeStakeRpl(amountWei *big.Int) (api.CanNodeStakeRplResponse, error)

Check whether the node can stake RPL

func (*Client) CanNodeSwapRpl added in v1.0.0

func (c *Client) CanNodeSwapRpl(amountWei *big.Int) (api.CanNodeSwapRplResponse, error)

Check whether the node can swap RPL tokens

func (*Client) CanNodeWithdrawRpl added in v1.0.0

func (c *Client) CanNodeWithdrawRpl(amountWei *big.Int) (api.CanNodeWithdrawRplResponse, error)

Check whether the node can withdraw RPL

func (*Client) CanProcessQueue

func (c *Client) CanProcessQueue() (api.CanProcessQueueResponse, error)

Check whether the queue can be processed

func (*Client) CanProposeInviteToTNDAO added in v1.0.0

func (c *Client) CanProposeInviteToTNDAO(memberAddress common.Address, memberId, memberEmail string) (api.CanProposeTNDAOInviteResponse, error)

Check whether the node can propose inviting a new member

func (*Client) CanProposeKickFromTNDAO added in v1.0.0

func (c *Client) CanProposeKickFromTNDAO(memberAddress common.Address, fineAmountWei *big.Int) (api.CanProposeTNDAOKickResponse, error)

Check whether the node can propose kicking a member

func (*Client) CanProposeLeaveTNDAO added in v1.0.0

func (c *Client) CanProposeLeaveTNDAO() (api.CanProposeTNDAOLeaveResponse, error)

Check whether the node can propose leaving the oracle DAO

func (*Client) CanProposeReplaceTNDAOMember added in v1.0.0

func (c *Client) CanProposeReplaceTNDAOMember(memberAddress common.Address, memberId, memberEmail string) (api.CanProposeTNDAOReplaceResponse, error)

Check whether the node can propose replacing its position with a new member

func (*Client) CanProposeTNDAOSetting added in v1.0.0

func (c *Client) CanProposeTNDAOSetting() (api.CanProposeTNDAOSettingResponse, error)

Check whether the node can propose a setting update

func (*Client) CanProposeTNDAOSettingMembersQuorum added in v1.0.0

func (c *Client) CanProposeTNDAOSettingMembersQuorum(quorum float64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingMembersRplBond added in v1.0.0

func (c *Client) CanProposeTNDAOSettingMembersRplBond(bondAmountWei *big.Int) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingMinipoolUnbondedMax added in v1.0.0

func (c *Client) CanProposeTNDAOSettingMinipoolUnbondedMax(unbondedMinipoolMax uint64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingProposalActionBlocks

func (c *Client) CanProposeTNDAOSettingProposalActionBlocks(proposalActionBlocks uint64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingProposalCooldown added in v1.0.0

func (c *Client) CanProposeTNDAOSettingProposalCooldown(proposalCooldownBlocks uint64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingProposalExecuteBlocks

func (c *Client) CanProposeTNDAOSettingProposalExecuteBlocks(proposalExecuteBlocks uint64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingProposalVoteBlocks

func (c *Client) CanProposeTNDAOSettingProposalVoteBlocks(proposalVoteBlocks uint64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanProposeTNDAOSettingProposalVoteDelayBlocks

func (c *Client) CanProposeTNDAOSettingProposalVoteDelayBlocks(proposalDelayBlocks uint64) (api.CanProposeTNDAOSettingResponse, error)

func (*Client) CanRecoverUnclaimedRPLFromLot added in v1.0.0

func (c *Client) CanRecoverUnclaimedRPLFromLot(lotIndex uint64) (api.CanRecoverRPLFromLotResponse, error)

Check whether the node can recover unclaimed RPL from a lot

func (*Client) CanRefundMinipool

func (c *Client) CanRefundMinipool(address common.Address) (api.CanRefundMinipoolResponse, error)

Check whether a minipool is eligible for a refund

func (*Client) CanRegisterNode

func (c *Client) CanRegisterNode(timezoneLocation string) (api.CanRegisterNodeResponse, error)

Check whether the node can be registered

func (*Client) CanReplaceTNDAOMember added in v1.0.0

func (c *Client) CanReplaceTNDAOMember() (api.CanReplaceTNDAOPositionResponse, error)

Check whether the node can replace its position in the oracle DAO

func (*Client) CanSetNodeTimezone added in v1.0.0

func (c *Client) CanSetNodeTimezone(timezoneLocation string) (api.CanSetNodeTimezoneResponse, error)

Checks if the node's timezone location can be set

func (*Client) CanSetNodeWithdrawalAddress added in v1.0.0

func (c *Client) CanSetNodeWithdrawalAddress(withdrawalAddress common.Address, confirm bool) (api.CanSetNodeWithdrawalAddressResponse, error)

Checks if the node's withdrawal address can be set

func (*Client) CanVoteOnTNDAOProposal added in v1.0.0

func (c *Client) CanVoteOnTNDAOProposal(proposalId uint64) (api.CanVoteOnTNDAOProposalResponse, error)

Check whether the node can vote on a proposal

func (*Client) CanWithdrawMinipool

func (c *Client) CanWithdrawMinipool(address common.Address) (api.CanWithdrawMinipoolResponse, error)

Check whether a minipool can be withdrawn

func (*Client) CancelTNDAOProposal added in v1.0.0

func (c *Client) CancelTNDAOProposal(proposalId uint64) (api.CancelTNDAOProposalResponse, error)

Cancel a proposal made by the node

func (*Client) ClaimFromLot added in v1.0.0

func (c *Client) ClaimFromLot(lotIndex uint64) (api.ClaimFromLotResponse, error)

Claim RPL from a lot

func (*Client) Close

func (c *Client) Close()

Close client remote connection

func (*Client) CloseMinipool

func (c *Client) CloseMinipool(address common.Address) (api.CloseMinipoolResponse, error)

Close a minipool

func (*Client) CreateLot added in v1.0.0

func (c *Client) CreateLot() (api.CreateLotResponse, error)

Create a new lot

func (*Client) DissolveMinipool

func (c *Client) DissolveMinipool(address common.Address) (api.DissolveMinipoolResponse, error)

Dissolve a minipool

func (*Client) ExecuteTNDAOProposal added in v1.0.0

func (c *Client) ExecuteTNDAOProposal(proposalId uint64) (api.ExecuteTNDAOProposalResponse, error)

Execute a proposal

func (*Client) ExitMinipool

func (c *Client) ExitMinipool(address common.Address) (api.ExitMinipoolResponse, error)

Exit a minipool

func (*Client) ExportWallet

func (c *Client) ExportWallet() (api.ExportWalletResponse, error)

Export wallet

func (*Client) GetMinipoolAddress

func (c *Client) GetMinipoolAddress(txHash common.Hash) (api.NodeDepositMinipoolResponse, error)

Get the minipool address for a new deposit

func (*Client) GetServiceVersion added in v0.0.5

func (c *Client) GetServiceVersion() (string, error)

Get the Rocket Pool service version

func (*Client) GetTNDAOMemberSettings added in v1.0.0

func (c *Client) GetTNDAOMemberSettings() (api.GetTNDAOMemberSettingsResponse, error)

Get the member settings

func (*Client) GetTNDAOProposalSettings added in v1.0.0

func (c *Client) GetTNDAOProposalSettings() (api.GetTNDAOProposalSettingsResponse, error)

Get the proposal settings

func (*Client) InitWallet

func (c *Client) InitWallet() (api.InitWalletResponse, error)

Initialize wallet

func (*Client) InstallService

func (c *Client) InstallService(verbose, noDeps bool, network, version string) error

Install the Rocket Pool service

func (*Client) JoinTNDAO added in v1.0.0

func (c *Client) JoinTNDAO(approvalTxHash common.Hash) (api.JoinTNDAOJoinResponse, error)

Join the oracle DAO (requires an executed invite proposal)

func (*Client) LeaveTNDAO added in v1.0.0

func (c *Client) LeaveTNDAO(bondRefundAddress common.Address) (api.LeaveTNDAOResponse, error)

Leave the oracle DAO (requires an executed leave proposal)

func (*Client) LoadGlobalConfig

func (c *Client) LoadGlobalConfig() (config.RocketPoolConfig, error)

Load the global config

func (*Client) LoadMergedConfig added in v1.0.0

func (c *Client) LoadMergedConfig() (config.RocketPoolConfig, error)

Load the merged global & user config

func (*Client) LoadUserConfig added in v1.0.0

func (c *Client) LoadUserConfig() (config.RocketPoolConfig, error)

Load/save the user config

func (*Client) MinipoolStatus

func (c *Client) MinipoolStatus() (api.MinipoolStatusResponse, error)

Get minipool status

func (*Client) NodeBurn

func (c *Client) NodeBurn(amountWei *big.Int, token string) (api.NodeBurnResponse, error)

Burn tokens owned by the node for ETH

func (*Client) NodeDeposit

func (c *Client) NodeDeposit(amountWei *big.Int, minFee float64) (api.NodeDepositResponse, error)

Make a node deposit

func (*Client) NodeFee

func (c *Client) NodeFee() (api.NodeFeeResponse, error)

Get network node fee

func (*Client) NodeSend

func (c *Client) NodeSend(amountWei *big.Int, token string, toAddress common.Address) (api.NodeSendResponse, error)

Send tokens from the node to an address

func (*Client) NodeStakeRpl added in v1.0.0

func (c *Client) NodeStakeRpl(amountWei *big.Int, approvalTxHash common.Hash) (api.NodeStakeRplStakeResponse, error)

Stake RPL against the node

func (*Client) NodeStakeRplApprove added in v1.0.0

func (c *Client) NodeStakeRplApprove(amountWei *big.Int) (api.NodeStakeRplApproveResponse, error)

Approve RPL for staking against the node

func (*Client) NodeStatus

func (c *Client) NodeStatus() (api.NodeStatusResponse, error)

Get node status

func (*Client) NodeSwapRpl added in v1.0.0

func (c *Client) NodeSwapRpl(amountWei *big.Int, approvalTxHash common.Hash) (api.NodeSwapRplSwapResponse, error)

Swap node's old RPL tokens for new RPL tokens

func (*Client) NodeSwapRplApprove added in v1.0.0

func (c *Client) NodeSwapRplApprove(amountWei *big.Int) (api.NodeSwapRplApproveResponse, error)

Approves old RPL for a token swap

func (*Client) NodeSync added in v1.0.0

func (c *Client) NodeSync() (api.NodeSyncProgressResponse, error)

Get node sync progress

func (*Client) NodeWithdrawRpl added in v1.0.0

func (c *Client) NodeWithdrawRpl(amountWei *big.Int) (api.NodeWithdrawRplResponse, error)

Withdraw RPL staked against the node

func (*Client) PauseService

func (c *Client) PauseService(composeFiles []string) error

Pause the Rocket Pool service

func (*Client) PrintGasInfo added in v1.0.0

func (rp *Client) PrintGasInfo(gasInfo rocketpool.GasInfo)

Print estimated gas cost and any requested gas parameters

func (*Client) PrintMultiTxWarning added in v1.0.0

func (rp *Client) PrintMultiTxWarning()

Print a warning about the gas estimate for operations that have multiple transactions

func (*Client) PrintServiceLogs

func (c *Client) PrintServiceLogs(composeFiles []string, tail string, serviceNames ...string) error

Print the Rocket Pool service logs

func (*Client) PrintServiceStats

func (c *Client) PrintServiceStats(composeFiles []string) error

Print the Rocket Pool service stats

func (*Client) PrintServiceStatus

func (c *Client) PrintServiceStatus(composeFiles []string) error

Print the Rocket Pool service status

func (*Client) ProcessQueue

func (c *Client) ProcessQueue() (api.ProcessQueueResponse, error)

Process the queue

func (*Client) ProposeInviteToTNDAO added in v1.0.0

func (c *Client) ProposeInviteToTNDAO(memberAddress common.Address, memberId, memberEmail string) (api.ProposeTNDAOInviteResponse, error)

Propose inviting a new member

func (*Client) ProposeKickFromTNDAO added in v1.0.0

func (c *Client) ProposeKickFromTNDAO(memberAddress common.Address, fineAmountWei *big.Int) (api.ProposeTNDAOKickResponse, error)

Propose kicking a member

func (*Client) ProposeLeaveTNDAO added in v1.0.0

func (c *Client) ProposeLeaveTNDAO() (api.ProposeTNDAOLeaveResponse, error)

Propose leaving the oracle DAO

func (*Client) ProposeReplaceTNDAOMember added in v1.0.0

func (c *Client) ProposeReplaceTNDAOMember(memberAddress common.Address, memberId, memberEmail string) (api.ProposeTNDAOReplaceResponse, error)

Propose replacing the node's position with a new member

func (*Client) ProposeTNDAOSettingMembersQuorum added in v1.0.0

func (c *Client) ProposeTNDAOSettingMembersQuorum(quorum float64) (api.ProposeTNDAOSettingMembersQuorumResponse, error)

Propose a setting update

func (*Client) ProposeTNDAOSettingMembersRplBond added in v1.0.0

func (c *Client) ProposeTNDAOSettingMembersRplBond(bondAmountWei *big.Int) (api.ProposeTNDAOSettingMembersRplBondResponse, error)

func (*Client) ProposeTNDAOSettingMinipoolUnbondedMax added in v1.0.0

func (c *Client) ProposeTNDAOSettingMinipoolUnbondedMax(unbondedMinipoolMax uint64) (api.ProposeTNDAOSettingMinipoolUnbondedMaxResponse, error)

func (*Client) ProposeTNDAOSettingProposalActionBlocks

func (c *Client) ProposeTNDAOSettingProposalActionBlocks(proposalActionBlocks uint64) (api.ProposeTNDAOSettingProposalActionBlocksResponse, error)

func (*Client) ProposeTNDAOSettingProposalCooldown added in v1.0.0

func (c *Client) ProposeTNDAOSettingProposalCooldown(proposalCooldownBlocks uint64) (api.ProposeTNDAOSettingProposalCooldownResponse, error)

func (*Client) ProposeTNDAOSettingProposalExecuteBlocks

func (c *Client) ProposeTNDAOSettingProposalExecuteBlocks(proposalExecuteBlocks uint64) (api.ProposeTNDAOSettingProposalExecuteBlocksResponse, error)

func (*Client) ProposeTNDAOSettingProposalVoteBlocks

func (c *Client) ProposeTNDAOSettingProposalVoteBlocks(proposalVoteBlocks uint64) (api.ProposeTNDAOSettingProposalVoteBlocksResponse, error)

func (*Client) ProposeTNDAOSettingProposalVoteDelayBlocks

func (c *Client) ProposeTNDAOSettingProposalVoteDelayBlocks(proposalDelayBlocks uint64) (api.ProposeTNDAOSettingProposalVoteDelayBlocksResponse, error)

func (*Client) QueueStatus

func (c *Client) QueueStatus() (api.QueueStatusResponse, error)

Get queue status

func (*Client) RebuildWallet added in v0.0.5

func (c *Client) RebuildWallet() (api.RebuildWalletResponse, error)

Rebuild wallet

func (*Client) RecoverUnclaimedRPLFromLot added in v1.0.0

func (c *Client) RecoverUnclaimedRPLFromLot(lotIndex uint64) (api.RecoverRPLFromLotResponse, error)

Recover unclaimed RPL from a lot (returning it to the auction contract)

func (*Client) RecoverWallet

func (c *Client) RecoverWallet(mnemonic string) (api.RecoverWalletResponse, error)

Recover wallet

func (*Client) RefundMinipool

func (c *Client) RefundMinipool(address common.Address) (api.RefundMinipoolResponse, error)

Refund ETH from a minipool

func (*Client) RegisterNode

func (c *Client) RegisterNode(timezoneLocation string) (api.RegisterNodeResponse, error)

Register the node

func (*Client) ReplaceTNDAOMember added in v1.0.0

func (c *Client) ReplaceTNDAOMember() (api.ReplaceTNDAOPositionResponse, error)

Replace the node's position in the oracle DAO (requires an executed replace proposal)

func (*Client) RplPrice added in v1.0.0

func (c *Client) RplPrice() (api.RplPriceResponse, error)

Get network RPL price

func (*Client) SaveUserConfig

func (c *Client) SaveUserConfig(cfg config.RocketPoolConfig) error

func (*Client) SetNodeTimezone

func (c *Client) SetNodeTimezone(timezoneLocation string) (api.SetNodeTimezoneResponse, error)

Set the node's timezone location

func (*Client) SetNodeWithdrawalAddress added in v1.0.0

func (c *Client) SetNodeWithdrawalAddress(withdrawalAddress common.Address, confirm bool) (api.SetNodeWithdrawalAddressResponse, error)

Set the node's withdrawal address

func (*Client) SetPassword

func (c *Client) SetPassword(password string) (api.SetPasswordResponse, error)

Set wallet password

func (*Client) StartService

func (c *Client) StartService(composeFiles []string) error

Start the Rocket Pool service

func (*Client) StopService

func (c *Client) StopService(composeFiles []string) error

Stop the Rocket Pool service

func (*Client) TNDAOMembers added in v1.0.0

func (c *Client) TNDAOMembers() (api.TNDAOMembersResponse, error)

Get oracle DAO members

func (*Client) TNDAOProposals added in v1.0.0

func (c *Client) TNDAOProposals() (api.TNDAOProposalsResponse, error)

Get oracle DAO proposals

func (*Client) TNDAOStatus added in v1.0.0

func (c *Client) TNDAOStatus() (api.TNDAOStatusResponse, error)

Get oracle DAO status

func (*Client) VoteOnTNDAOProposal added in v1.0.0

func (c *Client) VoteOnTNDAOProposal(proposalId uint64, support bool) (api.VoteOnTNDAOProposalResponse, error)

Vote on a proposal

func (*Client) WaitForTransaction added in v1.0.0

func (c *Client) WaitForTransaction(txHash common.Hash) (api.APIResponse, error)

Wait for a transaction

func (*Client) WalletStatus

func (c *Client) WalletStatus() (api.WalletStatusResponse, error)

Get wallet status

func (*Client) WithdrawMinipool

func (c *Client) WithdrawMinipool(address common.Address) (api.WithdrawMinipoolResponse, error)

Withdraw a minipool

Jump to

Keyboard shortcuts

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