nft

package
v0.0.0-...-8369a04 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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

type Mempool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMempool

func NewMempool() *Mempool

func (*Mempool) Mempool

func (mempool *Mempool) Mempool() (txs [][]byte)

func (*Mempool) ParseBlock

func (mempool *Mempool) ParseBlock(block umi.Block)

func (*Mempool) Push

func (mempool *Mempool) Push(transaction []byte) error

func (*Mempool) SetLedger

func (mempool *Mempool) SetLedger(ledger1 iLedger)

func (*Mempool) SubscribeTo

func (mempool *Mempool) SubscribeTo(subscriber iSubscriber)

func (*Mempool) Worker

func (mempool *Mempool) Worker(ctx context.Context)

type Storage

type Storage struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(conf *config.Config) *Storage

func (*Storage) AppendData

func (storage *Storage) AppendData(data []byte) error

func (*Storage) Close

func (storage *Storage) Close()

func (*Storage) Count

func (storage *Storage) Count() int

func (*Storage) Data

func (storage *Storage) Data(hash [32]byte) (data Transaction, err error)

func (*Storage) DataByHeight

func (storage *Storage) DataByHeight(height int) (data Transaction, err error)

func (*Storage) OpenOrCreate

func (storage *Storage) OpenOrCreate() (err error)

func (*Storage) ParsedData

func (storage *Storage) ParsedData(hash [32]byte) (meta json.RawMessage, data []byte, err error)

func (*Storage) Scan

func (storage *Storage) Scan() error

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

Jump to

Keyboard shortcuts

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