tencentcloud-sdk-tdid 1.0.267 → 1.0.268
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20210519/client.rb +96 -0
- data/lib/v20210519/models.rb +228 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00a88cd44ac55656c0e10c282ef14141e98aba30
|
4
|
+
data.tar.gz: 1092ef490ee46f4ca1d6408d9ce6b35091c48e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b24106ce78d879d5269785973dd0e16247c5816266aa62c7c46e41e1f5b5bb5a6d1432eb3bc393aafa366398c215901ecad3be77ba63d608ee54b9ca5797bbd4
|
7
|
+
data.tar.gz: f5ebee9c0f76771bf727251f8f0a0e6b1ffc50b014af9febab7af13aee6f4a05572592aa5a143811dd8bcc16f1f7e65b0bc605bea9c98170d2ccf4738d230f56
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.268
|
data/lib/v20210519/client.rb
CHANGED
@@ -101,6 +101,102 @@ module TencentCloud
|
|
101
101
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
102
102
|
end
|
103
103
|
|
104
|
+
# 新建DID根据公钥生成Tdid
|
105
|
+
|
106
|
+
# @param request: Request instance for CreateTDidByPublicKey.
|
107
|
+
# @type request: :class:`Tencentcloud::tdid::V20210519::CreateTDidByPublicKeyRequest`
|
108
|
+
# @rtype: :class:`Tencentcloud::tdid::V20210519::CreateTDidByPublicKeyResponse`
|
109
|
+
def CreateTDidByPublicKey(request)
|
110
|
+
body = send_request('CreateTDidByPublicKey', request.serialize)
|
111
|
+
response = JSON.parse(body)
|
112
|
+
if response['Response'].key?('Error') == false
|
113
|
+
model = CreateTDidByPublicKeyResponse.new
|
114
|
+
model.deserialize(response['Response'])
|
115
|
+
model
|
116
|
+
else
|
117
|
+
code = response['Response']['Error']['Code']
|
118
|
+
message = response['Response']['Error']['Message']
|
119
|
+
reqid = response['Response']['RequestId']
|
120
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
121
|
+
end
|
122
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
123
|
+
raise e
|
124
|
+
rescue StandardError => e
|
125
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
126
|
+
end
|
127
|
+
|
128
|
+
# 获取权威机构信息
|
129
|
+
|
130
|
+
# @param request: Request instance for GetAuthorityIssuer.
|
131
|
+
# @type request: :class:`Tencentcloud::tdid::V20210519::GetAuthorityIssuerRequest`
|
132
|
+
# @rtype: :class:`Tencentcloud::tdid::V20210519::GetAuthorityIssuerResponse`
|
133
|
+
def GetAuthorityIssuer(request)
|
134
|
+
body = send_request('GetAuthorityIssuer', request.serialize)
|
135
|
+
response = JSON.parse(body)
|
136
|
+
if response['Response'].key?('Error') == false
|
137
|
+
model = GetAuthorityIssuerResponse.new
|
138
|
+
model.deserialize(response['Response'])
|
139
|
+
model
|
140
|
+
else
|
141
|
+
code = response['Response']['Error']['Code']
|
142
|
+
message = response['Response']['Error']['Message']
|
143
|
+
reqid = response['Response']['RequestId']
|
144
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
145
|
+
end
|
146
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
147
|
+
raise e
|
148
|
+
rescue StandardError => e
|
149
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
150
|
+
end
|
151
|
+
|
152
|
+
# 查看DID文档
|
153
|
+
|
154
|
+
# @param request: Request instance for GetDidDocument.
|
155
|
+
# @type request: :class:`Tencentcloud::tdid::V20210519::GetDidDocumentRequest`
|
156
|
+
# @rtype: :class:`Tencentcloud::tdid::V20210519::GetDidDocumentResponse`
|
157
|
+
def GetDidDocument(request)
|
158
|
+
body = send_request('GetDidDocument', request.serialize)
|
159
|
+
response = JSON.parse(body)
|
160
|
+
if response['Response'].key?('Error') == false
|
161
|
+
model = GetDidDocumentResponse.new
|
162
|
+
model.deserialize(response['Response'])
|
163
|
+
model
|
164
|
+
else
|
165
|
+
code = response['Response']['Error']['Code']
|
166
|
+
message = response['Response']['Error']['Message']
|
167
|
+
reqid = response['Response']['RequestId']
|
168
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
169
|
+
end
|
170
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
171
|
+
raise e
|
172
|
+
rescue StandardError => e
|
173
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
174
|
+
end
|
175
|
+
|
176
|
+
# 设置凭证链上状态
|
177
|
+
|
178
|
+
# @param request: Request instance for SetCredentialStatus.
|
179
|
+
# @type request: :class:`Tencentcloud::tdid::V20210519::SetCredentialStatusRequest`
|
180
|
+
# @rtype: :class:`Tencentcloud::tdid::V20210519::SetCredentialStatusResponse`
|
181
|
+
def SetCredentialStatus(request)
|
182
|
+
body = send_request('SetCredentialStatus', request.serialize)
|
183
|
+
response = JSON.parse(body)
|
184
|
+
if response['Response'].key?('Error') == false
|
185
|
+
model = SetCredentialStatusResponse.new
|
186
|
+
model.deserialize(response['Response'])
|
187
|
+
model
|
188
|
+
else
|
189
|
+
code = response['Response']['Error']['Code']
|
190
|
+
message = response['Response']['Error']['Message']
|
191
|
+
reqid = response['Response']['RequestId']
|
192
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
193
|
+
end
|
194
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
195
|
+
raise e
|
196
|
+
rescue StandardError => e
|
197
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
198
|
+
end
|
199
|
+
|
104
200
|
# 验证凭证
|
105
201
|
|
106
202
|
# @param request: Request instance for VerifyCredential.
|
data/lib/v20210519/models.rb
CHANGED
@@ -25,13 +25,16 @@ module TencentCloud
|
|
25
25
|
# @type TransactionArg: :class:`Tencentcloud::Tdid.v20210519.models.TransactionArg`
|
26
26
|
# @param VersionCredential: 版本
|
27
27
|
# @type VersionCredential: String
|
28
|
+
# @param UnSigned: 是否未签名
|
29
|
+
# @type UnSigned: Boolean
|
28
30
|
|
29
|
-
attr_accessor :FunctionArg, :TransactionArg, :VersionCredential
|
31
|
+
attr_accessor :FunctionArg, :TransactionArg, :VersionCredential, :UnSigned
|
30
32
|
|
31
|
-
def initialize(functionarg=nil, transactionarg=nil, versioncredential=nil)
|
33
|
+
def initialize(functionarg=nil, transactionarg=nil, versioncredential=nil, unsigned=nil)
|
32
34
|
@FunctionArg = functionarg
|
33
35
|
@TransactionArg = transactionarg
|
34
36
|
@VersionCredential = versioncredential
|
37
|
+
@UnSigned = unsigned
|
35
38
|
end
|
36
39
|
|
37
40
|
def deserialize(params)
|
@@ -44,6 +47,7 @@ module TencentCloud
|
|
44
47
|
@TransactionArg.deserialize(params['TransactionArg'])
|
45
48
|
end
|
46
49
|
@VersionCredential = params['VersionCredential']
|
50
|
+
@UnSigned = params['UnSigned']
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
@@ -110,6 +114,54 @@ module TencentCloud
|
|
110
114
|
end
|
111
115
|
end
|
112
116
|
|
117
|
+
# CreateTDidByPublicKey请求参数结构体
|
118
|
+
class CreateTDidByPublicKeyRequest < TencentCloud::Common::AbstractModel
|
119
|
+
# @param ClusterId: 网络ID
|
120
|
+
# @type ClusterId: String
|
121
|
+
# @param GroupId: 群组ID
|
122
|
+
# @type GroupId: Integer
|
123
|
+
# @param PublicKey: 身份公钥
|
124
|
+
# @type PublicKey: String
|
125
|
+
# @param EncryptPubKey: 加密公钥
|
126
|
+
# @type EncryptPubKey: String
|
127
|
+
|
128
|
+
attr_accessor :ClusterId, :GroupId, :PublicKey, :EncryptPubKey
|
129
|
+
|
130
|
+
def initialize(clusterid=nil, groupid=nil, publickey=nil, encryptpubkey=nil)
|
131
|
+
@ClusterId = clusterid
|
132
|
+
@GroupId = groupid
|
133
|
+
@PublicKey = publickey
|
134
|
+
@EncryptPubKey = encryptpubkey
|
135
|
+
end
|
136
|
+
|
137
|
+
def deserialize(params)
|
138
|
+
@ClusterId = params['ClusterId']
|
139
|
+
@GroupId = params['GroupId']
|
140
|
+
@PublicKey = params['PublicKey']
|
141
|
+
@EncryptPubKey = params['EncryptPubKey']
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# CreateTDidByPublicKey返回参数结构体
|
146
|
+
class CreateTDidByPublicKeyResponse < TencentCloud::Common::AbstractModel
|
147
|
+
# @param Did: did具体信息
|
148
|
+
# @type Did: String
|
149
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
150
|
+
# @type RequestId: String
|
151
|
+
|
152
|
+
attr_accessor :Did, :RequestId
|
153
|
+
|
154
|
+
def initialize(did=nil, requestid=nil)
|
155
|
+
@Did = did
|
156
|
+
@RequestId = requestid
|
157
|
+
end
|
158
|
+
|
159
|
+
def deserialize(params)
|
160
|
+
@Did = params['Did']
|
161
|
+
@RequestId = params['RequestId']
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
113
165
|
# CreateTDid请求参数结构体
|
114
166
|
class CreateTDidRequest < TencentCloud::Common::AbstractModel
|
115
167
|
# @param GroupId: 群组ID
|
@@ -154,6 +206,45 @@ module TencentCloud
|
|
154
206
|
end
|
155
207
|
end
|
156
208
|
|
209
|
+
# 凭证链上状态信息
|
210
|
+
class CredentialStatus < TencentCloud::Common::AbstractModel
|
211
|
+
# @param CredentialId: 凭证唯一id
|
212
|
+
# @type CredentialId: String
|
213
|
+
# @param Status: 凭证状态(0:吊销;1:有效)
|
214
|
+
# @type Status: Integer
|
215
|
+
# @param Issuer: 凭证颁发者Did
|
216
|
+
# @type Issuer: String
|
217
|
+
# @param Digest: 凭证摘要
|
218
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
219
|
+
# @type Digest: String
|
220
|
+
# @param Signature: 凭证签名
|
221
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
222
|
+
# @type Signature: String
|
223
|
+
# @param TimeStamp: 更新时间戳
|
224
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
225
|
+
# @type TimeStamp: Integer
|
226
|
+
|
227
|
+
attr_accessor :CredentialId, :Status, :Issuer, :Digest, :Signature, :TimeStamp
|
228
|
+
|
229
|
+
def initialize(credentialid=nil, status=nil, issuer=nil, digest=nil, signature=nil, timestamp=nil)
|
230
|
+
@CredentialId = credentialid
|
231
|
+
@Status = status
|
232
|
+
@Issuer = issuer
|
233
|
+
@Digest = digest
|
234
|
+
@Signature = signature
|
235
|
+
@TimeStamp = timestamp
|
236
|
+
end
|
237
|
+
|
238
|
+
def deserialize(params)
|
239
|
+
@CredentialId = params['CredentialId']
|
240
|
+
@Status = params['Status']
|
241
|
+
@Issuer = params['Issuer']
|
242
|
+
@Digest = params['Digest']
|
243
|
+
@Signature = params['Signature']
|
244
|
+
@TimeStamp = params['TimeStamp']
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
157
248
|
# 创建凭证入参的FunctionArg
|
158
249
|
class FunctionArg < TencentCloud::Common::AbstractModel
|
159
250
|
# @param CptId: CPT ID
|
@@ -182,6 +273,106 @@ module TencentCloud
|
|
182
273
|
end
|
183
274
|
end
|
184
275
|
|
276
|
+
# GetAuthorityIssuer请求参数结构体
|
277
|
+
class GetAuthorityIssuerRequest < TencentCloud::Common::AbstractModel
|
278
|
+
# @param Did: tdid
|
279
|
+
# @type Did: String
|
280
|
+
|
281
|
+
attr_accessor :Did
|
282
|
+
|
283
|
+
def initialize(did=nil)
|
284
|
+
@Did = did
|
285
|
+
end
|
286
|
+
|
287
|
+
def deserialize(params)
|
288
|
+
@Did = params['Did']
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
# GetAuthorityIssuer返回参数结构体
|
293
|
+
class GetAuthorityIssuerResponse < TencentCloud::Common::AbstractModel
|
294
|
+
# @param Name: 名称
|
295
|
+
# @type Name: String
|
296
|
+
# @param ClusterId: 区块链网络id
|
297
|
+
# @type ClusterId: String
|
298
|
+
# @param GroupId: 区块链群组id
|
299
|
+
# @type GroupId: Integer
|
300
|
+
# @param Did: 权威机构did
|
301
|
+
# @type Did: String
|
302
|
+
# @param Remark: 机构备注信息
|
303
|
+
# @type Remark: String
|
304
|
+
# @param RegisterTime: 注册时间
|
305
|
+
# @type RegisterTime: String
|
306
|
+
# @param RecognizeTime: 认证时间
|
307
|
+
# @type RecognizeTime: String
|
308
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
309
|
+
# @type RequestId: String
|
310
|
+
|
311
|
+
attr_accessor :Name, :ClusterId, :GroupId, :Did, :Remark, :RegisterTime, :RecognizeTime, :RequestId
|
312
|
+
|
313
|
+
def initialize(name=nil, clusterid=nil, groupid=nil, did=nil, remark=nil, registertime=nil, recognizetime=nil, requestid=nil)
|
314
|
+
@Name = name
|
315
|
+
@ClusterId = clusterid
|
316
|
+
@GroupId = groupid
|
317
|
+
@Did = did
|
318
|
+
@Remark = remark
|
319
|
+
@RegisterTime = registertime
|
320
|
+
@RecognizeTime = recognizetime
|
321
|
+
@RequestId = requestid
|
322
|
+
end
|
323
|
+
|
324
|
+
def deserialize(params)
|
325
|
+
@Name = params['Name']
|
326
|
+
@ClusterId = params['ClusterId']
|
327
|
+
@GroupId = params['GroupId']
|
328
|
+
@Did = params['Did']
|
329
|
+
@Remark = params['Remark']
|
330
|
+
@RegisterTime = params['RegisterTime']
|
331
|
+
@RecognizeTime = params['RecognizeTime']
|
332
|
+
@RequestId = params['RequestId']
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
# GetDidDocument请求参数结构体
|
337
|
+
class GetDidDocumentRequest < TencentCloud::Common::AbstractModel
|
338
|
+
# @param Did: tdid
|
339
|
+
# @type Did: String
|
340
|
+
|
341
|
+
attr_accessor :Did
|
342
|
+
|
343
|
+
def initialize(did=nil)
|
344
|
+
@Did = did
|
345
|
+
end
|
346
|
+
|
347
|
+
def deserialize(params)
|
348
|
+
@Did = params['Did']
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
# GetDidDocument返回参数结构体
|
353
|
+
class GetDidDocumentResponse < TencentCloud::Common::AbstractModel
|
354
|
+
# @param Name: 名称
|
355
|
+
# @type Name: String
|
356
|
+
# @param Document: DID文档
|
357
|
+
# @type Document: String
|
358
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
359
|
+
# @type RequestId: String
|
360
|
+
|
361
|
+
attr_accessor :Name, :Document, :RequestId
|
362
|
+
|
363
|
+
def initialize(name=nil, document=nil, requestid=nil)
|
364
|
+
@Name = name
|
365
|
+
@Document = document
|
366
|
+
@RequestId = requestid
|
367
|
+
end
|
368
|
+
|
369
|
+
def deserialize(params)
|
370
|
+
@Name = params['Name']
|
371
|
+
@Document = params['Document']
|
372
|
+
@RequestId = params['RequestId']
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
185
376
|
# 验证凭证签名
|
186
377
|
class Proof < TencentCloud::Common::AbstractModel
|
187
378
|
# @param Created: 创建时间
|
@@ -214,6 +405,41 @@ module TencentCloud
|
|
214
405
|
end
|
215
406
|
end
|
216
407
|
|
408
|
+
# SetCredentialStatus请求参数结构体
|
409
|
+
class SetCredentialStatusRequest < TencentCloud::Common::AbstractModel
|
410
|
+
# @param CredentialStatus: 凭证状态
|
411
|
+
# @type CredentialStatus: :class:`Tencentcloud::Tdid.v20210519.models.CredentialStatus`
|
412
|
+
|
413
|
+
attr_accessor :CredentialStatus
|
414
|
+
|
415
|
+
def initialize(credentialstatus=nil)
|
416
|
+
@CredentialStatus = credentialstatus
|
417
|
+
end
|
418
|
+
|
419
|
+
def deserialize(params)
|
420
|
+
unless params['CredentialStatus'].nil?
|
421
|
+
@CredentialStatus = CredentialStatus.new
|
422
|
+
@CredentialStatus.deserialize(params['CredentialStatus'])
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
# SetCredentialStatus返回参数结构体
|
428
|
+
class SetCredentialStatusResponse < TencentCloud::Common::AbstractModel
|
429
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
430
|
+
# @type RequestId: String
|
431
|
+
|
432
|
+
attr_accessor :RequestId
|
433
|
+
|
434
|
+
def initialize(requestid=nil)
|
435
|
+
@RequestId = requestid
|
436
|
+
end
|
437
|
+
|
438
|
+
def deserialize(params)
|
439
|
+
@RequestId = params['RequestId']
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
217
443
|
# 创建凭证第二个
|
218
444
|
class TransactionArg < TencentCloud::Common::AbstractModel
|
219
445
|
# @param InvokerTDid: 凭证did
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-tdid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.268
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|