contract

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MedianPokeGesLimit = 200000
View Source
const MedianPokeMaxFeePerGas = 2000 * 1e9
View Source
const MedianPricePrecision = 18
View Source
const ScribeOpPokeGasLimit = 200000
View Source
const ScribeOpPokeMaxFeePerGas = 2000 * 1e9
View Source
const ScribePokeGasLimit = 200000
View Source
const ScribePokeMaxFeePerGas = 2000 * 1e9
View Source
const ScribePricePrecision = 18

Variables

This section is empty.

Functions

This section is empty.

Types

type ECDSADataStruct

type ECDSADataStruct struct {
	V uint8    `abi:"v"`
	R *big.Int `abi:"r"`
	S *big.Int `abi:"s"`
}

ECDSADataStruct represents the ECDSAData struct in the IScribe interface.

type Median

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

func NewMedian

func NewMedian(client rpc.RPC, address types.Address) *Median

func (*Median) Age

func (m *Median) Age(ctx context.Context) (time.Time, error)

func (*Median) Bar

func (m *Median) Bar(ctx context.Context) (int, error)

func (*Median) Poke

func (m *Median) Poke(ctx context.Context, val []*bn.DecFixedPointNumber, age []time.Time, v []uint8, r []*big.Int, s []*big.Int) error

func (*Median) Val

func (*Median) Wat

func (m *Median) Wat(ctx context.Context) (string, error)

type OpScribe

type OpScribe struct {
	Scribe
}

func NewOpScribe

func NewOpScribe(client rpc.RPC, address types.Address) *OpScribe

func (*OpScribe) OpPoke

func (s *OpScribe) OpPoke(ctx context.Context, pokeData PokeData, schnorrData SchnorrData, ecdsaData types.Signature) error

type PokeData

type PokeData struct {
	Val *bn.DecFixedPointNumber
	Age time.Time
}

type PokeDataStruct

type PokeDataStruct struct {
	Val *big.Int `abi:"val"`
	Age uint32   `abi:"age"`
}

PokeDataStruct represents the PokeData struct in the IScribe interface.

type SchnorrData

type SchnorrData struct {
	Signature   *big.Int
	Commitment  types.Address
	SignersBlob []byte
}

type SchnorrDataStruct

type SchnorrDataStruct struct {
	Signature   *big.Int      `abi:"signature"`
	Commitment  types.Address `abi:"commitment"`
	SignersBlob []byte        `abi:"signersBlob"`
}

SchnorrDataStruct represents the SchnorrData struct in the IScribe interface.

type Scribe

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

func NewScribe

func NewScribe(client rpc.RPC, address types.Address) *Scribe

func (*Scribe) Bar

func (s *Scribe) Bar(ctx context.Context) (int, error)

func (*Scribe) Feeds

func (s *Scribe) Feeds(ctx context.Context) ([]types.Address, []uint8, error)

func (*Scribe) Poke

func (s *Scribe) Poke(ctx context.Context, pokeData PokeData, schnorrData SchnorrData) error

func (*Scribe) Read

func (*Scribe) Wat

func (s *Scribe) Wat(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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