Documentation
¶
Index ¶
- type BlockHeader
- type BlockHeaderRawData
- type BlockResponse
- type Bytes
- type Client
- func (c *Client) BroadcastHex(txHex string) (*CreateTransactionResponse, error)
- func (c *Client) CreateTransaction(from string, to string, amount int) (*CreateTransactionResponse, error)
- func (c *Client) GetAccount(address string) (*GetAccountResponse, error)
- func (c *Client) GetBlockByNum(num uint64) (*BlockResponse, error)
- func (c *Client) GetTransactionByID(txHash string) (*GetTransactionIDResponse, error)
- func (c *Client) GetTransactionInfoByID(txHash string) (*GetTransactionInfoById, error)
- func (c *Client) ReadTrc20Balance(fromAddress string, contract string) (*big.Int, error)
- func (c *Client) ReadTrc20Decimals(contract string) (*big.Int, error)
- func (c *Client) TriggerConstantContracts(ownerAddress string, contract string, funcSelector string, param string) (*TriggerConstantContractResponse, error)
- func (c *Client) Url(path string) string
- type ContractData
- type ContractParameter
- type CreateTransactionResponse
- type Error
- type GetAccountResponse
- type GetTransactionIDResponse
- type GetTransactionInfoById
- type InternalTransaction
- type Log
- type Receipt
- type RetItem
- type TransactionRawData
- type TriggerConstantContractResponse
- type TxResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlockHeader struct { RawData BlockHeaderRawData `json:"raw_data"` WitnessSignature Bytes `json:"witness_signature"` }
type BlockHeaderRawData ¶
type BlockResponse ¶
type BlockResponse struct { Error BlockHeader BlockHeader `json:"block_header"` BlockId string `json:"blockID"` }
type Bytes ¶
type Bytes []byte
Bytes marshals/unmarshals as a JSON string with NO 0x prefix.
func (*Bytes) UnmarshalJSON ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func (*Client) BroadcastHex ¶
func (c *Client) BroadcastHex(txHex string) (*CreateTransactionResponse, error)
func (*Client) CreateTransaction ¶
func (*Client) GetAccount ¶
func (c *Client) GetAccount(address string) (*GetAccountResponse, error)
func (*Client) GetBlockByNum ¶
func (c *Client) GetBlockByNum(num uint64) (*BlockResponse, error)
func (*Client) GetTransactionByID ¶
func (c *Client) GetTransactionByID(txHash string) (*GetTransactionIDResponse, error)
func (*Client) GetTransactionInfoByID ¶
func (c *Client) GetTransactionInfoByID(txHash string) (*GetTransactionInfoById, error)
func (*Client) ReadTrc20Balance ¶
func (*Client) ReadTrc20Decimals ¶
func (*Client) TriggerConstantContracts ¶
type ContractData ¶
type ContractData struct { Parameter ContractParameter `json:"parameter"` Type string `json:"type"` }
func (*ContractData) AsTransferContract ¶
func (c *ContractData) AsTransferContract() (*transferContract, error)
type ContractParameter ¶
type CreateTransactionResponse ¶
type CreateTransactionResponse struct { Error RawData TransactionRawData `json:"raw_data"` RawDataHex Bytes `json:"raw_data_hex"` }
type Error ¶
type GetAccountResponse ¶
type GetTransactionInfoById ¶
type GetTransactionInfoById struct { Error Id Bytes `json:"id"` Fee uint64 `json:"fee"` BlockNumber uint64 `json:"blockNumber"` BlockTimeStamp uint64 `json:"blockTimeStamp"` ContractResult []string `json:"contractResult"` Receipt Receipt `json:"receipt"` ContractAddress string `json:"contract_address"` Logs []*Log `json:"log"` InternalTransactions []*InternalTransaction `json:"internal_transactions"` }
type InternalTransaction ¶
type TransactionRawData ¶
Click to show internal directories.
Click to hide internal directories.