Documentation ¶
Index ¶
- Variables
- func Client(ip, proxyPort string) (*rpchttp.HTTP, error)
- func CreateConfigFromChain(home string, apps []ChainApp) string
- func CreateHomeDirectory(dirPath string) (string, error)
- func CreateMegablocksHeader(chainID string) []byte
- func DumpLog(logfile string)
- func SendTx(client *http.HTTP, tx comettypes.Tx) error
- type Balance
- type ChainApp
- type CosMux
- type KeyValEntry
- type KvApp
- type RpcResponse
- type RpcResult
- type SdkApp
- func (app *SdkApp) AddKey(name string) error
- func (app *SdkApp) Configure() error
- func (app *SdkApp) GetAddress() string
- func (app *SdkApp) GetAddressType() string
- func (app *SdkApp) GetBalance(address, denom string) (int, error)
- func (app *SdkApp) GetBalanceWithChainID(address, denom, chainID string) (int, error)
- func (app *SdkApp) GetChainID() string
- func (app *SdkApp) GetHome() string
- func (app *SdkApp) GetLatestBlockHeight() (int, error)
- func (app *SdkApp) GetUserAddress(user string) (string, error)
- func (app *SdkApp) Init() error
- func (app *SdkApp) SendBankTransaction(fromAddress, toAddress, amount string) error
- func (app *SdkApp) Start() error
- func (app *SdkApp) Stop() error
- func (app *SdkApp) UpdateGenesis() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CometHome = filepath.Join(os.TempDir(), "cometbft-home") CometBFT *exec.Cmd = nil CometURL string = "github.com/cometbft/cometbft/cmd/cometbft@v0.38.0" CometGrpcPort int = 26657 CometGrpcAddress string = fmt.Sprintf("127.0.0.1:%d", CometGrpcPort) CometGrpcURL string = fmt.Sprintf("tcp://%s", CometGrpcAddress) )
View Source
var (
BlockTime time.Duration = time.Second * 3
)
Functions ¶
func CreateConfigFromChain ¶
func CreateHomeDirectory ¶
func CreateMegablocksHeader ¶
createMegablocksHeader creates the header needed for all transactions of megablocks applications.
Types ¶
type CosMux ¶
type KeyValEntry ¶
type KvApp ¶
type KvApp struct { ChainID string Home string Binary string Address string AddressType string LogFile *os.File Command *exec.Cmd }
func (*KvApp) GetAddress ¶
func (*KvApp) GetAddressType ¶
func (*KvApp) GetChainID ¶
type RpcResponse ¶
type RpcResponse struct {
Result RpcResult `json: "result"`
}
type RpcResult ¶
type RpcResult struct {
Response KeyValEntry `json: "response"`
}
type SdkApp ¶
type SdkApp struct { ChainID string Home string Binary string Address string AddressType string LogFile *os.File Command *exec.Cmd Moniker string NodeKey string Keys []string }
func (*SdkApp) GetAddress ¶
func (*SdkApp) GetAddressType ¶
func (*SdkApp) GetBalance ¶
GetBalance returns bank balance for a given address
func (*SdkApp) GetBalanceWithChainID ¶
func (*SdkApp) GetChainID ¶
func (*SdkApp) GetLatestBlockHeight ¶
func (*SdkApp) GetUserAddress ¶
GetUserAddress returns the addrs for given user
func (*SdkApp) SendBankTransaction ¶
func (*SdkApp) UpdateGenesis ¶
Click to show internal directories.
Click to hide internal directories.