stated-protocol 5.0.0

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.
Files changed (62) hide show
  1. package/README.md +409 -0
  2. package/dist/constants.d.ts +225 -0
  3. package/dist/constants.d.ts.map +1 -0
  4. package/dist/constants.js +227 -0
  5. package/dist/constants.js.map +1 -0
  6. package/dist/esm/constants.d.ts +225 -0
  7. package/dist/esm/constants.d.ts.map +1 -0
  8. package/dist/esm/hash.d.ts +37 -0
  9. package/dist/esm/hash.d.ts.map +1 -0
  10. package/dist/esm/index.d.ts +6 -0
  11. package/dist/esm/index.d.ts.map +1 -0
  12. package/dist/esm/index.js +2104 -0
  13. package/dist/esm/index.js.map +7 -0
  14. package/dist/esm/protocol.d.ts +30 -0
  15. package/dist/esm/protocol.d.ts.map +1 -0
  16. package/dist/esm/signature.d.ts +49 -0
  17. package/dist/esm/signature.d.ts.map +1 -0
  18. package/dist/esm/types.d.ts +115 -0
  19. package/dist/esm/types.d.ts.map +1 -0
  20. package/dist/esm/utils.d.ts +14 -0
  21. package/dist/esm/utils.d.ts.map +1 -0
  22. package/dist/hash.d.ts +37 -0
  23. package/dist/hash.d.ts.map +1 -0
  24. package/dist/hash.js +99 -0
  25. package/dist/hash.js.map +1 -0
  26. package/dist/index.d.ts +6 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +22 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/protocol.d.ts +30 -0
  31. package/dist/protocol.d.ts.map +1 -0
  32. package/dist/protocol.js +677 -0
  33. package/dist/protocol.js.map +1 -0
  34. package/dist/signature.d.ts +49 -0
  35. package/dist/signature.d.ts.map +1 -0
  36. package/dist/signature.js +169 -0
  37. package/dist/signature.js.map +1 -0
  38. package/dist/types.d.ts +115 -0
  39. package/dist/types.d.ts.map +1 -0
  40. package/dist/types.js +30 -0
  41. package/dist/types.js.map +1 -0
  42. package/dist/utils.d.ts +14 -0
  43. package/dist/utils.d.ts.map +1 -0
  44. package/dist/utils.js +96 -0
  45. package/dist/utils.js.map +1 -0
  46. package/package.json +66 -0
  47. package/src/constants.ts +245 -0
  48. package/src/fixtures.test.ts +236 -0
  49. package/src/hash.test.ts +219 -0
  50. package/src/hash.ts +99 -0
  51. package/src/index.ts +5 -0
  52. package/src/organisation-verification.test.ts +50 -0
  53. package/src/person-verification.test.ts +55 -0
  54. package/src/poll.test.ts +28 -0
  55. package/src/protocol.ts +871 -0
  56. package/src/rating.test.ts +25 -0
  57. package/src/signature.test.ts +200 -0
  58. package/src/signature.ts +159 -0
  59. package/src/statement.test.ts +101 -0
  60. package/src/types.ts +185 -0
  61. package/src/utils.test.ts +140 -0
  62. package/src/utils.ts +104 -0
