types

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTarget added in v0.5.0

type BaseTarget = uint64

type BlocksApplier added in v0.5.0

type BlocksApplier interface {
	Apply(block []*proto.Block) error
}

type EmbeddedWallet added in v0.5.0

type EmbeddedWallet interface {
	SignTransactionWith(pk crypto.PublicKey, tx proto.Transaction) error
	Load(password []byte) error
	Seeds() [][]byte
}

type Handler

type Handler interface {
	Handle()
}

Abstract handler that called when event happens

type ID added in v0.5.0

type ID interface {
	ID() string
}

type InvRequester added in v0.5.0

type InvRequester interface {
	Request(MessageSender, proto.BlockID)
}

type MessageSender added in v0.5.0

type MessageSender interface {
	SendMessage(proto.Message)
}

type Miner added in v0.5.0

type Miner interface {
	Mine(ctx context.Context, t proto.Timestamp, k proto.KeyPair, parent proto.BlockID, baseTarget BaseTarget, gs []byte, vrf []byte)
}

type MinerConsensus added in v0.5.0

type MinerConsensus interface {
	IsMiningAllowed() bool
}

type Scheduler

type Scheduler interface {
	Reschedule()
}

type ScoreSender added in v0.5.0

type ScoreSender interface {
	Priority()
	NonPriority()
}

type SmartState

type SmartState interface {
	AddingBlockHeight() (uint64, error)
	NewestTransactionByID([]byte) (proto.Transaction, error)
	NewestTransactionHeightByID([]byte) (uint64, error)

	// NewestAccountBalance retrieves balance of address in specific currency, asset is asset's ID.
	// nil asset = Waves.
	NewestAccountBalance(account proto.Recipient, asset []byte) (uint64, error)
	NewestAddrByAlias(alias proto.Alias) (proto.Address, error)
	RetrieveNewestIntegerEntry(account proto.Recipient, key string) (*proto.IntegerDataEntry, error)
	RetrieveNewestBooleanEntry(account proto.Recipient, key string) (*proto.BooleanDataEntry, error)
	RetrieveNewestStringEntry(account proto.Recipient, key string) (*proto.StringDataEntry, error)
	RetrieveNewestBinaryEntry(account proto.Recipient, key string) (*proto.BinaryDataEntry, error)
	NewestAssetIsSponsored(assetID crypto.Digest) (bool, error)
	NewestAssetInfo(assetID crypto.Digest) (*proto.AssetInfo, error)
	NewestHeaderByHeight(height proto.Height) (*proto.BlockHeader, error)

	IsNotFound(err error) bool
	BlockVRF(blockHeader *proto.BlockHeader, height proto.Height) ([]byte, error)
}

state for smart contracts

type StateHistorySynchronizer

type StateHistorySynchronizer interface {
	Sync()
}

notify state that it must run synchronization

type StateSync added in v0.5.0

type StateSync interface {
	Sync()
	SetEnabled(enabled bool)
	Close()
	Run(ctx context.Context)
}

type Subscribe added in v0.5.0

type Subscribe interface {
	Subscribe(p ID, responseMessage proto.Message) (chan proto.Message, func(), error)
	Receive(p ID, responseMessage proto.Message) bool
}

type Time added in v0.5.0

type Time interface {
	Now() time.Time
}

type TransactionWithBytes

type TransactionWithBytes struct {
	T proto.Transaction
	B []byte
}

type UtxPool

type UtxPool interface {
	AddWithBytes(t proto.Transaction, b []byte) error
	Exists(t proto.Transaction) bool
	Pop() *TransactionWithBytes
	AllTransactions() []*TransactionWithBytes
	Count() int
	ExistsByID(id []byte) bool
}

UtxPool storage interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL