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:"previous_hash"` Version uint64 `json:"version"` SchemaVersion uint64 `json:"schema_version"` Height uint64 `json:"height"` Difficulty string `json:"difficulty"` Timestamp uint64 `json:"timestamp"` MerkleRoot string `json:"merkle_root"` ChainRoot string `json:"chain_root"` Distance string `json:"distance"` TotalDistance string `json:"total_distance"` Nonce string `json:"nonce"` NrgGrant float64 `json:"nrg_grant"` EmblemWeight float64 `json:"emblem_weight"` EmblemChainFingerprintRoot string `json:"emblem_chain_fingerprint_Root"` EmblemChainAddress string `json:"emblem_chain_address"` TxCount uint64 `json:"tx_Count"` TxsList []BcTransaction `json:"txs"` TxFeeBase uint64 `json:"txFeeBase"` TxDistanceSumLimit uint64 `json:"txDistanceSumLimit"` BlockchainHeadersCount uint64 `json:"blockchain_headers_count"` BlockchainHeaders BcChildBlockHeaders `json:"blockchain_headers"` }
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:"nin_count"` NoutCount uint64 `json:"nout_Count"` 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:"script_Length"` InputScript string `json:"input_Script"` }
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 Urlgool 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)
unused if i see correctly
func (*RPCClient) SendTransaction ¶
Click to show internal directories.
Click to hide internal directories.