Documentation ¶
Index ¶
- type AddressStateResponse
- type BlockHeader
- type BlockHeaderRequest
- type BlockHeaderResponse
- type BlockResponse
- type BlockTemplate
- type BlockTemplateRequest
- type BroadcastTransferTransactionRespose
- type GetEstimatedNetworkFeeResponse
- type GetHeightResponse
- type GetVersionResponse
- type MiningAPIServer
- func (m *MiningAPIServer) GetBlockHeaderByHeight(height uint64, w http.ResponseWriter)
- func (m *MiningAPIServer) GetBlockTemplate(walletAddress string, w http.ResponseWriter)
- func (m *MiningAPIServer) GetLastBlockHeader(w http.ResponseWriter)
- func (m *MiningAPIServer) Handler(w http.ResponseWriter, req *http.Request)
- func (m *MiningAPIServer) Start() error
- func (m *MiningAPIServer) SubmitBlock(blob string, w http.ResponseWriter)
- func (m *MiningAPIServer) Transfer(w http.ResponseWriter, req *http.Request)
- type PublicAPIServer
- func (p *PublicAPIServer) BroadcastTransferTx(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetAddressState(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetBalance(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetBlockByHash(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetBlockByNumber(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetEstimatedNetworkFee(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetHeight(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetLastBlock(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetNetworkStats(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetTxByHash(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetUnusedOTSIndex(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) GetVersion(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) RedirectToAPIDoc(w http.ResponseWriter, r *http.Request)
- func (p *PublicAPIServer) Start() error
- type RPCRequest
- type RPCResponse
- type Response
- type SubmitBlockResponse
- type TransactionResponse
- type TransferTransactionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressStateResponse ¶
type AddressStateResponse struct { Address string `json:"address" bson:"address"` Balance string `json:"balance" bson:"balance"` Nonce string `json:"nonce" bson:"nonce"` OtsBitfield []string `json:"otsBitField" bson:"otsBitField"` Transactions []TransactionResponse `json:"transactions" bson:"transactions"` OtsCounter string `json:"otsCounter" bson:"otsCounter"` }
func NewAddressStateResponse ¶
func NewAddressStateResponse(a *addressstate.PlainAddressState, c *chain.Chain) (*AddressStateResponse, error)
type BlockHeader ¶
type BlockHeaderRequest ¶
type BlockHeaderRequest struct {
Height uint64 `json:"height"`
}
type BlockHeaderResponse ¶
type BlockHeaderResponse struct { BlockHeader *BlockHeader `json:"block_header"` Status string `json:"status"` }
type BlockResponse ¶
type BlockTemplate ¶
type BlockTemplateRequest ¶
type BroadcastTransferTransactionRespose ¶
type BroadcastTransferTransactionRespose struct {
TransactionHash string `json:"transactionHash"`
}
type GetEstimatedNetworkFeeResponse ¶
type GetEstimatedNetworkFeeResponse struct {
Fee string `json:"fee"`
}
type GetHeightResponse ¶
type GetHeightResponse struct {
Height uint64 `json:"height"`
}
type GetVersionResponse ¶
type GetVersionResponse struct {
Version string `json:"version"`
}
type MiningAPIServer ¶
type MiningAPIServer struct {
// contains filtered or unexported fields
}
func NewMiningAPIServer ¶
func NewMiningAPIServer(c *chain.Chain, registerAndBroadcastChan chan *messages.RegisterMessage) *MiningAPIServer
func (*MiningAPIServer) GetBlockHeaderByHeight ¶
func (m *MiningAPIServer) GetBlockHeaderByHeight(height uint64, w http.ResponseWriter)
func (*MiningAPIServer) GetBlockTemplate ¶
func (m *MiningAPIServer) GetBlockTemplate(walletAddress string, w http.ResponseWriter)
func (*MiningAPIServer) GetLastBlockHeader ¶
func (m *MiningAPIServer) GetLastBlockHeader(w http.ResponseWriter)
func (*MiningAPIServer) Handler ¶
func (m *MiningAPIServer) Handler(w http.ResponseWriter, req *http.Request)
func (*MiningAPIServer) Start ¶
func (m *MiningAPIServer) Start() error
func (*MiningAPIServer) SubmitBlock ¶
func (m *MiningAPIServer) SubmitBlock(blob string, w http.ResponseWriter)
func (*MiningAPIServer) Transfer ¶
func (m *MiningAPIServer) Transfer(w http.ResponseWriter, req *http.Request)
type PublicAPIServer ¶
type PublicAPIServer struct {
// contains filtered or unexported fields
}
func NewPublicAPIServer ¶
func NewPublicAPIServer(c *chain.Chain, registerAndBroadcastChan chan *messages.RegisterMessage) *PublicAPIServer
func (*PublicAPIServer) BroadcastTransferTx ¶
func (p *PublicAPIServer) BroadcastTransferTx(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetAddressState ¶
func (p *PublicAPIServer) GetAddressState(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetBalance ¶
func (p *PublicAPIServer) GetBalance(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetBlockByHash ¶
func (p *PublicAPIServer) GetBlockByHash(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetBlockByNumber ¶
func (p *PublicAPIServer) GetBlockByNumber(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetEstimatedNetworkFee ¶
func (p *PublicAPIServer) GetEstimatedNetworkFee(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetHeight ¶
func (p *PublicAPIServer) GetHeight(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetLastBlock ¶
func (p *PublicAPIServer) GetLastBlock(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetNetworkStats ¶
func (p *PublicAPIServer) GetNetworkStats(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetTxByHash ¶
func (p *PublicAPIServer) GetTxByHash(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetUnusedOTSIndex ¶
func (p *PublicAPIServer) GetUnusedOTSIndex(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) GetVersion ¶
func (p *PublicAPIServer) GetVersion(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) RedirectToAPIDoc ¶
func (p *PublicAPIServer) RedirectToAPIDoc(w http.ResponseWriter, r *http.Request)
func (*PublicAPIServer) Start ¶
func (p *PublicAPIServer) Start() error
type RPCRequest ¶
type RPCRequest struct { Id string `json:"id"` JsonRPC string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params"` }
type RPCResponse ¶
type SubmitBlockResponse ¶
type SubmitBlockResponse struct {
// contains filtered or unexported fields
}
type TransactionResponse ¶
type TransactionResponse interface {
GetSignerAddress() string
}
type TransferTransactionResponse ¶
type TransferTransactionResponse struct { AddressFrom string `json:"addressFrom"` SignerAddress string `json:"signerAddress"` Fee string `json:"fee"` PublicKey string `json:"publicKey"` Signature string `json:"signature"` Nonce string `json:"nonce"` TransactionHash string `json:"transactionHash"` TransactionType string `json:"transactionType"` AddressesTo []string `json:"addressesTo"` Amounts []string `json:"amounts"` TotalAmount string `json:"totalAmount"` Block *BlockResponse `json:"block"` }
func NewCoinBaseTransactionResponse ¶
func NewCoinBaseTransactionResponse(tm *generated.TransactionMetadata, b *block.Block) *TransferTransactionResponse
func NewTransferTransactionResponse ¶
func NewTransferTransactionResponse(tm *generated.TransactionMetadata, b *block.Block) *TransferTransactionResponse
func (*TransferTransactionResponse) GetSignerAddress ¶
func (tr *TransferTransactionResponse) GetSignerAddress() string
Click to show internal directories.
Click to hide internal directories.