Documentation ¶
Index ¶
- Variables
- func BuildCoreClaim(schemaSuite jsonSuite.Schema, schemaBytes []byte, vc verifiable.W3CCredential, ...) (*core.Claim, error)
- func CreateW3CCredential(schema jsonSuite.Schema, issuer string, req CredentialRequest, chainID int) (verifiable.W3CCredential, error)
- func RandInt64() (uint64, error)
- func StateVerificationHandler(ethStateContracts map[string]*abi.State) packers.VerificationHandlerFunc
- type CredentialRequest
- type OnChain
- func (oc *OnChain) CreateClaimOnChain(ctx context.Context, issuer string, credentialReq CredentialRequest) (string, error)
- func (oc *OnChain) GetUserVCByID(ctx context.Context, issuer string, credentialID string) (verifiable.W3CCredential, error)
- func (oc *OnChain) GetUsersVCs(ctx context.Context, issuer string, subject string, schemaType string) ([]verifiable.W3CCredential, error)
- func (oc *OnChain) IsRevokedVC(ctx context.Context, issuer string, nonce uint64) (bool, error)
- func (oc *OnChain) RevokeVC(ctx context.Context, issuer string, nonce uint64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJSONLDURLNotFound = errors.New("jsonLdContext not found in schema metadata")
Functions ¶
func BuildCoreClaim ¶
func BuildCoreClaim( schemaSuite jsonSuite.Schema, schemaBytes []byte, vc verifiable.W3CCredential, credentialReq CredentialRequest, revocationNonce uint64, version uint32, ) (*core.Claim, error)
func CreateW3CCredential ¶
func CreateW3CCredential( schema jsonSuite.Schema, issuer string, req CredentialRequest, chainID int, ) (verifiable.W3CCredential, error)
func StateVerificationHandler ¶
func StateVerificationHandler( ethStateContracts map[string]*abi.State, ) packers.VerificationHandlerFunc
Types ¶
type CredentialRequest ¶
type CredentialRequest struct { CredentialSchema string `json:"credentialSchema"` Type string `json:"type"` CredentialSubject json.RawMessage `json:"credentialSubject"` Expiration int64 `json:"expiration,omitempty"` Version uint32 `json:"version,omitempty"` RevNonce *uint64 `json:"revNonce,omitempty"` SubjectPosition string `json:"subjectPosition,omitempty"` MerklizedRootPosition string `json:"merklizedRootPosition,omitempty"` }
type OnChain ¶
type OnChain struct {
CredentialRepository *repository.CredentialRepository
}
func (*OnChain) CreateClaimOnChain ¶
func (oc *OnChain) CreateClaimOnChain( ctx context.Context, issuer string, credentialReq CredentialRequest, ) (string, error)
CreateClaimOnChain create onchain vc to issuer
func (*OnChain) GetUserVCByID ¶
func (oc *OnChain) GetUserVCByID( ctx context.Context, issuer string, credentialID string, ) (verifiable.W3CCredential, error)
func (*OnChain) GetUsersVCs ¶
func (oc *OnChain) GetUsersVCs( ctx context.Context, issuer string, subject string, schemaType string, ) ([]verifiable.W3CCredential, error)
func (*OnChain) IsRevokedVC ¶
Click to show internal directories.
Click to hide internal directories.