-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update vocdoni-sdk docs by commit 0849099
- Loading branch information
1 parent
6fde03d
commit 0c7864c
Showing
40 changed files
with
2,909 additions
and
268 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class AccountService | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
<div className="container"> | ||
<div className="row mb-2"><div className="col col--12"><strong>Methods</strong></div></div> | ||
<div className="row"><div className="col col--12"><a href="#fetchAccountInfo">fetchAccountInfo</a><br/><a href="#setInfo">setInfo</a></div></div> | ||
</div> | ||
|
||
## constructor | ||
```ts | ||
new AccountService(params) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Instantiate the election service. | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|params|Partial<AccountServiceParameters>|||The service parameters| | ||
|
||
## Methods | ||
|
||
### fetchAccountInfo {#fetchAccountInfo} | ||
|
||
<div> | ||
<span className="badge badge--success">async</span> | ||
</div> | ||
|
||
Fetches account information. | ||
|
||
**Returns**: Promise<[AccountData](AccountData)> | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|address|string|||The account address to fetch the information| | ||
|
||
### setInfo {#setInfo} | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Updates an account with information | ||
|
||
**Returns**: Promise<string> | ||
- The transaction hash | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|tx|string|||The transaction for setting the account| | ||
|metadata|string|||The account metadata| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class AnonymousService | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
<div className="container"> | ||
<div className="row mb-2"><div className="col col--12"><strong>Methods</strong></div></div> | ||
<div className="row"><div className="col col--12"><a href="#checkCircuitsHashes">checkCircuitsHashes</a><br/><a href="#fetchCircuits">fetchCircuits</a><br/><a href="#setCircuits">setCircuits</a></div></div> | ||
</div> | ||
|
||
## constructor | ||
```ts | ||
new AnonymousService(params) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Instantiate the anonymous service. | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|params|Partial<AnonymousServiceParameters>|||The service parameters| | ||
|
||
## Methods | ||
|
||
### checkCircuitsHashes {#checkCircuitsHashes} | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Checks circuit hashes | ||
|
||
**Returns**: ChainCircuits | ||
- The checked circuit parameters | ||
|
||
### fetchCircuits {#fetchCircuits} | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Fetches circuits for anonymous voting | ||
|
||
**Returns**: Promise<ChainCircuits> | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|circuits|Omit<ChainCircuits, ('zKeyData'\|'vKeyData'\|'wasmData')>|✔️||Additional options for custom circuits| | ||
|
||
### setCircuits {#setCircuits} | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Sets circuits for anonymous voting | ||
|
||
**Returns**: Promise<ChainCircuits> | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|circuits|ChainCircuits|||Custom circuits| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class AnonymousVote | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
## constructor | ||
```ts | ||
new AnonymousVote(votes, signature, password) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Constructs a csp vote | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|votes|Array<number \| TSBigIntKeyword>|||The list of votes values| | ||
|signature|string|✔️||The signature of the payload| | ||
|password|string|✔️|"0"|The password of the anonymous vote| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class ApprovalElection | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Represents an approval election | ||
|
||
## constructor | ||
```ts | ||
new ApprovalElection(params) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Constructs an approval election | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|params|IApprovalElectionParameters|||Approval election parameters| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class ArchivedCensus | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Represents an archived census | ||
|
||
## constructor | ||
```ts | ||
new ArchivedCensus(censusId, censusURI, type, size, weight) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Constructs an archived census | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|censusId|string|||The id of the census| | ||
|censusURI|string|✔️||The URI of the census| | ||
|type|CensusType|✔️||The type of the census| | ||
|size|number|✔️||The size of the census| | ||
|weight|TSBigIntKeyword|✔️||The weight of the census| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class ArchivedElection | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Represents a published election | ||
|
||
## constructor | ||
```ts | ||
new ArchivedElection(params) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Constructs an archived election | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|params|IPublishedElectionParameters|||Election parameters| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
custom_edit_url: null | ||
--- | ||
|
||
```ts | ||
class BudgetElection | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Represents a budget election | ||
|
||
## constructor | ||
```ts | ||
new BudgetElection(params) | ||
``` | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
Constructs a budget election | ||
|
||
|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|params|IBudgetElectionParameters|||Budget election parameters| | ||
|
Oops, something went wrong.