types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KTSecp256k1 = "secp256k1"
	KTBLS       = "bls"
)
View Source
const (
	IKTUnknown = -1

	IKTSecp256k1 = iota
	IKTBLS
)
View Source
const BigIntMaxSerializedLen = 128
View Source
const SignatureMaxLength = 200

Variables

View Source
var EmptyInt = BigInt{}

Functions

func Deserialize

func Deserialize(b []byte, out interface{}) error

func Serialize

func Serialize(i cbg.CBORMarshaler) ([]byte, error)

Types

type BigInt

type BigInt struct {
	*big.Int
}

func NewInt

func NewInt(i uint64) BigInt

func NewIntFromString

func NewIntFromString(s string) BigInt

func (*BigInt) MarshalCBOR

func (bi *BigInt) MarshalCBOR(w io.Writer) error

func (*BigInt) UnmarshalCBOR

func (bi *BigInt) UnmarshalCBOR(br io.Reader) error

type BitField

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

func BitFieldFromSet

func BitFieldFromSet(setBits []uint64) BitField

func NewBitField

func NewBitField() BitField

func (BitField) All

func (bf BitField) All() []uint64

All returns all set bits, in random order

func (BitField) Clear

func (bf BitField) Clear(bit uint64)

Clear ...s bit in the BitField

func (BitField) Has

func (bf BitField) Has(bit uint64) bool

Has checkes if bit is set in the BitField

func (BitField) MarshalCBOR

func (bf BitField) MarshalCBOR(w io.Writer) error

func (BitField) Set

func (bf BitField) Set(bit uint64)

Set ...s bit in the BitField

func (*BitField) UnmarshalCBOR

func (bf *BitField) UnmarshalCBOR(r io.Reader) error

type GasUnit

type GasUnit uint64

Type aliases for state values and message method parameters.

type KeyInfo

type KeyInfo struct {
	Type       string
	PrivateKey []byte
}

KeyInfo is used for storing keys in KeyStore

type Merge

type Merge struct {
	Lane  uint64
	Nonce uint64
}

func (*Merge) MarshalCBOR

func (t *Merge) MarshalCBOR(w io.Writer) error

func (*Merge) UnmarshalCBOR

func (t *Merge) UnmarshalCBOR(r io.Reader) error

type ModVerifyParams

type ModVerifyParams struct {
	Actor  address.Address
	Method uint64
	Data   []byte
}

func (*ModVerifyParams) MarshalCBOR

func (t *ModVerifyParams) MarshalCBOR(w io.Writer) error

func (*ModVerifyParams) UnmarshalCBOR

func (t *ModVerifyParams) UnmarshalCBOR(r io.Reader) error

type PubKey

type PubKey []byte

Type aliases for state values and message method parameters.

type Signature

type Signature struct {
	Type string
	Data []byte
}

func (*Signature) MarshalCBOR

func (s *Signature) MarshalCBOR(w io.Writer) error

func (*Signature) TypeCode added in v0.0.3

func (s *Signature) TypeCode() int

func (*Signature) UnmarshalCBOR

func (s *Signature) UnmarshalCBOR(br io.Reader) error

type SignedVoucher

type SignedVoucher struct {
	TimeLock       uint64
	SecretPreimage []byte
	Extra          *ModVerifyParams
	Lane           uint64
	Nonce          uint64
	Amount         BigInt
	MinCloseHeight uint64

	Merges []Merge

	Signature *Signature
}

func (*SignedVoucher) MarshalCBOR

func (t *SignedVoucher) MarshalCBOR(w io.Writer) error

func (*SignedVoucher) SigningBytes added in v0.0.3

func (sv *SignedVoucher) SigningBytes() ([]byte, error)

func (*SignedVoucher) UnmarshalCBOR

func (t *SignedVoucher) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

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