blockchain

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: 3 Imported by: 8

Documentation

Overview

Package blockchain defines primitives to work with blockchains.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashTimestamper

type HashTimestamper interface {
	// GetInfo returns information on the Timestamper.
	GetInfo() *Info

	// TimestampHash timestamps a hash on a blockchain.
	TimestampHash(ctx context.Context, hash []byte) (types.TransactionID, error)
}

HashTimestamper must be able to timestamp a hash.

type Info

type Info struct {
	Network     Network
	Description string
}

Info is the info returned by GetInfo.

type Network

type Network interface {
	fmt.Stringer
}

Network represents a blockchain network.

type Timestamper

type Timestamper interface {
	// Timestamp timestamps data on a blockchain.
	Timestamp(ctx context.Context, data interface{}) (types.TransactionID, error)
}

Timestamper must be able to timestamp data.

Directories

Path Synopsis
Package blockchaintesting contains test utilies for packages that depend on the blockchain packages.
Package blockchaintesting contains test utilies for packages that depend on the blockchain packages.
btc
Package btc defines primitives to work with Bitcoin.
Package btc defines primitives to work with Bitcoin.
blockcypher
Package blockcypher defines primitives to work with the BlockCypher API.
Package blockcypher defines primitives to work with the BlockCypher API.
btctesting
Package btctesting defines helpers to test Bitcoin.
Package btctesting defines helpers to test Bitcoin.
btctimestamper
Package btctimestamper implements a fake Bitcoin timestamper which can be used for testing.
Package btctimestamper implements a fake Bitcoin timestamper which can be used for testing.
Package dummytimestamper implements a fake blockchain timestamper which can be used for testing.
Package dummytimestamper implements a fake blockchain timestamper which can be used for testing.

Jump to

Keyboard shortcuts

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