b2node

package
v0.0.0-...-d62eb6d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseGasPrice = 10_000_000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GasPriceRsp

type GasPriceRsp struct {
	ID      int64  `json:"id"`
	Jsonrpc string `json:"jsonrpc"`
	Result  string `json:"result"`
}

type NodeClient

type NodeClient struct {
	PrivateKey ethsecp256k1.PrivKey
	Address    string
	ChainID    string
	GrpcConn   *grpc.ClientConn
	RPCUrl     string
	Denom      string
}

func NewNodeClient

func NewNodeClient(privateKeyHex string, chainID string, address string, grpcConn *grpc.ClientConn,
	rpcURL string, denom string,
) *NodeClient

func (NodeClient) AddCommitter

func (n NodeClient) AddCommitter(address string) (string, error)

func (NodeClient) BitcoinTx

func (n NodeClient) BitcoinTx(proposalID uint64, from string, bitcoinTxHash string) (uint64, error)

func (NodeClient) CommitterBitcoinTx

func (n NodeClient) CommitterBitcoinTx(msg *committerTypes.MsgBitcoinTx) (*tx.BroadcastTxResponse, error)

func (NodeClient) GetAccountInfo

func (n NodeClient) GetAccountInfo(address string) (*eTypes.EthAccount, error)

func (NodeClient) GetEthGasPrice

func (n NodeClient) GetEthGasPrice() (uint64, error)

func (NodeClient) GetGasPrice

func (n NodeClient) GetGasPrice() (uint64, error)

func (NodeClient) QueryLastProposalID

func (n NodeClient) QueryLastProposalID() (uint64, uint64, error)

func (NodeClient) QueryProposalByID

func (n NodeClient) QueryProposalByID(id uint64) (*committerTypes.Proposal, error)

func (NodeClient) SubmitProof

func (n NodeClient) SubmitProof(id uint64, from string, proofHash string, stateRootHash string,
	startIndex uint64, endIndex uint64,
) (uint64, error)

func (NodeClient) TimeoutProposal

func (n NodeClient) TimeoutProposal(id uint64) error

Jump to

Keyboard shortcuts

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