issuer

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainOwnershipActionType = "DomainOwnership"
	GroupRoleActionType       = "GroupRole"
)

Variables

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

Functions

This section is empty.

Types

type CreateIdentityRequest

type CreateIdentityRequest struct {
	DidMetadata DidMetadata `json:"didMetadata"`
}

func NewDefaultBJJIdentity

func NewDefaultBJJIdentity() CreateIdentityRequest

type CreateIdentityResponse

type CreateIdentityResponse struct {
	Identifier string `json:"identifier"`
	State      State  `json:"state"`
	Address    string `json:"address"`
}

type DidMetadata

type DidMetadata struct {
	Method     string `json:"method"`
	Blockchain string `json:"blockchain"`
	Network    string `json:"network"`
	Type       string `json:"type"`
}

type DomainOwnershipCredentialSubject

type DomainOwnershipCredentialSubject struct {
	IdentityDID string `json:"id"`
	Domain      string `json:"domain"`
}

type GetClaimStateStatusResponse

type GetClaimStateStatusResponse struct {
	Status string `json:"status"`
}

type GroupRoleCredentialSubject

type GroupRoleCredentialSubject struct {
	IdentityDID   string `json:"id"`
	GroupID       string `json:"groupID,omitempty"`
	Role          int    `json:"role"`
	GroupRoleHash string `json:"groupRoleHash"`
}

type Issuer

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

func New

func New(log *logan.Entry, config config.IssuerConfig, storage data.Storage) *Issuer

func (*Issuer) CreateIdentity

func (is *Issuer) CreateIdentity(request CreateIdentityRequest) (CreateIdentityResponse, error)

func (*Issuer) GetClaimStatus

func (is *Issuer) GetClaimStatus(issuerDID, claimID string) (string, error)

func (*Issuer) IssueClaim

func (is *Issuer) IssueClaim(issuerDid string, credentialRequest resources.CredentialRequest) (string, error)

type State

type State struct {
	StateID            int64     `json:"stateID"`
	Identifier         string    `json:"identifier"`
	State              string    `json:"state"`
	RootOfRoots        string    `json:"rootOfRoots"`
	ClaimsTreeRoot     string    `json:"claimsTreeRoot"`
	RevocationTreeRoot string    `json:"revocationTreeRoot"`
	BlockTimestamp     int       `json:"blockTimestamp"`
	BlockNumber        int       `json:"blockNumber"`
	TxID               string    `json:"txID"`
	PreviousState      string    `json:"previousState"`
	Status             string    `json:"status"`
	ModifiedAt         time.Time `json:"modifiedAt"`
	CreatedAt          time.Time `json:"createdAt"`
}

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