Documentation ¶
Index ¶
- Constants
- type Operation
- func (o *Operation) Add(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Close(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Connect(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) CreateKeyPair(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) CreateProfile(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Derive(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Get(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetAll(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetRESTHandlers() []rest.Handler
- func (o *Operation) Issue(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Open(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) PresentProof(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) ProfileExists(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) ProposeCredential(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) ProposePresentation(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Prove(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Query(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Remove(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) RequestCredential(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) ResolveCredentialManifest(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) UpdateProfile(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) Verify(rw http.ResponseWriter, req *http.Request)
Constants ¶
const ( OperationID = "/vcwallet" // command Paths. CreateProfilePath = OperationID + "/create-profile" UpdateProfilePath = OperationID + "/update-profile" ProfileExistsPath = OperationID + "/profile/{id}" OpenPath = OperationID + "/open" ClosePath = OperationID + "/close" AddPath = OperationID + "/add" RemovePath = OperationID + "/remove" GetPath = OperationID + "/get" GetAllPath = OperationID + "/getall" QueryPath = OperationID + "/query" IssuePath = OperationID + "/issue" ProvePath = OperationID + "/prove" VerifyPath = OperationID + "/verify" DerivePath = OperationID + "/derive" CreateKeyPairPath = OperationID + "/create-key-pair" ConnectPath = OperationID + "/connect" ProposePresentationPath = OperationID + "/propose-presentation" PresentProofPath = OperationID + "/present-proof" ProposeCredentialPath = OperationID + "/propose-credential" RequestCredentialPath = OperationID + "/request-credential" ResolveCredentialManifestPath = OperationID + "/resolve-credential-manifest" )
All command operations.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
Operation contains REST operations provided by verifiable credential wallet.
func (*Operation) Add ¶
func (o *Operation) Add(rw http.ResponseWriter, req *http.Request)
Add swagger:route POST /vcwallet/add vcwallet addContentReq
adds given data model to wallet content store.
Supported data models:
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Collection
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Credential
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#DIDResolutionResponse
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#meta-data
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#connection
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Key
Responses:
default: genericError 200: emptyRes
func (*Operation) Close ¶
func (o *Operation) Close(rw http.ResponseWriter, req *http.Request)
Close swagger:route POST /vcwallet/close vcwallet lockWalletReq
Expires token issued to this VC wallet, removes wallet's key manager instance and closes wallet content store.
returns response containing bool flag false if token is not found or already expired for this wallet user.
Responses:
default: genericError 200: lockWalletRes
func (*Operation) Connect ¶
func (o *Operation) Connect(rw http.ResponseWriter, req *http.Request)
Connect swagger:route POST /vcwallet/connect vcwallet connectReq
accepts out-of-band invitations and performs DID exchange.
Responses:
default: genericError 200: connectRes
func (*Operation) CreateKeyPair ¶
func (o *Operation) CreateKeyPair(rw http.ResponseWriter, req *http.Request)
CreateKeyPair swagger:route POST /vcwallet/create-key-pair vcwallet createKeyPairReq
creates a new key pair from wallet.
Responses:
default: genericError 200: createKeyPairRes
func (*Operation) CreateProfile ¶
func (o *Operation) CreateProfile(rw http.ResponseWriter, req *http.Request)
CreateProfile swagger:route POST /vcwallet/create-profile vcwallet createProfileReq
Creates new wallet profile and returns error if wallet profile is already created.
Responses:
default: genericError 200: emptyRes
func (*Operation) Derive ¶
func (o *Operation) Derive(rw http.ResponseWriter, req *http.Request)
Derive swagger:route POST /vcwallet/derive vcwallet deriveReq
derives a Verifiable Credential.
https://w3c-ccg.github.io/universal-wallet-interop-spec/#derive
Responses:
default: genericError 200: deriveRes
func (*Operation) Get ¶
func (o *Operation) Get(rw http.ResponseWriter, req *http.Request)
Get swagger:route POST /vcwallet/get vcwallet getContentReq
gets content from wallet content store.
Supported data models:
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Collection
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Credential
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#DIDResolutionResponse
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#meta-data
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#connection
Responses:
default: genericError 200: getContentRes
func (*Operation) GetAll ¶
func (o *Operation) GetAll(rw http.ResponseWriter, req *http.Request)
GetAll swagger:route POST /vcwallet/getall vcwallet getAllContentReq
gets all contents from wallet content store for given content type.
Supported data models:
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Collection
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Credential
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#DIDResolutionResponse
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#meta-data
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#connection
Responses:
default: genericError 200: getAllContentRes
func (*Operation) GetRESTHandlers ¶
GetRESTHandlers get all controller API handler available for this service.
func (*Operation) Issue ¶
func (o *Operation) Issue(rw http.ResponseWriter, req *http.Request)
Issue swagger:route POST /vcwallet/issue vcwallet issueReq
adds proof to a Verifiable Credential.
https://w3c-ccg.github.io/universal-wallet-interop-spec/#issue
Responses:
default: genericError 200: issueRes
func (*Operation) Open ¶
func (o *Operation) Open(rw http.ResponseWriter, req *http.Request)
Open swagger:route POST /vcwallet/open vcwallet unlockWalletReq
Unlocks given wallet's key manager instance & content store and returns a authorization token to be used for performing wallet operations.
Responses:
default: genericError 200: unlockWalletRes
func (*Operation) PresentProof ¶
func (o *Operation) PresentProof(rw http.ResponseWriter, req *http.Request)
PresentProof swagger:route POST /vcwallet/present-proof vcwallet presentProofReq
sends message present proof message from wallet to relying party. https://w3c-ccg.github.io/universal-wallet-interop-spec/#presentproof
Currently Supporting [0454-present-proof-v2](https://github.com/hyperledger/aries-rfcs/tree/master/features/0454-present-proof-v2)
Responses:
default: genericError 200: presentProofRes
func (*Operation) ProfileExists ¶
func (o *Operation) ProfileExists(rw http.ResponseWriter, req *http.Request)
ProfileExists swagger:route GET /vcwallet/profile/{id} vcwallet checkProfile
Checks if profile exists for given wallet user ID and returns error if profile doesn't exists.
Responses:
default: genericError 200: emptyRes
func (*Operation) ProposeCredential ¶ added in v0.1.8
func (o *Operation) ProposeCredential(rw http.ResponseWriter, req *http.Request)
ProposeCredential swagger:route POST /vcwallet/propose-credential vcwallet proposeCredReq
Sends propose credential message from wallet to issuer and optionally waits for offer credential response. https://w3c-ccg.github.io/universal-wallet-interop-spec/#proposecredential
Currently Supporting : 0453-issueCredentialV2 https://github.com/hyperledger/aries-rfcs/blob/main/features/0453-issue-credential-v2/README.md
Responses:
default: genericError 200: proposeCredRes
func (*Operation) ProposePresentation ¶
func (o *Operation) ProposePresentation(rw http.ResponseWriter, req *http.Request)
ProposePresentation swagger:route POST /vcwallet/propose-presentation vcwallet proposePresReq
accepts out-of-band invitation and sends message proposing presentation from wallet to relying party. https://w3c-ccg.github.io/universal-wallet-interop-spec/#proposepresentation
Currently Supporting [0454-present-proof-v2](https://github.com/hyperledger/aries-rfcs/tree/master/features/0454-present-proof-v2)
Responses:
default: genericError 200: proposePresRes
func (*Operation) Prove ¶
func (o *Operation) Prove(rw http.ResponseWriter, req *http.Request)
Prove swagger:route POST /vcwallet/prove vcwallet proveReq
produces a Verifiable Presentation.
https://w3c-ccg.github.io/universal-wallet-interop-spec/#prove
Responses:
default: genericError 200: proveRes
func (*Operation) Query ¶
func (o *Operation) Query(rw http.ResponseWriter, req *http.Request)
Query swagger:route POST /vcwallet/query vcwallet contentQueryReq
runs query against wallet credential contents and returns presentation containing credential results.
This function may return multiple presentations as a result based on combination of query types used.
https://w3c-ccg.github.io/universal-wallet-interop-spec/#query
Supported Query Types:
- https://www.w3.org/TR/json-ld11-framing
- https://identity.foundation/presentation-exchange
- https://w3c-ccg.github.io/vp-request-spec/#query-by-example
- https://w3c-ccg.github.io/vp-request-spec/#did-authentication-request
Responses:
default: genericError 200: contentQueryRes
func (*Operation) Remove ¶
func (o *Operation) Remove(rw http.ResponseWriter, req *http.Request)
Remove swagger:route POST /vcwallet/remove vcwallet removeContentReq
removes given content from wallet content store.
Supported data models:
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Collection
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#Credential
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#DIDResolutionResponse
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#meta-data
- https://w3c-ccg.github.io/universal-wallet-interop-spec/#connection
Responses:
default: genericError 200: emptyRes
func (*Operation) RequestCredential ¶ added in v0.1.8
func (o *Operation) RequestCredential(rw http.ResponseWriter, req *http.Request)
RequestCredential swagger:route POST /vcwallet/request-credential vcwallet requestCredReq
Sends request credential message from wallet to issuer and optionally waits for credential response. https://w3c-ccg.github.io/universal-wallet-interop-spec/#requestcredential
Currently Supporting : 0453-issueCredentialV2 https://github.com/hyperledger/aries-rfcs/blob/main/features/0453-issue-credential-v2/README.md
Responses:
default: genericError 200: requestCredRes
func (*Operation) ResolveCredentialManifest ¶ added in v0.1.8
func (o *Operation) ResolveCredentialManifest(rw http.ResponseWriter, req *http.Request)
ResolveCredentialManifest swagger:route POST /vcwallet/resolve-credential-manifest vcwallet resolveCredManifest
Resolves given credential manifest by credential response or credential. Supports: https://identity.foundation/credential-manifest/
Responses:
default: genericError 200: resolveCredManifest
func (*Operation) UpdateProfile ¶
func (o *Operation) UpdateProfile(rw http.ResponseWriter, req *http.Request)
UpdateProfile swagger:route POST /vcwallet/update-profile vcwallet UpdateProfileReq
Updates an existing wallet profile and returns error if profile doesn't exists.
Caution: - you might lose your existing keys if you change kms options. - you might lose your existing wallet contents if you change storage/EDV options (example: switching context storage provider or changing EDV settings).
Responses:
default: genericError 200: emptyRes
func (*Operation) Verify ¶
func (o *Operation) Verify(rw http.ResponseWriter, req *http.Request)
Verify swagger:route POST /vcwallet/verify vcwallet verifyReq
verifies a Verifiable Credential or a Verifiable Presentation.
https://w3c-ccg.github.io/universal-wallet-interop-spec/#prove
Responses:
default: genericError 200: verifyRes