issuer

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: EUPL-1.2 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_CREDENTIAL_VERSION = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type IssueMessage

type IssueMessage struct {
	PrepareIssueMessage    *common.PrepareIssueMessage  `json:"prepareIssueMessage"`
	IssueCommitmentMessage *gabi.IssueCommitmentMessage `json:"issueCommitmentMessage"`
	CredentialsAttributes  []map[string]string          `json:"credentialsAttributes"`
	CredentialVersion      int                          `json:"credentialVersion"`
	KeyUsage               string                       `json:"keyUsage"`
}

type Issuer

type Issuer struct {
	Signer Signer
}

func New

func New(signer Signer) *Issuer

func (*Issuer) Issue

func (iss *Issuer) Issue(im *IssueMessage) ([]*common.CreateCredentialMessage, error)

func (*Issuer) IssueStatic added in v0.3.0

func (iss *Issuer) IssueStatic(sim *StaticIssueMessage) (proofPrefixed, proofIdentifier []byte, err error)

func (*Issuer) PrepareIssue

func (iss *Issuer) PrepareIssue(keyUsage string, credentialAmount int) (*common.PrepareIssueMessage, error)

type Signer

type Signer interface {
	PrepareSign(keyUsage string) (pkId string, issuerNonce *big.Int, err error)
	Sign(keyUsage string, credentialsAttributeList [][]*big.Int, proofUs []*big.Int, holderNonce *big.Int) (isms []*gabi.IssueSignatureMessage, err error)
	FindIssuerPkByUsage(keyUsage string) (pk *gabi.PublicKey, kid string, err error)
	GetPrimePool() gabipool.PrimePool
}

type StaticIssueMessage added in v0.3.0

type StaticIssueMessage struct {
	CredentialAttributes map[string]string `json:"credentialAttributes"`
	CredentialVersion    int               `json:"credentialVersion"`
	KeyUsage             string            `json:"keyUsage"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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