chainreadinterface

package
v0.0.0-...-a4a6c37 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IBlock

type IBlock interface {
	IBlockHandle
	TransactionCount() (int64, error)
	NthTransaction(n int64) (ITransHandle, error)
}

type IBlockChain

type IBlockChain interface {
	IBlockTree
	LatestBlock() (IBlockHandle, error)
	NextBlock(block IBlockHandle) (IBlockHandle, error)
	LatestTransaction() (ITransHandle, error)
	NextTransaction(trans ITransHandle) (ITransHandle, error)
}

type IBlockHandle

type IBlockHandle interface {
	Height() int64
	Hash() (indexedhashes.Sha256, error)
	HeightSpecified() bool
	HashSpecified() bool
	IsBlockHandle()
	IsInvalid() bool
}

type IBlockTree

type IBlockTree interface {
	InvalidBlock() IBlockHandle
	InvalidTrans() ITransHandle
	GenesisBlock() IBlockHandle
	ParentBlock(block IBlockHandle) IBlockHandle
	GenesisTransaction() (ITransHandle, error)
	PreviousTransaction(trans ITransHandle) ITransHandle // Todo [  ] Cannot be implemented in some cases
	IsBlockTree() bool
	BlockInterface(IBlockHandle) (IBlock, error)
	TransInterface(ITransHandle) (ITransaction, error)
	TxiInterface(ITxiHandle) (ITxi, error)
	TxoInterface(ITxoHandle) (ITxo, error)
}

type ITransHandle

type ITransHandle interface {
	Height() int64
	Hash() (indexedhashes.Sha256, error)
	IndicesPath() (int64, int64) // Block, trans
	HeightSpecified() bool
	HashSpecified() bool
	IndicesPathSpecified() bool
	IsTransHandle()
	IsInvalid() bool
}

type ITransaction

type ITransaction interface {
	ITransHandle
	TxiCount() (int64, error)
	NthTxi(n int64) (ITxiHandle, error)
	TxoCount() (int64, error)
	NthTxo(n int64) (ITxoHandle, error)
}

type ITxi

type ITxi interface {
	ITxiHandle
	SourceTxo() (ITxoHandle, error)
}

type ITxiHandle

type ITxiHandle interface {
	ParentTrans() ITransHandle
	ParentIndex() int64
	TxiHeight() int64
	IndicesPath() (int64, int64, int64) // Block, Trans, Vin
	ParentSpecified() bool
	TxiHeightSpecified() bool
	IndicesPathSpecified() bool
}

type ITxo

type ITxo interface {
	ITxoHandle
	Satoshis() (int64, error)
}

type ITxoHandle

type ITxoHandle interface {
	ParentTrans() ITransHandle
	ParentIndex() int64
	TxoHeight() int64
	IndicesPath() (int64, int64, int64) // Block, Trans, Vout
	ParentSpecified() bool
	TxoHeightSpecified() bool
	IndicesPathSpecified() bool
}

Jump to

Keyboard shortcuts

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