Documentation ¶
Index ¶
- type CreateTxOptions
- type EstimateFeeResWrapper
- type LCDClient
- func (lcd LCDClient) Broadcast(ctx context.Context, txbuilder *tx.Builder) (*sdk.TxResponse, error)
- func (lcd LCDClient) ComputeTax(ctx context.Context, txbuilder tx.Builder) (*customauthtx.ComputeTaxResponse, error)
- func (lcd *LCDClient) CreateAndSignTx(ctx context.Context, options CreateTxOptions) (*tx.Builder, error)
- func (lcd LCDClient) EstimateFee(ctx context.Context, options CreateTxOptions) (res *feeutils.EstimateFeeResp, err error)
- func (lcd LCDClient) LoadAccount(ctx context.Context, address msg.AccAddress) (res authtypes.AccountI, err error)
- func (lcd LCDClient) Simulate(ctx context.Context, txbuilder tx.Builder, options CreateTxOptions) (*sdktx.SimulateResponse, error)
- type QueryAccountRes
- type QueryAccountResData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTxOptions ¶
type CreateTxOptions struct { Msgs []msg.Msg Memo string // Optional parameters AccountNumber uint64 Sequence uint64 GasLimit uint64 FeeAmount msg.Coins SignMode tx.SignMode FeeGranter msg.AccAddress TimeoutHeight uint64 }
CreateTxOptions tx creation options
type EstimateFeeResWrapper ¶
type EstimateFeeResWrapper struct { Height msg.Int `json:"height"` Result feeutils.EstimateFeeResp `json:"result"` }
EstimateFeeResWrapper - wrapper for estimate fee query
type LCDClient ¶
type LCDClient struct { URL string ChainID string GasPrice msg.DecCoin GasAdjustment msg.Dec PrivKey key.PrivKey EncodingConfig terraappparams.EncodingConfig // contains filtered or unexported fields }
LCDClient outer interface for building & signing & broadcasting tx
func NewLCDClient ¶
func NewLCDClient(URL, chainID string, gasPrice msg.DecCoin, gasAdjustment msg.Dec, tmKey key.PrivKey, httpTimeout time.Duration) *LCDClient
NewLCDClient create new LCDClient
func (LCDClient) ComputeTax ¶
func (lcd LCDClient) ComputeTax(ctx context.Context, txbuilder tx.Builder) (*customauthtx.ComputeTaxResponse, error)
ComputeTax compute tax
func (*LCDClient) CreateAndSignTx ¶
func (lcd *LCDClient) CreateAndSignTx(ctx context.Context, options CreateTxOptions) (*tx.Builder, error)
CreateAndSignTx build and sign tx
func (LCDClient) EstimateFee ¶
func (lcd LCDClient) EstimateFee(ctx context.Context, options CreateTxOptions) (res *feeutils.EstimateFeeResp, err error)
EstimateFee simulates gas and fee for a transaction
func (LCDClient) LoadAccount ¶
func (lcd LCDClient) LoadAccount(ctx context.Context, address msg.AccAddress) (res authtypes.AccountI, err error)
LoadAccount simulates gas and fee for a transaction
type QueryAccountRes ¶
type QueryAccountRes struct {
Account QueryAccountResData `json:"account"`
}
QueryAccountRes response
type QueryAccountResData ¶
type QueryAccountResData struct { Address msg.AccAddress `json:"address"` AccountNumber msg.Int `json:"account_number"` Sequence msg.Int `json:"sequence"` }
QueryAccountResData response
Click to show internal directories.
Click to hide internal directories.