@vocdoni/davinci-sdk 0.0.7 → 0.1.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.
- package/README.md +48 -28
- package/dist/index.d.ts +78 -88
- package/dist/index.js +125 -146
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -144
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +125 -146
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ yarn add @vocdoni/davinci-sdk
|
|
|
20
20
|
### Basic Usage
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
|
-
import { DavinciSDK,
|
|
23
|
+
import { DavinciSDK, OffchainCensus } from '@vocdoni/davinci-sdk';
|
|
24
24
|
import { Wallet } from 'ethers';
|
|
25
25
|
|
|
26
26
|
// Initialize the SDK
|
|
@@ -34,7 +34,7 @@ const sdk = new DavinciSDK({
|
|
|
34
34
|
await sdk.init();
|
|
35
35
|
|
|
36
36
|
// 1. Create a census with eligible voters
|
|
37
|
-
const census = new
|
|
37
|
+
const census = new OffchainCensus(); // Supports both plain and weighted voting
|
|
38
38
|
census.add([
|
|
39
39
|
'0x1234567890123456789012345678901234567890',
|
|
40
40
|
'0x2345678901234567890123456789012345678901',
|
|
@@ -152,14 +152,16 @@ The SDK provides simple-to-use census classes that make voter management easy. C
|
|
|
152
152
|
|
|
153
153
|
### Census Types
|
|
154
154
|
|
|
155
|
-
####
|
|
155
|
+
#### OffchainCensus - Static Merkle Tree Census
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
A flexible census that supports both plain addresses (equal voting power) and weighted participants.
|
|
158
|
+
|
|
159
|
+
**Plain addresses (everyone gets weight = 1):**
|
|
158
160
|
|
|
159
161
|
```typescript
|
|
160
|
-
import {
|
|
162
|
+
import { OffchainCensus } from '@vocdoni/davinci-sdk';
|
|
161
163
|
|
|
162
|
-
const census = new
|
|
164
|
+
const census = new OffchainCensus();
|
|
163
165
|
census.add([
|
|
164
166
|
'0x1234567890123456789012345678901234567890',
|
|
165
167
|
'0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
|
|
@@ -168,19 +170,19 @@ census.add([
|
|
|
168
170
|
|
|
169
171
|
// Use directly in process creation - SDK auto-publishes!
|
|
170
172
|
const process = await sdk.createProcess({
|
|
171
|
-
census: census, // ✨ Auto-published!
|
|
173
|
+
census: census, // ✨ Auto-published! maxVoters auto-calculated!
|
|
172
174
|
// ... rest of config
|
|
173
175
|
});
|
|
174
176
|
```
|
|
175
177
|
|
|
176
|
-
|
|
178
|
+
**Weighted participants (custom voting power):**
|
|
177
179
|
|
|
178
|
-
|
|
180
|
+
Supports flexible weight types: **string**, **number**, or **bigint**.
|
|
179
181
|
|
|
180
182
|
```typescript
|
|
181
|
-
import {
|
|
183
|
+
import { OffchainCensus } from '@vocdoni/davinci-sdk';
|
|
182
184
|
|
|
183
|
-
const census = new
|
|
185
|
+
const census = new OffchainCensus();
|
|
184
186
|
|
|
185
187
|
census.add([
|
|
186
188
|
{ key: '0x123...', weight: "1" }, // string
|
|
@@ -188,7 +190,27 @@ census.add([
|
|
|
188
190
|
{ key: '0x789...', weight: 100n }, // bigint
|
|
189
191
|
]);
|
|
190
192
|
|
|
191
|
-
// Auto-published when creating process
|
|
193
|
+
// Auto-published when creating process, maxVoters auto-set to participant count
|
|
194
|
+
const process = await sdk.createProcess({
|
|
195
|
+
census: census,
|
|
196
|
+
// ... rest of config
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### OffchainDynamicCensus - Updatable Merkle Tree Census
|
|
201
|
+
|
|
202
|
+
Similar to OffchainCensus but allows census updates after process creation.
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
import { OffchainDynamicCensus } from '@vocdoni/davinci-sdk';
|
|
206
|
+
|
|
207
|
+
const census = new OffchainDynamicCensus();
|
|
208
|
+
census.add([
|
|
209
|
+
{ key: '0x123...', weight: 10 },
|
|
210
|
+
{ key: '0x456...', weight: 20 }
|
|
211
|
+
]);
|
|
212
|
+
|
|
213
|
+
// Auto-published and updatable
|
|
192
214
|
const process = await sdk.createProcess({
|
|
193
215
|
census: census,
|
|
194
216
|
// ... rest of config
|
|
@@ -204,12 +226,12 @@ import { CspCensus } from '@vocdoni/davinci-sdk';
|
|
|
204
226
|
|
|
205
227
|
const census = new CspCensus(
|
|
206
228
|
"0x1234567890abcdef", // Root hash (public key)
|
|
207
|
-
"https://csp-server.com"
|
|
208
|
-
1000 // Expected number of voters
|
|
229
|
+
"https://csp-server.com" // CSP URL
|
|
209
230
|
);
|
|
210
231
|
|
|
211
232
|
const process = await sdk.createProcess({
|
|
212
233
|
census: census,
|
|
234
|
+
maxVoters: 1000, // Required for CSP census
|
|
213
235
|
// ... rest of config
|
|
214
236
|
});
|
|
215
237
|
```
|
|
@@ -219,17 +241,17 @@ const process = await sdk.createProcess({
|
|
|
219
241
|
For censuses already published to the network.
|
|
220
242
|
|
|
221
243
|
```typescript
|
|
222
|
-
import { PublishedCensus,
|
|
244
|
+
import { PublishedCensus, CensusOrigin } from '@vocdoni/davinci-sdk';
|
|
223
245
|
|
|
224
246
|
const census = new PublishedCensus(
|
|
225
|
-
|
|
247
|
+
CensusOrigin.OffchainStatic,
|
|
226
248
|
"0xroot...",
|
|
227
|
-
"ipfs://uri..."
|
|
228
|
-
100 // size
|
|
249
|
+
"ipfs://uri..."
|
|
229
250
|
);
|
|
230
251
|
|
|
231
252
|
const process = await sdk.createProcess({
|
|
232
253
|
census: census,
|
|
254
|
+
maxVoters: 100, // Required for pre-published census
|
|
233
255
|
// ... rest of config
|
|
234
256
|
});
|
|
235
257
|
```
|
|
@@ -239,7 +261,7 @@ const process = await sdk.createProcess({
|
|
|
239
261
|
The SDK automatically publishes unpublished censuses when creating a process:
|
|
240
262
|
|
|
241
263
|
```typescript
|
|
242
|
-
const census = new
|
|
264
|
+
const census = new OffchainCensus();
|
|
243
265
|
census.add(['0x123...', '0x456...']);
|
|
244
266
|
|
|
245
267
|
console.log(census.isPublished); // false
|
|
@@ -257,10 +279,10 @@ console.log(census.censusURI); // Published URI
|
|
|
257
279
|
|
|
258
280
|
### Flexible Weight Types
|
|
259
281
|
|
|
260
|
-
|
|
282
|
+
OffchainCensus accepts weights as strings, numbers, or bigints for maximum flexibility:
|
|
261
283
|
|
|
262
284
|
```typescript
|
|
263
|
-
const census = new
|
|
285
|
+
const census = new OffchainCensus();
|
|
264
286
|
|
|
265
287
|
// String weights (recommended for very large numbers)
|
|
266
288
|
census.add({ key: '0x123...', weight: "999999999999" });
|
|
@@ -282,7 +304,7 @@ census.add([
|
|
|
282
304
|
### Census Operations
|
|
283
305
|
|
|
284
306
|
```typescript
|
|
285
|
-
const census = new
|
|
307
|
+
const census = new OffchainCensus();
|
|
286
308
|
|
|
287
309
|
// Add single participant
|
|
288
310
|
census.add({ key: '0x123...', weight: 5 });
|
|
@@ -310,7 +332,6 @@ const participants = census.participants;
|
|
|
310
332
|
if (census.isPublished) {
|
|
311
333
|
console.log('Root:', census.censusRoot);
|
|
312
334
|
console.log('URI:', census.censusURI);
|
|
313
|
-
console.log('Size:', census.size);
|
|
314
335
|
}
|
|
315
336
|
```
|
|
316
337
|
|
|
@@ -323,9 +344,9 @@ const process = await sdk.createProcess({
|
|
|
323
344
|
census: {
|
|
324
345
|
type: CensusOrigin.OffchainStatic,
|
|
325
346
|
root: "0xabc...",
|
|
326
|
-
size: 100,
|
|
327
347
|
uri: "ipfs://..."
|
|
328
348
|
},
|
|
349
|
+
maxVoters: 100, // Required for manual census config
|
|
329
350
|
// ... rest of config
|
|
330
351
|
});
|
|
331
352
|
```
|
|
@@ -408,7 +429,6 @@ const processResult = await sdk.createProcess({
|
|
|
408
429
|
census: {
|
|
409
430
|
type: CensusOrigin.OffchainStatic,
|
|
410
431
|
root: "0x...",
|
|
411
|
-
size: 1000,
|
|
412
432
|
uri: "ipfs://..."
|
|
413
433
|
},
|
|
414
434
|
|
|
@@ -431,8 +451,8 @@ const processResult = await sdk.createProcess({
|
|
|
431
451
|
minValueSum: "0"
|
|
432
452
|
},
|
|
433
453
|
|
|
434
|
-
// Maximum voters (
|
|
435
|
-
maxVoters: 500,
|
|
454
|
+
// Maximum voters (required for manual census config)
|
|
455
|
+
maxVoters: 500,
|
|
436
456
|
|
|
437
457
|
// Questions
|
|
438
458
|
questions: [{
|
|
@@ -664,9 +684,9 @@ async function completeVotingExample() {
|
|
|
664
684
|
census: {
|
|
665
685
|
type: CensusOrigin.OffchainStatic,
|
|
666
686
|
root: publishResult.root,
|
|
667
|
-
size: censusSize,
|
|
668
687
|
uri: publishResult.uri
|
|
669
688
|
},
|
|
689
|
+
maxVoters: censusSize,
|
|
670
690
|
timing: {
|
|
671
691
|
startDate: new Date(Date.now() + 60000), // Start in 1 minute
|
|
672
692
|
duration: 3600 // 1 hour
|
package/dist/index.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare enum CensusOrigin {
|
|
|
117
117
|
/** Credential Service Provider (CSP) census using EdDSA BLS12-377 */
|
|
118
118
|
CSP = 4
|
|
119
119
|
}
|
|
120
|
-
interface CensusParticipant
|
|
120
|
+
interface CensusParticipant {
|
|
121
121
|
key: string;
|
|
122
122
|
weight?: string;
|
|
123
123
|
}
|
|
@@ -275,8 +275,8 @@ declare class VocdoniCensusService extends BaseService {
|
|
|
275
275
|
*/
|
|
276
276
|
getCensusUri(relativePath: string): string;
|
|
277
277
|
createCensus(): Promise<string>;
|
|
278
|
-
addParticipants(censusId: string, participants: CensusParticipant
|
|
279
|
-
getParticipants(censusId: string): Promise<CensusParticipant
|
|
278
|
+
addParticipants(censusId: string, participants: CensusParticipant[]): Promise<void>;
|
|
279
|
+
getParticipants(censusId: string): Promise<CensusParticipant[]>;
|
|
280
280
|
getCensusRoot(censusId: string): Promise<string>;
|
|
281
281
|
getCensusSizeById(censusId: string): Promise<number>;
|
|
282
282
|
getCensusSizeByRoot(censusRoot: string): Promise<number>;
|
|
@@ -289,21 +289,6 @@ declare class VocdoniCensusService extends BaseService {
|
|
|
289
289
|
getHealth(): Promise<HealthResponse>;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
/**
|
|
293
|
-
* Census type enumeration
|
|
294
|
-
*/
|
|
295
|
-
declare enum CensusType {
|
|
296
|
-
PLAIN = "plain",
|
|
297
|
-
WEIGHTED = "weighted",
|
|
298
|
-
CSP = "csp"
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Re-export CensusParticipant from types for convenience
|
|
302
|
-
* Extended to make weight required (base type has optional weight)
|
|
303
|
-
*/
|
|
304
|
-
interface CensusParticipant extends CensusParticipant$1 {
|
|
305
|
-
weight: string;
|
|
306
|
-
}
|
|
307
292
|
/**
|
|
308
293
|
* Abstract base class for all census types
|
|
309
294
|
*/
|
|
@@ -311,84 +296,48 @@ declare abstract class Census {
|
|
|
311
296
|
protected _censusId: string | null;
|
|
312
297
|
protected _censusRoot: string | null;
|
|
313
298
|
protected _censusURI: string | null;
|
|
314
|
-
protected _type: CensusType;
|
|
315
299
|
protected _censusOrigin: CensusOrigin;
|
|
316
|
-
|
|
317
|
-
constructor(type: CensusType, censusOrigin?: CensusOrigin);
|
|
300
|
+
constructor(censusOrigin: CensusOrigin);
|
|
318
301
|
get censusId(): string | null;
|
|
319
302
|
get censusRoot(): string | null;
|
|
320
303
|
get censusURI(): string | null;
|
|
321
|
-
get type(): CensusType;
|
|
322
|
-
get size(): number | null;
|
|
323
304
|
get isPublished(): boolean;
|
|
324
305
|
/**
|
|
325
306
|
* Get the census origin (OffchainStatic, OffchainDynamic, Onchain, or CSP)
|
|
326
307
|
*/
|
|
327
308
|
get censusOrigin(): CensusOrigin;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Plain census where all participants have equal voting power (weight=1)
|
|
332
|
-
* Simpler API - just add addresses without specifying weights
|
|
333
|
-
*/
|
|
334
|
-
declare class PlainCensus extends Census {
|
|
335
|
-
private _participants;
|
|
336
|
-
/**
|
|
337
|
-
* Creates a new PlainCensus
|
|
338
|
-
* @param censusOrigin - The census origin (defaults to OffchainStatic for backward compatibility)
|
|
339
|
-
*/
|
|
340
|
-
constructor(censusOrigin?: CensusOrigin);
|
|
341
309
|
/**
|
|
342
|
-
*
|
|
343
|
-
*
|
|
310
|
+
* Check if this census requires publishing via the Census API
|
|
311
|
+
* Merkle censuses (OffchainStatic, OffchainDynamic) need to be published
|
|
312
|
+
* Onchain and CSP censuses are ready immediately upon construction
|
|
344
313
|
*/
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Remove participant by address
|
|
348
|
-
*/
|
|
349
|
-
remove(address: string): void;
|
|
350
|
-
/**
|
|
351
|
-
* Get all participants as CensusParticipant array (for API)
|
|
352
|
-
* All participants have weight="1"
|
|
353
|
-
*/
|
|
354
|
-
get participants(): CensusParticipant[];
|
|
355
|
-
/**
|
|
356
|
-
* Get addresses only
|
|
357
|
-
*/
|
|
358
|
-
get addresses(): string[];
|
|
359
|
-
private validateAddress;
|
|
360
|
-
/**
|
|
361
|
-
* Internal method called after publishing
|
|
362
|
-
* @internal
|
|
363
|
-
*/
|
|
364
|
-
_setPublishedData(root: string, uri: string, size: number, censusId?: string): void;
|
|
314
|
+
get requiresPublishing(): boolean;
|
|
365
315
|
}
|
|
366
316
|
|
|
367
317
|
/**
|
|
368
|
-
* Participant with flexible weight type for
|
|
318
|
+
* Participant with flexible weight type for MerkleCensus
|
|
369
319
|
* Weight can be string, number, or bigint - will be normalized to string internally
|
|
370
320
|
*/
|
|
371
|
-
interface
|
|
321
|
+
interface Participant {
|
|
372
322
|
key: string;
|
|
373
323
|
weight: string | number | bigint;
|
|
374
324
|
}
|
|
375
325
|
/**
|
|
376
|
-
*
|
|
377
|
-
*
|
|
326
|
+
* Abstract base class for Merkle Tree censuses
|
|
327
|
+
* Supports both plain addresses (weight=1) and weighted participants
|
|
378
328
|
*/
|
|
379
|
-
declare class
|
|
329
|
+
declare abstract class MerkleCensus extends Census {
|
|
380
330
|
private _participants;
|
|
331
|
+
constructor(censusOrigin: CensusOrigin);
|
|
381
332
|
/**
|
|
382
|
-
*
|
|
383
|
-
* @param
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
*
|
|
388
|
-
* Weight can be provided as string, number, or bigint - will be converted to string internally
|
|
389
|
-
* @param participant - Single participant or array of participants with custom weights
|
|
333
|
+
* Add participant(s) - supports both plain addresses and weighted participants
|
|
334
|
+
* @param data - Can be:
|
|
335
|
+
* - string: single address (weight=1)
|
|
336
|
+
* - string[]: array of addresses (weight=1 for all)
|
|
337
|
+
* - {key: string, weight: string|number|bigint}: single weighted participant
|
|
338
|
+
* - Array of weighted participants
|
|
390
339
|
*/
|
|
391
|
-
add(
|
|
340
|
+
add(data: string | string[] | Participant | Participant[]): void;
|
|
392
341
|
/**
|
|
393
342
|
* Remove participant by address
|
|
394
343
|
*/
|
|
@@ -405,16 +354,58 @@ declare class WeightedCensus extends Census {
|
|
|
405
354
|
* Get weight for specific address
|
|
406
355
|
*/
|
|
407
356
|
getWeight(address: string): string | undefined;
|
|
357
|
+
/**
|
|
358
|
+
* Internal method to add a plain address with a given weight
|
|
359
|
+
*/
|
|
360
|
+
private addAddress;
|
|
361
|
+
/**
|
|
362
|
+
* Internal method to add a weighted participant
|
|
363
|
+
*/
|
|
364
|
+
private addParticipant;
|
|
408
365
|
/**
|
|
409
366
|
* Normalizes weight from string, number, or bigint to string
|
|
410
367
|
*/
|
|
411
368
|
private normalizeWeight;
|
|
412
|
-
|
|
369
|
+
/**
|
|
370
|
+
* Validates Ethereum address format
|
|
371
|
+
*/
|
|
372
|
+
private validateAddress;
|
|
413
373
|
/**
|
|
414
374
|
* Internal method called after publishing
|
|
415
375
|
* @internal
|
|
416
376
|
*/
|
|
417
|
-
_setPublishedData(root: string, uri: string,
|
|
377
|
+
_setPublishedData(root: string, uri: string, censusId?: string): void;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Offchain static Merkle Tree census (most common)
|
|
382
|
+
* Supports both plain addresses (weight=1) and weighted participants
|
|
383
|
+
*/
|
|
384
|
+
declare class OffchainCensus extends MerkleCensus {
|
|
385
|
+
constructor();
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Offchain dynamic Merkle Tree census
|
|
390
|
+
* Supports both plain addresses (weight=1) and weighted participants
|
|
391
|
+
*/
|
|
392
|
+
declare class OffchainDynamicCensus extends MerkleCensus {
|
|
393
|
+
constructor();
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Onchain census that references a smart contract
|
|
398
|
+
* Does not require publishing as it references an existing on-chain contract
|
|
399
|
+
*/
|
|
400
|
+
declare class OnchainCensus extends Census {
|
|
401
|
+
private _contractAddress;
|
|
402
|
+
/**
|
|
403
|
+
* Creates an OnchainCensus
|
|
404
|
+
* @param contractAddress - The address of the smart contract (e.g., ERC20, ERC721)
|
|
405
|
+
* @param uri - Optional URI with census information
|
|
406
|
+
*/
|
|
407
|
+
constructor(contractAddress: string, uri?: string);
|
|
408
|
+
get contractAddress(): string;
|
|
418
409
|
}
|
|
419
410
|
|
|
420
411
|
/**
|
|
@@ -424,25 +415,23 @@ declare class WeightedCensus extends Census {
|
|
|
424
415
|
declare class CspCensus extends Census {
|
|
425
416
|
private _publicKey;
|
|
426
417
|
private _cspURI;
|
|
427
|
-
constructor(publicKey: string, cspURI: string
|
|
418
|
+
constructor(publicKey: string, cspURI: string);
|
|
428
419
|
get publicKey(): string;
|
|
429
420
|
get cspURI(): string;
|
|
430
421
|
}
|
|
431
422
|
|
|
432
423
|
/**
|
|
433
424
|
* Published census - represents a census that has already been published
|
|
434
|
-
* Use this when you have the census root
|
|
425
|
+
* Use this when you have the census root and URI from a previous publication
|
|
435
426
|
*/
|
|
436
427
|
declare class PublishedCensus extends Census {
|
|
437
428
|
/**
|
|
438
429
|
* Creates a PublishedCensus from existing census data
|
|
439
|
-
* @param
|
|
430
|
+
* @param censusOrigin - The census origin (OffchainStatic, OffchainDynamic, Onchain, or CSP)
|
|
440
431
|
* @param root - The census root
|
|
441
432
|
* @param uri - The census URI
|
|
442
|
-
* @param size - The census size (number of participants)
|
|
443
|
-
* @param censusOrigin - The census origin (optional - defaults based on type if not provided)
|
|
444
433
|
*/
|
|
445
|
-
constructor(
|
|
434
|
+
constructor(censusOrigin: CensusOrigin, root: string, uri: string);
|
|
446
435
|
}
|
|
447
436
|
|
|
448
437
|
/**
|
|
@@ -452,19 +441,18 @@ declare class CensusOrchestrator {
|
|
|
452
441
|
private censusService;
|
|
453
442
|
constructor(censusService: VocdoniCensusService);
|
|
454
443
|
/**
|
|
455
|
-
* Publishes a
|
|
444
|
+
* Publishes a MerkleCensus (OffchainCensus, OffchainDynamicCensus, or OnchainCensus)
|
|
456
445
|
* Creates a working census, adds participants, and publishes it
|
|
457
446
|
*/
|
|
458
|
-
publish(census:
|
|
447
|
+
publish(census: MerkleCensus): Promise<void>;
|
|
459
448
|
/**
|
|
460
449
|
* Gets census data for process creation
|
|
461
|
-
* Throws if census is not published
|
|
450
|
+
* Throws if census is not ready (published for Merkle/CSP, or constructed for Onchain)
|
|
462
451
|
*/
|
|
463
452
|
getCensusData(census: Census): {
|
|
464
453
|
type: CensusOrigin;
|
|
465
454
|
root: string;
|
|
466
455
|
uri: string;
|
|
467
|
-
size: number;
|
|
468
456
|
};
|
|
469
457
|
}
|
|
470
458
|
|
|
@@ -1276,8 +1264,10 @@ interface BaseProcessConfig {
|
|
|
1276
1264
|
endDate?: Date | string | number;
|
|
1277
1265
|
};
|
|
1278
1266
|
/**
|
|
1279
|
-
* Maximum number of voters allowed for this process
|
|
1280
|
-
*
|
|
1267
|
+
* Maximum number of voters allowed for this process
|
|
1268
|
+
* Optional only if census is a published MerkleCensus (OffchainCensus/OffchainDynamicCensus)
|
|
1269
|
+
* - defaults to participant count from the census
|
|
1270
|
+
* Required in all other cases (OnchainCensus, CspCensus, manual config, unpublished census)
|
|
1281
1271
|
*/
|
|
1282
1272
|
maxVoters?: number;
|
|
1283
1273
|
}
|
|
@@ -2713,5 +2703,5 @@ declare class DavinciSDK {
|
|
|
2713
2703
|
private ensureProvider;
|
|
2714
2704
|
}
|
|
2715
2705
|
|
|
2716
|
-
export { BaseService, Census, CensusNotUpdatable, CensusOrchestrator, CensusOrigin,
|
|
2717
|
-
export type { AbstainProperties, AnyJson, ApiError, ApprovalProperties, BallotMode, BaseCensusProof, BaseProcess, BudgetProperties, CSPCensusProof, CSPCensusProofProvider, CSPSignOutput, CensusData, CensusParticipant
|
|
2706
|
+
export { BaseService, Census, CensusNotUpdatable, CensusOrchestrator, CensusOrigin, CircomProof, ContractServiceError, CspCensus, DavinciCrypto, DavinciSDK, ElectionMetadataTemplate, ElectionResultsTypeNames, MerkleCensus, OffchainCensus, OffchainDynamicCensus, OnchainCensus, OrganizationAdministratorError, OrganizationCreateError, OrganizationDeleteError, OrganizationRegistryService, OrganizationUpdateError, ProcessCensusError, ProcessCreateError, ProcessDurationError, ProcessOrchestrationService, ProcessRegistryService, ProcessResultError, ProcessStateTransitionError, ProcessStatus, ProcessStatusError, PublishedCensus, SmartContractService, TxStatus, VocdoniApiService, VocdoniCensusService, VocdoniSequencerService, VoteOrchestrationService, VoteStatus, assertCSPCensusProof, assertMerkleCensusProof, createProcessSignatureMessage, getElectionMetadataTemplate, isCSPCensusProof, isMerkleCensusProof, signProcessCreation, validateProcessId };
|
|
2707
|
+
export type { AbstainProperties, AnyJson, ApiError, ApprovalProperties, BallotMode, BaseCensusProof, BaseProcess, BudgetProperties, CSPCensusProof, CSPCensusProofProvider, CSPSignOutput, CensusData, CensusParticipant, CensusProof, CensusProviders, CensusSizeResponse, Choice, ChoiceProperties, CircomProofOptions, CreateProcessRequest, CreateProcessResponse, CustomMeta, DavinciCryptoCiphertext, DavinciCryptoInputs, DavinciCryptoOptions, DavinciCryptoOutput, DavinciSDKConfig, ElectionMetadata, ElectionResultsType, EncryptionKey, EntityCallback, GetProcessResponse, Groth16Proof, HealthResponse, IChoice, IQuestion, InfoResponse, JsonArray, JsonMap, ListProcessesResponse, MerkleCensusProof, MerkleCensusProofProvider, MultiLanguage, OrganizationAdministratorAddedCallback, OrganizationAdministratorRemovedCallback, OrganizationCreatedCallback, OrganizationInfo, OrganizationUpdatedCallback, Participant, ParticipantInfoResponse, ProcessCensusUpdatedCallback, ProcessConfig, ProcessConfigWithMetadata, ProcessConfigWithMetadataUri, ProcessCreatedCallback, ProcessCreationResult, ProcessDurationChangedCallback, ProcessInfo, ProcessMaxVotersChangedCallback, ProcessQuestion, ProcessResultsSetCallback, ProcessStateTransitionedCallback, ProcessStatusChangedCallback, ProofInputs, ProtocolVersion, PublishCensusResponse, QuadraticProperties, Question, SequencerStats, Snapshot, SnapshotsQueryParams, SnapshotsResponse, TxStatusEvent, VocdoniApiServiceConfig, VoteBallot, VoteCiphertext, VoteConfig, VoteOrchestrationConfig, VoteProof, VoteRequest, VoteResult, VoteStatusInfo, VoteStatusResponse, WorkerStats, WorkersResponse };
|