tencentcloud-sdk-nodejs 4.0.778 → 4.0.779
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/SERVICE_CHANGELOG.md +91 -6
- package/package.json +1 -1
- package/products.md +1 -1
- package/src/common/sdk_version.ts +1 -1
- package/src/services/tdid/v20210519/tdid_client.ts +84 -161
- package/src/services/tdid/v20210519/tdid_models.ts +154 -340
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/tdid/v20210519/tdid_client.d.ts +19 -62
- package/tencentcloud/services/tdid/v20210519/tdid_client.js +27 -78
- package/tencentcloud/services/tdid/v20210519/tdid_models.d.ts +154 -330
- package/test/tdid.v20210519.test.js +18 -58
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractClient } from "../../../common/abstract_client";
|
|
2
2
|
import { ClientConfig } from "../../../common/interface";
|
|
3
|
-
import {
|
|
3
|
+
import { CreateTDidByPubKeyResponse, GetTDidDocumentResponse, GetCredentialStateRequest, CheckNewPurchaseRequest, VerifyCredentialsRequest, GetTDidDocumentRequest, IssueCredentialResponse, GetCredentialStateResponse, CreateTDidByHostRequest, IssueCredentialRequest, VerifyCredentialsResponse, UpdateCredentialStateRequest, CreateTDidByPubKeyRequest, DeactivateTDidRequest, CheckNewPurchaseResponse, UpdateCredentialStateResponse, DeactivateTDidResponse, CreateTDidByHostResponse } from "./tdid_models";
|
|
4
4
|
/**
|
|
5
5
|
* tdid client
|
|
6
6
|
* @class
|
|
@@ -8,82 +8,39 @@ import { CreateTDidRequest, CreateSelectiveCredentialRequest, CreateTDidByPrivat
|
|
|
8
8
|
export declare class Client extends AbstractClient {
|
|
9
9
|
constructor(clientConfig: ClientConfig);
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
凭证模版详情
|
|
11
|
+
* 验证已签名的可验证凭证
|
|
14
12
|
*/
|
|
15
|
-
|
|
13
|
+
VerifyCredentials(req: VerifyCredentialsRequest, cb?: (error: string, rep: VerifyCredentialsResponse) => void): Promise<VerifyCredentialsResponse>;
|
|
16
14
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
查看DID文档
|
|
20
|
-
|
|
15
|
+
* 自动生成公私钥对托管在DID平台,并注册DID标识
|
|
21
16
|
*/
|
|
22
|
-
|
|
17
|
+
CreateTDidByHost(req: CreateTDidByHostRequest, cb?: (error: string, rep: CreateTDidByHostResponse) => void): Promise<CreateTDidByHostResponse>;
|
|
23
18
|
/**
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
创建选择性批露凭证
|
|
19
|
+
* 使用导入的公钥文件注册DID标识
|
|
27
20
|
*/
|
|
28
|
-
|
|
21
|
+
CreateTDidByPubKey(req: CreateTDidByPubKeyRequest, cb?: (error: string, rep: CreateTDidByPubKeyResponse) => void): Promise<CreateTDidByPubKeyResponse>;
|
|
29
22
|
/**
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
创建机构DID
|
|
23
|
+
* 获取DID标识的文档
|
|
33
24
|
*/
|
|
34
|
-
|
|
25
|
+
GetTDidDocument(req: GetTDidDocumentRequest, cb?: (error: string, rep: GetTDidDocumentResponse) => void): Promise<GetTDidDocumentResponse>;
|
|
35
26
|
/**
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
创建凭证
|
|
27
|
+
* 更新凭证的链上状态
|
|
39
28
|
*/
|
|
40
|
-
|
|
29
|
+
UpdateCredentialState(req: UpdateCredentialStateRequest, cb?: (error: string, rep: UpdateCredentialStateResponse) => void): Promise<UpdateCredentialStateResponse>;
|
|
41
30
|
/**
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
新建DID根据公钥生成Tdid
|
|
31
|
+
* 更新DID标识的禁用状态
|
|
45
32
|
*/
|
|
46
|
-
|
|
33
|
+
DeactivateTDid(req: DeactivateTDidRequest, cb?: (error: string, rep: DeactivateTDidResponse) => void): Promise<DeactivateTDidResponse>;
|
|
47
34
|
/**
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
获取凭证链上状态信息
|
|
35
|
+
* 获取凭证链上状态信息
|
|
51
36
|
*/
|
|
52
|
-
|
|
37
|
+
GetCredentialState(req: GetCredentialStateRequest, cb?: (error: string, rep: GetCredentialStateResponse) => void): Promise<GetCredentialStateResponse>;
|
|
53
38
|
/**
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
新建DID根据私钥生成Tdid
|
|
39
|
+
* 颁发可验证凭证
|
|
57
40
|
*/
|
|
58
|
-
|
|
41
|
+
IssueCredential(req: IssueCredentialRequest, cb?: (error: string, rep: IssueCredentialResponse) => void): Promise<IssueCredentialResponse>;
|
|
59
42
|
/**
|
|
60
|
-
*
|
|
61
|
-
|
|
62
|
-
检查区块链信息
|
|
43
|
+
* 检查用户套餐购买状态
|
|
63
44
|
*/
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 该接口不再使用
|
|
67
|
-
|
|
68
|
-
凭证模版新建
|
|
69
|
-
*/
|
|
70
|
-
RegisterCpt(req: RegisterCptRequest, cb?: (error: string, rep: RegisterCptResponse) => void): Promise<RegisterCptResponse>;
|
|
71
|
-
/**
|
|
72
|
-
* 该接口不再使用
|
|
73
|
-
|
|
74
|
-
验证凭证
|
|
75
|
-
*/
|
|
76
|
-
VerifyCredential(req: VerifyCredentialRequest, cb?: (error: string, rep: VerifyCredentialResponse) => void): Promise<VerifyCredentialResponse>;
|
|
77
|
-
/**
|
|
78
|
-
* 该接口不再使用
|
|
79
|
-
|
|
80
|
-
获取权威机构信息
|
|
81
|
-
*/
|
|
82
|
-
GetAuthorityIssuer(req: GetAuthorityIssuerRequest, cb?: (error: string, rep: GetAuthorityIssuerResponse) => void): Promise<GetAuthorityIssuerResponse>;
|
|
83
|
-
/**
|
|
84
|
-
* 该接口不再使用
|
|
85
|
-
|
|
86
|
-
设置凭证链上状态
|
|
87
|
-
*/
|
|
88
|
-
SetCredentialStatus(req: SetCredentialStatusRequest, cb?: (error: string, rep: SetCredentialStatusResponse) => void): Promise<SetCredentialStatusResponse>;
|
|
45
|
+
CheckNewPurchase(req?: CheckNewPurchaseRequest, cb?: (error: string, rep: CheckNewPurchaseResponse) => void): Promise<CheckNewPurchaseResponse>;
|
|
89
46
|
}
|
|
@@ -28,109 +28,58 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
28
28
|
super("tdid.tencentcloudapi.com", "2021-05-19", clientConfig);
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
凭证模版详情
|
|
31
|
+
* 验证已签名的可验证凭证
|
|
34
32
|
*/
|
|
35
|
-
async
|
|
36
|
-
return this.request("
|
|
33
|
+
async VerifyCredentials(req, cb) {
|
|
34
|
+
return this.request("VerifyCredentials", req, cb);
|
|
37
35
|
}
|
|
38
36
|
/**
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
查看DID文档
|
|
42
|
-
|
|
37
|
+
* 自动生成公私钥对托管在DID平台,并注册DID标识
|
|
43
38
|
*/
|
|
44
|
-
async
|
|
45
|
-
return this.request("
|
|
39
|
+
async CreateTDidByHost(req, cb) {
|
|
40
|
+
return this.request("CreateTDidByHost", req, cb);
|
|
46
41
|
}
|
|
47
42
|
/**
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
创建选择性批露凭证
|
|
43
|
+
* 使用导入的公钥文件注册DID标识
|
|
51
44
|
*/
|
|
52
|
-
async
|
|
53
|
-
return this.request("
|
|
45
|
+
async CreateTDidByPubKey(req, cb) {
|
|
46
|
+
return this.request("CreateTDidByPubKey", req, cb);
|
|
54
47
|
}
|
|
55
48
|
/**
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
创建机构DID
|
|
49
|
+
* 获取DID标识的文档
|
|
59
50
|
*/
|
|
60
|
-
async
|
|
61
|
-
return this.request("
|
|
51
|
+
async GetTDidDocument(req, cb) {
|
|
52
|
+
return this.request("GetTDidDocument", req, cb);
|
|
62
53
|
}
|
|
63
54
|
/**
|
|
64
|
-
*
|
|
65
|
-
|
|
66
|
-
创建凭证
|
|
55
|
+
* 更新凭证的链上状态
|
|
67
56
|
*/
|
|
68
|
-
async
|
|
69
|
-
return this.request("
|
|
57
|
+
async UpdateCredentialState(req, cb) {
|
|
58
|
+
return this.request("UpdateCredentialState", req, cb);
|
|
70
59
|
}
|
|
71
60
|
/**
|
|
72
|
-
*
|
|
73
|
-
|
|
74
|
-
新建DID根据公钥生成Tdid
|
|
61
|
+
* 更新DID标识的禁用状态
|
|
75
62
|
*/
|
|
76
|
-
async
|
|
77
|
-
return this.request("
|
|
63
|
+
async DeactivateTDid(req, cb) {
|
|
64
|
+
return this.request("DeactivateTDid", req, cb);
|
|
78
65
|
}
|
|
79
66
|
/**
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
获取凭证链上状态信息
|
|
67
|
+
* 获取凭证链上状态信息
|
|
83
68
|
*/
|
|
84
|
-
async
|
|
85
|
-
return this.request("
|
|
69
|
+
async GetCredentialState(req, cb) {
|
|
70
|
+
return this.request("GetCredentialState", req, cb);
|
|
86
71
|
}
|
|
87
72
|
/**
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
新建DID根据私钥生成Tdid
|
|
73
|
+
* 颁发可验证凭证
|
|
91
74
|
*/
|
|
92
|
-
async
|
|
93
|
-
return this.request("
|
|
75
|
+
async IssueCredential(req, cb) {
|
|
76
|
+
return this.request("IssueCredential", req, cb);
|
|
94
77
|
}
|
|
95
78
|
/**
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
检查区块链信息
|
|
79
|
+
* 检查用户套餐购买状态
|
|
99
80
|
*/
|
|
100
|
-
async
|
|
101
|
-
return this.request("
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* 该接口不再使用
|
|
105
|
-
|
|
106
|
-
凭证模版新建
|
|
107
|
-
*/
|
|
108
|
-
async RegisterCpt(req, cb) {
|
|
109
|
-
return this.request("RegisterCpt", req, cb);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* 该接口不再使用
|
|
113
|
-
|
|
114
|
-
验证凭证
|
|
115
|
-
*/
|
|
116
|
-
async VerifyCredential(req, cb) {
|
|
117
|
-
return this.request("VerifyCredential", req, cb);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* 该接口不再使用
|
|
121
|
-
|
|
122
|
-
获取权威机构信息
|
|
123
|
-
*/
|
|
124
|
-
async GetAuthorityIssuer(req, cb) {
|
|
125
|
-
return this.request("GetAuthorityIssuer", req, cb);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* 该接口不再使用
|
|
129
|
-
|
|
130
|
-
设置凭证链上状态
|
|
131
|
-
*/
|
|
132
|
-
async SetCredentialStatus(req, cb) {
|
|
133
|
-
return this.request("SetCredentialStatus", req, cb);
|
|
81
|
+
async CheckNewPurchase(req, cb) {
|
|
82
|
+
return this.request("CheckNewPurchase", req, cb);
|
|
134
83
|
}
|
|
135
84
|
}
|
|
136
85
|
exports.Client = Client;
|