Versions in this module Expand all Collapse all v0 v0.0.9 May 29, 2021 v0.0.8 May 28, 2021 v0.0.7 May 28, 2021 v0.0.6 May 16, 2021 Changes in this version + type ParseSimulateAccountsResponse struct + Accounts [][2]types.Point + func ParseSimulateAccounts(data string) (*ParseSimulateAccountsResponse, error) v0.0.5 Apr 27, 2021 Changes in this version + func SimulateAccounts(y string, epoch uint64) string v0.0.4 Apr 14, 2021 v0.0.3 Apr 12, 2021 v0.0.2 Apr 12, 2021 Changes in this version + var BASEPOS = 64 + func Burn(y string, bTransfer uint64, u string, proof string) string + func Fund(y string, b uint64) string + func Register(y string, c string, s string) string + func Transfer(c string, d string, y string, u string, proof string) string type BN128 + func (b *BN128) SetSpecialRandom(r *ebigint.NBigInt) type FieldVector + func (f *FieldVector) String() string type GeneratorVector + func (g *GeneratorVector) String() string type TransferStatement + func (t *TransferStatement) Content() type TransferWitness + func (t *TransferWitness) Content() v0.0.1 Jan 18, 2021 Changes in this version + var B_MAX = 4294967295 + var FIELD_MODULUS = new(big.Int).SetString("30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47", 16) + var GROUP_MODULUS = new(big.Int).SetString("30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001", 16) + func BytePadding(data []byte, length int) []byte + func BytesCombine(pBytes ...[]byte) []byte + func Hash(str string) *ebigint.NBigInt + func PaddingString(in string, padding int) string + func ProveBurn(statement BurnStatement, witness BurnWitness) string + func ProveTransfer(statement TransferStatement, witness TransferWitness) string + func ReadBalance(CL, CR types.Point, x *ebigint.NBigInt) int + func Reverse(s []string) []string + func Sign(address []byte, keypair Account) (*ebigint.NBigInt, *ebigint.NBigInt, error) + func SignWithRandom(address []byte, keypair Account, k *ebigint.NBigInt) (*ebigint.NBigInt, *ebigint.NBigInt, error) + type ABI_Bytes32 [32]byte + type ABI_Bytes32_2 [2][32]byte + type ABI_Bytes32_2S [][2][32]byte + type Account struct + X *ebigint.NBigInt + Y types.Point + func CreateAccount() Account + func CreateAccountWithX(x *ebigint.NBigInt) Account + func (a *Account) UnmarshalJSON(input []byte) error + func (a Account) MarshalJSON() ([]byte, error) + func (a Account) String() string + type BN128 struct + G1 *bn256.G1 + func NewBN128() *BN128 + func (b *BN128) B_MAX() int + func (b *BN128) Bytes(i *big.Int) string + func (b *BN128) CurveG() Point + func (b *BN128) CurveRed() *ebigint.Red + func (b *BN128) Fq() bn256.Fq + func (b *BN128) P() *ebigint.Red + func (b *BN128) Q() *ebigint.Red + func (b *BN128) RandomScalar() *ebigint.NBigInt + func (b *BN128) Representation(p Point) string + func (b *BN128) Serialize(p Point) types.Point + func (b *BN128) UnSerialize(pubkey types.Point) Point + func (b *BN128) Zero() Point + type BurnProof struct + BA Point + BS Point + func (z BurnProof) Serialize() string + type BurnProver struct + func NewBurnProver() BurnProver + func (burn BurnProver) GenerateProof(istatement BurnStatement, iwitness BurnWitness) *BurnProof + type BurnStatement struct + CLn types.Point + CRn types.Point + Epoch int + Sender string + Y types.Point + type BurnWitness struct + BDiff int + SK string + type Convolver struct + func NewConvolver() *Convolver + func (c *Convolver) Convolution_Point(exponent *FieldVector, base *GeneratorVector) *GeneratorVector + func (c *Convolver) Convolution_Scalar(exponent *FieldVector, base *FieldVector) *FieldVector + func (c *Convolver) FFT_Point(input *GeneratorVector, inverse bool) *GeneratorVector + func (c *Convolver) FFT_Scalar(input *FieldVector, inverse bool) *FieldVector + type ETH_ADDR ethcommon.Address + type FieldVector struct + func NewFieldVector(vector []*ebigint.NBigInt) *FieldVector + func (f *FieldVector) Add(other *FieldVector) *FieldVector + func (f *FieldVector) Concat(other *FieldVector) *FieldVector + func (f *FieldVector) Extract(parity int) *FieldVector + func (f *FieldVector) Flip() *FieldVector + func (f *FieldVector) GetVector() []*ebigint.NBigInt + func (f *FieldVector) Hadamard(other *FieldVector) *FieldVector + func (f *FieldVector) InnerProduct(other *FieldVector) *ebigint.NBigInt + func (f *FieldVector) Invert() *FieldVector + func (f *FieldVector) Length() int + func (f *FieldVector) Negate() *FieldVector + func (f *FieldVector) Plus(constant *ebigint.NBigInt) *FieldVector + func (f *FieldVector) Slice(begin, end int) *FieldVector + func (f *FieldVector) Subtract(other *FieldVector) *FieldVector + func (f *FieldVector) Sum() *ebigint.NBigInt + func (f *FieldVector) Times(constant *ebigint.NBigInt) *FieldVector + type FieldVectorPolynomial struct + func NewFieldVectorPolynomial(coefficients ...*FieldVector) *FieldVectorPolynomial + func (f *FieldVectorPolynomial) Evaluate(x *ebigint.NBigInt) *FieldVector + func (f *FieldVectorPolynomial) GetCoefficients() []*FieldVector + func (f *FieldVectorPolynomial) InnerProduct(other *FieldVectorPolynomial) []*ebigint.NBigInt + type GeneratorParams struct + func NewGeneratorParams(hi interface{}, gs, hs *GeneratorVector) *GeneratorParams + func (g *GeneratorParams) Commit(blinding *ebigint.NBigInt, gExp, hExp *FieldVector) Point + func (g GeneratorParams) GetG() Point + func (g GeneratorParams) GetGS() *GeneratorVector + func (g GeneratorParams) GetH() Point + func (g GeneratorParams) GetHS() *GeneratorVector + type GeneratorVector struct + func NewGeneratorVector(Innards []Point) *GeneratorVector + func (g *GeneratorVector) Add(other *GeneratorVector) *GeneratorVector + func (g *GeneratorVector) Commit(exponents *FieldVector) Point + func (g *GeneratorVector) Concat(other *GeneratorVector) *GeneratorVector + func (g *GeneratorVector) Extract(parity int) *GeneratorVector + func (g *GeneratorVector) GetVector() []Point + func (g *GeneratorVector) Hadamard(exponents *FieldVector) *GeneratorVector + func (g *GeneratorVector) Length() int + func (g *GeneratorVector) Negate() *GeneratorVector + func (g *GeneratorVector) Slice(begin, end int) *GeneratorVector + func (g *GeneratorVector) Sum() Point + func (g *GeneratorVector) Times(constant *ebigint.NBigInt) *GeneratorVector + type InnerProductProof struct + A *ebigint.NBigInt + B *ebigint.NBigInt + L []Point + R []Point + func (i *InnerProductProof) Serialize() string + type InnerProductProver struct + func (t InnerProductProver) GenerateProof(statement InnerProduct_statement, witness InnerProduct_witness, ...) *InnerProductProof + type InnerProduct_statement struct + P Point + PrimeBase *GeneratorParams + type InnerProduct_witness struct + L *FieldVector + R *FieldVector + type PList struct + func NewPList() *PList + func (p *PList) Append(d []*ebigint.NBigInt) + func (p *PList) Len() int + type PedersenCommitment struct + func NewPedersenCommitment(params GeneratorParams, coefficient *ebigint.NBigInt, b *ebigint.NBigInt) *PedersenCommitment + func (pc PedersenCommitment) Add(other *PedersenCommitment) *PedersenCommitment + func (pc PedersenCommitment) Commit() Point + func (pc PedersenCommitment) GetR() *ebigint.NBigInt + func (pc PedersenCommitment) GetX() *ebigint.NBigInt + func (pc PedersenCommitment) Times(exponent *ebigint.NBigInt) *PedersenCommitment + type Point struct + func GEpoch(epoch int) Point + func MapInto(seed string) Point + func NewPoint(d1, d2 *big.Int) Point + func U(epoch int, x *ebigint.NBigInt) Point + func (p Point) Add(o Point) Point + func (p Point) Equal(o Point) bool + func (p Point) Mul(o *ebigint.NBigInt) Point + func (p Point) Neg() Point + func (p Point) String() string + func (p Point) XY() (*big.Int, *big.Int) + type PolyCommitment struct + func NewPolyCommitment(params GeneratorParams, coefficients []*ebigint.NBigInt) *PolyCommitment + func (pc *PolyCommitment) Evaluate(x *ebigint.NBigInt) *PedersenCommitment + func (pc *PolyCommitment) GetCommitments() []Point + type Polynomial struct + func NewPolynomial(coefficients []*ebigint.NBigInt) *Polynomial + func (p *Polynomial) Mul(other *Polynomial) *Polynomial + type TransferStatement struct + C []types.Point + CLn []types.Point + CRn []types.Point + D types.Point + Epoch int + Y []types.Point + type TransferWitness struct + BDiff int + BTransfer int + Index []int + R string + SK string + type ZetherProof struct + A Point + B Point + BA Point + BS Point + CLnG []Point + CRnG []Point + C_0G []Point + C_XG []Point + DG []Point + func (z ZetherProof) Serialize() string + type ZetherProver struct + func NewZetherProver() ZetherProver + func (this ZetherProver) GenerateProof(istatement TransferStatement, iwitness TransferWitness) *ZetherProof + func (this ZetherProver) RecursivePolynomials(plist *PList, accum *Polynomial, a []*ebigint.NBigInt, b []*ebigint.NBigInt)