Documentation ¶
Index ¶
- Constants
- type Amount
- type AmountRequest
- type AmountResponse
- type Controller
- func (controller *Controller) BlockchainClient() *network.Neighbor
- func (controller *Controller) CreateTransaction(writer http.ResponseWriter, req *http.Request)
- func (controller *Controller) GetTransactions(writer http.ResponseWriter, req *http.Request)
- func (controller *Controller) Index(w http.ResponseWriter, req *http.Request)
- func (controller *Controller) Mine(writer http.ResponseWriter, req *http.Request)
- func (controller *Controller) Port() uint16
- func (controller *Controller) Run()
- func (controller *Controller) StartMining(writer http.ResponseWriter, req *http.Request)
- func (controller *Controller) StopMining(writer http.ResponseWriter, req *http.Request)
- func (controller *Controller) Wallet(writer http.ResponseWriter, req *http.Request)
- func (controller *Controller) WalletAmount(writer http.ResponseWriter, req *http.Request)
- type Transaction
- type TransactionRequest
Constants ¶
View Source
const DefaultPort = 8080
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Amount ¶ added in v1.0.1
type Amount struct {
// contains filtered or unexported fields
}
func (*Amount) GetRequest ¶ added in v1.0.1
func (amount *Amount) GetRequest() *neighborhood.AmountRequest
type AmountRequest ¶ added in v1.0.1
type AmountRequest struct {
Address *string
}
func (*AmountRequest) IsInvalid ¶ added in v1.0.1
func (amountRequest *AmountRequest) IsInvalid() bool
type AmountResponse ¶
type AmountResponse struct {
Amount float64 `json:"amount"`
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func (*Controller) BlockchainClient ¶
func (controller *Controller) BlockchainClient() *network.Neighbor
func (*Controller) CreateTransaction ¶
func (controller *Controller) CreateTransaction(writer http.ResponseWriter, req *http.Request)
func (*Controller) GetTransactions ¶
func (controller *Controller) GetTransactions(writer http.ResponseWriter, req *http.Request)
func (*Controller) Index ¶
func (controller *Controller) Index(w http.ResponseWriter, req *http.Request)
func (*Controller) Mine ¶
func (controller *Controller) Mine(writer http.ResponseWriter, req *http.Request)
func (*Controller) Port ¶
func (controller *Controller) Port() uint16
func (*Controller) Run ¶
func (controller *Controller) Run()
func (*Controller) StartMining ¶
func (controller *Controller) StartMining(writer http.ResponseWriter, req *http.Request)
func (*Controller) StopMining ¶
func (controller *Controller) StopMining(writer http.ResponseWriter, req *http.Request)
func (*Controller) Wallet ¶
func (controller *Controller) Wallet(writer http.ResponseWriter, req *http.Request)
func (*Controller) WalletAmount ¶
func (controller *Controller) WalletAmount(writer http.ResponseWriter, req *http.Request)
type Transaction ¶ added in v1.0.1
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶ added in v1.0.1
func NewTransaction(recipientAddress string, senderAddress string, senderPublicKey *encryption.PublicKey, timestamp int64, value uint64) *Transaction
func (*Transaction) GetRequest ¶ added in v1.0.1
func (transaction *Transaction) GetRequest() neighborhood.TransactionRequest
func (*Transaction) MarshalJSON ¶ added in v1.0.1
func (transaction *Transaction) MarshalJSON() ([]byte, error)
func (*Transaction) Sign ¶ added in v1.0.1
func (transaction *Transaction) Sign(privateKey *encryption.PrivateKey) (err error)
type TransactionRequest ¶
type TransactionRequest struct { SenderPrivateKey *string `json:"sender_private_key"` SenderAddress *string `json:"sender_address"` RecipientAddress *string `json:"recipient_address"` SenderPublicKey *string `json:"sender_public_key"` Value *string `json:"value"` }
func (*TransactionRequest) IsInvalid ¶
func (transactionRequest *TransactionRequest) IsInvalid() bool
Click to show internal directories.
Click to hide internal directories.