Add a new method registerApp(did: string, ownerName: string, appName: string, metadata: string[]). This registers an application as being owned by a given did and associates a domain name with it.
For example; Register the Verida: Vault application context to be controlled by a Verida did with metadata:
The registerApp() request must be signed by the owner did. Throws invalid request signature.
A did can register multiple applications, but all applications they register must have the same ownerName. Throws did is associated with a different owner.
The combination of ownerName and appName must be unique. Throws application already exists error.
Both ownerName and appName must only contain alphanumeric characters (including spaces). Throws invalid owner or application name error.
metadata.domain is required, throws domain is required error
metadata.domain must be all lower-case and match the valid characters for a domain name. Throws invalid domain format error.
The did must provide $APP_FEE VDA tokens as a fee for registering an application. These tokens can be withdrawn by the smart contract owner. Throws insufficient tokens provided error.
metadata is an array of key / value pairs
Add a new method getApp(ownerName: string, appName: string). This returns the did and metadata.
Requirements:
If the combination of ownerName and appName is not found, throws application not found error.
Add a new method deregisterApp(did: string, ownerName: string, appName: string). This de-registers an application.
Requirements:
The deregisterApp() request must be signed by the owner did. Throws invalid request signature
If the combination of ownerName and appName is not found, throws application not found error.
Add a new method updateApp(did: string, ownerName: string, appName: string, domain: string, metadata: string). This updates the metadata for a registered application.
Requirements:
-The updateApp() request must be signed by the owner did. Throws invalid request signature
The same verification rules apply as registerApp().
Add a new method
registerApp(did: string, ownerName: string, appName: string, metadata: string[])
. This registers an application as being owned by a given did and associates a domain name with it.For example; Register the Verida: Vault application context to be controlled by a Verida did with metadata:
Requirements:
registerApp()
request must be signed by the owner did. Throws invalid request signature.did
can register multiple applications, but all applications they register must have the sameownerName
. Throwsdid
is associated with a different owner.ownerName
andappName
must be unique. Throws application already exists error.ownerName
andappName
must only contain alphanumeric characters (including spaces). Throws invalid owner or application name error.metadata.domain
is required, throws domain is required errormetadata.domain
must be all lower-case and match the valid characters for a domain name. Throws invalid domain format error.did
must provide$APP_FEE
VDA tokens as a fee for registering an application. These tokens can be withdrawn by the smart contract owner. Throws insufficient tokens provided error.metadata
is an array of key / value pairsAdd a new method
getApp(ownerName: string, appName: string)
. This returns thedid
andmetadata
.Requirements:
ownerName
andappName
is not found, throws application not found error.Add a new method
deregisterApp(did: string, ownerName: string, appName: string)
. This de-registers an application.Requirements:
deregisterApp()
request must be signed by the owner did. Throws invalid request signatureownerName
andappNam
e is not found, throws application not found error.Add a new method
updateApp(did: string, ownerName: string, appName: string, domain: string, metadata: string)
. This updates the metadata for a registered application.Requirements:
-The
updateApp()
request must be signed by the owner did. Throws invalid request signatureregisterApp()
.