Documentation ¶
Index ¶
- func BuildSign(chainID string, acc *Account, msgs []sdk.Msg) ([]byte, error)
- func BuildSignBroadcast(chainID string, acc *Account, conn *grpc.ClientConn, msgs []sdk.Msg) error
- func BuildTransaction(txConfig *client.TxConfig, msgs []sdk.Msg) (*client.TxBuilder, error)
- func NewConnection(url string) (*grpc.ClientConn, error)
- func ParseAccounts(file string) []string
- func PrepareTransaction() *client.TxConfig
- func SendBytesAsync(conn *grpc.ClientConn, txBytes []byte) error
- func SendTransactionAsync(conn *grpc.ClientConn, txConfig *client.TxConfig, txBuilder *client.TxBuilder) error
- func SignTransaction(chainID string, acc *Account, txConfig *client.TxConfig, ...) error
- type Account
- func (acc *Account) GetAccNum() uint64
- func (acc *Account) GetAccSeq() uint64
- func (acc *Account) GetAddress() string
- func (acc *Account) GetPrKey() cryptotypes.PrivKey
- func (acc *Account) GetPubKey() cryptotypes.PubKey
- func (acc *Account) IncreaseAccSeq()
- func (acc *Account) QueryInfo(conn *grpc.ClientConn)
- type Handler
- type MyHandler
- type RPCResp
- type TMConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSignBroadcast ¶
func BuildTransaction ¶
func NewConnection ¶
func NewConnection(url string) (*grpc.ClientConn, error)
func ParseAccounts ¶
func PrepareTransaction ¶
func SendBytesAsync ¶ added in v0.0.3
func SendBytesAsync(conn *grpc.ClientConn, txBytes []byte) error
func SendTransactionAsync ¶
Types ¶
type Account ¶
type Account struct { PrKey cryptotypes.PrivKey // contains filtered or unexported fields }
func NewAccount ¶
func (*Account) GetAddress ¶
func (*Account) GetPrKey ¶
func (acc *Account) GetPrKey() cryptotypes.PrivKey
func (*Account) GetPubKey ¶
func (acc *Account) GetPubKey() cryptotypes.PubKey
func (*Account) IncreaseAccSeq ¶
func (acc *Account) IncreaseAccSeq()
func (*Account) QueryInfo ¶
func (acc *Account) QueryInfo(conn *grpc.ClientConn)
type RPCResp ¶
type RPCResp struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result struct { Query string `json:"query"` Data struct { Type string `json:"type"` Value struct { Block struct { Header struct { Version struct { Block string `json:"block"` } `json:"version"` ChainID string `json:"chain_id"` Height string `json:"height"` Time time.Time `json:"time"` LastBlockID struct { Hash string `json:"hash"` Parts struct { Total int `json:"total"` Hash string `json:"hash"` } `json:"parts"` } `json:"last_block_id"` LastCommitHash string `json:"last_commit_hash"` DataHash string `json:"data_hash"` ValidatorsHash string `json:"validators_hash"` NextValidatorsHash string `json:"next_validators_hash"` ConsensusHash string `json:"consensus_hash"` AppHash string `json:"app_hash"` LastResultsHash string `json:"last_results_hash"` EvidenceHash string `json:"evidence_hash"` ProposerAddress string `json:"proposer_address"` } `json:"header"` Data struct { Txs []string `json:"txs"` } `json:"data"` Evidence struct { Evidence []interface{} `json:"evidence"` } `json:"evidence"` LastCommit struct { Height string `json:"height"` Round int `json:"round"` BlockID struct { Hash string `json:"hash"` Parts struct { Total int `json:"total"` Hash string `json:"hash"` } `json:"parts"` } `json:"block_id"` Signatures []struct { BlockIDFlag int `json:"block_id_flag"` ValidatorAddress string `json:"validator_address"` Timestamp time.Time `json:"timestamp"` Signature string `json:"signature"` } `json:"signatures"` } `json:"last_commit"` } `json:"block"` ResultBeginBlock struct { Events []struct { Type string `json:"type"` Attributes []struct { Key string `json:"key"` Value string `json:"value"` Index bool `json:"index"` } `json:"attributes"` } `json:"events"` } `json:"result_begin_block"` ResultEndBlock struct { ValidatorUpdates []interface{} `json:"validator_updates"` ConsensusParamUpdates struct { Block struct { MaxBytes string `json:"max_bytes"` MaxGas string `json:"max_gas"` } `json:"block"` Evidence struct { MaxAgeNumBlocks string `json:"max_age_num_blocks"` MaxAgeDuration string `json:"max_age_duration"` MaxBytes string `json:"max_bytes"` } `json:"evidence"` Validator struct { PubKeyTypes []string `json:"pub_key_types"` } `json:"validator"` } `json:"consensus_param_updates"` Events []interface{} `json:"events"` } `json:"result_end_block"` } `json:"value"` } `json:"data"` Events struct { CoinReceivedAmount []string `json:"coin_received.amount"` CoinSpentSpender []string `json:"coin_spent.spender"` TransferAmount []string `json:"transfer.amount"` MintInflation []string `json:"mint.inflation"` MintAnnualProvisions []string `json:"mint.annual_provisions"` CoinbaseMinter []string `json:"coinbase.minter"` MessageSender []string `json:"message.sender"` MintBondedRatio []string `json:"mint.bonded_ratio"` MintAmount []string `json:"mint.amount"` CommissionAmount []string `json:"commission.amount"` CommissionValidator []string `json:"commission.validator"` TmEvent []string `json:"tm.event"` CoinbaseAmount []string `json:"coinbase.amount"` CoinSpentAmount []string `json:"coin_spent.amount"` TransferRecipient []string `json:"transfer.recipient"` RewardsAmount []string `json:"rewards.amount"` RewardsValidator []string `json:"rewards.validator"` CoinReceivedReceiver []string `json:"coin_received.receiver"` TransferSender []string `json:"transfer.sender"` ProposerRewardAmount []string `json:"proposer_reward.amount"` ProposerRewardValidator []string `json:"proposer_reward.validator"` } `json:"events"` } `json:"result"` }
type TMConn ¶
type TMConn struct {
// contains filtered or unexported fields
}
func NewTMConnect ¶
func (*TMConn) BlockSubscribe ¶
func (*TMConn) UnsubscribeAll ¶
Click to show internal directories.
Click to hide internal directories.