verifiable_data

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0, ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VDBlock added in v0.1.1

type VDBlock struct {
	// contains filtered or unexported fields
}

func (*VDBlock) GetBlockNumber added in v0.1.1

func (block *VDBlock) GetBlockNumber() uint64

type VDBlockProcessor

type VDBlockProcessor func(b *block.Block) error

func (VDBlockProcessor) ProcessBlock

func (p VDBlockProcessor) ProcessBlock(b *block.Block) error

type VDClient

type VDClient struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, conf *VDClientConfig) (*VDClient, error)

func (*VDClient) FetchBlockWithHash added in v0.1.1

func (v *VDClient) FetchBlockWithHash(hash []byte, blockNumber uint64) error

FetchBlockWithHash is a temporary workaround for verifying registered hash values.

func (*VDClient) IsShutdown

func (v *VDClient) IsShutdown() bool

func (*VDClient) ListAllBlocksWithTx

func (v *VDClient) ListAllBlocksWithTx() error

ListAllBlocksWithTx prints all non-empty blocks from genesis up to the latest block

func (*VDClient) RegisterFileHash

func (v *VDClient) RegisterFileHash(filePath string) error

func (*VDClient) RegisterHash

func (v *VDClient) RegisterHash(hash string) error

func (*VDClient) RegisterHashBytes

func (v *VDClient) RegisterHashBytes(bytes []byte) error

type VDClientConfig

type VDClientConfig struct {
	// AbConf configuration parameters of Alphabill client
	AbConf *client.AlphabillClientConfig
	// WaitBlock upon hash submission, waits for a block to contain a transaction with the given hash, stops when found or timeout is reached
	WaitBlock bool
	// BlockTimeout relative timeout of a transaction (e.g. if latest block # is 100, given block timeout is 50, transaction's timeout is 150)
	BlockTimeout uint64
	// OnBlockCallback is called if WaitBlock is set to true and block containing a transaction with the given hash is found
	OnBlockCallback func(b *VDBlock)
}

Jump to

Keyboard shortcuts

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