node

package
v0.0.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGenerator

type IDGenerator interface {
	GenerateFromProof(
		ctx context.Context,
		proof *vctypes.Proof,
	) (string, *issuertypes.Issuer, error)
}

func NewIDGenerator

func NewIDGenerator(oidcParser oidc.Parser, issuerRepository issuercore.Repository) IDGenerator

type IdService

type IdService interface {
	Generate(
		ctx context.Context,
		issuer *issuertypes.Issuer,
		proof *vctypes.Proof,
	) (*idtypes.ResolverMetadata, error)
	Resolve(
		ctx context.Context,
		id string,
	) (*idtypes.ResolverMetadata, error)
}

func NewIdService

func NewIdService(
	verificationService core.VerificationService,
	idRepository idcore.IdRepository,
	issuerRepository issuercore.Repository,
	idGenerator IDGenerator,
) IdService

type IssuerService

type IssuerService interface {
	// Register a new Issuer
	// In case of external IdPs provide a proof of ownership
	Register(ctx context.Context, issuer *issuertypes.Issuer, proof *vctypes.Proof) (*string, error)

	// Find the issuer by common name
	// Return the public keys of the Issuer
	GetJwks(ctx context.Context, commonName string) (*idtypes.Jwks, error)
}

The IssuerService interface defines the Node methods for Issuers

func NewIssuerService

func NewIssuerService(
	issuerRepository issuercore.Repository,
	verficationService core.VerificationService,
) IssuerService

NewIssuerService creates a new instance of the IssuerService

type VerifiableCredentialService

type VerifiableCredentialService interface {
	Publish(
		ctx context.Context,
		credential *vctypes.EnvelopedCredential,
		proof *vctypes.Proof,
	) error

	// Find the vcs by resolver metadata ID
	GetVcs(
		ctx context.Context,
		resolverMetadataID string,
	) ([]*vctypes.EnvelopedCredential, error)
}

func NewVerifiableCredentialService

func NewVerifiableCredentialService(
	verificationService core.VerificationService,
	idRepository idcore.IdRepository,
	issuerRepository issuercore.Repository,
	vcRepository vccore.Repository,
	idGenerator IDGenerator,
) VerifiableCredentialService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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