zkp

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaymentProof

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

PaymentProof contains all of PoK for spending coin

func (*PaymentProof) Bytes

func (proof *PaymentProof) Bytes() []byte

func (PaymentProof) GetAggregatedRangeProof

func (paymentProof PaymentProof) GetAggregatedRangeProof() *aggregaterange.AggregatedRangeProof

func (PaymentProof) GetCommitmentIndices

func (paymentProof PaymentProof) GetCommitmentIndices() []uint64

func (PaymentProof) GetCommitmentInputSND

func (paymentProof PaymentProof) GetCommitmentInputSND() []*privacy.Point

func (PaymentProof) GetCommitmentInputSecretKey

func (paymentProof PaymentProof) GetCommitmentInputSecretKey() *privacy.Point

func (PaymentProof) GetCommitmentInputShardID

func (paymentProof PaymentProof) GetCommitmentInputShardID() *privacy.Point

func (PaymentProof) GetCommitmentInputValue

func (paymentProof PaymentProof) GetCommitmentInputValue() []*privacy.Point

func (PaymentProof) GetCommitmentOutputSND

func (paymentProof PaymentProof) GetCommitmentOutputSND() []*privacy.Point

func (PaymentProof) GetCommitmentOutputShardID

func (paymentProof PaymentProof) GetCommitmentOutputShardID() []*privacy.Point

func (PaymentProof) GetCommitmentOutputValue

func (paymentProof PaymentProof) GetCommitmentOutputValue() []*privacy.Point

func (PaymentProof) GetInputCoins

func (paymentProof PaymentProof) GetInputCoins() []*privacy.InputCoin

func (PaymentProof) GetOneOfManyProof

func (paymentProof PaymentProof) GetOneOfManyProof() []*oneoutofmany.OneOutOfManyProof

GET/SET function

func (PaymentProof) GetOutputCoins

func (paymentProof PaymentProof) GetOutputCoins() []*privacy.OutputCoin

func (PaymentProof) GetSerialNumberNoPrivacyProof

func (paymentProof PaymentProof) GetSerialNumberNoPrivacyProof() []*serialnumbernoprivacy.SNNoPrivacyProof

func (PaymentProof) GetSerialNumberProof

func (paymentProof PaymentProof) GetSerialNumberProof() []*serialnumberprivacy.SNPrivacyProof

func (*PaymentProof) Init

func (proof *PaymentProof) Init()

Init

func (PaymentProof) MarshalJSON

func (proof PaymentProof) MarshalJSON() ([]byte, error)

MarshalJSON - override function

func (*PaymentProof) SetAggregatedRangeProof

func (paymentProof *PaymentProof) SetAggregatedRangeProof(p *aggregaterange.AggregatedRangeProof)

func (*PaymentProof) SetBytes

func (proof *PaymentProof) SetBytes(proofbytes []byte) *privacy.PrivacyError

func (*PaymentProof) SetInputCoins

func (paymentProof *PaymentProof) SetInputCoins(v []*privacy.InputCoin)

func (*PaymentProof) SetOneOfManyProof

func (paymentProof *PaymentProof) SetOneOfManyProof(p []*oneoutofmany.OneOutOfManyProof)

func (*PaymentProof) SetOutputCoins

func (paymentProof *PaymentProof) SetOutputCoins(v []*privacy.OutputCoin)

func (*PaymentProof) SetSerialNumberNoPrivacyProof

func (paymentProof *PaymentProof) SetSerialNumberNoPrivacyProof(p []*serialnumbernoprivacy.SNNoPrivacyProof)

func (*PaymentProof) SetSerialNumberProof

func (paymentProof *PaymentProof) SetSerialNumberProof(p []*serialnumberprivacy.SNPrivacyProof)

func (*PaymentProof) UnmarshalJSON

func (proof *PaymentProof) UnmarshalJSON(data []byte) error

UnmarshalJSON - override function

type PaymentWitness

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

PaymentWitness contains all of witness for proving when spending coins

func (PaymentWitness) GetRandSecretKey

func (paymentWitness PaymentWitness) GetRandSecretKey() *privacy.Scalar

func (*PaymentWitness) Init

func (wit *PaymentWitness) Init(PaymentWitnessParam PaymentWitnessParam) *privacy.PrivacyError

Build prepares witnesses for all protocol need to be proved when create tx if hashPrivacy = false, witness includes spending key, input coins, output coins otherwise, witness includes all attributes in PaymentWitness struct

func (*PaymentWitness) Prove

func (wit *PaymentWitness) Prove(hasPrivacy bool) (*PaymentProof, *privacy.PrivacyError)

Prove creates big proof

type PaymentWitnessParam

type PaymentWitnessParam struct {
	HasPrivacy              bool
	PrivateKey              *privacy.Scalar
	InputCoins              []*privacy.InputCoin
	OutputCoins             []*privacy.OutputCoin
	PublicKeyLastByteSender byte
	Commitments             []*privacy.Point
	CommitmentIndices       []uint64
	MyCommitmentIndices     []uint64
	Fee                     uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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