Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmountRequest ¶ added in v1.0.8
type AmountRequest struct {
Address *string
}
func (*AmountRequest) IsInvalid ¶ added in v1.0.8
func (amountRequest *AmountRequest) IsInvalid() bool
type AmountResponse ¶ added in v1.0.8
type AmountResponse struct {
Amount uint64
}
type BlockResponse ¶ added in v1.0.8
type BlockResponse struct { Timestamp int64 PreviousHash [32]byte Transactions []*TransactionResponse RegisteredAddresses []string }
type Neighbor ¶
type Neighbor interface { Ip() string Port() uint16 Target() string GetBlocks() (blockResponses []*BlockResponse, err error) SendTargets(request []TargetRequest) (err error) AddTransaction(request TransactionRequest) (err error) GetTransactions() (transactionResponses []TransactionResponse, err error) GetAmount(request AmountRequest) (amountResponse *AmountResponse, err error) Mine() (err error) StartMining() (err error) StopMining() error }
type Synchronizer ¶
type Synchronizer interface { AddTargets(requests []TargetRequest) Neighbors() []Neighbor }
type TargetRequest ¶ added in v1.0.8
type TransactionRequest ¶ added in v1.0.8
type TransactionRequest struct { RecipientAddress *string SenderAddress *string SenderPublicKey *string Signature *string Timestamp *int64 Value *uint64 Fee *uint64 }
func (*TransactionRequest) IsInvalid ¶ added in v1.0.8
func (transactionRequest *TransactionRequest) IsInvalid() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.