Documentation
      ¶
    
    
  
    
  
    Index ¶
- type Auditor
 - func (a *Auditor) Check(ctx context.Context, tokenRequest *driver.TokenRequest, ...) error
 - func (a *Auditor) CheckIssueRequests(outputsFromIssue [][]*InspectableToken, txID driver.TokenRequestAnchor) error
 - func (a *Auditor) CheckTransferRequests(inputs [][]*InspectableToken, outputsFromTransfer [][]*InspectableToken, ...) error
 - func (a *Auditor) Endorse(tokenRequest *driver.TokenRequest, txID string) ([]byte, error)
 - func (a *Auditor) GetAuditInfoForIssues(issues [][]byte, issueMetadata []*driver.IssueMetadata) ([][]*InspectableToken, []InspectableIdentity, error)
 - func (a *Auditor) GetAuditInfoForTransfers(transfers [][]byte, metadata []*driver.TransferMetadata, ...) ([][]*InspectableToken, [][]*InspectableToken, error)
 - func (a *Auditor) InspectIdentity(matcher InfoMatcher, identity *InspectableIdentity, index int) error
 - func (a *Auditor) InspectInputs(inputs []*InspectableToken) error
 - func (a *Auditor) InspectOutput(output *InspectableToken, index int) error
 - func (a *Auditor) InspectOutputs(tokens []*InspectableToken) error
 
- type InfoMatcher
 - type InspectableData
 - type InspectableIdentity
 - type InspectableToken
 - type OwnerOpening
 - type SigningIdentity
 - type TokenDataOpening
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auditor ¶
type Auditor struct {
	Logger logging.Logger
	Tracer trace.Tracer
	// Owner Identity InfoMatcher
	InfoMatcher InfoMatcher
	// Auditor's signing identity
	Signer SigningIdentity
	// Pedersen generators used to compute TokenData
	PedersenParams []*math.G1
	// Elliptic curve
	Curve *math.Curve
}
    Auditor inspects zkat tokens and their owners.
func NewAuditor ¶
func (*Auditor) Check ¶
func (a *Auditor) Check( ctx context.Context, tokenRequest *driver.TokenRequest, tokenRequestMetadata *driver.TokenRequestMetadata, inputTokens [][]*token.Token, txID driver.TokenRequestAnchor, ) error
Check validates TokenRequest against TokenRequestMetadata
func (*Auditor) CheckIssueRequests ¶
func (a *Auditor) CheckIssueRequests(outputsFromIssue [][]*InspectableToken, txID driver.TokenRequestAnchor) error
CheckIssueRequests verifies that the commitments in issue outputs match the information provided in the clear.
func (*Auditor) CheckTransferRequests ¶
func (a *Auditor) CheckTransferRequests(inputs [][]*InspectableToken, outputsFromTransfer [][]*InspectableToken, txID driver.TokenRequestAnchor) error
CheckTransferRequests verifies that the commitments in transfer inputs and outputs match the information provided in the clear.
func (*Auditor) GetAuditInfoForIssues ¶
func (a *Auditor) GetAuditInfoForIssues(issues [][]byte, issueMetadata []*driver.IssueMetadata) ([][]*InspectableToken, []InspectableIdentity, error)
GetAuditInfoForIssues returns an array of InspectableToken for each issue action It takes a deserializer, an array of serialized issue actions and an array of issue metadata.
func (*Auditor) GetAuditInfoForTransfers ¶
func (a *Auditor) GetAuditInfoForTransfers(transfers [][]byte, metadata []*driver.TransferMetadata, inputs [][]*token.Token) ([][]*InspectableToken, [][]*InspectableToken, error)
GetAuditInfoForTransfers returns an array of InspectableToken for each transfer action. It takes a deserializer, an array of serialized transfer actions and an array of transfer metadata.
func (*Auditor) InspectIdentity ¶
func (a *Auditor) InspectIdentity(matcher InfoMatcher, identity *InspectableIdentity, index int) error
InspectIdentity verifies that the audit info matches the token owner
func (*Auditor) InspectInputs ¶
func (a *Auditor) InspectInputs(inputs []*InspectableToken) error
InspectInputs verifies that the commitment in an array of inputs matches the information provided in the clear.
func (*Auditor) InspectOutput ¶
func (a *Auditor) InspectOutput(output *InspectableToken, index int) error
InspectOutput verifies that the commitments in an output token of a given index match the information provided in the clear.
func (*Auditor) InspectOutputs ¶
func (a *Auditor) InspectOutputs(tokens []*InspectableToken) error
InspectOutputs verifies that the commitments in an array of outputs matches the information provided in the clear.
type InfoMatcher ¶
InfoMatcher deserialize audit information
type InspectableData ¶
type InspectableIdentity ¶
type InspectableToken ¶
type InspectableToken struct {
	Identity InspectableIdentity
	Data     InspectableData
}
    InspectableToken contains a zkat token and the information that allows an auditor to learn its content.
type OwnerOpening ¶
type OwnerOpening struct {
	OwnerInfo []byte
}
    OwnerOpening contains the information that allows the auditor to identify the owner.
type SigningIdentity ¶
type SigningIdentity interface {
	driver.SigningIdentity
}
    SigningIdentity models a signing identity