package/README.md ADDED
@@ -0,0 +1,409 @@
1
+ # Stated Protocol Parser
2
+
3
+ [![npm](https://img.shields.io/badge/npm-stated--protocol--parser-CB3837?logo=npm)](https://www.npmjs.com/package/stated-protocol-parser)
4
+
5
+ A TypeScript library for parsing and formatting statements in the Stated protocol - a decentralized statement verification system.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install stated-protocol-parser
11
+ ```
12
+
13
+ ## Features
14
+
15
+ - **Statement Parsing & Formatting**: Parse and build statements with domain verification
16
+ - **Cryptographic Signatures**: Sign and verify statements using Ed25519 (Version 5)
17
+ - **Multiple Statement Types**: Support for various statement types including:
18
+ - Basic statements
19
+ - Polls and votes
20
+ - Organisation and person verifications
21
+ - Disputes (authenticity and content)
22
+ - Ratings
23
+ - PDF signing
24
+ - Responses
25
+ - **Type Safety**: Full TypeScript support with comprehensive type definitions
26
+ - **Version Support**: Supports version 5 format
27
+ - **Validation**: Built-in validation for all statement formats
28
+ - **Cross-Platform**: Works in both Node.js and browser environments
29
+
30
+ ## Usage
31
+
32
+ ### Basic Statement
33
+
34
+ ```typescript
35
+ import { buildStatement, parseStatement } from 'stated-protocol-parser';
36
+
37
+ // Build a statement
38
+ const statement = buildStatement({
39
+ domain: 'example.com',
40
+ author: 'Example Organization',
41
+ time: new Date(),
42
+ tags: ['announcement', 'update'],
43
+ content: 'This is our official statement.',
44
+ });
45
+
46
+ // Parse a statement
47
+ const parsed = parseStatement({ statement });
48
+ console.log(parsed.domain); // 'example.com'
49
+ console.log(parsed.author); // 'Example Organization'
50
+ ```
51
+
52
+ ### Cryptographic Signatures (Version 5)
53
+
54
+ Version 5 introduces cryptographic signatures for statements, providing non-repudiation and tamper detection.
55
+
56
+ #### Node.js Example
57
+
58
+ ```typescript
59
+ import {
60
+ buildStatement,
61
+ generateKeyPair,
62
+ buildSignedStatement,
63
+ verifySignedStatement,
64
+ parseSignedStatement
65
+ } from 'stated-protocol-parser/node';
66
+
67
+ // Generate a key pair
68
+ const { publicKey, privateKey } = generateKeyPair();
69
+
70
+ // Build a statement
71
+ const statement = buildStatement({
72
+ domain: 'example.com',
73
+ author: 'Example Organization',
74
+ time: new Date(),
75
+ content: 'This is our official signed statement.',
76
+ });
77
+
78
+ // Sign the statement
79
+ const signedStatement = buildSignedStatement(statement, privateKey, publicKey);
80
+
81
+ // Verify the signed statement
82
+ const isValid = verifySignedStatement(signedStatement);
83
+ console.log('Signature valid:', isValid); // true
84
+
85
+ // Parse the signed statement
86
+ const parsed = parseSignedStatement(signedStatement);
87
+ console.log('Original statement:', parsed?.statement);
88
+ console.log('Public key:', parsed?.publicKey);
89
+ console.log('Signature:', parsed?.signature);
90
+ ```
91
+
92
+ #### Browser Example
93
+
94
+ ```typescript
95
+ import {
96
+ buildStatement,
97
+ generateKeyPair,
98
+ buildSignedStatement,
99
+ verifySignedStatement
100
+ } from 'stated-protocol-parser';
101
+
102
+ // Generate a key pair (async in browser)
103
+ const { publicKey, privateKey } = await generateKeyPair();
104
+
105
+ // Build and sign a statement
106
+ const statement = buildStatement({
107
+ domain: 'example.com',
108
+ author: 'Example Organization',
109
+ time: new Date(),
110
+ content: 'This is our official signed statement.',
111
+ });
112
+
113
+ const signedStatement = await buildSignedStatement(statement, privateKey, publicKey);
114
+
115
+ // Verify the signed statement
116
+ const isValid = await verifySignedStatement(signedStatement);
117
+ console.log('Signature valid:', isValid);
118
+ ```
119
+
120
+ #### Signed Statement Format
121
+
122
+ ```
123
+ Stated protocol version: 5
124
+ Publishing domain: example.com
125
+ Author: Example Organization
126
+ Time: Thu, 15 Jun 2023 20:01:26 GMT
127
+ Statement content:
128
+ This is our official signed statement.
129
+ ---
130
+ Statement hash: <url-safe-base64-sha256-hash>
131
+ Public key: <url-safe-base64-encoded-public-key>
132
+ Signature: <url-safe-base64-encoded-signature>
133
+ Algorithm: Ed25519
134
+ ```
135
+
136
+
137
+ ### Poll
138
+
139
+ ```typescript
140
+ import { buildPollContent, parsePoll } from 'stated-protocol-parser';
141
+
142
+ const pollContent = buildPollContent({
143
+ poll: 'Should we implement feature X?',
144
+ options: ['Yes', 'No', 'Need more information'],
145
+ deadline: new Date('2024-12-31'),
146
+ scopeDescription: 'All registered users',
147
+ });
148
+
149
+ const parsed = parsePoll(pollContent);
150
+ ```
151
+
152
+ ### Organisation Verification
153
+
154
+ ```typescript
155
+ import { buildOrganisationVerificationContent, parseOrganisationVerification } from 'stated-protocol-parser';
156
+
157
+ const verification = buildOrganisationVerificationContent({
158
+ name: 'Example Corp',
159
+ country: 'United States',
160
+ city: 'New York',
161
+ legalForm: 'corporation',
162
+ domain: 'example.com',
163
+ // ... other fields
164
+ });
165
+ ```
166
+
167
+ ### Person Verification
168
+
169
+ ```typescript
170
+ import { buildPersonVerificationContent, parsePersonVerification } from 'stated-protocol-parser';
171
+
172
+ const verification = buildPersonVerificationContent({
173
+ name: 'John Doe',
174
+ dateOfBirth: new Date('1990-01-01'),
175
+ cityOfBirth: 'New York',
176
+ countryOfBirth: 'United States',
177
+ ownDomain: 'johndoe.com',
178
+ // ... other fields
179
+ });
180
+ ```
181
+
182
+ ## API Reference
183
+
184
+ ### Statement Functions
185
+
186
+ - `buildStatement(params)` - Build a statement string
187
+ - `parseStatement({ statement })` - Parse a statement string
188
+
189
+ ### Content Type Functions
190
+
191
+ Each content type has corresponding build and parse functions:
192
+
193
+ - **Poll**: `buildPollContent()`, `parsePoll()`
194
+ - **Vote**: `buildVoteContent()`, `parseVote()`
195
+ - **Organisation Verification**: `buildOrganisationVerificationContent()`, `parseOrganisationVerification()`
196
+ - **Person Verification**: `buildPersonVerificationContent()`, `parsePersonVerification()`
197
+ - **Dispute Authenticity**: `buildDisputeAuthenticityContent()`, `parseDisputeAuthenticity()`
198
+ - **Dispute Content**: `buildDisputeContentContent()`, `parseDisputeContent()`
199
+ - **Response**: `buildResponseContent()`, `parseResponseContent()`
200
+ - **PDF Signing**: `buildPDFSigningContent()`, `parsePDFSigning()`
201
+ - **Rating**: `buildRating()`, `parseRating()`
202
+
203
+ ### Constants
204
+
205
+ ```typescript
206
+ import {
207
+ statementTypes,
208
+ legalForms,
209
+ peopleCountBuckets,
210
+ UTCFormat
211
+ } from 'stated-protocol-parser';
212
+ ```
213
+
214
+ ### Types
215
+
216
+ All TypeScript types are exported:
217
+
218
+ ```typescript
219
+ import type {
220
+ Statement,
221
+ Poll,
222
+ OrganisationVerification,
223
+ PersonVerification,
224
+ Vote,
225
+ DisputeAuthenticity,
226
+ DisputeContent,
227
+ ResponseContent,
228
+ PDFSigning,
229
+ Rating
230
+ } from 'stated-protocol-parser';
231
+ ```
232
+
233
+ ## Format Specifications
234
+
235
+ ### Statement Format
236
+
237
+ Statements follow a specific format with required fields:
238
+ - Publishing domain
239
+ - Author
240
+ - Time (UTC format)
241
+ - Format version
242
+ - Statement content
243
+
244
+ Optional fields:
245
+ - Authorized signing representative
246
+ - Tags
247
+ - Superseded statement
248
+ - Translations (multi-language support)
249
+ - Attachments (up to 5 file references)
250
+
251
+ ### Validation Rules
252
+
253
+ - Statements must not exceed 3,000 characters
254
+ - Statements cannot contain double line breaks (`\n\n`)
255
+ - Time must be in UTC format
256
+ - Domain, author, and content are required fields
257
+
258
+ ## Version Support
259
+
260
+ The library supports version 5 format with cryptographic signature support using Ed25519.
261
+
262
+ ## Error Handling
263
+
264
+ All parse functions throw descriptive errors when encountering invalid formats:
265
+
266
+ ```typescript
267
+ try {
268
+ const parsed = parseStatement({ statement: invalidStatement });
269
+ } catch (error) {
270
+ console.error('Invalid statement format:', error.message);
271
+ }
272
+ ```
273
+
274
+ ## Static File Publication Standard
275
+
276
+ Organizations can publish statements as static files on their domain following this standardized structure. This enables automated verification and aggregation of statements.
277
+
278
+ ### Directory Structure
279
+
280
+ All statement files should be published under the `/.well-known/` directory:
281
+
282
+ ```
283
+ /.well-known/
284
+ ├── statements.txt # All statements concatenated
285
+ ├── statements/
286
+ │ ├── index.txt # List of all statement files
287
+ │ ├── <urlsafe_b64_statement_hash>.txt # Individual statement files
288
+ │ └── attachments/
289
+ │ ├── index.txt # List of all attachment files
290
+ │ └── <urlsafe_b64_contents_hash>.<ext> # Attachment files
291
+ ```
292
+
293
+ ### Peer Replication Structure
294
+
295
+ For peer-to-peer replication of statements from other domains, use the following directory structure under `/.well-known/statements/peers/`:
296
+
297
+ ```
298
+ /.well-known/statements/
299
+ ├── peers/
300
+ │ ├── index.txt # List of all peer domains
301
+ │ └── <peer_domain>/
302
+ │ ├── metadata.json # Sync metadata for this peer
303
+ │ ├── statements.txt # All statements from peer
304
+ │ ├── statements/
305
+ │ │ ├── index.txt # List of statement files
306
+ │ │ ├── <urlsafe_b64_statement_hash>.txt # Individual statements
307
+ │ │ └── attachments/
308
+ │ │ ├── index.txt # List of attachments
309
+ │ │ └── <urlsafe_b64_contents_hash>.<ext> # Attachment files
310
+ ```
311
+
312
+
313
+ ### File Specifications
314
+
315
+ #### `/.well-known/statements.txt`
316
+
317
+ Contains all statements concatenated with 2 newline characters (`\n\n`) between each statement.
318
+
319
+ **Example:**
320
+ ```
321
+ Stated protocol version: 5
322
+ Publishing domain: example.com
323
+ Author: Example Organization
324
+ Time: Thu, 15 Jun 2023 20:01:26 GMT
325
+ Statement content:
326
+ First statement content
327
+
328
+
329
+ Stated protocol version: 5
330
+ Publishing domain: example.com
331
+ Author: Example Organization
332
+ Time: Fri, 16 Jun 2023 10:30:00 GMT
333
+ Statement content:
334
+ Second statement content
335
+ ```
336
+
337
+ #### `/.well-known/statements/<urlsafe_b64_signed_statement_hash>.txt`
338
+
339
+ Individual statement files named using the URL-safe base64-encoded SHA-256 hash of the complete file content.
340
+
341
+ **Important Hash Terminology:**
342
+
343
+ For signed statements, there are three distinct hash values:
344
+
345
+ 1. **Statement content hash**: Hash of only the content field (the actual message text)
346
+ 2. **Statement hash**: Hash of the complete unsigned statement (all fields: domain, author, time, content, etc., but excluding the signature block)
347
+ 3. **Signed statement hash**: Hash of the complete signed statement (unsigned statement + signature block)
348
+
349
+ **Usage:**
350
+ - **Filename**: Uses the **signed statement hash** (hash of entire file content)
351
+ - **Signature block "Statement hash" field**: Contains the **statement hash** (hash of unsigned statement, used for cryptographic verification)
352
+ - **Response references**: Use the **signed statement hash** to reference which statement is being responded to
353
+
354
+ **Naming Convention:**
355
+ - Hash the complete statement text using SHA-256
356
+ - Encode the hash using URL-safe base64 (replacing `+` with `-` and `/` with `_`, removing padding `=`)
357
+ - Use `.txt` extension
358
+
359
+ **Example:**
360
+ ```
361
+ /.well-known/statements/qg51IiW3RKIXSxiaF_hVQdZdtHzKsU4YePxFuZ2YVtQ.txt
362
+ ```
363
+
364
+ **File Content:**
365
+ ```
366
+ Stated protocol version: 5
367
+ Publishing domain: example.com
368
+ Author: Example Organization
369
+ Time: Thu, 15 Jun 2023 20:01:26 GMT
370
+ Statement content:
371
+ This is the statement content
372
+ ```
373
+
374
+ #### `/.well-known/statements/index.txt`
375
+
376
+ Newline-delimited list of all statement file paths relative to `/.well-known/statements/`.
377
+
378
+ **Example:**
379
+ ```
380
+ qg51IiW3RKIXSxiaF_hVQdZdtHzKsU4YePxFuZ2YVtQ.txt
381
+ YTIhylbTsXvJZN8og3LvusdfjjjnnVudocw1mki11Vs.txt
382
+ NF6irhgDU0F_HEgTRKnhnDlA2R8c9YnjihhiCyNGsQA.txt
383
+ ```
384
+
385
+ #### `/.well-known/statements/attachments/<urlsafe_b64_contents_hash>.<file_extension>`
386
+
387
+ Attachment files referenced in statements, named using the URL-safe base64-encoded SHA-256 hash of the file contents with the appropriate file extension.
388
+
389
+ **Naming Convention:**
390
+ - Hash the complete file contents using SHA-256
391
+ - Encode the hash using URL-safe base64
392
+ - Append the original file extension (e.g., `.pdf`, `.jpg`, `.png`, `.json`)
393
+
394
+ **Example:**
395
+ ```
396
+ /.well-known/statements/attachments/8kF3mN9pQ2rT5vW7xY1zA3bC4dE6fG8hI0jK2lM4nO6.pdf
397
+ /.well-known/statements/attachments/pQ9rS1tU3vW5xY7zA9bC1dE3fG5hI7jK9lM1nO3pQ5.jpg
398
+ ```
399
+
400
+ #### `/.well-known/statements/attachments/index.txt`
401
+
402
+ Newline-delimited list of all attachment file paths relative to `/.well-known/statements/attachments/`.
403
+
404
+ **Example:**
405
+ ```
406
+ 8kF3mN9pQ2rT5vW7xY1zA3bC4dE6fG8hI0jK2lM4nO6.pdf
407
+ pQ9rS1tU3vW5xY7zA9bC1dE3fG5hI7jK9lM1nO3pQ5.jpg
408
+ xY1zA3bC4dE6fG8hI0jK2lM4nO6pQ9rS1tU3vW5xY7z.json
409
+ ```
@@ -0,0 +1,225 @@
1
+ export declare const legalForms: {
2
+ local_government: string;
3
+ state_government: string;
4
+ foreign_affairs_ministry: string;
5
+ corporation: string;
6
+ };
7
+ export declare const statementTypes: {
8
+ statement: string;
9
+ organisationVerification: string;
10
+ personVerification: string;
11
+ poll: string;
12
+ vote: string;
13
+ response: string;
14
+ disputeContent: string;
15
+ disputeAuthenticity: string;
16
+ rating: string;
17
+ signPdf: string;
18
+ unsupported: string;
19
+ };
20
+ export declare const peopleCountBuckets: {
21
+ '0': string;
22
+ '10': string;
23
+ '100': string;
24
+ '1000': string;
25
+ '10000': string;
26
+ '100000': string;
27
+ '1000000': string;
28
+ '10000000': string;
29
+ };
30
+ export declare const supportedLanguages: {
31
+ readonly aa: "aa";
32
+ readonly ab: "ab";
33
+ readonly af: "af";
34
+ readonly ak: "ak";
35
+ readonly am: "am";
36
+ readonly ar: "ar";
37
+ readonly an: "an";
38
+ readonly as: "as";
39
+ readonly av: "av";
40
+ readonly ay: "ay";
41
+ readonly az: "az";
42
+ readonly ba: "ba";
43
+ readonly bm: "bm";
44
+ readonly be: "be";
45
+ readonly bn: "bn";
46
+ readonly bi: "bi";
47
+ readonly bo: "bo";
48
+ readonly bs: "bs";
49
+ readonly br: "br";
50
+ readonly bg: "bg";
51
+ readonly ca: "ca";
52
+ readonly cs: "cs";
53
+ readonly ch: "ch";
54
+ readonly ce: "ce";
55
+ readonly cv: "cv";
56
+ readonly kw: "kw";
57
+ readonly co: "co";
58
+ readonly cr: "cr";
59
+ readonly cy: "cy";
60
+ readonly da: "da";
61
+ readonly de: "de";
62
+ readonly dv: "dv";
63
+ readonly dz: "dz";
64
+ readonly el: "el";
65
+ readonly en: "en";
66
+ readonly eo: "eo";
67
+ readonly et: "et";
68
+ readonly eu: "eu";
69
+ readonly ee: "ee";
70
+ readonly fo: "fo";
71
+ readonly fa: "fa";
72
+ readonly fj: "fj";
73
+ readonly fi: "fi";
74
+ readonly fr: "fr";
75
+ readonly fy: "fy";
76
+ readonly ff: "ff";
77
+ readonly gd: "gd";
78
+ readonly ga: "ga";
79
+ readonly gl: "gl";
80
+ readonly gv: "gv";
81
+ readonly gn: "gn";
82
+ readonly gu: "gu";
83
+ readonly ht: "ht";
84
+ readonly ha: "ha";
85
+ readonly sh: "sh";
86
+ readonly he: "he";
87
+ readonly hz: "hz";
88
+ readonly hi: "hi";
89
+ readonly ho: "ho";
90
+ readonly hr: "hr";
91
+ readonly hu: "hu";
92
+ readonly hy: "hy";
93
+ readonly ig: "ig";
94
+ readonly io: "io";
95
+ readonly ii: "ii";
96
+ readonly iu: "iu";
97
+ readonly ie: "ie";
98
+ readonly ia: "ia";
99
+ readonly id: "id";
100
+ readonly ik: "ik";
101
+ readonly is: "is";
102
+ readonly it: "it";
103
+ readonly jv: "jv";
104
+ readonly ja: "ja";
105
+ readonly kl: "kl";
106
+ readonly kn: "kn";
107
+ readonly ks: "ks";
108
+ readonly ka: "ka";
109
+ readonly kr: "kr";
110
+ readonly kk: "kk";
111
+ readonly km: "km";
112
+ readonly ki: "ki";
113
+ readonly rw: "rw";
114
+ readonly ky: "ky";
115
+ readonly kv: "kv";
116
+ readonly kg: "kg";
117
+ readonly ko: "ko";
118
+ readonly kj: "kj";
119
+ readonly ku: "ku";
120
+ readonly lo: "lo";
121
+ readonly la: "la";
122
+ readonly lv: "lv";
123
+ readonly li: "li";
124
+ readonly ln: "ln";
125
+ readonly lt: "lt";
126
+ readonly lb: "lb";
127
+ readonly lu: "lu";
128
+ readonly lg: "lg";
129
+ readonly mh: "mh";
130
+ readonly ml: "ml";
131
+ readonly mr: "mr";
132
+ readonly mk: "mk";
133
+ readonly mg: "mg";
134
+ readonly mt: "mt";
135
+ readonly mn: "mn";
136
+ readonly mi: "mi";
137
+ readonly ms: "ms";
138
+ readonly my: "my";
139
+ readonly na: "na";
140
+ readonly nv: "nv";
141
+ readonly nr: "nr";
142
+ readonly nd: "nd";
143
+ readonly ng: "ng";
144
+ readonly ne: "ne";
145
+ readonly nl: "nl";
146
+ readonly nn: "nn";
147
+ readonly nb: "nb";
148
+ readonly no: "no";
149
+ readonly ny: "ny";
150
+ readonly oc: "oc";
151
+ readonly oj: "oj";
152
+ readonly or: "or";
153
+ readonly om: "om";
154
+ readonly os: "os";
155
+ readonly pa: "pa";
156
+ readonly pi: "pi";
157
+ readonly pl: "pl";
158
+ readonly pt: "pt";
159
+ readonly ps: "ps";
160
+ readonly qu: "qu";
161
+ readonly rm: "rm";
162
+ readonly ro: "ro";
163
+ readonly rn: "rn";
164
+ readonly ru: "ru";
165
+ readonly sg: "sg";
166
+ readonly sa: "sa";
167
+ readonly si: "si";
168
+ readonly sk: "sk";
169
+ readonly sl: "sl";
170
+ readonly se: "se";
171
+ readonly sm: "sm";
172
+ readonly sn: "sn";
173
+ readonly sd: "sd";
174
+ readonly so: "so";
175
+ readonly st: "st";
176
+ readonly es: "es";
177
+ readonly sq: "sq";
178
+ readonly sc: "sc";
179
+ readonly sr: "sr";
180
+ readonly ss: "ss";
181
+ readonly su: "su";
182
+ readonly sw: "sw";
183
+ readonly sv: "sv";
184
+ readonly ty: "ty";
185
+ readonly ta: "ta";
186
+ readonly tt: "tt";
187
+ readonly te: "te";
188
+ readonly tg: "tg";
189
+ readonly tl: "tl";
190
+ readonly th: "th";
191
+ readonly ti: "ti";
192
+ readonly to: "to";
193
+ readonly tn: "tn";
194
+ readonly ts: "ts";
195
+ readonly tk: "tk";
196
+ readonly tr: "tr";
197
+ readonly tw: "tw";
198
+ readonly ug: "ug";
199
+ readonly uk: "uk";
200
+ readonly ur: "ur";
201
+ readonly uz: "uz";
202
+ readonly ve: "ve";
203
+ readonly vi: "vi";
204
+ readonly vo: "vo";
205
+ readonly wa: "wa";
206
+ readonly wo: "wo";
207
+ readonly xh: "xh";
208
+ readonly yi: "yi";
209
+ readonly yo: "yo";
210
+ readonly za: "za";
211
+ readonly zh: "zh";
212
+ readonly zu: "zu";
213
+ };
214
+ export type SupportedLanguage = (typeof supportedLanguages)[keyof typeof supportedLanguages];
215
+ export declare const UTCFormat: RegExp;
216
+ export declare const pollKeys: RegExp;
217
+ export declare const organisationVerificationKeys: RegExp;
218
+ export declare const personVerificationKeys: RegExp;
219
+ export declare const voteKeys: RegExp;
220
+ export declare const disputeAuthenticityKeys: RegExp;
221
+ export declare const disputeContentKeys: RegExp;
222
+ export declare const responseKeys: RegExp;
223
+ export declare const PDFSigningKeys: RegExp;
224
+ export declare const ratingKeys: RegExp;
225
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;CAY1B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;CAS9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuLrB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE7F,eAAO,MAAM,SAAS,EAAE,MACmG,CAAC;AAE5H,eAAO,MAAM,QAAQ,QAC6V,CAAC;AAEnX,eAAO,MAAM,4BAA4B,QACmT,CAAC;AAE7V,eAAO,MAAM,sBAAsB,QACiN,CAAC;AAErP,eAAO,MAAM,QAAQ,QAAwC,CAAC;AAE9D,eAAO,MAAM,uBAAuB,QACwD,CAAC;AAE7F,eAAO,MAAM,kBAAkB,QAC6D,CAAC;AAE7F,eAAO,MAAM,YAAY,QAAuD,CAAC;AAEjF,eAAO,MAAM,cAAc,QAA4C,CAAC;AAExE,eAAO,MAAM,UAAU,QACiH,CAAC"}