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 CreateDeposit
- type CreateDepositRequest
- type CreateDepositResponse
- type Deposit
- type Execution
- type Explorer
- type ExplorerProxy
- func (_p ExplorerProxy) CreateDeposit(request CreateDepositRequest) (CreateDepositResponse, error)
- func (_p ExplorerProxy) EstimateGasForSmartContract(request Execution) (int64, error)
- func (_p ExplorerProxy) EstimateGasForTransfer(request SendTransferRequest) (int64, error)
- func (_p ExplorerProxy) EstimateGasForVote() (int64, error)
- func (_p ExplorerProxy) GetAddressBalance(address string) (string, error)
- func (_p ExplorerProxy) GetAddressDetails(address string) (AddressDetails, error)
- func (_p ExplorerProxy) GetBlockByID(blkID string) (Block, error)
- func (_p ExplorerProxy) GetBlockOrActionByHash(hashStr string) (GetBlkOrActResponse, error)
- func (_p ExplorerProxy) GetBlockchainHeight() (int64, error)
- func (_p ExplorerProxy) GetCandidateMetrics() (CandidateMetrics, error)
- func (_p ExplorerProxy) GetCandidateMetricsByHeight(h int64) (CandidateMetrics, error)
- func (_p ExplorerProxy) GetCoinStatistic() (CoinStatistic, error)
- func (_p ExplorerProxy) GetConsensusMetrics() (ConsensusMetrics, error)
- func (_p ExplorerProxy) GetCreateDeposit(createDepositID string) (CreateDeposit, error)
- func (_p ExplorerProxy) GetCreateDepositsByAddress(address string, offset int64, limit int64) ([]CreateDeposit, error)
- func (_p ExplorerProxy) GetDeposits(subChainID int64, offset int64, limit int64) ([]Deposit, error)
- func (_p ExplorerProxy) GetLastBlocksByRange(offset int64, limit int64) ([]Block, error)
- func (_p ExplorerProxy) GetPeers() (GetPeersResponse, error)
- func (_p ExplorerProxy) GetReceiptByActionID(id string) (Receipt, error)
- func (_p ExplorerProxy) GetReceiptByExecutionID(id string) (Receipt, error)
- func (_p ExplorerProxy) GetSettleDeposit(settleDepositID string) (SettleDeposit, error)
- func (_p ExplorerProxy) GetSettleDepositsByAddress(address string, offset int64, limit int64) ([]SettleDeposit, error)
- func (_p ExplorerProxy) GetStateRootHash(blockHeight int64) (string, error)
- func (_p ExplorerProxy) PutSubChainBlock(request PutSubChainBlockRequest) (PutSubChainBlockResponse, error)
- func (_p ExplorerProxy) ReadExecutionState(request Execution) (string, error)
- func (_p ExplorerProxy) SendAction(request SendActionRequest) (SendActionResponse, 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)
- func (_p ExplorerProxy) SettleDeposit(request SettleDepositRequest) (SettleDepositResponse, error)
- func (_p ExplorerProxy) SuggestGasPrice() (int64, error)
- type GetBlkOrActResponse
- type GetPeersResponse
- type Log
- type Node
- type PutSubChainBlockMerkelRoot
- type PutSubChainBlockRequest
- type PutSubChainBlockResponse
- type Receipt
- type SendActionRequest
- type SendActionResponse
- type SendExecutionResponse
- type SendSmartContractResponse
- type SendTransferRequest
- type SendTransferResponse
- type SendVoteRequest
- type SendVoteResponse
- type SettleDeposit
- type SettleDepositRequest
- type SettleDepositResponse
- type Transfer
- type Vote
Constants ¶
View Source
const BarristerChecksum string = "02691b1ac8fe2a4e7820ddf891ec5020"
View Source
const BarristerDateGenerated int64 = 1552068369522000000
View Source
const BarristerVersion string = "0.1.6"
Variables ¶
View Source
var IdlJsonRaw = `` /* 71261-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 string `json:"amount"` Size int64 `json:"size"` TxRoot string `json:"txRoot"` DeltaStateDigest string `json:"deltaStateDigest"` }
type BlockGenerator ¶
type CandidateMetrics ¶ added in v0.3.0
type CoinStatistic ¶
type ConsensusMetrics ¶
type CreateDeposit ¶ added in v0.4.0
type CreateDeposit struct { Version int64 `json:"version"` ID string `json:"ID"` Nonce int64 `json:"nonce"` Sender string `json:"sender"` Recipient string `json:"recipient"` Amount string `json:"amount"` SenderPubKey string `json:"senderPubKey"` Signature string `json:"signature"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` Fee string `json:"fee"` Timestamp int64 `json:"timestamp"` BlockID string `json:"blockID"` IsPending bool `json:"isPending"` }
type CreateDepositRequest ¶ added in v0.4.0
type CreateDepositRequest struct { Version int64 `json:"version"` Nonce int64 `json:"nonce"` ChainID int64 `json:"chainID"` Sender string `json:"sender"` SenderPubKey string `json:"senderPubKey"` Recipient string `json:"recipient"` Amount string `json:"amount"` Signature string `json:"signature"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` }
type CreateDepositResponse ¶ added in v0.4.0
type CreateDepositResponse struct {
Hash string `json:"hash"`
}
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 string `json:"amount"` ExecutorPubKey string `json:"executorPubKey"` Signature string `json:"signature"` GasLimit int64 `json:"gasLimit"` GasPrice string `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) (string, error) GetAddressDetails(address string) (AddressDetails, error) GetCreateDeposit(createDepositID string) (CreateDeposit, error) GetCreateDepositsByAddress(address string, offset int64, limit int64) ([]CreateDeposit, error) GetSettleDeposit(settleDepositID string) (SettleDeposit, error) GetSettleDepositsByAddress(address string, offset int64, limit int64) ([]SettleDeposit, error) GetLastBlocksByRange(offset int64, limit int64) ([]Block, error) GetBlockByID(blkID string) (Block, error) GetCoinStatistic() (CoinStatistic, error) GetConsensusMetrics() (ConsensusMetrics, error) GetCandidateMetrics() (CandidateMetrics, error) GetCandidateMetricsByHeight(h int64) (CandidateMetrics, error) SendTransfer(request SendTransferRequest) (SendTransferResponse, error) SendVote(request SendVoteRequest) (SendVoteResponse, error) SendSmartContract(request Execution) (SendSmartContractResponse, error) PutSubChainBlock(request PutSubChainBlockRequest) (PutSubChainBlockResponse, error) SendAction(request SendActionRequest) (SendActionResponse, error) GetPeers() (GetPeersResponse, error) GetReceiptByExecutionID(id string) (Receipt, error) GetReceiptByActionID(id string) (Receipt, error) ReadExecutionState(request Execution) (string, error) GetBlockOrActionByHash(hashStr string) (GetBlkOrActResponse, error) CreateDeposit(request CreateDepositRequest) (CreateDepositResponse, error) GetDeposits(subChainID int64, offset int64, limit int64) ([]Deposit, error) SettleDeposit(request SettleDepositRequest) (SettleDepositResponse, error) SuggestGasPrice() (int64, error) EstimateGasForTransfer(request SendTransferRequest) (int64, error) EstimateGasForVote() (int64, error) EstimateGasForSmartContract(request Execution) (int64, error) GetStateRootHash(blockHeight int64) (string, error) }
func NewExplorerProxy ¶
func NewExplorerProxy(c barrister.Client) Explorer
type ExplorerProxy ¶
type ExplorerProxy struct {
// contains filtered or unexported fields
}
func (ExplorerProxy) CreateDeposit ¶ added in v0.4.0
func (_p ExplorerProxy) CreateDeposit(request CreateDepositRequest) (CreateDepositResponse, error)
func (ExplorerProxy) EstimateGasForSmartContract ¶ added in v0.4.4
func (_p ExplorerProxy) EstimateGasForSmartContract(request Execution) (int64, error)
func (ExplorerProxy) EstimateGasForTransfer ¶ added in v0.4.4
func (_p ExplorerProxy) EstimateGasForTransfer(request SendTransferRequest) (int64, error)
func (ExplorerProxy) EstimateGasForVote ¶ added in v0.4.4
func (_p ExplorerProxy) EstimateGasForVote() (int64, error)
func (ExplorerProxy) GetAddressBalance ¶
func (_p ExplorerProxy) GetAddressBalance(address string) (string, 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) GetBlockOrActionByHash ¶ added in v0.4.0
func (_p ExplorerProxy) GetBlockOrActionByHash(hashStr string) (GetBlkOrActResponse, 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) GetCandidateMetricsByHeight ¶ added in v0.4.0
func (_p ExplorerProxy) GetCandidateMetricsByHeight(h int64) (CandidateMetrics, error)
func (ExplorerProxy) GetCoinStatistic ¶
func (_p ExplorerProxy) GetCoinStatistic() (CoinStatistic, error)
func (ExplorerProxy) GetConsensusMetrics ¶
func (_p ExplorerProxy) GetConsensusMetrics() (ConsensusMetrics, error)
func (ExplorerProxy) GetCreateDeposit ¶ added in v0.4.0
func (_p ExplorerProxy) GetCreateDeposit(createDepositID string) (CreateDeposit, error)
func (ExplorerProxy) GetCreateDepositsByAddress ¶ added in v0.4.0
func (_p ExplorerProxy) GetCreateDepositsByAddress(address string, offset int64, limit int64) ([]CreateDeposit, error)
func (ExplorerProxy) GetDeposits ¶ added in v0.4.0
func (ExplorerProxy) GetLastBlocksByRange ¶
func (_p ExplorerProxy) GetLastBlocksByRange(offset int64, limit int64) ([]Block, error)
func (ExplorerProxy) GetPeers ¶ added in v0.3.0
func (_p ExplorerProxy) GetPeers() (GetPeersResponse, error)
func (ExplorerProxy) GetReceiptByActionID ¶ added in v0.4.4
func (_p ExplorerProxy) GetReceiptByActionID(id string) (Receipt, error)
func (ExplorerProxy) GetReceiptByExecutionID ¶ added in v0.3.0
func (_p ExplorerProxy) GetReceiptByExecutionID(id string) (Receipt, error)
func (ExplorerProxy) GetSettleDeposit ¶ added in v0.4.0
func (_p ExplorerProxy) GetSettleDeposit(settleDepositID string) (SettleDeposit, error)
func (ExplorerProxy) GetSettleDepositsByAddress ¶ added in v0.4.0
func (_p ExplorerProxy) GetSettleDepositsByAddress(address string, offset int64, limit int64) ([]SettleDeposit, error)
func (ExplorerProxy) GetStateRootHash ¶ added in v0.4.4
func (_p ExplorerProxy) GetStateRootHash(blockHeight int64) (string, error)
func (ExplorerProxy) PutSubChainBlock ¶ added in v0.4.0
func (_p ExplorerProxy) PutSubChainBlock(request PutSubChainBlockRequest) (PutSubChainBlockResponse, error)
func (ExplorerProxy) ReadExecutionState ¶ added in v0.3.0
func (_p ExplorerProxy) ReadExecutionState(request Execution) (string, error)
func (ExplorerProxy) SendAction ¶ added in v0.4.0
func (_p ExplorerProxy) SendAction(request SendActionRequest) (SendActionResponse, 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)
func (ExplorerProxy) SettleDeposit ¶ added in v0.4.0
func (_p ExplorerProxy) SettleDeposit(request SettleDepositRequest) (SettleDepositResponse, error)
func (ExplorerProxy) SuggestGasPrice ¶ added in v0.4.4
func (_p ExplorerProxy) SuggestGasPrice() (int64, error)
type GetBlkOrActResponse ¶ added in v0.4.0
type GetBlkOrActResponse struct { Block *Block `json:"block,omitempty"` Transfer *Transfer `json:"transfer,omitempty"` Vote *Vote `json:"vote,omitempty"` Execution *Execution `json:"execution,omitempty"` Address *AddressDetails `json:"address,omitempty"` }
type GetPeersResponse ¶ added in v0.3.0
type PutSubChainBlockMerkelRoot ¶ added in v0.4.0
type PutSubChainBlockRequest ¶ added in v0.4.0
type PutSubChainBlockRequest struct { Version int64 `json:"version"` Nonce int64 `json:"nonce"` SenderAddress string `json:"senderAddress"` SubChainAddress string `json:"subChainAddress"` Height int64 `json:"height"` Roots []PutSubChainBlockMerkelRoot `json:"roots"` SenderPubKey string `json:"senderPubKey"` Signature string `json:"signature"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` }
type PutSubChainBlockResponse ¶ added in v0.4.0
type PutSubChainBlockResponse struct {
Hash string `json:"hash"`
}
type SendActionRequest ¶ added in v0.4.0
type SendActionRequest struct {
Payload string `json:"payload"`
}
type SendActionResponse ¶ added in v0.4.0
type SendActionResponse struct {
Payload string `json:"payload"`
}
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 string `json:"amount"` SenderPubKey string `json:"senderPubKey"` Signature string `json:"signature"` Payload string `json:"payload"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` 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 SettleDeposit ¶ added in v0.4.0
type SettleDeposit struct { Version int64 `json:"version"` ID string `json:"ID"` Nonce int64 `json:"nonce"` Sender string `json:"sender"` Recipient string `json:"recipient"` Amount string `json:"amount"` Index int64 `json:"index"` SenderPubKey string `json:"senderPubKey"` Signature string `json:"signature"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` Fee string `json:"fee"` Timestamp int64 `json:"timestamp"` BlockID string `json:"blockID"` IsPending bool `json:"isPending"` }
type SettleDepositRequest ¶ added in v0.4.0
type SettleDepositRequest struct { Version int64 `json:"version"` Nonce int64 `json:"nonce"` Sender string `json:"sender"` SenderPubKey string `json:"senderPubKey"` Recipient string `json:"recipient"` Amount string `json:"amount"` Index int64 `json:"index"` Signature string `json:"signature"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` }
type SettleDepositResponse ¶ added in v0.4.0
type SettleDepositResponse 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 string `json:"amount"` SenderPubKey string `json:"senderPubKey"` Signature string `json:"signature"` Payload string `json:"payload"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` IsCoinbase bool `json:"isCoinbase"` Fee string `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"` GasLimit int64 `json:"gasLimit"` GasPrice string `json:"gasPrice"` Signature string `json:"signature"` BlockID string `json:"blockID"` IsPending bool `json:"isPending"` }
Click to show internal directories.
Click to hide internal directories.