Documentation ¶
Index ¶
- Variables
- type Mempool
- func (mempool *Mempool) Mempool() (txs [][]byte)
- func (mempool *Mempool) ParseBlock(block umi.Block)
- func (mempool *Mempool) Push(transaction []byte) error
- func (mempool *Mempool) SetLedger(ledger1 iLedger)
- func (mempool *Mempool) SubscribeTo(subscriber iSubscriber)
- func (mempool *Mempool) Worker(ctx context.Context)
- type Storage
- func (storage *Storage) AppendData(data []byte) error
- func (storage *Storage) Close()
- func (storage *Storage) Count() int
- func (storage *Storage) Data(hash [32]byte) (data Transaction, err error)
- func (storage *Storage) DataByHeight(height int) (data Transaction, err error)
- func (storage *Storage) OpenOrCreate() (err error)
- func (storage *Storage) ParsedData(hash [32]byte) (meta json.RawMessage, data []byte, err error)
- func (storage *Storage) Scan() error
- type Transaction
- func (t *Transaction) Data() []byte
- func (t *Transaction) Hash() [32]byte
- func (t *Transaction) Meta() json.RawMessage
- func (t *Transaction) Nonce() uint32
- func (t *Transaction) Sender() umi.Address
- func (t *Transaction) SetData(data []byte)
- func (t *Transaction) SetMeta(meta json.RawMessage)
- func (t *Transaction) SetNonce(nonce uint32)
- func (t *Transaction) SetSender(addr umi.Address)
- func (t *Transaction) SetTimestamp(epoch uint32)
- func (t *Transaction) Sign(sec ed25519.PrivateKey)
- func (t *Transaction) Timestamp() uint32
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMempool = errors.New("mempool")
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
This section is empty.
Types ¶
type Mempool ¶
func NewMempool ¶
func NewMempool() *Mempool
func (*Mempool) ParseBlock ¶
func (*Mempool) SubscribeTo ¶
func (mempool *Mempool) SubscribeTo(subscriber iSubscriber)
type Storage ¶
func NewStorage ¶
func (*Storage) AppendData ¶
func (*Storage) DataByHeight ¶
func (storage *Storage) DataByHeight(height int) (data Transaction, err error)
func (*Storage) OpenOrCreate ¶
func (*Storage) ParsedData ¶
type Transaction ¶
type Transaction []byte
func NewTransaction ¶
func NewTransaction() *Transaction
func (*Transaction) Data ¶
func (t *Transaction) Data() []byte
func (*Transaction) Hash ¶
func (t *Transaction) Hash() [32]byte
func (*Transaction) Meta ¶
func (t *Transaction) Meta() json.RawMessage
func (*Transaction) Nonce ¶
func (t *Transaction) Nonce() uint32
func (*Transaction) Sender ¶
func (t *Transaction) Sender() umi.Address
func (*Transaction) SetData ¶
func (t *Transaction) SetData(data []byte)
func (*Transaction) SetMeta ¶
func (t *Transaction) SetMeta(meta json.RawMessage)
func (*Transaction) SetNonce ¶
func (t *Transaction) SetNonce(nonce uint32)
func (*Transaction) SetSender ¶
func (t *Transaction) SetSender(addr umi.Address)
func (*Transaction) SetTimestamp ¶
func (t *Transaction) SetTimestamp(epoch uint32)
func (*Transaction) Sign ¶
func (t *Transaction) Sign(sec ed25519.PrivateKey)
func (*Transaction) Timestamp ¶
func (t *Transaction) Timestamp() uint32
Click to show internal directories.
Click to hide internal directories.