opentimestamps

package
v0.0.0-...-999b8c7 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2017 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attestation

type Attestation interface {
	// contains filtered or unexported methods
}

func ParseAttestation

func ParseAttestation(ctx *deserializationContext) (Attestation, error)

type BitcoinAttestation

type BitcoinAttestation struct {
	Height uint64
	// contains filtered or unexported fields
}

func (*BitcoinAttestation) String

func (b *BitcoinAttestation) String() string

func (*BitcoinAttestation) VerifyAgainstBlockHash

func (b *BitcoinAttestation) VerifyAgainstBlockHash(
	digest, blockHash []byte,
) error

type DetachedTimestamp

type DetachedTimestamp struct {
	HashOp    cryptOp
	FileHash  []byte
	Timestamp *Timestamp
}

func CreateDetachedTimestampForFile

func CreateDetachedTimestampForFile(
	path string, cal *RemoteCalendar,
) (*DetachedTimestamp, error)

func NewDetachedTimestamp

func NewDetachedTimestamp(
	hashOp cryptOp, fileHash []byte, ts *Timestamp,
) (*DetachedTimestamp, error)

func NewDetachedTimestampFromPath

func NewDetachedTimestampFromPath(p string) (*DetachedTimestamp, error)

func NewDetachedTimestampFromReader

func NewDetachedTimestampFromReader(r io.Reader) (*DetachedTimestamp, error)

func (*DetachedTimestamp) Dump

func (d *DetachedTimestamp) Dump() string

func (*DetachedTimestamp) WriteToStream

func (d *DetachedTimestamp) WriteToStream(w io.Writer) error

type PendingTimestamp

type PendingTimestamp struct {
	Timestamp          *Timestamp
	PendingAttestation *pendingAttestation
}

func PendingTimestamps

func PendingTimestamps(ts *Timestamp) (res []PendingTimestamp)

func (PendingTimestamp) Upgrade

func (p PendingTimestamp) Upgrade() (*Timestamp, error)

type RemoteCalendar

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

func NewRemoteCalendar

func NewRemoteCalendar(baseURL string) (*RemoteCalendar, error)

func (*RemoteCalendar) GetTimestamp

func (c *RemoteCalendar) GetTimestamp(commitment []byte) (*Timestamp, error)

func (*RemoteCalendar) Submit

func (c *RemoteCalendar) Submit(digest []byte) (*Timestamp, error)

type Timestamp

type Timestamp struct {
	Message      []byte
	Attestations []Attestation
	// contains filtered or unexported fields
}

A Timestamp can contain many attestations and operations.

func NewTimestampFromReader

func NewTimestampFromReader(r io.Reader, message []byte) (*Timestamp, error)

func (*Timestamp) Dump

func (t *Timestamp) Dump() string

func (*Timestamp) DumpIndent

func (t *Timestamp) DumpIndent(w io.Writer, indent int, cfg dumpConfig)

func (*Timestamp) DumpWithConfig

func (t *Timestamp) DumpWithConfig(cfg dumpConfig) string

func (*Timestamp) Walk

func (t *Timestamp) Walk(f func(t *Timestamp))

Walk calls the passed function f for this timestamp and all downstream timestamps that are chained via operations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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