@@ -4,20 +4,33 @@ import {
4
4
} from "cosmjs-types/cosmos/base/query/v1beta1/pagination.js" ;
5
5
import _m0 from "protobufjs/minimal.js" ;
6
6
7
+ export const verificationTypes = [
8
+ "VT_UNSPECIFIED" ,
9
+ "VT_KYC" ,
10
+ "VT_KYB" ,
11
+ "VT_KYW" ,
12
+ "VT_HUMANITY" ,
13
+ "VT_AML" ,
14
+ "VT_ADDRESS" ,
15
+ "VT_CUSTOM" ,
16
+ "VT_CREDIT_SCORE" ,
17
+ ] as const ;
18
+
7
19
export type VerificationDetails = {
20
+ type : ( typeof verificationTypes ) [ number ] ;
8
21
issuerAddress ?: string ;
9
22
originChain ?: string ;
10
23
issuanceTimestamp ?: number ;
11
24
expirationTimestamp ?: number ;
12
25
originalData ?: string ;
13
- proofSchema ?: string ;
26
+ schema ?: string ;
14
27
issuerVerificationId ?: string ;
28
+ version ?: number ;
15
29
} ;
16
30
17
- export type VerificationDetailsWithKey = {
31
+ export type MergedVerificationDetails = {
18
32
verificationID : string ;
19
- verificationDetails : VerificationDetails ;
20
- } ;
33
+ } & VerificationDetails ;
21
34
22
35
export const QueryVerificationListRequest = {
23
36
encode ( message : { pagination ?: PageRequest } , writer = _m0 . Writer . create ( ) ) {
@@ -34,7 +47,7 @@ export const QueryVerificationListResponse = {
34
47
const end = length === undefined ? reader . len : reader . pos + length ;
35
48
36
49
const message = {
37
- verifications : [ ] as VerificationDetailsWithKey [ ] ,
50
+ verifications : [ ] as MergedVerificationDetails [ ] ,
38
51
pagination : undefined as any as PageResponse ,
39
52
} ;
40
53
@@ -44,7 +57,7 @@ export const QueryVerificationListResponse = {
44
57
switch ( tag >>> 3 ) {
45
58
case 1 :
46
59
message . verifications . push (
47
- QueryVerificationDetailsWithKey . decode ( reader , reader . uint32 ( ) )
60
+ QueryMergedVerificationDetails . decode ( reader , reader . uint32 ( ) )
48
61
) ;
49
62
break ;
50
63
case 2 :
@@ -59,26 +72,49 @@ export const QueryVerificationListResponse = {
59
72
} ,
60
73
} ;
61
74
62
- export const QueryVerificationDetailsWithKey = {
75
+ export const QueryMergedVerificationDetails = {
63
76
decode ( input : _m0 . Reader | Uint8Array , length ?: number ) {
64
77
const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
65
78
const end = length === undefined ? reader . len : reader . pos + length ;
66
79
67
- const message = { } as VerificationDetailsWithKey ;
80
+ const message = { } as MergedVerificationDetails ;
68
81
69
82
while ( reader . pos < end ) {
70
83
const tag = reader . uint32 ( ) ;
71
84
72
85
switch ( tag >>> 3 ) {
73
86
case 1 :
74
- message . verificationID = Buffer . from ( reader . bytes ( ) ) . toString ( "base64" ) ;
87
+ message . type = verificationTypes [ reader . uint32 ( ) ] ;
75
88
break ;
76
89
case 2 :
77
- message . verificationDetails = QueryVerificationDetailsResponse . decode (
78
- reader ,
79
- reader . uint32 ( )
90
+ message . verificationID = Buffer . from ( reader . bytes ( ) ) . toString (
91
+ "base64"
80
92
) ;
81
93
break ;
94
+ case 3 :
95
+ message . issuerAddress = reader . string ( ) ;
96
+ break ;
97
+ case 4 :
98
+ message . originChain = reader . string ( ) ;
99
+ break ;
100
+ case 5 :
101
+ message . issuanceTimestamp = reader . uint32 ( ) ;
102
+ break ;
103
+ case 6 :
104
+ message . expirationTimestamp = reader . uint32 ( ) ;
105
+ break ;
106
+ case 7 :
107
+ message . originalData = Buffer . from ( reader . bytes ( ) ) . toString ( "base64" ) ;
108
+ break ;
109
+ case 8 :
110
+ message . schema = reader . string ( ) ;
111
+ break ;
112
+ case 9 :
113
+ message . issuerVerificationId = reader . string ( ) ;
114
+ break ;
115
+ case 10 :
116
+ message . version = reader . uint32 ( ) ;
117
+ break ;
82
118
default :
83
119
reader . skipType ( tag & 7 ) ;
84
120
break ;
@@ -102,15 +138,7 @@ export const QueryVerificationDetailsResponse = {
102
138
const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
103
139
const end = length === undefined ? reader . len : reader . pos + length ;
104
140
105
- const message : VerificationDetails = {
106
- issuerAddress : undefined ,
107
- originChain : undefined ,
108
- issuanceTimestamp : undefined ,
109
- expirationTimestamp : undefined ,
110
- originalData : undefined ,
111
- proofSchema : undefined ,
112
- issuerVerificationId : undefined ,
113
- } ;
141
+ const message = { } as VerificationDetails ;
114
142
115
143
if ( length === undefined ) {
116
144
reader . uint32 ( ) ;
@@ -122,26 +150,32 @@ export const QueryVerificationDetailsResponse = {
122
150
123
151
switch ( tag >>> 3 ) {
124
152
case 1 :
125
- message . issuerAddress = reader . string ( ) ;
153
+ message . type = verificationTypes [ reader . uint32 ( ) ] ;
126
154
break ;
127
155
case 2 :
128
- message . originChain = reader . string ( ) ;
156
+ message . issuerAddress = reader . string ( ) ;
129
157
break ;
130
158
case 3 :
131
- message . issuanceTimestamp = reader . uint32 ( ) ;
159
+ message . originChain = reader . string ( ) ;
132
160
break ;
133
161
case 4 :
134
- message . expirationTimestamp = reader . uint32 ( ) ;
162
+ message . issuanceTimestamp = reader . uint32 ( ) ;
135
163
break ;
136
164
case 5 :
137
- message . originalData = Buffer . from ( reader . bytes ( ) ) . toString ( "base64" ) ;
165
+ message . expirationTimestamp = reader . uint32 ( ) ;
138
166
break ;
139
167
case 6 :
140
- message . proofSchema = reader . string ( ) ;
168
+ message . originalData = Buffer . from ( reader . bytes ( ) ) . toString ( "base64" ) ;
141
169
break ;
142
170
case 7 :
171
+ message . schema = reader . string ( ) ;
172
+ break ;
173
+ case 8 :
143
174
message . issuerVerificationId = reader . string ( ) ;
144
175
break ;
176
+ case 9 :
177
+ message . version = reader . uint32 ( ) ;
178
+ break ;
145
179
default :
146
180
reader . skipType ( tag & 7 ) ;
147
181
break ;
0 commit comments