issuer

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpectedStatusCode = errors.New("unexpected status code")
)

Functions

This section is empty.

Types

type CredentialRequest

type CredentialRequest struct {
	CredentialSchema  string            `json:"credentialSchema"`
	Type              string            `json:"type"`
	CredentialSubject CredentialSubject `json:"credentialSubject"`
	Expiration        *time.Time        `json:"expiration,omitempty"`
	MtProof           bool              `json:"mtProof"`
	SignatureProof    bool              `json:"signatureProof"`
}

type CredentialSubject

type CredentialSubject struct {
	ID                string `json:"id"`
	IsAdult           bool   `json:"isAdult"`
	IssuingAuthority  int64  `json:"issuingAuthority"`
	DocumentNullifier string `json:"documentNullifier"`
	CredentialHash    string `json:"credentialHash"`
}

type GetCredentialResponse added in v0.3.4

type GetCredentialResponse struct {
	Id                    string          `json:"id"`
	ProofTypes            []string        `json:"proofTypes"`
	CreatedAt             time.Time       `json:"createdAt"`
	ExpiresAt             time.Time       `json:"expiresAt"`
	Expired               bool            `json:"expired"`
	SchemaHash            string          `json:"schemaHash"`
	SchemaType            string          `json:"schemaType"`
	SchemaUrl             string          `json:"schemaUrl"`
	Revoked               bool            `json:"revoked"`
	RevNonce              int64           `json:"revNonce"`
	CredentialSubject     json.RawMessage `json:"credentialSubject"`
	UserID                string          `json:"userID"`
	SchemaTypeDescription string          `json:"schemaTypeDescription"`
}

type Issuer

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

func New

func New(log *logan.Entry, config *config.IssuerConfig, login, password string) *Issuer

func (*Issuer) DID added in v0.3.4

func (is *Issuer) DID() string

func (*Issuer) GetCredential added in v0.3.4

func (is *Issuer) GetCredential(claimID uuid.UUID) (GetCredentialResponse, error)

func (*Issuer) IssueVotingClaim added in v0.3.4

func (is *Issuer) IssueVotingClaim(
	id string, issuingAuthority int64, isAdult bool, expiration *time.Time, dg2 []byte, blinder *big.Int,
) (string, error)

func (*Issuer) RevokeClaim added in v0.3.4

func (is *Issuer) RevokeClaim(revocationNonce int64) error

type UUIDResponse

type UUIDResponse struct {
	Id string `json:"id"`
}

Jump to

Keyboard shortcuts

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