Function name |
createCredential(CreateCredential createCredential) |
Description |
The attribute values defined in the credential template are provided by the issuer for the DID user to obtain on the front page. The issuer issues the credentials for the DID user through this interface. If there are more Claim parameters than defined in the credential template, the server side will discard them. |
Request Parameters |
No. |
Parameter |
Type |
Required |
Description |
1 |
|
CreateCredential |
Y |
|
CreateCredential |
1 |
cptId |
Long |
Y |
Credential template ID |
2 |
issuerDid |
String |
Y |
DID of the credential template issuer |
3 |
userDid |
String |
Y |
DID of the user who created the credentials |
4 |
expirationDate |
String |
Y |
Credential expiration date. Should be greater than today. In the form of yyyy-mm-dd |
5 |
claim |
Map<String, Object> |
Y |
Content of the credential. The claim data needs to correspond to the format of the credential template |
6 |
type |
String |
Y |
Credential type, input Proof |
7 |
privateKey |
String |
Y |
Private key |
8 |
shortDesc |
String |
N |
Brief description of the credential. The default value is the credential template title |
9 |
longDesc |
String |
N |
Detailed description of the credential |
Response Parameters |
No. |
Parameter |
Type |
Required |
Description |
1 |
|
CredentialWrapper |
Y |
Creation result, Credential information |
CredentialWrapper |
No. |
Parameter |
Type |
Required |
Description |
1 |
context |
String |
Y |
Version |
2 |
id |
String |
Y |
Credential ID |
3 |
type |
String |
Y |
Credential type, Proof |
4 |
cptId |
Long |
Y |
Credential template Id |
5 |
issuerDid |
String |
Y |
DID of the credential template issuer |
6 |
userDid |
String |
Y |
DID of the user who created the credentials |
7 |
expirationDate |
String |
Y |
Credential expiration date |
8 |
created |
String |
Y |
Created date |
9 |
shortDesc |
String |
Y |
Brief description of the credential |
10 |
longDesc |
String |
N |
Detailed description of the credential |
11 |
claim |
Map<String, Object> |
Y |
Claim data |
12 |
proof |
Map<String, Object> |
Y |
Signature |