Documentation ¶
Index ¶
- Constants
- type Elephant
- func (e *Elephant) CancelCs(postType string, params []interface{}) (string, error)
- func (e *Elephant) CheckReceipt(postType string, params []interface{}) (string, error)
- func (e *Elephant) CheckTx(postType string, params []interface{}) (string, error)
- func (e *Elephant) CheckTxIsPending(hashId string) (bool, error)
- func (e *Elephant) CreateObjectStorage(postType string, params []interface{}) (string, error)
- func (e *Elephant) DoOperation(cmd string, params []interface{}, rate chan int) (interface{}, error)
- func (e *Elephant) GetAccAddresses() []string
- func (e *Elephant) GetAccoutInUse() accounts.Account
- func (e *Elephant) GetAccouts() []accounts.Account
- func (e *Elephant) GetAgentsInfo() (string, error)
- func (e *Elephant) GetCSAddress() (string, error)
- func (e *Elephant) GetClient() *EthClient
- func (e *Elephant) GetMails(postType string, params []interface{}) (string, error)
- func (e *Elephant) GetSignedCs(postType string, params []interface{}, address string) (string, error)
- func (e *Elephant) GetTotalBalance() (string, error)
- func (e *Elephant) ImportKey(postType string, params []interface{}) (string, error)
- func (e *Elephant) Init() ([]byte, error)
- func (e *Elephant) Log() log.Logger
- func (e *Elephant) NewAccount(params []interface{}) (string, error)
- func (e *Elephant) ParseUpdateSignedCs(str string) error
- func (e *Elephant) PassphraseEntered() bool
- func (e *Elephant) ReadFile(postType string, params []interface{}, rate chan int) (string, error)
- func (e *Elephant) ReadString(postType string, params []interface{}) (string, error)
- func (e *Elephant) RegMail(postType string, params []interface{}) (string, error)
- func (e *Elephant) RemoteIPEntered() bool
- func (e *Elephant) SendMail(postType string, params []interface{}) (string, error)
- func (e *Elephant) SendTransaction(postType string, params []interface{}) (string, error)
- func (e *Elephant) SetAccoutInUse(address, passphrase string) bool
- func (e *Elephant) SetAccoutInUse2(postType string, params []interface{}) (bool, error)
- func (e *Elephant) SignAuthAllowFlow(signer, csAddr common.Address, flow uint64) ([]byte, error)
- func (e *Elephant) SignCs(postType string, params []interface{}) (string, error)
- func (e *Elephant) WaitTXComplete(postType string, params []interface{}) (bool, error)
- func (e *Elephant) WalletTx(postType string, params []interface{}) (string, error)
- func (e *Elephant) WriteFile(postType string, params []interface{}, rate chan int) (bool, error)
- func (e *Elephant) WriteString(postType string, params []interface{}) (bool, error)
- type EthClient
- func (client *EthClient) CheckReg(addr common.Address, params []interface{}) (bool, error)
- func (client *EthClient) EstimateGasSpend(from common.Address, value *big.Int) (*big.Int, error)
- func (client *EthClient) EstimateTxnGas(from, to common.Address, value *big.Int) (*big.Int, error)
- func (client *EthClient) GetBalance(params []interface{}) (string, error)
- func (client *EthClient) GetEleTransaction(hash common.Hash) (*types_elephant.Transaction, bool, error)
- func (client *EthClient) GetEthGasStationEstimate() (*EthGasStationData, error)
- func (client *EthClient) GetLatestBlock() (uint32, common.Hash, error)
- func (client *EthClient) GetObjectsInfo(params []interface{}, address string) (string, error)
- func (client *EthClient) GetRentSize(params []interface{}, address string) (string, error)
- func (client *EthClient) GetTxnNonce(txID string) (int32, error)
- func (client *EthClient) GetUnconfirmedBalance(destAccount common.Address) (*big.Int, error)
- func (client *EthClient) GetUsedFlow(address string) (uint64, error)
- func (client *EthClient) SendTx(from, to, passphrase string, am *accounts.Manager, actType uint8, ...) (common.Hash, error)
- func (client *EthClient) SendTxWithNonce(from, to, passphrase string, value *big.Int, am *accounts.Manager, ...) (common.Hash, error)
- type EthGasStationData
Constants ¶
const ( CharSpace = ' ' CharEqual = '=' StringSpace = " " )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elephant ¶
type Elephant struct {
// contains filtered or unexported fields
}
func (*Elephant) CheckReceipt ¶
func (*Elephant) CheckTxIsPending ¶
func (*Elephant) CreateObjectStorage ¶
func (*Elephant) DoOperation ¶
func (*Elephant) GetAccAddresses ¶
Accounts returns the collection of accounts this node manages
func (*Elephant) GetAccoutInUse ¶
GetAccoutInUse gets the account selected in the GUI
func (*Elephant) GetAccouts ¶
Accounts returns the collection of accounts this node manages
func (*Elephant) GetAgentsInfo ¶
func (*Elephant) GetCSAddress ¶
GetCSAddress gets the agent account connected in the GUI
func (*Elephant) GetSignedCs ¶
func (e *Elephant) GetSignedCs(postType string, params []interface{}, address string) (string, error)
GetSignedCs - returns the signed CS of this account
func (*Elephant) GetTotalBalance ¶
GetTotalBalance - returns the total balance for all accounts available
func (*Elephant) ImportKey ¶
ImportKey will import a new account and returns the address for the new account.
func (*Elephant) NewAccount ¶
NewAccount will create a new account and returns the address for the new account.
func (*Elephant) ParseUpdateSignedCs ¶
func (*Elephant) PassphraseEntered ¶
PassPhraseEntered return if the passphrase has been entered
func (*Elephant) ReadString ¶
func (*Elephant) RemoteIPEntered ¶
RemoteIPEntered return if the remote IP has been entered
func (*Elephant) SendTransaction ¶
func (*Elephant) SetAccoutInUse ¶
SetAccoutInUse sets the account selected in the GUI
func (*Elephant) SetAccoutInUse2 ¶
func (*Elephant) SignAuthAllowFlow ¶
func (*Elephant) WaitTXComplete ¶
type EthClient ¶
EthClient represents the eth client
func NewEthClient ¶
NewEthClient returns a new eth client
func (*EthClient) CheckReg ¶
CheckReg - returns whether the mail nickname have already been registered
func (*EthClient) EstimateGasSpend ¶
EstimateGasSpend - returns estimated gas
func (*EthClient) EstimateTxnGas ¶
EstimateTxnGas - returns estimated gas
func (*EthClient) GetBalance ¶
GetBalance - returns the balance for this account
func (*EthClient) GetEleTransaction ¶
func (client *EthClient) GetEleTransaction(hash common.Hash) (*types_elephant.Transaction, bool, error)
GetEleTransaction - returns a elephant txn for the specified hash
func (*EthClient) GetEthGasStationEstimate ¶
func (client *EthClient) GetEthGasStationEstimate() (*EthGasStationData, error)
GetEthGasStationEstimate get the latest data from https://ethgasstation.info/json/ethgasAPI.json
func (*EthClient) GetLatestBlock ¶
GetLatestBlock - returns the latest block
func (*EthClient) GetObjectsInfo ¶
GetObjectsInfo - returns the objects information
func (*EthClient) GetRentSize ¶
GetRentSize - returns the rent size
func (*EthClient) GetTxnNonce ¶
GetTxnNonce - used to fetch nonce for a submitted txn
func (*EthClient) GetUnconfirmedBalance ¶
GetUnconfirmedBalance - returns the unconfirmed balance for this account
func (*EthClient) GetUsedFlow ¶
type EthGasStationData ¶
type EthGasStationData struct { Average float64 `json:"average"` FastestWait float64 `json:"fastestWait"` FastWait float64 `json:"fastWeight"` Fast float64 `json:"Fast"` SafeLowWait float64 `json:"safeLowWait"` BlockNum int64 `json:"blockNum"` AvgWait float64 `json:"avgWait"` BlockTime float64 `json:"block_time"` Speed float64 `json:"speed"` Fastest float64 `json:"fastest"` SafeLow float64 `json:"safeLow"` }
EthGasStationData represents ethgasstation api data https://ethgasstation.info/json/ethgasAPI.json {"average": 20.0, "fastestWait": 0.4, "fastWait": 0.4, "fast": 200.0, "safeLowWait": 10.6, "blockNum": 6684733, "avgWait": 2.0, "block_time": 13.056701030927835, "speed": 0.7529715304081577, "fastest": 410.0, "safeLow": 17.0}