Documentation
¶
Overview ¶
Code generated by idl2go from JSON generated by Barrister v0.1.6
Index ¶
- Constants
- Variables
- func NewJSONServer(idl *barrister.Idl, forceASCII bool, explorer Explorer) barrister.Server
- func NewServer(idl *barrister.Idl, ser barrister.Serializer, explorer Explorer) barrister.Server
- type AddressDetails
- type Block
- type BlockGenerator
- type Candidate
- type CandidateMetrics
- type CoinStatistic
- type ConsensusMetrics
- type Execution
- type Explorer
- type ExplorerProxy
- func (_p ExplorerProxy) GetAddressBalance(address string) (int64, error)
- func (_p ExplorerProxy) GetAddressDetails(address string) (AddressDetails, error)
- func (_p ExplorerProxy) GetBlockByID(blkID string) (Block, error)
- func (_p ExplorerProxy) GetBlockchainHeight() (int64, error)
- func (_p ExplorerProxy) GetCandidateMetrics() (CandidateMetrics, error)
- func (_p ExplorerProxy) GetCoinStatistic() (CoinStatistic, error)
- func (_p ExplorerProxy) GetConsensusMetrics() (ConsensusMetrics, error)
- func (_p ExplorerProxy) GetExecutionByID(executionID string) (Execution, error)
- func (_p ExplorerProxy) GetExecutionsByAddress(address string, offset int64, limit int64) ([]Execution, error)
- func (_p ExplorerProxy) GetExecutionsByBlockID(blkID string, offset int64, limit int64) ([]Execution, error)
- func (_p ExplorerProxy) GetLastBlocksByRange(offset int64, limit int64) ([]Block, error)
- func (_p ExplorerProxy) GetLastExecutionsByRange(startBlockHeight int64, offset int64, limit int64) ([]Execution, error)
- func (_p ExplorerProxy) GetLastTransfersByRange(startBlockHeight int64, offset int64, limit int64, showCoinBase bool) ([]Transfer, error)
- func (_p ExplorerProxy) GetLastVotesByRange(startBlockHeight int64, offset int64, limit int64) ([]Vote, error)
- func (_p ExplorerProxy) GetPeers() (GetPeersResponse, error)
- func (_p ExplorerProxy) GetReceiptByExecutionID(id string) (Receipt, error)
- func (_p ExplorerProxy) GetTransferByID(transferID string) (Transfer, error)
- func (_p ExplorerProxy) GetTransfersByAddress(address string, offset int64, limit int64) ([]Transfer, error)
- func (_p ExplorerProxy) GetTransfersByBlockID(blkID string, offset int64, limit int64) ([]Transfer, error)
- func (_p ExplorerProxy) GetUnconfirmedExecutionsByAddress(address string, offset int64, limit int64) ([]Execution, error)
- func (_p ExplorerProxy) GetUnconfirmedTransfersByAddress(address string, offset int64, limit int64) ([]Transfer, error)
- func (_p ExplorerProxy) GetUnconfirmedVotesByAddress(address string, offset int64, limit int64) ([]Vote, error)
- func (_p ExplorerProxy) GetVoteByID(voteID string) (Vote, error)
- func (_p ExplorerProxy) GetVotesByAddress(address string, offset int64, limit int64) ([]Vote, error)
- func (_p ExplorerProxy) GetVotesByBlockID(blkID string, offset int64, limit int64) ([]Vote, error)
- func (_p ExplorerProxy) ReadExecutionState(request Execution) (string, error)
- func (_p ExplorerProxy) SendSmartContract(request Execution) (SendSmartContractResponse, error)
- func (_p ExplorerProxy) SendTransfer(request SendTransferRequest) (SendTransferResponse, error)
- func (_p ExplorerProxy) SendVote(request SendVoteRequest) (SendVoteResponse, error)
- type GetPeersResponse
- type Log
- type Node
- type Receipt
- type SendExecutionResponse
- type SendSmartContractResponse
- type SendTransferRequest
- type SendTransferResponse
- type SendVoteRequest
- type SendVoteResponse
- type Transfer
- type Vote
Constants ¶
View Source
const BarristerChecksum string = "8af933d782f93b653033aa66329b030b"
View Source
const BarristerDateGenerated int64 = 1535574606391000000
View Source
const BarristerVersion string = "0.1.6"
Variables ¶
View Source
var IdlJsonRaw = `` /* 54854-byte string literal not displayed */
Functions ¶
func NewJSONServer ¶
Types ¶
type AddressDetails ¶
type Block ¶
type Block struct {
ID string `json:"ID"`
Height int64 `json:"height"`
Timestamp int64 `json:"timestamp"`
Transfers int64 `json:"transfers"`
Votes int64 `json:"votes"`
Executions int64 `json:"executions"`
GenerateBy BlockGenerator `json:"generateBy"`
Amount int64 `json:"amount"`
Forged int64 `json:"forged"`
Size int64 `json:"size"`
}
type BlockGenerator ¶
type CandidateMetrics ¶ added in v0.3.0
type CoinStatistic ¶
type ConsensusMetrics ¶
type Execution ¶ added in v0.3.0
type Execution struct {
Version int64 `json:"version"`
ID string `json:"ID"`
Nonce int64 `json:"nonce"`
Executor string `json:"executor"`
Contract string `json:"contract"`
Amount int64 `json:"amount"`
ExecutorPubKey string `json:"executorPubKey"`
Signature string `json:"signature"`
Gas int64 `json:"gas"`
GasPrice int64 `json:"gasPrice"`
Timestamp int64 `json:"timestamp"`
Data string `json:"data"`
BlockID string `json:"blockID"`
IsPending bool `json:"isPending"`
}
type Explorer ¶
type Explorer interface {
GetBlockchainHeight() (int64, error)
GetAddressBalance(address string) (int64, error)
GetAddressDetails(address string) (AddressDetails, error)
GetLastTransfersByRange(startBlockHeight int64, offset int64, limit int64, showCoinBase bool) ([]Transfer, error)
GetTransferByID(transferID string) (Transfer, error)
GetTransfersByAddress(address string, offset int64, limit int64) ([]Transfer, error)
GetUnconfirmedTransfersByAddress(address string, offset int64, limit int64) ([]Transfer, error)
GetTransfersByBlockID(blkID string, offset int64, limit int64) ([]Transfer, error)
GetLastVotesByRange(startBlockHeight int64, offset int64, limit int64) ([]Vote, error)
GetVoteByID(voteID string) (Vote, error)
GetVotesByAddress(address string, offset int64, limit int64) ([]Vote, error)
GetUnconfirmedVotesByAddress(address string, offset int64, limit int64) ([]Vote, error)
GetVotesByBlockID(blkID string, offset int64, limit int64) ([]Vote, error)
GetLastExecutionsByRange(startBlockHeight int64, offset int64, limit int64) ([]Execution, error)
GetExecutionByID(executionID string) (Execution, error)
GetExecutionsByAddress(address string, offset int64, limit int64) ([]Execution, error)
GetUnconfirmedExecutionsByAddress(address string, offset int64, limit int64) ([]Execution, error)
GetExecutionsByBlockID(blkID string, offset int64, limit int64) ([]Execution, error)
GetLastBlocksByRange(offset int64, limit int64) ([]Block, error)
GetBlockByID(blkID string) (Block, error)
GetCoinStatistic() (CoinStatistic, error)
GetConsensusMetrics() (ConsensusMetrics, error)
GetCandidateMetrics() (CandidateMetrics, error)
SendTransfer(request SendTransferRequest) (SendTransferResponse, error)
SendVote(request SendVoteRequest) (SendVoteResponse, error)
SendSmartContract(request Execution) (SendSmartContractResponse, error)
GetPeers() (GetPeersResponse, error)
GetReceiptByExecutionID(id string) (Receipt, error)
ReadExecutionState(request Execution) (string, error)
}
func NewExplorerProxy ¶
type ExplorerProxy ¶
type ExplorerProxy struct {
// contains filtered or unexported fields
}
func (ExplorerProxy) GetAddressBalance ¶
func (_p ExplorerProxy) GetAddressBalance(address string) (int64, error)
func (ExplorerProxy) GetAddressDetails ¶
func (_p ExplorerProxy) GetAddressDetails(address string) (AddressDetails, error)
func (ExplorerProxy) GetBlockByID ¶
func (_p ExplorerProxy) GetBlockByID(blkID string) (Block, error)
func (ExplorerProxy) GetBlockchainHeight ¶
func (_p ExplorerProxy) GetBlockchainHeight() (int64, error)
func (ExplorerProxy) GetCandidateMetrics ¶ added in v0.3.0
func (_p ExplorerProxy) GetCandidateMetrics() (CandidateMetrics, error)
func (ExplorerProxy) GetCoinStatistic ¶
func (_p ExplorerProxy) GetCoinStatistic() (CoinStatistic, error)
func (ExplorerProxy) GetConsensusMetrics ¶
func (_p ExplorerProxy) GetConsensusMetrics() (ConsensusMetrics, error)
func (ExplorerProxy) GetExecutionByID ¶ added in v0.3.0
func (_p ExplorerProxy) GetExecutionByID(executionID string) (Execution, error)
func (ExplorerProxy) GetExecutionsByAddress ¶ added in v0.3.0
func (ExplorerProxy) GetExecutionsByBlockID ¶ added in v0.3.0
func (ExplorerProxy) GetLastBlocksByRange ¶
func (_p ExplorerProxy) GetLastBlocksByRange(offset int64, limit int64) ([]Block, error)
func (ExplorerProxy) GetLastExecutionsByRange ¶ added in v0.3.0
func (ExplorerProxy) GetLastTransfersByRange ¶
func (ExplorerProxy) GetLastVotesByRange ¶
func (ExplorerProxy) GetPeers ¶ added in v0.3.0
func (_p ExplorerProxy) GetPeers() (GetPeersResponse, error)
func (ExplorerProxy) GetReceiptByExecutionID ¶ added in v0.3.0
func (_p ExplorerProxy) GetReceiptByExecutionID(id string) (Receipt, error)
func (ExplorerProxy) GetTransferByID ¶
func (_p ExplorerProxy) GetTransferByID(transferID string) (Transfer, error)
func (ExplorerProxy) GetTransfersByAddress ¶
func (ExplorerProxy) GetTransfersByBlockID ¶
func (ExplorerProxy) GetUnconfirmedExecutionsByAddress ¶ added in v0.3.0
func (ExplorerProxy) GetUnconfirmedTransfersByAddress ¶ added in v0.3.0
func (ExplorerProxy) GetUnconfirmedVotesByAddress ¶ added in v0.3.0
func (ExplorerProxy) GetVoteByID ¶
func (_p ExplorerProxy) GetVoteByID(voteID string) (Vote, error)
func (ExplorerProxy) GetVotesByAddress ¶
func (ExplorerProxy) GetVotesByBlockID ¶
func (ExplorerProxy) ReadExecutionState ¶ added in v0.3.0
func (_p ExplorerProxy) ReadExecutionState(request Execution) (string, error)
func (ExplorerProxy) SendSmartContract ¶ added in v0.3.0
func (_p ExplorerProxy) SendSmartContract(request Execution) (SendSmartContractResponse, error)
func (ExplorerProxy) SendTransfer ¶ added in v0.3.0
func (_p ExplorerProxy) SendTransfer(request SendTransferRequest) (SendTransferResponse, error)
func (ExplorerProxy) SendVote ¶ added in v0.3.0
func (_p ExplorerProxy) SendVote(request SendVoteRequest) (SendVoteResponse, error)
type GetPeersResponse ¶ added in v0.3.0
type SendExecutionResponse ¶ added in v0.3.0
type SendExecutionResponse struct {
Receipt Receipt `json:"receipt"`
}
type SendSmartContractResponse ¶ added in v0.3.0
type SendSmartContractResponse struct {
Hash string `json:"hash"`
}
type SendTransferRequest ¶ added in v0.3.0
type SendTransferRequest struct {
Version int64 `json:"version"`
Nonce int64 `json:"nonce"`
Sender string `json:"sender"`
Recipient string `json:"recipient"`
Amount int64 `json:"amount"`
SenderPubKey string `json:"senderPubKey"`
Signature string `json:"signature"`
Payload string `json:"payload"`
IsCoinbase bool `json:"isCoinbase"`
}
type SendTransferResponse ¶ added in v0.3.0
type SendTransferResponse struct {
Hash string `json:"hash"`
}
type SendVoteRequest ¶ added in v0.3.0
type SendVoteResponse ¶ added in v0.3.0
type SendVoteResponse struct {
Hash string `json:"hash"`
}
type Transfer ¶
type Transfer struct {
Version int64 `json:"version"`
ID string `json:"ID"`
Nonce int64 `json:"nonce"`
Sender string `json:"sender"`
Recipient string `json:"recipient"`
Amount int64 `json:"amount"`
SenderPubKey string `json:"senderPubKey"`
Signature string `json:"signature"`
Payload string `json:"payload"`
IsCoinbase bool `json:"isCoinbase"`
Fee int64 `json:"fee"`
Timestamp int64 `json:"timestamp"`
BlockID string `json:"blockID"`
IsPending bool `json:"isPending"`
}
type Vote ¶
type Vote struct {
Version int64 `json:"version"`
ID string `json:"ID"`
Nonce int64 `json:"nonce"`
Timestamp int64 `json:"timestamp"`
Voter string `json:"voter"`
Votee string `json:"votee"`
VoterPubKey string `json:"voterPubKey"`
Signature string `json:"signature"`
BlockID string `json:"blockID"`
IsPending bool `json:"isPending"`
}
Click to show internal directories.
Click to hide internal directories.