Documentation
¶
Index ¶
- type BalanceReply
- type BcBlockReply
- type BcChildBlockHeader
- type BcChildBlockHeaders
- type BcRpcError
- type BcTransaction
- type BcTransactionResponse
- type BcTxInput
- type BcTxOutPoint
- type BcTxOutput
- type GetBlockReply
- type GetBlockReplyPart
- type JSONRpcResp
- type RPCClient
- func (r *RPCClient) Check() bool
- func (r *RPCClient) GetBalance(address string) (*big.Int, error)
- func (r *RPCClient) GetBlockByHash(hash string) (*BcBlockReply, error)
- func (r *RPCClient) GetBlockByHeight(height int64) (*BcBlockReply, error)
- func (r *RPCClient) GetLatestBlock() (*GetBlockReplyPart, error)
- func (r *RPCClient) GetPeerCount() (int64, error)
- func (r *RPCClient) GetTxReceipt(hash string) (*TxReceipt, error)
- func (r *RPCClient) GetUncleByBlockNumberAndIndex(height int64, index int) (*BcBlockReply, error)
- func (r *RPCClient) GetWork() ([]string, error)
- func (r *RPCClient) SendTransaction(from, to, valueInWei, pkey string) (string, error)
- func (r *RPCClient) Sick() bool
- func (r *RPCClient) Sign(from string, s string) (string, error)
- func (r *RPCClient) SubmitBlock(params []string) (bool, error)
- type Tx
- type TxReceipt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceReply ¶
type BcBlockReply ¶
type BcBlockReply struct {
Hash string `json:"hash"`
PreviousHash string `json:"previousHash"`
Version uint64 `json:"version"`
SchemaVersion uint64 `json:"schemaVersion"`
Height uint64 `json:"height"`
Difficulty string `json:"difficulty"`
Timestamp uint64 `json:"timestamp"`
MerkleRoot string `json:"merkleRoot"`
ChainRoot string `json:"chainRoot"`
Distance string `json:"distance"`
TotalDistance string `json:"totalDistance"`
Nonce string `json:"nonce"`
NrgGrant float64 `json:"nrgGrant"`
EmblemWeight float64 `json:"emblemWeight"`
EmblemChainFingerprintRoot string `json:"emblemChainFingerprintRoot"`
EmblemChainAddress string `json:"emblemChainAddress"`
TxCount uint64 `json:"txCount"`
TxsList []BcTransaction `json:"txsList"`
TxFeeBase uint64 `json:"txFeeBase"`
TxDistanceSumLimit uint64 `json:"txDistanceSumLimit"`
BlockchainHeadersCount uint64 `json:"blockchainHeadersCount"`
BlockchainHeaders BcChildBlockHeaders `json:"blockchainHeaders"`
}
type BcChildBlockHeader ¶
type BcChildBlockHeader struct {
Blockchain string `json:"blockchain"`
Hash string `json:"hash"`
PreviousHash string `json:"previousHash"`
Timestamp uint64 `json:"timestamp"`
Height uint64 `json:"height"`
MerkleRoot string `json:"merkleRoot"`
BlockchainConfirmationsInParentCount uint64 `json:"blockchainConfirmationsInParentCount"`
MarkedTxsList []string `json:"-"` // fill out later!
MarkedTxCount uint64 `json:"markedTxCount"`
}
type BcChildBlockHeaders ¶
type BcChildBlockHeaders struct {
BtcList []BcChildBlockHeader `json:"btcList"`
EthList []BcChildBlockHeader `json:"ethList"`
LskList []BcChildBlockHeader `json:"lskList"`
NeoList []BcChildBlockHeader `json:"neoList"`
WavList []BcChildBlockHeader `json:"wavList"`
BlockchainFingerprintsRoot string `json:"blockchainFingerprintsRoot"`
}
type BcRpcError ¶
type BcRpcError struct {
Details string `json:"details"`
}
type BcTransaction ¶
type BcTransaction struct {
Version uint64 `json:"version"`
Nonce string `json:"nonce"`
Hash string `json:"hash"`
Overline string `json:"overline"`
NinCount uint64 `json:"ninCount"`
NoutCount uint64 `json:"noutCount"`
InputsList []BcTxInput `json:"inputsList"`
OutputsList []BcTxOutput `json:"outputsList"`
LockTime uint64 `json:"lockTime"`
}
type BcTransactionResponse ¶
type BcTxInput ¶
type BcTxInput struct {
OutPoint BcTxOutPoint `json:"outPoint"`
ScriptLength uint64 `json:"scriptLength"`
InputScript string `json:"inputScript"`
}
type BcTxOutPoint ¶
type BcTxOutput ¶
type GetBlockReply ¶
type GetBlockReply struct {
Number json.Number `json:"height,Number"`
Hash string `json:"hash"`
Nonce string `json:"nonce"`
Distance string `json:"distance"`
Miner string `json:"miner"`
Difficulty string `json:"difficulty"`
GasLimit string
GasUsed string
Transactions []Tx `json:"txsList"`
Uncles []string
// https://github.com/ethereum/EIPs/issues/95
SealFields []string
}
type GetBlockReplyPart ¶
type JSONRpcResp ¶
type JSONRpcResp struct {
Id *json.RawMessage `json:"id"`
Result *json.RawMessage `json:"result"`
Error map[string]interface{} `json:"error"`
}
type RPCClient ¶
type RPCClient struct {
sync.RWMutex
Url string
Name string
SCookie string
// contains filtered or unexported fields
}
func NewRPCClient ¶
func (*RPCClient) GetBlockByHash ¶
func (r *RPCClient) GetBlockByHash(hash string) (*BcBlockReply, error)
func (*RPCClient) GetBlockByHeight ¶
func (r *RPCClient) GetBlockByHeight(height int64) (*BcBlockReply, error)
func (*RPCClient) GetLatestBlock ¶
func (r *RPCClient) GetLatestBlock() (*GetBlockReplyPart, error)
func (*RPCClient) GetPeerCount ¶
func (*RPCClient) GetUncleByBlockNumberAndIndex ¶
func (r *RPCClient) GetUncleByBlockNumberAndIndex(height int64, index int) (*BcBlockReply, error)
func (*RPCClient) SendTransaction ¶
Click to show internal directories.
Click to hide internal directories.