oracle

package
v0.0.0-...-1c741c1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006-01-02 15:04:05"

TimeFormat is a format of settlement time

Variables

This section is empty.

Functions

This section is empty.

Types

type Oracle

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

Oracle is a struct

func New

func New(name string, params *chaincfg.Params, nRpoints int) (*Oracle, error)

New creates a oracle

func NewTestOracle

func NewTestOracle() *Oracle

NewTestOracle creates a oracle for test

func (*Oracle) FixMsgs

func (o *Oracle) FixMsgs(ftime time.Time, msgs [][]byte) error

FixMsgs fixes messsages at a specified time

func (*Oracle) InitDB

func (o *Oracle) InitDB()

InitDB initialized oracle's DB

func (*Oracle) PubkeySet

func (o *Oracle) PubkeySet(ftime time.Time) (PubkeySet, error)

PubkeySet returns a key set for given fixing time

func (*Oracle) SignMsg

func (oracle *Oracle) SignMsg(ftime time.Time) (SignedMsg, error)

SignMsg returns FixedMsg for given fixing time

type PubkeySet

type PubkeySet = oracle.PubkeySet

PubkeySet is an alias of oracle.PubkeySet

type SignedMsg

type SignedMsg = oracle.SignedMsg

SignedMsg is an alias of oracle.SignedMsg

Jump to

Keyboard shortcuts

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