blockchainfossilizer

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package blockchainfossilizer implements a fossilizer that fossilize hashes on a blockchain. A blockchain fossilizer should usually be wrapped inside a batch fossilizer to use less blockchain transactions.

Index

Constants

View Source
const (
	// Name is the name set in the fossilizer's information.
	Name = "blockchainfossilizer"

	// Description is the description set in the fossilizer's information.
	Description = "Stratumn's Blockchain Fossilizer"
)

Variables

This section is empty.

Functions

func New

func New(config *Config) fossilizer.Adapter

New creates an instance of a blockchain fossilizer.

Types

type Config

type Config struct {
	Version     string
	Commit      string
	Timestamper blockchain.HashTimestamper
}

Config for the blockchain fossilizer.

type Fossilizer

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

Fossilizer fossilizes data on a blockchain.

func (*Fossilizer) AddFossilizerEventChan

func (a *Fossilizer) AddFossilizerEventChan(fossilizerEventChan chan *fossilizer.Event)

AddFossilizerEventChan adds a new listener.

func (*Fossilizer) Fossilize

func (a *Fossilizer) Fossilize(ctx context.Context, data []byte, meta []byte) (err error)

Fossilize data to the configured blockchain.

func (*Fossilizer) GetInfo

func (a *Fossilizer) GetInfo(ctx context.Context) (interface{}, error)

GetInfo implements github.com/stratumn/go-core/fossilizer.Adapter.GetInfo.

type Info

type Info struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Version     string `json:"version"`
	Commit      string `json:"commit"`
	Blockchain  string `json:"blockchain"`
}

Info is the info returned by GetInfo.

Directories

Path Synopsis
Package evidences defines blockchainfossilizer evidence types.
Package evidences defines blockchainfossilizer evidence types.

Jump to

Keyboard shortcuts

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