Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultCodec() *codec.Codec
- type AccAddress
- type Assets
- type AuthClient
- type BaseAccount
- type BroadcastReq
- type Codec
- type CurrenciesClient
- type DnodeClient
- func (c DnodeClient) AccountName() string
- func (c DnodeClient) Auth() AuthClient
- func (c DnodeClient) BroadcastMode() string
- func (c DnodeClient) Codec() *Codec
- func (c DnodeClient) Currencies() CurrenciesClient
- func (c DnodeClient) FromAddress() AccAddress
- func (c DnodeClient) NodeURL() string
- func (c DnodeClient) Oracle() OracleClient
- func (c DnodeClient) Passphrase() string
- func (c DnodeClient) Tx() TxClient
- func (c DnodeClient) TxBuilder() TxBuilder
- func (c DnodeClient) WithAccount(account BaseAccount) DnodeClient
- func (c DnodeClient) WithAccountName(name string) DnodeClient
- func (c DnodeClient) WithAccountNumber(number uint64) DnodeClient
- func (c DnodeClient) WithBroadcastMode(mode TxBroadcastMode) DnodeClient
- func (c DnodeClient) WithChainID(chainID string) DnodeClient
- func (c DnodeClient) WithFees(fees string) DnodeClient
- func (c DnodeClient) WithFromAddress(addr AccAddress) DnodeClient
- func (c DnodeClient) WithGas(gas uint64) DnodeClient
- func (c DnodeClient) WithGasPrices(gasPrices string) DnodeClient
- func (c DnodeClient) WithKeybase(kb Keybase) DnodeClient
- func (c DnodeClient) WithMemo(memo string) DnodeClient
- func (c DnodeClient) WithPassphrase(phrase string) DnodeClient
- func (c DnodeClient) WithSequence(seq uint64) DnodeClient
- type Keybase
- type Msg
- type MsgConfirmCall
- type MsgDestroyCurrency
- type MsgIssueCurrency
- type MsgPostPrice
- type MsgRevokeConfirm
- type MsgSubmitCall
- type Option
- func WithAccountName(name string) Option
- func WithBroadcastMode(mode TxBroadcastMode) Option
- func WithCodec(cdc *codec.Codec) Option
- func WithFromAddress(addr AccAddress) Option
- func WithHTTPClient(cl *http.Client) Option
- func WithNodeURL(url string) Option
- func WithPassphrase(pp string) Option
- func WithTxBuilder(b auth.TxBuilder) Option
- type OracleClient
- type StdFee
- type StdTx
- type TxBroadcastMode
- type TxBuilder
- type TxClient
- type TxResponse
Constants ¶
const ( BroadcastBlock = flags.BroadcastBlock BroadcastSync = flags.BroadcastSync BroadcastAsync = flags.BroadcastAsync )
Variables ¶
var ( // Create new instance of message to submit call. NewMsgSubmitCall = msmsgs.NewMsgSubmitCall // SortJSON takes any JSON and returns it sorted by keys. Also, all white-spaces // are removed. // This method can be used to canonicalize JSON to be returned by GetSignBytes, // e.g. for the ledger integration. // If the passed JSON isn't valid it will return an error. SortJSON = types.SortJSON )
Functions ¶
func DefaultCodec ¶
DefaultCodec returns the initialized amino codec to marshal/unmarshal
Types ¶
type AccAddress ¶
type AccAddress = types.AccAddress
AccAddress a wrapper around bytes meant to represent an account address. When marshaled to a string or JSON, it uses Bech32.
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
AuthClient provides a set of methods for the Auth module
func (AuthClient) Account ¶
func (c AuthClient) Account(address AccAddress) (auth.BaseAccount, error)
Account returns account information including AccountNumber, Sequence and Address. The AccountNumber and Sequence fields are required to sign transactions.
type BaseAccount ¶
type BaseAccount = auth.BaseAccount
BaseAccount - a base account structure. This can be extended by embedding within in your AppAccount. However one doesn't have to use BaseAccount as long as your struct implements Account.
type BroadcastReq ¶
type BroadcastReq = rest.BroadcastReq
BroadcastReq defines a tx broadcasting request.
type CurrenciesClient ¶
type CurrenciesClient struct {
// contains filtered or unexported fields
}
CurrenciesClient provides a set of methods for the Currencies module
func (CurrenciesClient) Destroy ¶
func (c CurrenciesClient) Destroy(msg MsgDestroyCurrency) (TxResponse, error)
Destroy currency
func (CurrenciesClient) Issue ¶
func (c CurrenciesClient) Issue(msg MsgIssueCurrency, msgID string) (TxResponse, error)
Issue currency
type DnodeClient ¶
type DnodeClient struct {
// contains filtered or unexported fields
}
DnodeClient implements set of methods for working with dnode blockchain. Never create an instance with the DnodeClient{} literal! To create a correctly initialized instance, always use the New() function.
func (DnodeClient) AccountName ¶
func (c DnodeClient) AccountName() string
AccountName returns the current transaction sender account name
func (DnodeClient) Auth ¶
func (c DnodeClient) Auth() AuthClient
Auth returns initialized AuthClient
func (DnodeClient) BroadcastMode ¶
func (c DnodeClient) BroadcastMode() string
BroadcastMode returns the current broadcast mode
func (DnodeClient) Currencies ¶
func (c DnodeClient) Currencies() CurrenciesClient
Currencies returns initialized CurrenciesClient
func (DnodeClient) FromAddress ¶
func (c DnodeClient) FromAddress() AccAddress
FromAddress returns the current transaction sender address
func (DnodeClient) NodeURL ¶
func (c DnodeClient) NodeURL() string
NodeURL returns the current node URL
func (DnodeClient) Oracle ¶
func (c DnodeClient) Oracle() OracleClient
Oracle returns initialized OracleClient
func (DnodeClient) Passphrase ¶
func (c DnodeClient) Passphrase() string
Passphrase returns the current passphrase
func (DnodeClient) TxBuilder ¶
func (c DnodeClient) TxBuilder() TxBuilder
TxBuilder returns the current transactions bulder
func (DnodeClient) WithAccount ¶
func (c DnodeClient) WithAccount(account BaseAccount) DnodeClient
WithAccount returns DnodeClient with AccountNumber, Sequence and FromAddress fields set. This is a short record of the call of the following methods WithAccountNumber(...).WithSequence(...).WithFromAddress(...).
func (DnodeClient) WithAccountName ¶
func (c DnodeClient) WithAccountName(name string) DnodeClient
WithAccountName returns DnodeClient with the specified account name
func (DnodeClient) WithAccountNumber ¶
func (c DnodeClient) WithAccountNumber(number uint64) DnodeClient
WithAccountNumber returns DnodeClient with the specified AccountNumber
func (DnodeClient) WithBroadcastMode ¶
func (c DnodeClient) WithBroadcastMode(mode TxBroadcastMode) DnodeClient
WithBroadcastMode returns DnodeClient with the specified broadcast mode
func (DnodeClient) WithChainID ¶
func (c DnodeClient) WithChainID(chainID string) DnodeClient
WithChainID returns DnodeClient with the specified ChainID
func (DnodeClient) WithFees ¶
func (c DnodeClient) WithFees(fees string) DnodeClient
WithFees returns DnodeClient with the specified Fees
func (DnodeClient) WithFromAddress ¶
func (c DnodeClient) WithFromAddress(addr AccAddress) DnodeClient
WithFromAddress returns DnodeClient with the specified transaction sender address
func (DnodeClient) WithGas ¶
func (c DnodeClient) WithGas(gas uint64) DnodeClient
WithGas returns DnodeClient with the specified gas
func (DnodeClient) WithGasPrices ¶
func (c DnodeClient) WithGasPrices(gasPrices string) DnodeClient
WithGasPrices returns DnodeClient with the specified gas prices
func (DnodeClient) WithKeybase ¶
func (c DnodeClient) WithKeybase(kb Keybase) DnodeClient
WithKeybase returns DnodeClient with the specified KeyBase
func (DnodeClient) WithMemo ¶
func (c DnodeClient) WithMemo(memo string) DnodeClient
WithMemo returns DnodeClient with the specified memo
func (DnodeClient) WithPassphrase ¶
func (c DnodeClient) WithPassphrase(phrase string) DnodeClient
WithPassphrase returns DnodeClient with the specified passphrase
func (DnodeClient) WithSequence ¶
func (c DnodeClient) WithSequence(seq uint64) DnodeClient
WithSequence returns DnodeClient with the specified account sequence
type MsgConfirmCall ¶
type MsgConfirmCall = msmsgs.MsgConfirmCall
MsgConfirmCall message for confirm call
type MsgDestroyCurrency ¶
type MsgDestroyCurrency = msgs.MsgDestroyCurrency
MsgDestroyCurrency message for destroy currency
type MsgIssueCurrency ¶
type MsgIssueCurrency = msgs.MsgIssueCurrency
MsgIssueCurrency struct for issue new currencies. IssueID could be txHash of transaction in another blockchain.
type MsgPostPrice ¶
type MsgPostPrice = oracle.MsgPostPrice
MsgPostPrice struct representing a posted price message. Used by oracles to input prices to the oracle
type MsgRevokeConfirm ¶
type MsgRevokeConfirm = msmsgs.MsgRevokeConfirm
MsgRevokeConfirm message to revoke confirmation from call
type MsgSubmitCall ¶
type MsgSubmitCall = msmsgs.MsgSubmitCall
MsgSubmitCall message for submit call
type Option ¶
type Option func(*DnodeClient)
func WithAccountName ¶
WithAccountName sets the transaction sender's account name for the DnodeClient instance being created
func WithBroadcastMode ¶
func WithBroadcastMode(mode TxBroadcastMode) Option
WithBroadcastMode sets the transactions broadcast mode for the DnodeClient instance being created instead of the default one
func WithCodec ¶
WithCodec sets the codec for the DnodeClient instance being created instead of the default one
func WithFromAddress ¶
func WithFromAddress(addr AccAddress) Option
WithFromAddress sets the transaction sender's address for the DnodeClient instance being created
func WithHTTPClient ¶
WithHTTPClient sets the http.Client for the DnodeClient instance being created instead of the default one
func WithNodeURL ¶
WithNodeURL sets the node url for the DnodeClient instance being created instead of the default one
func WithPassphrase ¶
WithPassphrase sets the passphrase for the DnodeClient instance being created
func WithTxBuilder ¶
WithTxBuilder sets the transactions builder for the DnodeClient instance being created
type OracleClient ¶
type OracleClient struct {
// contains filtered or unexported fields
}
OracleClient provides a set of methods for the Oracle module
func (OracleClient) Assets ¶
func (c OracleClient) Assets() (Assets, error)
Assets returns the array of available assets of the oracle module.
func (OracleClient) PostPrices ¶
func (c OracleClient) PostPrices(msgs []MsgPostPrice) (result TxResponse, err error)
PostPrices sends asset prices to the oracle module.
type StdFee ¶
StdFee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool.
type StdTx ¶
StdTx is a standard way to wrap a Msg with Fee and Signatures. NOTE: the first signature is the fee payer (Signatures must not be nil).
type TxBroadcastMode ¶
type TxBroadcastMode int
TxBroadcastMode enumeration type for BroadcastMode numeric presentation
const ( TxBlockMode TxBroadcastMode = iota TxSyncMode TxAsyncMode )
func (TxBroadcastMode) String ¶
func (bm TxBroadcastMode) String() string
type TxClient ¶
type TxClient struct {
// contains filtered or unexported fields
}
TxClient provides a set of methods for working with transactions.
type TxResponse ¶
type TxResponse = types.TxResponse
TxResponse defines a structure containing relevant tx data and metadata. The tags are stringified and the log is JSON decoded.