-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsection.d.js
186 lines (159 loc) · 4.15 KB
/
section.d.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/**
* @fileoverview KimlikDAO decentralized identifier definitions.
*
* @author KimlikDAO
*/
import "../mina/mina.d";
import did from "./did.d";
import "./verifiableID.d";
/**
* A signed section of user data (e.g., geo address, contact info).
* Each signature contains a timestamp and a wallet commitment; therefore
* each section of data is signed *for* a walet and *at* a certain time.
*
* One exception to this is the {@link did.ExposureReport}, which is not
* committed to a wallet (but still contains a signature timestamp), since it
* is used in cases where the user has lost their keys.
*
* @interface
* @struct
*/
did.Section = function () { }
/** @type {number} */
did.Section.prototype.signatureTs;
/** @type {string} */
did.Section.prototype.commitment;
/**
* The blinding factor for the wallet commitment.
*
* This piece of data is never sent to the signer nodes so that the signers
* can never associate a person info to a wallet address.
*
* @type {string}
*/
did.Section.prototype.commitmentR;
/**
* The aggregated bls12-381 signature from various signer nodes.
*
* @type {string}
*/
did.Section.prototype.bls12_381;
/**
* The secp256k1 signatures kept as a list of 64 bytes compact signatures,
* sorted in lex order.
*
* Each signature must be from a different (valid) signer node.
*
* @type {Array<string>}
*/
did.Section.prototype.secp256k1;
/**
* @type {!Array<mina.SignerSignature>|undefined}
*/
did.Section.prototype.minaSchnorr;
/**
* @interface
* @struct
*
* @extends {did.Section}
* @extends {did.VerifiableID}
*/
did.HumanID = function () { }
/**
* @interface
* @struct
*
* @extends {did.Section}
* @extends {did.VerifiableID}
*/
did.ExposureReport = function () { }
/**
* Contains the fundamental identification data of a person such as
* name, date of birth, national id etc.
*
* @interface
* @struct
*
* @extends {did.Section}
*/
did.PersonInfo = function () { };
/** @type {string} */
did.PersonInfo.prototype.first;
/** @type {string} */
did.PersonInfo.prototype.last;
/** @type {string} */
did.PersonInfo.prototype.localIdNumber;
/** @type {string} */
did.PersonInfo.prototype.dateOfBirth;
/** @type {string} */
did.PersonInfo.prototype.cityOfBirth;
/** @type {string} */
did.PersonInfo.prototype.gender;
/**
* A length 64 hex string, encoding the 32-bytes exposureReportID.
*
* When a DID holder gets their wallet private keys exposed, they can either
* revoke the DID themselves, or use social revoking.
*
* If they are unable to do either (because they lost their private keys and
* did not set up social revoke), they need to get a new DID and file an
* exposure report at https://kimlikdao.org/report using the new DID.
*
* The report is filed in a completely decentralized fashion by sending an
* appropriate transaction containing the signed `exposureReportID`, which
* every KimlikDAO DID comes with. If desired, this can be done by interacting
* with the contract directly and the above interface is merely a convenience.
*
* The `exposureReportID` is obtained from the `localIdNumber` via a verifiable
* delay function, therefore for maximum privacy, one may choose to discard an
* EVM address used for an `exposureReport`.
*
* @type {string}
*/
did.PersonInfo.prototype.exposureReportID;
/**
* An info section containing verified contact info for a person / entity.
*
* @interface
* @struct
*
* @extends {did.Section}
*/
did.ContactInfo = function () { }
/** @type {string} */
did.ContactInfo.prototype.email;
/** @type {string} */
did.ContactInfo.prototype.phone;
/**
* @interface
* @struct
*
* @extends {did.Section}
*/
did.AddressInfo = function () { }
/**
* @type {string}
*/
did.AddressInfo.prototype.country;
import "../node/nvi.d";
/**
* @interface
* @extends {did.AddressInfo}
* @extends {node.nvi.AdresBilgileri}
*/
did.TürkiyeAdresi = function () { }
/**
* Kişinin kütük bilgilerini içerir bilgi kartı.
*
* @interface
* @extends {did.Section}
* @extends {node.nvi.KutukBilgileri}
*/
did.KütükBilgileri = function () { }
/**
* A collection of `did.Sections` keyed by a string name.
*
* @dict
* @typedef {!Object<string, !did.Section>}
*/
did.DecryptedSections;