c_type

package
v0.0.0-...-93382e6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DEPTH = 29
View Source
const ETEXT_WIDTH = 32 + 32 + 32 + 32 + 64

Currency+Value+Ticket+rPK+Memo

View Source
const INFO_WIDTH = 32 + 32 + 32 + 32 + 32 + 64

currency+value+category+value+rsk+memo

View Source
const PROOF_WIDTH = 131

Variables

View Source
var Empty_PKr = PKr{}
View Source
var Empty_SignN = SignN{}
View Source
var Empty_Tk = Tk{}
View Source
var Empty_Uint256 = Uint256{}
View Source
var Empty_Uint512 = Uint512{}

Functions

func Uint256_To_Uint64

func Uint256_To_Uint64(v *Uint256) (ret uint64)

Types

type Asset

type Asset struct {
	Tkn_currency Uint256
	Tkn_value    Uint256
	Tkt_category Uint256
	Tkt_value    Uint256
}

func (Asset) NewRef

func (self Asset) NewRef() (ret *Asset)

type BalanceDesc

type BalanceDesc struct {
	Zin_acms  []byte
	Zin_ars   []byte
	Zout_acms []byte
	Zout_ars  []byte
	Oin_accs  []byte
	Oout_accs []byte
	Hash      Uint256
	Bcr       Uint256
	Bsign     Uint512
}

type Einfo

type Einfo [INFO_WIDTH]byte

func (Einfo) MarshalText

func (b Einfo) MarshalText() ([]byte, error)

func (*Einfo) UnmarshalText

func (b *Einfo) UnmarshalText(input []byte) error

type LICr

type LICr struct {
	Proof [PROOF_WIDTH]byte
	C     uint64
	L     uint64
	H     uint64
}

func (*LICr) GetProp

func (self *LICr) GetProp() (counteract uint64, limit uint64)

type NetType

type NetType uint8
const (
	NET_Dev   NetType = 0
	NET_Alpha NetType = 1
	NET_Beta  NetType = 2
)

type PKr

type PKr [96]byte

func NewPKrByBytes

func NewPKrByBytes(bs []byte) (ret PKr)

func (*PKr) BASEr

func (self *PKr) BASEr() (ret Uint256)

func (*PKr) IsEndEmpty

func (self *PKr) IsEndEmpty() bool

func (PKr) MarshalText

func (b PKr) MarshalText() ([]byte, error)

func (PKr) NewRef

func (self PKr) NewRef() (ret *PKr)

func (*PKr) ToUint512

func (self *PKr) ToUint512() (ret Uint512)

func (*PKr) UnmarshalText

func (b *PKr) UnmarshalText(input []byte) error

func (*PKr) VPKr

func (self *PKr) VPKr() (ret Uint256)

func (*PKr) ZPKr

func (self *PKr) ZPKr() (ret Uint256)

type Proof

type Proof [PROOF_WIDTH]byte

func (Proof) MarshalText

func (b Proof) MarshalText() ([]byte, error)

func (*Proof) UnmarshalText

func (b *Proof) UnmarshalText(input []byte) error

type SignN

type SignN [96]byte

func (SignN) MarshalText

func (b SignN) MarshalText() ([]byte, error)

func (SignN) NewRef

func (self SignN) NewRef() (ret *PKr)

func (*SignN) ToUint512

func (self *SignN) ToUint512() (ret Uint512)

func (*SignN) UnmarshalText

func (b *SignN) UnmarshalText(input []byte) error

type Tk

type Tk [64]byte

func (Tk) MarshalText

func (b Tk) MarshalText() ([]byte, error)

func (Tk) NewRef

func (self Tk) NewRef() (ret *Tk)

func (*Tk) UnmarshalText

func (b *Tk) UnmarshalText(input []byte) error

type Uint128

type Uint128 [16]byte

func RandUint128

func RandUint128() (hash Uint128)

func (Uint128) MarshalText

func (b Uint128) MarshalText() ([]byte, error)

func (*Uint128) ToUint256

func (b *Uint128) ToUint256() (ret Uint256)

func (*Uint128) UnmarshalText

func (b *Uint128) UnmarshalText(input []byte) error

type Uint256

type Uint256 [32]byte

func RandUint256

func RandUint256() (hash Uint256)

func Uint64_To_Uint256

func Uint64_To_Uint256(v uint64) (ret Uint256)

func (Uint256) MarshalText

func (b Uint256) MarshalText() ([]byte, error)

func (Uint256) NewRef

func (self Uint256) NewRef() (ret *Uint256)

func (*Uint256) UnmarshalText

func (b *Uint256) UnmarshalText(input []byte) error

type Uint512

type Uint512 [64]byte

func RandUint512

func RandUint512() (hash Uint512)

func (Uint512) MarshalText

func (b Uint512) MarshalText() ([]byte, error)

func (Uint512) NewRef

func (self Uint512) NewRef() (ret *Uint512)

func (*Uint512) UnmarshalText

func (b *Uint512) UnmarshalText(input []byte) error

Jump to

Keyboard shortcuts

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