Documentation ¶
Overview ¶
Package qgbKit is a wrapper around the QGB orchestrator-relayer implementation.
In order to ease the calling of commands like the end user does through CLI, this package is providing easy to use functions for more readability for the test scenario.
To start using the wrapped style CLI, you need to initialise the struct QGBKit. A returned cmd contains functions that returns an output from StdOut pipeline (e.g. like the end user will see in the terminal) as well as errors if something bad happened while executing a command
wrappedCmd := qgbkit.New()
Currently, the way it is used is via creating a validator then attaching an orchestrator to it as a side car. This is similar to how we expect validators to run orchestrators. However, we can opt for different design where we spin up a Celestia network. Then, the we orchestrators start via taking the IP address of a validator along with the private key to its EVM address.
Index ¶
- type BootstrapperNode
- type QGBKit
- func (ak *QGBKit) DeployContract(evmAddress, evmPassphrase, evmChainID, evmRPC string) (string, error)
- func (ak *QGBKit) GetHomePath() string
- func (ak *QGBKit) ImportEVMKey(service, evmPrivateKey, passphrase string) (string, error)
- func (ak *QGBKit) ImportP2PKey(service, p2pPrivateKey, nickname string) (string, error)
- func (ak *QGBKit) InitService(service string) (string, error)
- func (ak *QGBKit) ListEVMKeys(service string) (string, error)
- func (ak *QGBKit) StartOrchestrator(evmAddress, evmPassphrase, p2pNickname, bootstrappers string) error
- func (ak *QGBKit) StartRelayer(...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootstrapperNode ¶
type QGBKit ¶
type QGBKit struct { Home string Cmd *cobra.Command P2PPrivateKey *crypto.PrivKey EVMPrivateKey *ecdsa.PrivateKey // contains filtered or unexported fields }
func New ¶
New creates a new QGBKit for testground. Note: the provided private keys do not get added automatically to the store. Make sure to add them using the below import helpers before using them.
func (*QGBKit) DeployContract ¶
func (ak *QGBKit) DeployContract(evmAddress, evmPassphrase, evmChainID, evmRPC string) (string, error)
DeployContract deploys the QGB contract and returns its address.
func (*QGBKit) GetHomePath ¶
func (*QGBKit) ImportEVMKey ¶
ImportEVMKey Imports the specified private key to service keystore. A service is either orchestrator, relayer or deployer.
func (*QGBKit) ImportP2PKey ¶
ImportP2PKey imports a P2P private key to the service keystore. The nickname is the name given to the private key, and the service is the target service: orchestrator, relayer or deployer.
func (*QGBKit) InitService ¶
InitService initializes the storage of a service. A service is either an orchestrator, relayer or deployer.
func (*QGBKit) ListEVMKeys ¶
ListEVMKeys Lists the EVM keys in store.
func (*QGBKit) StartOrchestrator ¶
func (ak *QGBKit) StartOrchestrator(evmAddress, evmPassphrase, p2pNickname, bootstrappers string) error
StartOrchestrator starts the orchestrator Set the p2p nickname or the bootstrappers to an empty string not to pass them to the start command.
func (*QGBKit) StartRelayer ¶
func (ak *QGBKit) StartRelayer(evmAddress, evmPassphrase, evmChainID, evmRPC, contractAddr, p2pNickname, bootstrappers string) error
StartRelayer starts the relayer Set the p2p nickname to an empty string not to pass them to the start command.