merkletree

package
v0.0.0-...-cda998f Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler handles incoming requests for merkletree service

func NewHandler

func NewHandler(service *Service) *Handler

NewHandler returns a new handler

func (*Handler) AddHandler

func (h *Handler) AddHandler(w http.ResponseWriter, r *http.Request)

AddHandler handlers requests to add items to the tree

func (*Handler) GetProofHandler

func (h *Handler) GetProofHandler(w http.ResponseWriter, r *http.Request)

GetProofHandler returns a proof for a given credential

func (*Handler) RevokeHandler

func (h *Handler) RevokeHandler(w http.ResponseWriter, r *http.Request)

RevokeHandler handles requests to revoke a claim

type Service

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

Service is a service for registering JWT claims

func NewService

func NewService(didJWTService *didjwt.Service,
	claimService *claims.Service) *Service

NewService creates a new instance of the service

func (*Service) AddEntry

func (s *Service) AddEntry(tokenString string, sender string) (string, error)

AddEntry adds a new jwt claim to it's issuers tree

func (*Service) GenerateProof

func (s *Service) GenerateProof(tokenString string) (*claims.MTProof, error)

GenerateProof creates a proof from a jwt

func (*Service) RevokeEntry

func (s *Service) RevokeEntry(tokenString string) error

RevokeEntry takes a token and revokes it in the merkle tree

Jump to

Keyboard shortcuts

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