Versions in this module Expand all Collapse all v1 v1.0.1 Dec 31, 2020 v1.0.0 Dec 24, 2020 Changes in this version + const AESKeySize + const CStringBulletProof + const CStringBurnAddress + const CalInnerProductErr + const CommitNewOutputCoinNoPrivacyErr + const CommitmentRingSize + const CommitmentRingSizeExp + const ConvertMultiSigToBytesErr + const DecompressTransmissionKeyErr + const DecryptOutputCoinErr + const Ed25519KeySize + const EncryptOutputCoinErr + const FixedRandomnessString + const InvalidInputToSetBytesErr + const InvalidLengthMultiSigErr + const InvalidMultiSigErr + const InvalidOutputValue + const MarshalPaymentProofErr + const MaxSizeInfoCoin + const PedersenPrivateKeyIndex + const PedersenRandomnessIndex + const PedersenShardIDIndex + const PedersenSndIndex + const PedersenValueIndex + const ProveAggregatedRangeErr + const ProveOneOutOfManyErr + const ProveSerialNumberNoPrivacyErr + const ProveSerialNumberPrivacyErr + const SetBytesProofErr + const SignMultiSigErr + const UnexpectedErr + const UnmarshalPaymentProofErr + const VerifyAggregatedProofFailedErr + const VerifyAmountNoPrivacyFailedErr + const VerifyAmountPrivacyFailedErr + const VerifyCoinCommitmentInputFailedErr + const VerifyCoinCommitmentOutputFailedErr + const VerifyOneOutOfManyProofFailedErr + const VerifySerialNumberNoPrivacyProofFailedErr + const VerifySerialNumberPrivacyProofFailedErr + var ErrCodeMessage = map[int]struct{ ... } + var FixedRandomnessShardID = new(Scalar).FromBytesS([]byte{ ... }) + var LInt = new(big.Int).SetBytes([]byte{ ... }) + var PedCom = newPedersenParams() + func ArrayToSlice(array [Ed25519KeySize]byte) []byte + func CheckDuplicateScalarArray(arr []*Scalar) bool + func Compare(sca, scb *Scalar) int + func ConvertIntToBinary(inum int, n int) []byte + func ConvertScalarArrayToBigIntArray(scalarArr []*Scalar) []*big.Int + func HybridDecrypt(ciphertext *HybridCipherText, privateKey *Scalar) (msg []byte, err error) + func IsPointEqual(pa *Point, pb *Point) bool + func IsScalarEqual(sc1, sc2 *Scalar) bool + func RandBytes(length int) []byte + func Reverse(x C25519.Key) (result C25519.Key) + func ScalarToBigInt(sc *Scalar) *big.Int + func SliceToArray(slice []byte) [Ed25519KeySize]byte + type Coin struct + func (coin *Coin) Bytes() []byte + func (coin *Coin) CommitAll() error + func (coin *Coin) GetPubKeyLastByte() byte + func (coin *Coin) HashH() *common.Hash + func (coin *Coin) Init() *Coin + func (coin *Coin) SetBytes(coinBytes []byte) error + func (coin *Coin) SetCoinCommitment(v *Point) + func (coin *Coin) SetInfo(v []byte) + func (coin *Coin) SetPublicKey(v *Point) + func (coin *Coin) SetRandomness(v *Scalar) + func (coin *Coin) SetSNDerivator(v *Scalar) + func (coin *Coin) SetSerialNumber(v *Point) + func (coin *Coin) SetValue(v uint64) + func (coin *Coin) UnmarshalJSON(data []byte) error + func (coin Coin) GetCoinCommitment() *Point + func (coin Coin) GetInfo() []byte + func (coin Coin) GetPublicKey() *Point + func (coin Coin) GetRandomness() *Scalar + func (coin Coin) GetSNDerivator() *Scalar + func (coin Coin) GetSerialNumber() *Point + func (coin Coin) GetValue() uint64 + func (coin Coin) MarshalJSON() ([]byte, error) + type CoinObject struct + CoinCommitment string + Info string + PublicKey string + Randomness string + SNDerivator string + SerialNumber string + Value string + type HybridCipherText struct + func HybridEncrypt(msg []byte, publicKey *Point) (ciphertext *HybridCipherText, err error) + func (ciphertext *HybridCipherText) SetBytes(bytes []byte) error + func (ciphertext HybridCipherText) Bytes() []byte + func (ciphertext HybridCipherText) GetMsgEncrypted() []byte + func (ciphertext HybridCipherText) GetSymKeyEncrypted() []byte + func (ciphertext HybridCipherText) IsNil() bool + func (hybridCipherText *HybridCipherText) UnmarshalJSON(data []byte) error + func (hybridCipherText HybridCipherText) MarshalJSON() ([]byte, error) + type InputCoin struct + CoinDetails *Coin + func (inputCoin *InputCoin) Bytes() []byte + func (inputCoin *InputCoin) Init() *InputCoin + func (inputCoin *InputCoin) ParseCoinObjectToInputCoin(coinObj CoinObject) error + func (inputCoin *InputCoin) SetBytes(bytes []byte) error + type OutputCoin struct + CoinDetails *Coin + CoinDetailsEncrypted *HybridCipherText + func (outputCoin *OutputCoin) Bytes() []byte + func (outputCoin *OutputCoin) Decrypt(viewingKey ViewingKey) *PrivacyError + func (outputCoin *OutputCoin) Encrypt(recipientTK TransmissionKey) *PrivacyError + func (outputCoin *OutputCoin) Init() *OutputCoin + func (outputCoin *OutputCoin) SetBytes(bytes []byte) error + type PaymentAddress struct + Pk PublicKey + Tk TransmissionKey + func GeneratePaymentAddress(privateKey []byte) PaymentAddress + func (addr *PaymentAddress) Bytes() []byte + func (addr *PaymentAddress) SetBytes(bytes []byte) *PaymentAddress + func (addr PaymentAddress) String() string + type PaymentInfo struct + Amount uint64 + Message []byte + PaymentAddress PaymentAddress + type PedersenCommitment struct + G []*Point + func (com PedersenCommitment) CommitAtIndex(value, rand *Scalar, index byte) *Point + type Point struct + var GBase *Point + var HBase *Point + func HashToPoint(b []byte) *Point + func HashToPointFromIndex(index int64, padStr string) *Point + func RandomPoint() *Point + func (p *Point) Add(pa, pb *Point) *Point + func (p *Point) AddPedersen(a *Scalar, A *Point, b *Scalar, B *Point) *Point + func (p *Point) AddPedersenCached(a *Scalar, APreCompute [8]C25519.CachedGroupElement, b *Scalar, ...) *Point + func (p *Point) Derive(pa *Point, a *Scalar, b *Scalar) *Point + func (p *Point) FromBytes(b [Ed25519KeySize]byte) (*Point, error) + func (p *Point) FromBytesS(b []byte) (*Point, error) + func (p *Point) Identity() *Point + func (p *Point) InvertScalarMult(pa *Point, a *Scalar) *Point + func (p *Point) InvertScalarMultBase(a *Scalar) *Point + func (p *Point) MultiScalarMult(scalarLs []*Scalar, pointLs []*Point) *Point + func (p *Point) MultiScalarMultCached(scalarLs []*Scalar, pointPreComputedLs [][8]C25519.CachedGroupElement) *Point + func (p *Point) ScalarMult(pa *Point, a *Scalar) *Point + func (p *Point) ScalarMultBase(a *Scalar) *Point + func (p *Point) Set(q *Point) *Point + func (p *Point) SetKey(a *C25519.Key) (*Point, error) + func (p *Point) Sub(pa, pb *Point) *Point + func (p *Point) UnmarshalText(data []byte) (*Point, error) + func (p Point) GetKey() C25519.Key + func (p Point) IsIdentity() bool + func (p Point) MarshalText() []byte + func (p Point) PointValid() bool + func (p Point) ToBytes() [Ed25519KeySize]byte + func (p Point) ToBytesS() []byte + type Poly []*big.Int + func (p Poly) GetDegree() int + func (p Poly) Mul(q Poly, m *big.Int) Poly + func (p Poly) String() (s string) + func (p Poly) Sub(q Poly, m *big.Int) Poly + type PrivacyError struct + Code int + Message string + func NewPrivacyErr(key int, err error) *PrivacyError + func (e PrivacyError) Error() string + func (e PrivacyError) GetCode() int + type PrivateKey []byte + func GeneratePrivateKey(seed []byte) PrivateKey + type PublicKey []byte + func GeneratePublicKey(privateKey []byte) PublicKey + type ReceivingKey []byte + func GenerateReceivingKey(privateKey []byte) ReceivingKey + type Scalar struct + func BigIntToScalar(bi *big.Int) *Scalar + func ConvertUint64ToBinary(number uint64, n int) []*Scalar + func HashToScalar(data []byte) *Scalar + func RandomScalar() *Scalar + func (sc *Scalar) Add(a, b *Scalar) *Scalar + func (sc *Scalar) Exp(a *Scalar, v uint64) *Scalar + func (sc *Scalar) FromBytes(b [Ed25519KeySize]byte) *Scalar + func (sc *Scalar) FromBytesS(b []byte) *Scalar + func (sc *Scalar) FromUint64(i uint64) *Scalar + func (sc *Scalar) Invert(a *Scalar) *Scalar + func (sc *Scalar) IsOne() bool + func (sc *Scalar) IsZero() bool + func (sc *Scalar) Mul(a, b *Scalar) *Scalar + func (sc *Scalar) MulAdd(a, b, c *Scalar) *Scalar + func (sc *Scalar) ScalarValid() bool + func (sc *Scalar) Set(a *Scalar) *Scalar + func (sc *Scalar) SetKey(a *C25519.Key) (*Scalar, error) + func (sc *Scalar) Sub(a, b *Scalar) *Scalar + func (sc *Scalar) ToUint64() uint64 + func (sc *Scalar) UnmarshalText(data []byte) (*Scalar, error) + func (sc Scalar) GetKey() C25519.Key + func (sc Scalar) MarshalText() []byte + func (sc Scalar) String() string + func (sc Scalar) ToBytes() [Ed25519KeySize]byte + func (sc Scalar) ToBytesS() []byte + type SchnSignature struct + func (sig *SchnSignature) SetBytes(bytes []byte) error + func (sig SchnSignature) Bytes() []byte + type SchnorrPrivateKey struct + func (privateKey *SchnorrPrivateKey) Set(sk *Scalar, r *Scalar) + func (privateKey SchnorrPrivateKey) Sign(data []byte) (*SchnSignature, error) + func (schnPrivKey SchnorrPrivateKey) GetPublicKey() *SchnorrPublicKey + type SchnorrPublicKey struct + func (publicKey *SchnorrPublicKey) Set(pk *Point) + func (publicKey SchnorrPublicKey) Verify(signature *SchnSignature, data []byte) bool + func (schnorrPubKey SchnorrPublicKey) GetPublicKey() *Point + type TransmissionKey []byte + func GenerateTransmissionKey(receivingKey []byte) TransmissionKey + type ViewingKey struct + Pk PublicKey + Rk ReceivingKey + func GenerateViewingKey(privateKey []byte) ViewingKey