Documentation
¶
Index ¶
- func GenerateAccountAPI() (privKey string, address string)
- type Balance
- type CoreContext
- func (c CoreContext) BeginUnbonding(amount int64) error
- func (c CoreContext) CheckBalance(address sdk.Address) (coins types.Coins, err error)
- func (c CoreContext) CheckValidatorDistInfo() error
- func (c CoreContext) CompleteUnbonding() error
- func (c CoreContext) ConstructTendermintTransaction(tx auth.AuthTx) (tdmtx tdmtypes.Tx, err error)
- func (c CoreContext) ConstructTransaction(msg sdk.Msg) (auth.AuthTx, error)
- func (c CoreContext) GetNonce() (int64, error)
- func (c CoreContext) LoadBalance(to sdk.Address, amount types.Coin) (res Response, err error)
- func (c CoreContext) RegisterValidator(amount int64, moniker string, identity string, website string, details string) (res Response, err error)
- func (c CoreContext) SendCoins(to sdk.Address, amt types.Coin) (res Response, err error)
- func (c CoreContext) WithdrawBlockReward() (res Response, err error)
- type Response
- type SHRAccount1
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAccountAPI ¶
GenerateAccountAPI - randomly generate account
Types ¶
type CoreContext ¶
type CoreContext struct {
Client rpcclient.Client
PrivKey types.PrivKeySecp256k1
Codec *wire.Codec
}
func NewCoreContextFromConfig ¶
func NewCoreContextFromConfig(config *cfg.Config) CoreContext
func NewCoreContextFromConfigWithClient ¶
func NewCoreContextFromConfigWithClient(config *cfg.Config, client string) CoreContext
func NewCoreContextWithClient ¶
func NewCoreContextWithClient(privKey string, client string) CoreContext
func (CoreContext) BeginUnbonding ¶
func (c CoreContext) BeginUnbonding(amount int64) error
func (CoreContext) CheckBalance ¶
func (CoreContext) CheckValidatorDistInfo ¶
func (c CoreContext) CheckValidatorDistInfo() error
func (CoreContext) CompleteUnbonding ¶
func (c CoreContext) CompleteUnbonding() error
func (CoreContext) ConstructTendermintTransaction ¶
ConstructTendermintTransaction - encode a ShareLedger authTx in Amino and form a Tendermint tx before sending to ShareLedger
func (CoreContext) ConstructTransaction ¶
func (CoreContext) GetNonce ¶
func (c CoreContext) GetNonce() (int64, error)
func (CoreContext) LoadBalance ¶
func (CoreContext) RegisterValidator ¶
func (CoreContext) WithdrawBlockReward ¶
func (c CoreContext) WithdrawBlockReward() (res Response, err error)
type Response ¶
type Response struct {
Code uint32 `json:"code"`
Data []byte `json:"data"`
Log string `json:"log"`
Hash []byte `json:"hash"`
}
Response - response from any transaction to Shareledger
func LoadBalanceAPI ¶
func LoadBalanceAPI( client string, privKey string, toAddress string, amount string, denom string, ) (res Response, err error)
LoadBalanceAPI - load coin
func SendCoinAPI ¶
Click to show internal directories.
Click to hide internal directories.