From 25ed3df508d7e9bcacb0b392d0ae9d976298bc9b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:36:30 +0000 Subject: [PATCH] deploy: 3d011daf5dd3c37ce0f9b7f5452e02cc3630e868 --- 404.html | 4 ++-- assets/js/4a1ec646.7a3fa26e.js | 1 - assets/js/4a1ec646.cbd46be4.js | 1 + assets/js/4f61726b.1fb8ecc1.js | 1 + assets/js/4f61726b.87a165f1.js | 1 - assets/js/935f2afb.4312d1cd.js | 1 + assets/js/935f2afb.f323c678.js | 1 - assets/js/{9728e091.c0cb931b.js => 9728e091.606ff7ce.js} | 2 +- assets/js/{e24c431f.70c28301.js => e24c431f.443d80ae.js} | 2 +- ...{runtime~main.b3411c4f.js => runtime~main.a9db251a.js} | 2 +- index.html | 4 ++-- intro.html | 4 ++-- protocol.html | 4 ++-- protocol/anonymity.html | 4 ++-- protocol/anonymity/blind-signatures.html | 4 ++-- protocol/anonymity/on-chain.html | 4 ++-- protocol/anonymity/zk-census-proof.html | 4 ++-- protocol/ballot-protocol.html | 4 ++-- protocol/census.html | 4 ++-- protocol/census/off-chain-csp.html | 4 ++-- protocol/census/off-chain-tree.html | 4 ++-- protocol/census/on-chain.html | 4 ++-- protocol/census/on-chain/census3.html | 4 ++-- protocol/data-schemes.html | 4 ++-- protocol/data-schemes/election.html | 4 ++-- protocol/data-schemes/organization.html | 4 ++-- protocol/data-schemes/vote.html | 4 ++-- sdk.html | 4 ++-- sdk/integration-details.html | 4 ++-- sdk/integration-details/census-types.html | 4 ++-- sdk/integration-details/census-types/off-chain-csp.html | 7 +++---- sdk/integration-details/census-types/off-chain-tree.html | 6 +++--- sdk/integration-details/census-types/on-chain.html | 4 ++-- .../census-types/on-chain/complex-census.html | 6 +++--- sdk/integration-details/vocdoni-tokens.html | 8 ++++---- sdk/integration-details/voting-types.html | 4 ++-- sdk/integration-details/voting-types/approval.html | 4 ++-- sdk/integration-details/voting-types/quadratic.html | 4 ++-- sdk/integration-details/voting-types/ranked.html | 4 ++-- sdk/integration-details/voting-types/single-choice.html | 4 ++-- sdk/integration-details/voting-types/weighted.html | 4 ++-- sdk/reference/changelog.html | 4 ++-- sdk/reference/classes/Account.html | 4 ++-- sdk/reference/classes/AccountAPI.html | 4 ++-- sdk/reference/classes/AccountService.html | 4 ++-- sdk/reference/classes/AnonymousService.html | 4 ++-- sdk/reference/classes/AnonymousVote.html | 4 ++-- sdk/reference/classes/ApprovalElection.html | 4 ++-- sdk/reference/classes/ArchivedElection.html | 4 ++-- sdk/reference/classes/BudgetElection.html | 4 ++-- sdk/reference/classes/Census.html | 4 ++-- sdk/reference/classes/Census3CensusAPI.html | 4 ++-- sdk/reference/classes/Census3ServiceAPI.html | 4 ++-- sdk/reference/classes/Census3StrategyAPI.html | 4 ++-- sdk/reference/classes/Census3TokenAPI.html | 4 ++-- sdk/reference/classes/CensusAPI.html | 4 ++-- sdk/reference/classes/CensusService.html | 4 ++-- sdk/reference/classes/ChainAPI.html | 4 ++-- sdk/reference/classes/ChainService.html | 4 ++-- sdk/reference/classes/CspAPI.html | 4 ++-- sdk/reference/classes/CspCensus.html | 4 ++-- sdk/reference/classes/CspService.html | 4 ++-- sdk/reference/classes/CspVote.html | 4 ++-- sdk/reference/classes/Election.html | 4 ++-- sdk/reference/classes/ElectionAPI.html | 4 ++-- sdk/reference/classes/ElectionService.html | 4 ++-- sdk/reference/classes/FaucetAPI.html | 4 ++-- sdk/reference/classes/FaucetService.html | 4 ++-- sdk/reference/classes/FileAPI.html | 4 ++-- sdk/reference/classes/FileService.html | 4 ++-- sdk/reference/classes/InvalidElection.html | 4 ++-- sdk/reference/classes/MultiChoiceElection.html | 4 ++-- sdk/reference/classes/OffchainCensus.html | 4 ++-- sdk/reference/classes/PlainCensus.html | 4 ++-- sdk/reference/classes/PublishedCensus.html | 4 ++-- sdk/reference/classes/PublishedElection.html | 4 ++-- sdk/reference/classes/Service.html | 4 ++-- sdk/reference/classes/StrategyCensus.html | 4 ++-- sdk/reference/classes/TokenCensus.html | 4 ++-- sdk/reference/classes/UnpublishedElection.html | 4 ++-- sdk/reference/classes/VocdoniCensus3Client.html | 4 ++-- sdk/reference/classes/VocdoniSDKClient.html | 4 ++-- sdk/reference/classes/Vote.html | 4 ++-- sdk/reference/classes/VoteAPI.html | 4 ++-- sdk/reference/classes/VoteService.html | 4 ++-- sdk/reference/classes/WalletAPI.html | 4 ++-- sdk/reference/classes/WeightedCensus.html | 4 ++-- sdk/reference/classes/ZkAPI.html | 4 ++-- sdk/reference/enums/CensusOrigin.html | 4 ++-- sdk/reference/enums/CensusType.html | 4 ++-- sdk/reference/enums/CensusTypeEnum.html | 4 ++-- sdk/reference/enums/CspProofType.html | 4 ++-- sdk/reference/enums/ElectionCreationSteps.html | 4 ++-- sdk/reference/enums/ElectionResultsTypeNames.html | 4 ++-- sdk/reference/enums/ElectionStatus.html | 4 ++-- sdk/reference/enums/ElectionStatusReady.html | 4 ++-- sdk/reference/enums/EnvOptions.html | 4 ++-- sdk/reference/enums/TransactionType.html | 4 ++-- sdk/reference/enums/TxType.html | 4 ++-- sdk/reference/enums/VoteSteps.html | 4 ++-- sdk/reference/interfaces/AccountMetadata.html | 4 ++-- sdk/reference/interfaces/AdminTx.html | 4 ++-- sdk/reference/interfaces/CircuitInputs.html | 4 ++-- sdk/reference/interfaces/CollectFaucetTx.html | 4 ++-- sdk/reference/interfaces/ElectionMetadata.html | 4 ++-- sdk/reference/interfaces/FetchElectionsParameters.html | 4 ++-- sdk/reference/interfaces/IAccount.html | 4 ++-- .../interfaces/IAccountTransfersCountResponse.html | 4 ++-- sdk/reference/interfaces/IAccountsCountResponse.html | 4 ++-- sdk/reference/interfaces/IAccountsListResponse.html | 4 ++-- sdk/reference/interfaces/IApprovalElectionParameters.html | 4 ++-- sdk/reference/interfaces/IBlockTransactionsResponse.html | 4 ++-- .../interfaces/IBudgetElectionParametersInfo.html | 4 ++-- .../interfaces/IBudgetElectionParametersWithBudget.html | 4 ++-- .../IBudgetElectionParametersWithCensusWeight.html | 4 ++-- sdk/reference/interfaces/ICensus.html | 4 ++-- sdk/reference/interfaces/ICensus3CensusListResponse.html | 4 ++-- sdk/reference/interfaces/ICensus3CensusQueueResponse.html | 4 ++-- sdk/reference/interfaces/ICensus3CensusResponse.html | 4 ++-- sdk/reference/interfaces/ICensus3ServiceInfoResponse.html | 4 ++-- .../interfaces/ICensus3StrategiesListResponse.html | 4 ++-- .../ICensus3StrategiesListResponsePaginated.html | 4 ++-- sdk/reference/interfaces/ICensus3StrategiesOperator.html | 4 ++-- .../interfaces/ICensus3StrategiesOperatorsResponse.html | 4 ++-- .../interfaces/ICensus3StrategyCreateResponse.html | 4 ++-- .../ICensus3StrategyEstimationQueueResponse.html | 4 ++-- .../interfaces/ICensus3StrategyHoldersResponse.html | 4 ++-- .../ICensus3StrategyHoldersResponsePaginated.html | 4 ++-- .../interfaces/ICensus3StrategyImportQueueResponse.html | 4 ++-- sdk/reference/interfaces/ICensus3StrategyToken.html | 4 ++-- sdk/reference/interfaces/ICensus3SupportedChain.html | 4 ++-- sdk/reference/interfaces/ICensus3TokenHolderResponse.html | 4 ++-- sdk/reference/interfaces/ICensus3TokenListResponse.html | 4 ++-- .../interfaces/ICensus3TokenListResponsePaginated.html | 4 ++-- sdk/reference/interfaces/ICensus3TokenTypesResponse.html | 4 ++-- .../interfaces/ICensus3ValidatePredicateChild.html | 4 ++-- .../interfaces/ICensus3ValidatePredicateResponse.html | 4 ++-- .../interfaces/ICensus3ValidatePredicateToken.html | 4 ++-- sdk/reference/interfaces/ICensusExportResponse.html | 4 ++-- sdk/reference/interfaces/ICensusImportResponse.html | 4 ++-- sdk/reference/interfaces/ICensusParticipant.html | 4 ++-- sdk/reference/interfaces/ICensusProofResponse.html | 4 ++-- sdk/reference/interfaces/ICensusPublishResponse.html | 4 ++-- sdk/reference/interfaces/IChainBlockInfoResponse.html | 4 ++-- sdk/reference/interfaces/IChainGetCircuitResponse.html | 4 ++-- sdk/reference/interfaces/IChainGetCostsResponse.html | 4 ++-- sdk/reference/interfaces/IChainGetInfoResponse.html | 4 ++-- .../interfaces/IChainOrganizationCountResponse.html | 4 ++-- .../interfaces/IChainOrganizationListResponse.html | 4 ++-- sdk/reference/interfaces/IChainOrganizationResponse.html | 4 ++-- sdk/reference/interfaces/IChainSubmitTxResponse.html | 4 ++-- sdk/reference/interfaces/IChainTxCountResponse.html | 4 ++-- sdk/reference/interfaces/IChainTxListResponse.html | 4 ++-- sdk/reference/interfaces/IChainTxReference.html | 4 ++-- sdk/reference/interfaces/IChainValidator.html | 4 ++-- .../interfaces/IChainValidatorsListResponse.html | 4 ++-- sdk/reference/interfaces/IChoice.html | 4 ++-- sdk/reference/interfaces/ICspAuthStep.html | 4 ++-- sdk/reference/interfaces/ICspFinalStepResponse.html | 4 ++-- sdk/reference/interfaces/ICspInfoResponse.html | 4 ++-- .../interfaces/ICspIntermediateStepResponse.html | 4 ++-- sdk/reference/interfaces/ICspSignResponse.html | 4 ++-- sdk/reference/interfaces/IElectionCreateResponse.html | 4 ++-- sdk/reference/interfaces/IElectionInfoResponse.html | 4 ++-- sdk/reference/interfaces/IElectionKeysResponse.html | 4 ++-- sdk/reference/interfaces/IElectionListFilter.html | 4 ++-- sdk/reference/interfaces/IElectionListResponse.html | 4 ++-- sdk/reference/interfaces/IElectionMode.html | 4 ++-- sdk/reference/interfaces/IElectionNextIdResponse.html | 4 ++-- sdk/reference/interfaces/IElectionParameters.html | 4 ++-- sdk/reference/interfaces/IElectionSummary.html | 4 ++-- sdk/reference/interfaces/IElectionType.html | 4 ++-- sdk/reference/interfaces/IElectionVote.html | 4 ++-- sdk/reference/interfaces/IElectionVoteListResponse.html | 4 ++-- sdk/reference/interfaces/IEncryptionKey.html | 4 ++-- sdk/reference/interfaces/IInvalidElectionParameters.html | 4 ++-- .../interfaces/IMultiChoiceElectionParameters.html | 4 ++-- .../interfaces/IPublishedElectionParameters.html | 4 ++-- sdk/reference/interfaces/IQuestion.html | 4 ++-- sdk/reference/interfaces/ITallyMode.html | 4 ++-- sdk/reference/interfaces/IVoteInfoResponse.html | 4 ++-- sdk/reference/interfaces/IVoteMode.html | 4 ++-- sdk/reference/interfaces/IVoteSubmitResponse.html | 4 ++-- sdk/reference/interfaces/IVoteType.html | 4 ++-- sdk/reference/interfaces/IZkProofResponse.html | 4 ++-- sdk/reference/interfaces/IZkSIKResponse.html | 4 ++-- sdk/reference/interfaces/MintTokensTx.html | 4 ++-- sdk/reference/interfaces/NewProcessTx.html | 4 ++-- sdk/reference/interfaces/Process.html | 4 ++-- sdk/reference/interfaces/Proof.html | 4 ++-- sdk/reference/interfaces/RegisterKeyTx.html | 4 ++-- sdk/reference/interfaces/SendTokensTx.html | 4 ++-- sdk/reference/interfaces/ServiceProperties.html | 4 ++-- sdk/reference/interfaces/SetAccountTx.html | 4 ++-- sdk/reference/interfaces/SetProcessTx.html | 4 ++-- sdk/reference/interfaces/SetTransactionCostsTx.html | 4 ++-- sdk/reference/interfaces/Tx.html | 4 ++-- sdk/reference/interfaces/VoteEnvelope.html | 4 ++-- sdk/reference/sdk-reference.html | 4 ++-- sdk/tutorial.html | 4 ++-- search.html | 4 ++-- ui-components.html | 4 ++-- ui-components/Election.html | 4 ++-- ui-components/Organization.html | 4 ++-- vocdoni-api/accounts.html | 4 ++-- vocdoni-api/add-account.html | 4 ++-- vocdoni-api/add-participants-to-census.html | 4 ++-- vocdoni-api/census-merkle-root.html | 4 ++-- vocdoni-api/census-size.html | 4 ++-- vocdoni-api/census-total-weight.html | 4 ++-- vocdoni-api/censuses.html | 4 ++-- vocdoni-api/chain.html | 4 ++-- vocdoni-api/circuit-info.html | 4 ++-- vocdoni-api/compute-election-price.html | 4 ++-- vocdoni-api/compute-ipfs-ci-dv-1-of-file.html | 4 ++-- vocdoni-api/count-election-votes.html | 4 ++-- vocdoni-api/count-organization-elections.html | 4 ++-- vocdoni-api/count-organizations.html | 4 ++-- vocdoni-api/create-a-new-census.html | 4 ++-- vocdoni-api/create-election-for-wallet.html | 4 ++-- vocdoni-api/create-election.html | 4 ++-- vocdoni-api/delete-census.html | 4 ++-- vocdoni-api/election-information.html | 4 ++-- vocdoni-api/election-results.html | 4 ++-- vocdoni-api/elections.html | 4 ++-- vocdoni-api/estimate-block-to-date.html | 4 ++-- vocdoni-api/estimate-date-to-block.html | 4 ++-- vocdoni-api/export-census-database.html | 4 ++-- vocdoni-api/export-census.html | 4 ++-- vocdoni-api/exports-the-indexer-database.html | 4 ++-- vocdoni-api/get-account.html | 4 ++-- vocdoni-api/get-block-by-hash.html | 4 ++-- vocdoni-api/get-block-by-height.html | 4 ++-- vocdoni-api/get-next-election-id.html | 4 ++-- vocdoni-api/get-type-of-census.html | 4 ++-- vocdoni-api/get-vote.html | 4 ++-- vocdoni-api/import-census-database.html | 4 ++-- vocdoni-api/import-census.html | 4 ++-- .../list-account-received-and-sent-token-transfers.html | 4 ++-- vocdoni-api/list-account-token-fees.html | 4 ++-- vocdoni-api/list-all-census-references.html | 4 ++-- vocdoni-api/list-all-token-fees-by-reference.html | 4 ++-- vocdoni-api/list-all-token-fees-by-type.html | 4 ++-- vocdoni-api/list-all-token-fees.html | 4 ++-- vocdoni-api/list-election-votes.html | 4 ++-- vocdoni-api/list-elections-filtered.html | 4 ++-- vocdoni-api/list-elections.html | 4 ++-- vocdoni-api/list-encryption-keys.html | 4 ++-- vocdoni-api/list-of-the-existing-accounts.html | 4 ++-- vocdoni-api/list-of-valid-sik-roots.html | 4 ++-- vocdoni-api/list-organization-elections-by-status.html | 4 ++-- vocdoni-api/list-organization-elections.html | 4 ++-- vocdoni-api/list-organizations-filtered.html | 4 ++-- vocdoni-api/list-organizations.html | 4 ++-- vocdoni-api/list-transactions.html | 4 ++-- vocdoni-api/list-validators.html | 4 ++-- vocdoni-api/price-factors-information.html | 4 ++-- vocdoni-api/prove-key-to-census.html | 4 ++-- vocdoni-api/publish-census-at-root.html | 4 ++-- vocdoni-api/publish-census.html | 4 ++-- .../returns-if-the-address-provided-has-a-valid-sik.html | 4 ++-- vocdoni-api/set-account.html | 4 ++-- vocdoni-api/set-wallet-account.html | 4 ++-- vocdoni-api/sik.html | 4 ++-- vocdoni-api/submit-a-vote.html | 4 ++-- vocdoni-api/submit-transaction.html | 4 ++-- vocdoni-api/total-number-of-accounts.html | 4 ++-- .../total-number-of-sent-and-received-transactions.html | 4 ++-- vocdoni-api/transaction-by-block-height-and-index.html | 4 ++-- vocdoni-api/transaction-by-hash.html | 4 ++-- vocdoni-api/transaction-by-index.html | 4 ++-- vocdoni-api/transaction-costs.html | 4 ++-- vocdoni-api/transactions-count.html | 4 ++-- vocdoni-api/transactions-in-a-block.html | 4 ++-- vocdoni-api/transfer-tokens.html | 4 ++-- vocdoni-api/verify-merkle-proof.html | 4 ++-- vocdoni-api/verify-vote.html | 4 ++-- vocdoni-api/vocdoni-api.html | 4 ++-- vocdoni-api/vochain-information.html | 4 ++-- vocdoni-api/votes.html | 4 ++-- vocdoni-api/wallet.html | 4 ++-- 281 files changed, 555 insertions(+), 556 deletions(-) delete mode 100644 assets/js/4a1ec646.7a3fa26e.js create mode 100644 assets/js/4a1ec646.cbd46be4.js create mode 100644 assets/js/4f61726b.1fb8ecc1.js delete mode 100644 assets/js/4f61726b.87a165f1.js create mode 100644 assets/js/935f2afb.4312d1cd.js delete mode 100644 assets/js/935f2afb.f323c678.js rename assets/js/{9728e091.c0cb931b.js => 9728e091.606ff7ce.js} (98%) rename assets/js/{e24c431f.70c28301.js => e24c431f.443d80ae.js} (86%) rename assets/js/{runtime~main.b3411c4f.js => runtime~main.a9db251a.js} (98%) diff --git a/404.html b/404.html index 88cea92c6..d908416a1 100644 --- a/404.html +++ b/404.html @@ -12,13 +12,13 @@ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/assets/js/4a1ec646.7a3fa26e.js b/assets/js/4a1ec646.7a3fa26e.js deleted file mode 100644 index b163bd33a..000000000 --- a/assets/js/4a1ec646.7a3fa26e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[5909],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(n),f=i,h=u["".concat(c,".").concat(f)]||u[f]||d[f]||r;return n?a.createElement(h,o(o({ref:t},p),{},{components:n})):a.createElement(h,o({ref:t},p))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s.mdxType="string"==typeof e?e:i,o[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>s,toc:()=>l});var a=n(87462),i=(n(67294),n(3905));const r={},o="Off-chain Credential Service Provider",s={unversionedId:"sdk/integration-details/census-types/off-chain-csp",id:"sdk/integration-details/census-types/off-chain-csp",title:"Off-chain Credential Service Provider",description:"A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote.",source:"@site/docs/sdk/integration-details/census-types/off-chain-csp.md",sourceDirName:"sdk/integration-details/census-types",slug:"/sdk/integration-details/census-types/off-chain-csp",permalink:"/sdk/integration-details/census-types/off-chain-csp",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Census Types",permalink:"/sdk/integration-details/census-types/"},next:{title:"Off-chain Merkle Tree",permalink:"/sdk/integration-details/census-types/off-chain-tree"}},c={},l=[{value:"Anonymity",id:"anonymity",level:2}],p={toc:l};function d(e){let{components:t,...n}=e;return(0,i.kt)("wrapper",(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"off-chain-credential-service-provider"},"Off-chain Credential Service Provider"),(0,i.kt)("p",null,"A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote. "),(0,i.kt)("p",null,"Because using an off-chain CSP census requires a custom CSP for each use-case, it is not ready to use out-of-the-box. If you are interested in setting up a CSP election, please ",(0,i.kt)("a",{parentName:"p",href:"https://chat.vocdoni.io"},"reach out to us")," for help."),(0,i.kt)("p",null,"CSP census elections have the option of full-anonymity with the use of ",(0,i.kt)("a",{parentName:"p",href:"/protocol/Census/off-chain-csp#blind-signatures"},"Blind Signatures"),". "),(0,i.kt)("p",null,"If a CSP is set up for a census, minor modifications are needed on the client side. For creating a CSP based election, a ",(0,i.kt)("inlineCode",{parentName:"p"},"CspCensus")," has to be used with the CSP's public key and URL as parameters. "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const election = Election.from({\n title: 'Election title',\n description: 'Election description',\n // a header image for your process (this is for example purposes; avoid using random sources)\n header: 'https://source.unsplash.com/random/2048x600',\n endDate: new Date('2023-01-23 23:23:23'),\n census: new CspCensus(CSP_PUBKEY, CSP_URL),\n})\n// The election can be created the same way from here...\n")),(0,i.kt)("p",null,"The next step is requesting a blind signature from the CSP for each voter before casting their vote. "),(0,i.kt)("p",null,"This is done with ",(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#cspstep"},(0,i.kt)("inlineCode",{parentName:"a"},"client.cspStep")),'. This function sends an API call to the given CSP to perform an "authentication step" predefined by whoever sets up the CSP. A step could be validating a name, sending an authentication token, or anything else. Non-final steps should return a ',(0,i.kt)("inlineCode",{parentName:"p"},"ICspIntermediateStepResponse")," object containing an ",(0,i.kt)("inlineCode",{parentName:"p"},"authToken")," and arbitrary ",(0,i.kt)("inlineCode",{parentName:"p"},"response")," data.\nOnce the predefined set of steps has been performed successfully, the final step should return a ",(0,i.kt)("inlineCode",{parentName:"p"},"ICspFinalStepResponse")," object containing a ",(0,i.kt)("inlineCode",{parentName:"p"},"token")," registered to the verified voter."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"// Client initialization\nconst client = new VocdoniSDKClient({\n env: EnvOptions.DEV,\n wallet: voter, // the signer used (Metamask, Walletconnect)\n electionId: '934234...', // The election identifier (has to be a CSP configured election)\n})\n\n// Auth steps for the CSP (can vary of the type of the CSP)\nconst step0 = (await client.cspStep(0, ['Name test'])) as ICspIntermediateStepResponse;\nconst step1 = (await client.cspStep(\n 1,\n [step0.response.reduce((acc, v) => +acc + +v, 0).toString()],\n step0.authToken\n)) as ICspFinalStepResponse;\n")),(0,i.kt)("p",null,"Once this token has been received, the client requests blind signature from the CSP and then uses this signature to cast vote. Because this signature is blinded, the vote cannot be traced back to the voter address or verification information."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"// Get the blind signature\nconst signature = await client.cspSign(voter.address, step1.token);\n\n// Get the vote based on the signature\nconst vote = client.cspVote(new Vote([Math.round(Math.random())]), signature);\n\n// Vote\nconst voteId = await client.submitVote(vote);\n")),(0,i.kt)("h2",{id:"anonymity"},"Anonymity"),(0,i.kt)("p",null,"Credential Service Provider elections provide strong anonymity by the use of ",(0,i.kt)("a",{parentName:"p",href:"/protocol/Census/off-chain-csp#blind-signatures"},"Blind Signatures"),'. This is a slight modification on the standard CSP Census design, in which users are able to send a "blinded" version of their vote to the CSP after getting verified. The CSP signs this blinded package, and the user is then able cast their vote signed by the CSP without their identity being traced to that vote by anybody, including the CSP.'),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://chat.vocdoni.io"},"Ask us")," if you would like to try setting up at CSP that can compute blind signatures. "))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4a1ec646.cbd46be4.js b/assets/js/4a1ec646.cbd46be4.js new file mode 100644 index 000000000..f96b684d2 --- /dev/null +++ b/assets/js/4a1ec646.cbd46be4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[5909],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,s=e.originalType,l=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(n),h=i,m=d["".concat(l,".").concat(h)]||d[h]||u[h]||s;return n?a.createElement(m,r(r({ref:t},p),{},{components:n})):a.createElement(m,r({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var s=n.length,r=new Array(s);r[0]=d;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:i,r[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var a=n(87462),i=(n(67294),n(3905));const s={},r="Off-chain Credential Service Provider",o={unversionedId:"sdk/integration-details/census-types/off-chain-csp",id:"sdk/integration-details/census-types/off-chain-csp",title:"Off-chain Credential Service Provider",description:"A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote.",source:"@site/docs/sdk/integration-details/census-types/off-chain-csp.md",sourceDirName:"sdk/integration-details/census-types",slug:"/sdk/integration-details/census-types/off-chain-csp",permalink:"/sdk/integration-details/census-types/off-chain-csp",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Census Types",permalink:"/sdk/integration-details/census-types/"},next:{title:"Off-chain Merkle Tree",permalink:"/sdk/integration-details/census-types/off-chain-tree"}},l={},c=[{value:"Tutorial",id:"tutorial",level:2},{value:"Census",id:"census",level:3},{value:"Election",id:"election",level:3},{value:"Voting",id:"voting",level:3},{value:"Anonymity",id:"anonymity",level:2}],p={toc:c};function u(e){let{components:t,...n}=e;return(0,i.kt)("wrapper",(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"off-chain-credential-service-provider"},"Off-chain Credential Service Provider"),(0,i.kt)("p",null,"A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote. "),(0,i.kt)("admonition",{title:"anonymous",type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"CSP census elections have the option of full anonymity with the use of ",(0,i.kt)("a",{parentName:"p",href:"/protocol/Census/off-chain-csp#blind-signatures"},"Blind Signatures"),". ")),(0,i.kt)("p",null,"Because using an off-chain CSP census requires a custom CSP for each use-case, it is not ready to use out-of-the-box. If you are interested in setting up a CSP election, please ",(0,i.kt)("a",{parentName:"p",href:"https://chat.vocdoni.io"},"reach out to us")," for help."),(0,i.kt)("h2",{id:"tutorial"},"Tutorial"),(0,i.kt)("p",null,"You can check out a full working example of this tutorial ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/vocdoni/vocdoni-sdk/tree/examples/token-based/examples/csp"},"here")),(0,i.kt)("p",null,'This tutorial uses an example Credential Service Provider that "verifies" voters with a simple arithmetic problem. For a real use-case you need to reach out to us for help with setting up a CSP that suits your needs.'),(0,i.kt)("h3",{id:"census"},"Census"),(0,i.kt)("p",null,"Once a CSP has been set up, you should have a ",(0,i.kt)("inlineCode",{parentName:"p"},"URL")," and a ",(0,i.kt)("inlineCode",{parentName:"p"},"Public Key")," belonging to that CSP. These parameters are used to create a ",(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/classes/CspCensus"},(0,i.kt)("inlineCode",{parentName:"a"},"CspCensus")),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const cspCensus = new CspCensus(CSP_PUBKEY, CSP_URL);\n")),(0,i.kt)("admonition",{title:"csp public key",type:"warning"},(0,i.kt)("p",{parentName:"admonition"},"Make sure that your are using the correct public key for your CSP. The protocol cannot tell if the public key is correct, but you will have a signature error when casting votes with an incorrect CSP public key.")),(0,i.kt)("h3",{id:"election"},"Election"),(0,i.kt)("p",null,"This census can then be used to create an election like any other. The only restriction is you must assign a ",(0,i.kt)("inlineCode",{parentName:"p"},"maxCensusSize")," to the election."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const election = Election.from({\n title: 'Election title',\n description: 'Election description',\n header: 'https://source.unsplash.com/random',\n endDate: new Date().getTime() + 100000000,\n maxCensusSize: 200,\n census: cspCensus,\n });\n")),(0,i.kt)("p",null,"From this point on you can create the election as you would with any other census type. "),(0,i.kt)("h3",{id:"voting"},"Voting"),(0,i.kt)("p",null,"The next step is requesting a signature from the CSP for each voter before casting their vote. In a real application, this might be done interactively with user input (like address or phone number), or it could be handled automatically using existing information (like a user login info, or a voter ID number)."),(0,i.kt)("p",null,"There can be multiple steps in order to validate a voter. This authorization is done in discrete steps which should be known for a CSP. We can also get a short description of the required steps with ",(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#cspinfo"},(0,i.kt)("inlineCode",{parentName:"a"},"client.cspInfo")),". "),(0,i.kt)("admonition",{title:"csp info",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"Before getting the CSP info, the client CSP service needs to know which CSP to communiate with. The CSP url is set automatically when voting, but you can also use ",(0,i.kt)("inlineCode",{parentName:"p"},"setUrlFromElection"),".")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"client.cspService.setUrlFromElection(election);\nconst info = await client.cspInfo();\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "title": "Simple math challenge",\n "signatureType": [\n "blind",\n "ecdsa",\n "sharedkey"\n ],\n "authType": "auth",\n "authSteps": [\n {\n "title": "Name",\n "type": "text"\n },\n {\n "title": "Solution",\n "type": "int4"\n }\n ]\n}\n')),(0,i.kt)("p",null,'For our example CSP, there are two steps. The first step involves sending a "name" (really any string). The second step requires the user to solve a simple math problem. '),(0,i.kt)("p",null,"The authorization steps are completed one-by-one with ",(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#cspstep"},(0,i.kt)("inlineCode",{parentName:"a"},"client.cspStep")),'. This function sends an API call to the given CSP to perform a predefined "authentication step". A step could be validating a name, sending an authentication token, or really anything else. Non-final steps return a ',(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/interfaces/ICspIntermediateStepResponse"},(0,i.kt)("inlineCode",{parentName:"a"},"ICspIntermediateStepResponse"))," object containing an ",(0,i.kt)("inlineCode",{parentName:"p"},"authToken")," and arbitrary ",(0,i.kt)("inlineCode",{parentName:"p"},"response")," data."),(0,i.kt)("p",null,'For our example first step, we just need to send some "name" string.'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const step0 = (await client.cspStep(0, ['Name test'])) as ICspIntermediateStepResponse;\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "authToken": "280b3b5f-d982-4277-aa73-bd2d3b0d0d8c",\n "response": [\n "319",\n "303"\n ]\n}\n')),(0,i.kt)("p",null,"In this case, the second (and final) step asks us to add together the two values from the response to ",(0,i.kt)("inlineCode",{parentName:"p"},"step0"),'. We do this by computing the sum and then using this sum as the "challenge" for the next step. We also include the ',(0,i.kt)("inlineCode",{parentName:"p"},"authToken")," from the prior step so that the CSP knows we are validating for the same voter."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const challenge = step0.response.reduce((accumulator, value) => +accumulator + +value, 0).toString();\nconst step1 = (await client.cspStep(1, [challenge], step0.authToken)) as ICspFinalStepResponse;\n")),(0,i.kt)("p",null,"Once the predefined set of steps has been performed successfully, the final step should return a ",(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/interfaces/ICspFinalStepResponse"},(0,i.kt)("inlineCode",{parentName:"a"},"ICspFinalStepResponse"))," object containing a ",(0,i.kt)("inlineCode",{parentName:"p"},"token")," registered to the verified voter."),(0,i.kt)("p",null,"This token represents a 'permission slip' allowing a user to vote but it cannot be used to cast a vote directly. First, the voter must be represented by a wallet address, just like in the typical off-chain tree census example. This wallet can belong to the user and be saved somewhere, but for the example we can just create a random address:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const voter = Wallet.createRandom();\n")),(0,i.kt)("p",null,"We then send this address to the CSP, along with the token validating that this voter is validated. The CSP checks that the token is valid and unique, computes a signature on the voter's address, and sends that signature back to the client."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const signature = await client.cspSign(voter.address, step1.token);\n")),(0,i.kt)("p",null,"We can now create a ",(0,i.kt)("a",{parentName:"p",href:"/sdk/reference/classes/cspvote"},(0,i.kt)("inlineCode",{parentName:"a"},"cspVote"))," using this ",(0,i.kt)("inlineCode",{parentName:"p"},"signature")," as the vote proof and then submit it as usual:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const vote = client.cspVote(new Vote([Math.round(Math.random())]), signature);\nawait client.submitVote(vote);\n")),(0,i.kt)("h2",{id:"anonymity"},"Anonymity"),(0,i.kt)("p",null,"Credential Service Provider elections provide strong anonymity with the use of ",(0,i.kt)("a",{parentName:"p",href:"/protocol/Census/off-chain-csp#blind-signatures"},"Blind Signatures"),'. If blind signatures are enabled, the client "blinds" the user\'s address before sending it with the token to be signed by the CSP. This is the default behavior of the SDK. The CSP is then able to validate the token and sign the "blinded" payload without seeing the actual voter address. This signature is sent back to the client, which then un-blinds the signature. The blind-signatures protocol means that this signature is only valid for this specific voter address, but the CSP has no way of associating it with the blinded payload it originally signed. Thus, the voter cannot be associated with the validation token they used to request the blind signature. The user is thus able cast their vote signed by the CSP without their identity being traced to that vote by anybody, including the CSP.'),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://chat.vocdoni.io"},"Ask us")," if you would like to try setting up at CSP that can compute blind signatures. "))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4f61726b.1fb8ecc1.js b/assets/js/4f61726b.1fb8ecc1.js new file mode 100644 index 000000000..471880048 --- /dev/null +++ b/assets/js/4f61726b.1fb8ecc1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[8882],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var o=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=o.createContext({}),l=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(n),m=a,h=p["".concat(c,".").concat(m)]||p[m]||d[m]||i;return n?o.createElement(h,r(r({ref:t},u),{},{components:n})):o.createElement(h,r({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=p;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s.mdxType="string"==typeof e?e:a,r[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var o=n(87462),a=(n(67294),n(3905));const i={},r="Vocdoni Tokens",s={unversionedId:"sdk/integration-details/vocdoni-tokens",id:"sdk/integration-details/vocdoni-tokens",title:"Vocdoni Tokens",description:'Behind-the-scenes, Vocdoni is powered by a custom blockchain. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital "currency" of Vocdoni tokens that have no real-world value but help with spam reduction and self-sustainability. Actions that update data on the blockchain, such as creating an election, incur a "cost." Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.',source:"@site/docs/sdk/integration-details/vocdoni-tokens.md",sourceDirName:"sdk/integration-details",slug:"/sdk/integration-details/vocdoni-tokens",permalink:"/sdk/integration-details/vocdoni-tokens",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Complex Census",permalink:"/sdk/integration-details/census-types/on-chain/complex-census"},next:{title:"Voting Types",permalink:"/sdk/integration-details/voting-types/"}},c={},l=[{value:"Initial Tokens",id:"initial-tokens",level:2},{value:"Checking Token Balance",id:"checking-token-balance",level:2},{value:"Election Cost",id:"election-cost",level:3},{value:"Requesting Tokens: The Faucet",id:"requesting-tokens-the-faucet",level:2},{value:"DEV & STG",id:"dev--stg",level:3},{value:"PROD",id:"prod",level:3}],u={toc:l};function d(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"vocdoni-tokens"},"Vocdoni Tokens"),(0,a.kt)("p",null,"Behind-the-scenes, Vocdoni is powered by a custom ",(0,a.kt)("a",{parentName:"p",href:"/protocol#11-the-blockchain"},"blockchain"),'. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital "currency" of Vocdoni tokens that have no real-world value but help with spam reduction and self-sustainability. Actions that update data on the blockchain, such as creating an election, incur a "cost." Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.'),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Casting a vote ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("em",{parentName:"strong"},"never"))," requires Vocdoni tokens.")),(0,a.kt)("h2",{id:"initial-tokens"},"Initial Tokens"),(0,a.kt)("p",null,"Because accounts cannot hold Vocdoni tokens before they are created, ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#createaccount"},(0,a.kt)("inlineCode",{parentName:"a"},"client.createAccount()"))," automatically requests tokens from the blockchain. In ",(0,a.kt)("strong",{parentName:"p"},"production environments"),", only enough tokens to create the account itself are provided. Moving forward, more tokens must be requested in order to create elections.\nIn ",(0,a.kt)("strong",{parentName:"p"},"non-production environments"),", a large amount of tokens is automatically supplied to accounts when they are created. You can create many elections in the ",(0,a.kt)("inlineCode",{parentName:"p"},"STG")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"DEV")," environments before worrying about maintaining a balance."),(0,a.kt)("h2",{id:"checking-token-balance"},"Checking Token Balance"),(0,a.kt)("p",null,"From this point on, you can check your account balance with ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#createaccount"},(0,a.kt)("inlineCode",{parentName:"a"},"client.createAccount()"))," or ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#fetchaccount"},(0,a.kt)("inlineCode",{parentName:"a"},"client.fetchAccountInfo()")),". This provides all the information associated with the account, including the balance."),(0,a.kt)("h3",{id:"election-cost"},"Election Cost"),(0,a.kt)("p",null,"The token cost of a voting process is not constant; it is determined by many factors. After creating an election, but before publishing it to the blockchain, you should get a sense of the cost of the operation in order to ensure your account has sufficient balance. There are two methods to do this: ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#estimateelectioncost"},(0,a.kt)("inlineCode",{parentName:"a"},"client.estimateElectionCost()"))," quickly provides a decent estimate of the cost and can be useful for writing UI components. ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#calculateelectioncost"},(0,a.kt)("inlineCode",{parentName:"a"},"client.calculateElectionCost()"))," makes a time-intensive API call but provides an exact figure. It is helpful to use this directly before publishing the election to ensure it can be published."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const price = await client.estimateElectionCost(election); // Should be an UnpublishedElection with a maxCensusSize\nconsole.log(price); // shows the estimated price\n")),(0,a.kt)("admonition",{title:"estimate election cost",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"In order to estimate the cost of an election quickly, the election must be created with a specified ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/interfaces/IElectionParameters#maxcensussize"},(0,a.kt)("inlineCode",{parentName:"a"},"maxCensusSize")),". This restricts the number of users who can enter the census but enables quick election cost estimation. If you want an unlimited census size, just use ",(0,a.kt)("inlineCode",{parentName:"p"},"calculateElectionCost")," instead.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const electionCost = await client.calculateElectionCost(election);\nconst info = await client.createAccount();\nif (info.balance < electionCost) {\n console.log('Need to request more tokens');\n}\n")),(0,a.kt)("h2",{id:"requesting-tokens-the-faucet"},"Requesting Tokens: The Faucet"),(0,a.kt)("p",null,"The main way for users to gain tokens in a production environment is via a faucet, a free provider of tokens. A faucet enables users to generate a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage"),". This package is essentially a set of instructions; it must still be sent to the blockchain in order to request the actual tokens."),(0,a.kt)("admonition",{title:"users & tokens",type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Some systems require election administrators to request tokens manually for their elections. In other systems, integrators may handle token requests automatically on behalf of their users. This can be done manually or with a custom faucet implementation. ",(0,a.kt)("a",{parentName:"p",href:"https://chat.vocdoni.io"},"Reach out")," for help with this.")),(0,a.kt)("h3",{id:"dev--stg"},"DEV & STG"),(0,a.kt)("p",null,"In development and staging environments, the faucet functionality is handled automatically. Behind-the-scenes, ",(0,a.kt)("inlineCode",{parentName:"p"},"createAccount")," requests a large amount of tokens from a development faucet. These tokens should last a while, but once the account balance is low, more tokens must be requested. This can be done with "),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"await client.collectFaucetTokens();\n")),(0,a.kt)("p",null,"This method uses the default development faucet to generate a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage")," requesting new tokens. It can be used any number of times. In development environments, this is all that needs to be done! "),(0,a.kt)("h3",{id:"prod"},"PROD"),(0,a.kt)("p",null,"Production environments require more hands-on generation of a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage"),". First you need to identify the ",(0,a.kt)("strong",{parentName:"p"},"account address")," you are requesting tokens for. "),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"console.log((await client.fetchAccountInfo()).address);\n")),(0,a.kt)("p",null,"There are multiple ways to request a faucet package:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Use ",(0,a.kt)("a",{parentName:"li",href:"https://app.vocdoni.io/faucet"},"https://app.vocdoni.io/faucet"),", our web-based faucet that requires users to login with some form of existing account (google, github, social media). It provides a large amount of tokens to the given address but limits the number of times a single user can request tokens per week."),(0,a.kt)("li",{parentName:"ul"},"Reach out via ",(0,a.kt)("a",{parentName:"li",href:"https://chat.vocdoni.io"},"discord")," to request tokens sent to your account address. "),(0,a.kt)("li",{parentName:"ul"},"If you are an integrator who needs to manage your own faucet to provide tokens to users automatically, ask us for help with creating a custom faucet.")),(0,a.kt)("p",null,"All of these faucets should provide you with a base-64 string containing the necessary information to request tokens from the blockchain with ",(0,a.kt)("inlineCode",{parentName:"p"},"collectFaucetTokens"),". Note that each faucet package can only be used once."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},'await client.collectFaucetTokens("")\n')),(0,a.kt)("admonition",{title:"collect faucet tokens",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"In production environments, the ",(0,a.kt)("inlineCode",{parentName:"p"},"collectFaucetTokens")," method requires a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage")," to be provided. In development and stage, this is optional as a package is generated automatically by default.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4f61726b.87a165f1.js b/assets/js/4f61726b.87a165f1.js deleted file mode 100644 index 01baf2c94..000000000 --- a/assets/js/4f61726b.87a165f1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[8882],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var o=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=o.createContext({}),l=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(n),m=a,h=p["".concat(c,".").concat(m)]||p[m]||d[m]||i;return n?o.createElement(h,r(r({ref:t},u),{},{components:n})):o.createElement(h,r({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=p;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s.mdxType="string"==typeof e?e:a,r[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var o=n(87462),a=(n(67294),n(3905));const i={},r="Vocdoni Tokens",s={unversionedId:"sdk/integration-details/vocdoni-tokens",id:"sdk/integration-details/vocdoni-tokens",title:"Vocdoni Tokens",description:'Behind-the-scenes, Vocdoni is powered by a custom blockchain. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital "currency" of Vocdoni tokens that have no real-world value but help with load-balancing and spam reduction. Actions that update data on the blockchain, such as creating an election, incur a "cost." Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.',source:"@site/docs/sdk/integration-details/vocdoni-tokens.md",sourceDirName:"sdk/integration-details",slug:"/sdk/integration-details/vocdoni-tokens",permalink:"/sdk/integration-details/vocdoni-tokens",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Complex Census",permalink:"/sdk/integration-details/census-types/on-chain/complex-census"},next:{title:"Voting Types",permalink:"/sdk/integration-details/voting-types/"}},c={},l=[{value:"Initial Tokens",id:"initial-tokens",level:2},{value:"Checking Token Balance",id:"checking-token-balance",level:2},{value:"Election Cost",id:"election-cost",level:3},{value:"Requesting Tokens: The Faucet",id:"requesting-tokens-the-faucet",level:2},{value:"DEV & STG",id:"dev--stg",level:3},{value:"PROD",id:"prod",level:3}],u={toc:l};function d(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"vocdoni-tokens"},"Vocdoni Tokens"),(0,a.kt)("p",null,"Behind-the-scenes, Vocdoni is powered by a custom ",(0,a.kt)("a",{parentName:"p",href:"/protocol#11-the-blockchain"},"blockchain"),'. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital "currency" of Vocdoni tokens that have no real-world value but help with load-balancing and spam reduction. Actions that update data on the blockchain, such as creating an election, incur a "cost." Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.'),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Casting a vote ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("em",{parentName:"strong"},"never"))," requires Vocdoni tokens.")),(0,a.kt)("h2",{id:"initial-tokens"},"Initial Tokens"),(0,a.kt)("p",null,"Because accounts cannot hold Vocdoni tokens before they are created, ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#createaccount"},(0,a.kt)("inlineCode",{parentName:"a"},"client.createAccount()"))," automatically requests tokens from the blockchain. In ",(0,a.kt)("strong",{parentName:"p"},"production environments"),", only enough tokens to create the account itself are provided. Moving forward, more tokens must be requested in order to create elections.\nIn ",(0,a.kt)("strong",{parentName:"p"},"non-production environments"),", a large amount of tokens is automatically supplied to accounts when they are created. You can create many elections in the ",(0,a.kt)("inlineCode",{parentName:"p"},"STG")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"DEV")," environments before worrying about maintaining a balance."),(0,a.kt)("h2",{id:"checking-token-balance"},"Checking Token Balance"),(0,a.kt)("p",null,"From this point on, you can check your account balance with ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#createaccount"},(0,a.kt)("inlineCode",{parentName:"a"},"client.createAccount()"))," or ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#fetchaccount"},(0,a.kt)("inlineCode",{parentName:"a"},"client.fetchAccountInfo()")),". This provides all the information associated with the account, including the balance."),(0,a.kt)("h3",{id:"election-cost"},"Election Cost"),(0,a.kt)("p",null,"The token cost of a voting process is not constant; it is determined by many factors. After creating an election, but before publishing it to the blockchain, you should get a sense of the cost of the operation in order to ensure your account has sufficient balance. There are two methods to do this: ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#estimateelectioncost"},(0,a.kt)("inlineCode",{parentName:"a"},"client.estimateElectionCost()"))," quickly provides a decent estimate of the cost and can be useful for writing UI components. ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/classes/VocdoniSDKClient#calculateelectioncost"},(0,a.kt)("inlineCode",{parentName:"a"},"client.calculateElectionCost()"))," makes a time-intensive API call but provides an exact figure. It is helpful to use this directly before publishing the election to ensure it can be published."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const price = await client.estimateElectionCost(election); // Should be an UnpublishedElection with a maxCensusSize\nconsole.log(price); // shows the estimated price\n")),(0,a.kt)("admonition",{title:"estimate election cost",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"In order to estimate the cost of an election quickly, the election must be created with a specified ",(0,a.kt)("a",{parentName:"p",href:"/sdk/reference/interfaces/IElectionParameters#maxcensussize"},(0,a.kt)("inlineCode",{parentName:"a"},"maxCensusSize")),". This restricts the number of users who can enter the census but enables quick election cost estimation. If you want an unlimited census size, just use ",(0,a.kt)("inlineCode",{parentName:"p"},"calculateElectionCost")," instead.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const electionCost = await client.calculateElectionCost(election);\nconst info = await client.createAccount();\nif (info.balance < electionCost) {\n console.log('Need to request more tokens');\n}\n")),(0,a.kt)("h2",{id:"requesting-tokens-the-faucet"},"Requesting Tokens: The Faucet"),(0,a.kt)("p",null,"The main way for users to gain tokens in a production environment is via a faucet, a free provider of tokens. A faucet enables users to generate a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage"),". This package is essentially a set of instructions; it must still be sent to the blockchain in order to request the actual tokens."),(0,a.kt)("admonition",{title:"users & tokens",type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Some systems require election administrators to request tokens manually for their elections. In other systems, integrators may handle token requests automatically on behalf of their users. This can be done manually or with a custom faucet implementation. ",(0,a.kt)("a",{parentName:"p",href:"https://chat.vocdoni.io"},"Reach out")," for help with this.")),(0,a.kt)("h3",{id:"dev--stg"},"DEV & STG"),(0,a.kt)("p",null,"In development and staging environments, the faucet functionality is handled automatically. Behind-the-scenes, ",(0,a.kt)("inlineCode",{parentName:"p"},"createAccount")," requests a large amount of tokens from a development faucet. These tokens should last a while, but once the account balance is low, more tokens must be requested. This can be done with "),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"await client.collectFaucetTokens();\n")),(0,a.kt)("p",null,"This method uses the default development faucet to generate a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage")," requesting new tokens. It can be used any number of times. In development environments, this is all that needs to be done! "),(0,a.kt)("h3",{id:"prod"},"PROD"),(0,a.kt)("p",null,"Production environments require more hands-on generation of a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage"),". First you need to identify the ",(0,a.kt)("strong",{parentName:"p"},"account address")," you are requesting tokens for. "),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"console.log((await client.fetchAccountInfo()).address);\n")),(0,a.kt)("p",null,"There are multiple ways to request a faucet package:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Use ",(0,a.kt)("a",{parentName:"li",href:"https://app.vocdoni.io/faucet"},"https://app.vocdoni.io/faucet"),", our web-based faucet that requires users to login with some form of existing account (google, github, social media). It provides a large amount of tokens to the given address but limits the number of times a single user can request tokens per week."),(0,a.kt)("li",{parentName:"ul"},"Reach out via ",(0,a.kt)("a",{parentName:"li",href:"https://chat.vocdoni.io"},"discord")," to request tokens sent to your account address. "),(0,a.kt)("li",{parentName:"ul"},"If you are an integrator who needs to manage your own faucet to provide tokens to users automatically, ask us for help with creating a custom faucet.")),(0,a.kt)("p",null,"All of these faucets should provide you with a base-64 string containing the necessary information to request tokens from the blockchain with ",(0,a.kt)("inlineCode",{parentName:"p"},"collectFaucetTokens"),". Note that each faucet package can only be used once."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},'await client.collectFaucetTokens("")\n')),(0,a.kt)("admonition",{title:"collect faucet tokens",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"In production environments, the ",(0,a.kt)("inlineCode",{parentName:"p"},"collectFaucetTokens")," method requires a ",(0,a.kt)("inlineCode",{parentName:"p"},"faucetPackage")," to be provided. In development and stage, this is optional as a package is generated automatically by default.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.4312d1cd.js b/assets/js/935f2afb.4312d1cd.js new file mode 100644 index 000000000..9fdf1cbef --- /dev/null +++ b/assets/js/935f2afb.4312d1cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"Getting Started","href":"/intro","docId":"intro"},{"type":"category","label":"Vocdoni Protocol","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Anonymous Voting","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CSP Blind Signatures","href":"/protocol/anonymity/blind-signatures","docId":"protocol/anonymity/blind-signatures"},{"type":"link","label":"On-Chain Census Anonymity","href":"/protocol/anonymity/on-chain","docId":"protocol/anonymity/on-chain"},{"type":"link","label":"Off-Chain Tree ZK Census Proof","href":"/protocol/anonymity/zk-census-proof","docId":"protocol/anonymity/zk-census-proof"}],"href":"/protocol/anonymity/"},{"type":"link","label":"Ballot Protocol","href":"/protocol/ballot-protocol","docId":"protocol/ballot-protocol"},{"type":"category","label":"The Census","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Off-Chain CSP Census","href":"/protocol/census/off-chain-csp","docId":"protocol/census/off-chain-csp"},{"type":"link","label":"Off-Chain Tree Census","href":"/protocol/census/off-chain-tree","docId":"protocol/census/off-chain-tree"},{"type":"category","label":"On-Chain Census","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Census3 Service","href":"/protocol/census/on-chain/census3","docId":"protocol/census/on-chain/census3"}],"href":"/protocol/census/on-chain/"}],"href":"/protocol/census/"},{"type":"category","label":"Data Schemes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Election Metadata","href":"/protocol/data-schemes/election","docId":"protocol/data-schemes/election"},{"type":"link","label":"Organization Metadata","href":"/protocol/data-schemes/organization","docId":"protocol/data-schemes/organization"},{"type":"link","label":"Vote Data","href":"/protocol/data-schemes/vote","docId":"protocol/data-schemes/vote"}],"href":"/protocol/data-schemes/"}],"href":"/protocol/"},{"type":"category","label":"Vocdoni SDK","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"SDK Tutorial","href":"/sdk/tutorial","docId":"sdk/tutorial"},{"type":"category","label":"Integration Details","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Census Types","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Off-chain Credential Service Provider","href":"/sdk/integration-details/census-types/off-chain-csp","docId":"sdk/integration-details/census-types/off-chain-csp"},{"type":"link","label":"Off-chain Merkle Tree","href":"/sdk/integration-details/census-types/off-chain-tree","docId":"sdk/integration-details/census-types/off-chain-tree"},{"type":"category","label":"On-chain Token-Based Census","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Complex Census","href":"/sdk/integration-details/census-types/on-chain/complex-census","docId":"sdk/integration-details/census-types/on-chain/complex-census"}],"href":"/sdk/integration-details/census-types/on-chain/"}],"href":"/sdk/integration-details/census-types/"},{"type":"link","label":"Vocdoni Tokens","href":"/sdk/integration-details/vocdoni-tokens","docId":"sdk/integration-details/vocdoni-tokens"},{"type":"category","label":"Voting Types","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Single Choice Voting","href":"/sdk/integration-details/voting-types/single-choice","docId":"sdk/integration-details/voting-types/single-choice"},{"type":"link","label":"Ranked Voting","href":"/sdk/integration-details/voting-types/ranked","docId":"sdk/integration-details/voting-types/ranked"},{"type":"link","label":"Approval Voting (Multiple Choice)","href":"/sdk/integration-details/voting-types/approval","docId":"sdk/integration-details/voting-types/approval"},{"type":"link","label":"Weighted voting","href":"/sdk/integration-details/voting-types/weighted","docId":"sdk/integration-details/voting-types/weighted"},{"type":"link","label":"Quadratic voting","href":"/sdk/integration-details/voting-types/quadratic","docId":"sdk/integration-details/voting-types/quadratic"}],"href":"/sdk/integration-details/voting-types/"}],"href":"/sdk/integration-details/"},{"type":"category","label":"Reference","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"@vocdoni/sdk","href":"/sdk/reference/sdk-reference","docId":"sdk/reference/sdk-reference"},{"type":"category","label":"Classes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Account","href":"/sdk/reference/classes/Account","docId":"sdk/reference/classes/Account"},{"type":"link","label":"AccountAPI","href":"/sdk/reference/classes/AccountAPI","docId":"sdk/reference/classes/AccountAPI"},{"type":"link","label":"AccountService","href":"/sdk/reference/classes/AccountService","docId":"sdk/reference/classes/AccountService"},{"type":"link","label":"AnonymousService","href":"/sdk/reference/classes/AnonymousService","docId":"sdk/reference/classes/AnonymousService"},{"type":"link","label":"AnonymousVote","href":"/sdk/reference/classes/AnonymousVote","docId":"sdk/reference/classes/AnonymousVote"},{"type":"link","label":"ApprovalElection","href":"/sdk/reference/classes/ApprovalElection","docId":"sdk/reference/classes/ApprovalElection"},{"type":"link","label":"ArchivedElection","href":"/sdk/reference/classes/ArchivedElection","docId":"sdk/reference/classes/ArchivedElection"},{"type":"link","label":"BudgetElection","href":"/sdk/reference/classes/BudgetElection","docId":"sdk/reference/classes/BudgetElection"},{"type":"link","label":"Census","href":"/sdk/reference/classes/Census","docId":"sdk/reference/classes/Census"},{"type":"link","label":"Census3CensusAPI","href":"/sdk/reference/classes/Census3CensusAPI","docId":"sdk/reference/classes/Census3CensusAPI"},{"type":"link","label":"Census3ServiceAPI","href":"/sdk/reference/classes/Census3ServiceAPI","docId":"sdk/reference/classes/Census3ServiceAPI"},{"type":"link","label":"Census3StrategyAPI","href":"/sdk/reference/classes/Census3StrategyAPI","docId":"sdk/reference/classes/Census3StrategyAPI"},{"type":"link","label":"Census3TokenAPI","href":"/sdk/reference/classes/Census3TokenAPI","docId":"sdk/reference/classes/Census3TokenAPI"},{"type":"link","label":"CensusAPI","href":"/sdk/reference/classes/CensusAPI","docId":"sdk/reference/classes/CensusAPI"},{"type":"link","label":"CensusService","href":"/sdk/reference/classes/CensusService","docId":"sdk/reference/classes/CensusService"},{"type":"link","label":"ChainAPI","href":"/sdk/reference/classes/ChainAPI","docId":"sdk/reference/classes/ChainAPI"},{"type":"link","label":"ChainService","href":"/sdk/reference/classes/ChainService","docId":"sdk/reference/classes/ChainService"},{"type":"link","label":"CspAPI","href":"/sdk/reference/classes/CspAPI","docId":"sdk/reference/classes/CspAPI"},{"type":"link","label":"CspCensus","href":"/sdk/reference/classes/CspCensus","docId":"sdk/reference/classes/CspCensus"},{"type":"link","label":"CspService","href":"/sdk/reference/classes/CspService","docId":"sdk/reference/classes/CspService"},{"type":"link","label":"CspVote","href":"/sdk/reference/classes/CspVote","docId":"sdk/reference/classes/CspVote"},{"type":"link","label":"Election","href":"/sdk/reference/classes/Election","docId":"sdk/reference/classes/Election"},{"type":"link","label":"ElectionAPI","href":"/sdk/reference/classes/ElectionAPI","docId":"sdk/reference/classes/ElectionAPI"},{"type":"link","label":"ElectionService","href":"/sdk/reference/classes/ElectionService","docId":"sdk/reference/classes/ElectionService"},{"type":"link","label":"FaucetAPI","href":"/sdk/reference/classes/FaucetAPI","docId":"sdk/reference/classes/FaucetAPI"},{"type":"link","label":"FaucetService","href":"/sdk/reference/classes/FaucetService","docId":"sdk/reference/classes/FaucetService"},{"type":"link","label":"FileAPI","href":"/sdk/reference/classes/FileAPI","docId":"sdk/reference/classes/FileAPI"},{"type":"link","label":"FileService","href":"/sdk/reference/classes/FileService","docId":"sdk/reference/classes/FileService"},{"type":"link","label":"InvalidElection","href":"/sdk/reference/classes/InvalidElection","docId":"sdk/reference/classes/InvalidElection"},{"type":"link","label":"MultiChoiceElection","href":"/sdk/reference/classes/MultiChoiceElection","docId":"sdk/reference/classes/MultiChoiceElection"},{"type":"link","label":"OffchainCensus","href":"/sdk/reference/classes/OffchainCensus","docId":"sdk/reference/classes/OffchainCensus"},{"type":"link","label":"PlainCensus","href":"/sdk/reference/classes/PlainCensus","docId":"sdk/reference/classes/PlainCensus"},{"type":"link","label":"PublishedCensus","href":"/sdk/reference/classes/PublishedCensus","docId":"sdk/reference/classes/PublishedCensus"},{"type":"link","label":"PublishedElection","href":"/sdk/reference/classes/PublishedElection","docId":"sdk/reference/classes/PublishedElection"},{"type":"link","label":"Service","href":"/sdk/reference/classes/Service","docId":"sdk/reference/classes/Service"},{"type":"link","label":"StrategyCensus","href":"/sdk/reference/classes/StrategyCensus","docId":"sdk/reference/classes/StrategyCensus"},{"type":"link","label":"TokenCensus","href":"/sdk/reference/classes/TokenCensus","docId":"sdk/reference/classes/TokenCensus"},{"type":"link","label":"UnpublishedElection","href":"/sdk/reference/classes/UnpublishedElection","docId":"sdk/reference/classes/UnpublishedElection"},{"type":"link","label":"VocdoniCensus3Client","href":"/sdk/reference/classes/VocdoniCensus3Client","docId":"sdk/reference/classes/VocdoniCensus3Client"},{"type":"link","label":"VocdoniSDKClient","href":"/sdk/reference/classes/VocdoniSDKClient","docId":"sdk/reference/classes/VocdoniSDKClient"},{"type":"link","label":"Vote","href":"/sdk/reference/classes/Vote","docId":"sdk/reference/classes/Vote"},{"type":"link","label":"VoteAPI","href":"/sdk/reference/classes/VoteAPI","docId":"sdk/reference/classes/VoteAPI"},{"type":"link","label":"VoteService","href":"/sdk/reference/classes/VoteService","docId":"sdk/reference/classes/VoteService"},{"type":"link","label":"WalletAPI","href":"/sdk/reference/classes/WalletAPI","docId":"sdk/reference/classes/WalletAPI"},{"type":"link","label":"WeightedCensus","href":"/sdk/reference/classes/WeightedCensus","docId":"sdk/reference/classes/WeightedCensus"},{"type":"link","label":"ZkAPI","href":"/sdk/reference/classes/ZkAPI","docId":"sdk/reference/classes/ZkAPI"}]},{"type":"category","label":"Enums","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CensusOrigin","href":"/sdk/reference/enums/CensusOrigin","docId":"sdk/reference/enums/CensusOrigin"},{"type":"link","label":"CensusType","href":"/sdk/reference/enums/CensusType","docId":"sdk/reference/enums/CensusType"},{"type":"link","label":"CensusTypeEnum","href":"/sdk/reference/enums/CensusTypeEnum","docId":"sdk/reference/enums/CensusTypeEnum"},{"type":"link","label":"CspProofType","href":"/sdk/reference/enums/CspProofType","docId":"sdk/reference/enums/CspProofType"},{"type":"link","label":"ElectionCreationSteps","href":"/sdk/reference/enums/ElectionCreationSteps","docId":"sdk/reference/enums/ElectionCreationSteps"},{"type":"link","label":"ElectionResultsTypeNames","href":"/sdk/reference/enums/ElectionResultsTypeNames","docId":"sdk/reference/enums/ElectionResultsTypeNames"},{"type":"link","label":"ElectionStatus","href":"/sdk/reference/enums/ElectionStatus","docId":"sdk/reference/enums/ElectionStatus"},{"type":"link","label":"ElectionStatusReady","href":"/sdk/reference/enums/ElectionStatusReady","docId":"sdk/reference/enums/ElectionStatusReady"},{"type":"link","label":"EnvOptions","href":"/sdk/reference/enums/EnvOptions","docId":"sdk/reference/enums/EnvOptions"},{"type":"link","label":"TransactionType","href":"/sdk/reference/enums/TransactionType","docId":"sdk/reference/enums/TransactionType"},{"type":"link","label":"TxType","href":"/sdk/reference/enums/TxType","docId":"sdk/reference/enums/TxType"},{"type":"link","label":"VoteSteps","href":"/sdk/reference/enums/VoteSteps","docId":"sdk/reference/enums/VoteSteps"}]},{"type":"category","label":"Interfaces","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"AccountMetadata","href":"/sdk/reference/interfaces/AccountMetadata","docId":"sdk/reference/interfaces/AccountMetadata"},{"type":"link","label":"AdminTx","href":"/sdk/reference/interfaces/AdminTx","docId":"sdk/reference/interfaces/AdminTx"},{"type":"link","label":"CircuitInputs","href":"/sdk/reference/interfaces/CircuitInputs","docId":"sdk/reference/interfaces/CircuitInputs"},{"type":"link","label":"CollectFaucetTx","href":"/sdk/reference/interfaces/CollectFaucetTx","docId":"sdk/reference/interfaces/CollectFaucetTx"},{"type":"link","label":"ElectionMetadata","href":"/sdk/reference/interfaces/ElectionMetadata","docId":"sdk/reference/interfaces/ElectionMetadata"},{"type":"link","label":"FetchElectionsParameters","href":"/sdk/reference/interfaces/FetchElectionsParameters","docId":"sdk/reference/interfaces/FetchElectionsParameters"},{"type":"link","label":"IAccount","href":"/sdk/reference/interfaces/IAccount","docId":"sdk/reference/interfaces/IAccount"},{"type":"link","label":"IAccountTransfersCountResponse","href":"/sdk/reference/interfaces/IAccountTransfersCountResponse","docId":"sdk/reference/interfaces/IAccountTransfersCountResponse"},{"type":"link","label":"IAccountsCountResponse","href":"/sdk/reference/interfaces/IAccountsCountResponse","docId":"sdk/reference/interfaces/IAccountsCountResponse"},{"type":"link","label":"IAccountsListResponse","href":"/sdk/reference/interfaces/IAccountsListResponse","docId":"sdk/reference/interfaces/IAccountsListResponse"},{"type":"link","label":"IApprovalElectionParameters","href":"/sdk/reference/interfaces/IApprovalElectionParameters","docId":"sdk/reference/interfaces/IApprovalElectionParameters"},{"type":"link","label":"IBlockTransactionsResponse","href":"/sdk/reference/interfaces/IBlockTransactionsResponse","docId":"sdk/reference/interfaces/IBlockTransactionsResponse"},{"type":"link","label":"IBudgetElectionParametersInfo","href":"/sdk/reference/interfaces/IBudgetElectionParametersInfo","docId":"sdk/reference/interfaces/IBudgetElectionParametersInfo"},{"type":"link","label":"IBudgetElectionParametersWithBudget","href":"/sdk/reference/interfaces/IBudgetElectionParametersWithBudget","docId":"sdk/reference/interfaces/IBudgetElectionParametersWithBudget"},{"type":"link","label":"IBudgetElectionParametersWithCensusWeight","href":"/sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight","docId":"sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight"},{"type":"link","label":"ICensus","href":"/sdk/reference/interfaces/ICensus","docId":"sdk/reference/interfaces/ICensus"},{"type":"link","label":"ICensus3CensusListResponse","href":"/sdk/reference/interfaces/ICensus3CensusListResponse","docId":"sdk/reference/interfaces/ICensus3CensusListResponse"},{"type":"link","label":"ICensus3CensusQueueResponse","href":"/sdk/reference/interfaces/ICensus3CensusQueueResponse","docId":"sdk/reference/interfaces/ICensus3CensusQueueResponse"},{"type":"link","label":"ICensus3CensusResponse","href":"/sdk/reference/interfaces/ICensus3CensusResponse","docId":"sdk/reference/interfaces/ICensus3CensusResponse"},{"type":"link","label":"ICensus3ServiceInfoResponse","href":"/sdk/reference/interfaces/ICensus3ServiceInfoResponse","docId":"sdk/reference/interfaces/ICensus3ServiceInfoResponse"},{"type":"link","label":"ICensus3StrategiesListResponse","href":"/sdk/reference/interfaces/ICensus3StrategiesListResponse","docId":"sdk/reference/interfaces/ICensus3StrategiesListResponse"},{"type":"link","label":"ICensus3StrategiesListResponsePaginated","href":"/sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated","docId":"sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated"},{"type":"link","label":"ICensus3StrategiesOperator","href":"/sdk/reference/interfaces/ICensus3StrategiesOperator","docId":"sdk/reference/interfaces/ICensus3StrategiesOperator"},{"type":"link","label":"ICensus3StrategiesOperatorsResponse","href":"/sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse","docId":"sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse"},{"type":"link","label":"ICensus3StrategyCreateResponse","href":"/sdk/reference/interfaces/ICensus3StrategyCreateResponse","docId":"sdk/reference/interfaces/ICensus3StrategyCreateResponse"},{"type":"link","label":"ICensus3StrategyEstimationQueueResponse","href":"/sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse","docId":"sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse"},{"type":"link","label":"ICensus3StrategyHoldersResponse","href":"/sdk/reference/interfaces/ICensus3StrategyHoldersResponse","docId":"sdk/reference/interfaces/ICensus3StrategyHoldersResponse"},{"type":"link","label":"ICensus3StrategyHoldersResponsePaginated","href":"/sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated","docId":"sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated"},{"type":"link","label":"ICensus3StrategyImportQueueResponse","href":"/sdk/reference/interfaces/ICensus3StrategyImportQueueResponse","docId":"sdk/reference/interfaces/ICensus3StrategyImportQueueResponse"},{"type":"link","label":"ICensus3StrategyToken","href":"/sdk/reference/interfaces/ICensus3StrategyToken","docId":"sdk/reference/interfaces/ICensus3StrategyToken"},{"type":"link","label":"ICensus3SupportedChain","href":"/sdk/reference/interfaces/ICensus3SupportedChain","docId":"sdk/reference/interfaces/ICensus3SupportedChain"},{"type":"link","label":"ICensus3TokenHolderResponse","href":"/sdk/reference/interfaces/ICensus3TokenHolderResponse","docId":"sdk/reference/interfaces/ICensus3TokenHolderResponse"},{"type":"link","label":"ICensus3TokenListResponse","href":"/sdk/reference/interfaces/ICensus3TokenListResponse","docId":"sdk/reference/interfaces/ICensus3TokenListResponse"},{"type":"link","label":"ICensus3TokenListResponsePaginated","href":"/sdk/reference/interfaces/ICensus3TokenListResponsePaginated","docId":"sdk/reference/interfaces/ICensus3TokenListResponsePaginated"},{"type":"link","label":"ICensus3TokenTypesResponse","href":"/sdk/reference/interfaces/ICensus3TokenTypesResponse","docId":"sdk/reference/interfaces/ICensus3TokenTypesResponse"},{"type":"link","label":"ICensus3ValidatePredicateChild","href":"/sdk/reference/interfaces/ICensus3ValidatePredicateChild","docId":"sdk/reference/interfaces/ICensus3ValidatePredicateChild"},{"type":"link","label":"ICensus3ValidatePredicateResponse","href":"/sdk/reference/interfaces/ICensus3ValidatePredicateResponse","docId":"sdk/reference/interfaces/ICensus3ValidatePredicateResponse"},{"type":"link","label":"ICensus3ValidatePredicateToken","href":"/sdk/reference/interfaces/ICensus3ValidatePredicateToken","docId":"sdk/reference/interfaces/ICensus3ValidatePredicateToken"},{"type":"link","label":"ICensusExportResponse","href":"/sdk/reference/interfaces/ICensusExportResponse","docId":"sdk/reference/interfaces/ICensusExportResponse"},{"type":"link","label":"ICensusImportResponse","href":"/sdk/reference/interfaces/ICensusImportResponse","docId":"sdk/reference/interfaces/ICensusImportResponse"},{"type":"link","label":"ICensusParticipant","href":"/sdk/reference/interfaces/ICensusParticipant","docId":"sdk/reference/interfaces/ICensusParticipant"},{"type":"link","label":"ICensusProofResponse","href":"/sdk/reference/interfaces/ICensusProofResponse","docId":"sdk/reference/interfaces/ICensusProofResponse"},{"type":"link","label":"ICensusPublishResponse","href":"/sdk/reference/interfaces/ICensusPublishResponse","docId":"sdk/reference/interfaces/ICensusPublishResponse"},{"type":"link","label":"IChainBlockInfoResponse","href":"/sdk/reference/interfaces/IChainBlockInfoResponse","docId":"sdk/reference/interfaces/IChainBlockInfoResponse"},{"type":"link","label":"IChainGetCircuitResponse","href":"/sdk/reference/interfaces/IChainGetCircuitResponse","docId":"sdk/reference/interfaces/IChainGetCircuitResponse"},{"type":"link","label":"IChainGetCostsResponse","href":"/sdk/reference/interfaces/IChainGetCostsResponse","docId":"sdk/reference/interfaces/IChainGetCostsResponse"},{"type":"link","label":"IChainGetInfoResponse","href":"/sdk/reference/interfaces/IChainGetInfoResponse","docId":"sdk/reference/interfaces/IChainGetInfoResponse"},{"type":"link","label":"IChainOrganizationCountResponse","href":"/sdk/reference/interfaces/IChainOrganizationCountResponse","docId":"sdk/reference/interfaces/IChainOrganizationCountResponse"},{"type":"link","label":"IChainOrganizationListResponse","href":"/sdk/reference/interfaces/IChainOrganizationListResponse","docId":"sdk/reference/interfaces/IChainOrganizationListResponse"},{"type":"link","label":"IChainOrganizationResponse","href":"/sdk/reference/interfaces/IChainOrganizationResponse","docId":"sdk/reference/interfaces/IChainOrganizationResponse"},{"type":"link","label":"IChainSubmitTxResponse","href":"/sdk/reference/interfaces/IChainSubmitTxResponse","docId":"sdk/reference/interfaces/IChainSubmitTxResponse"},{"type":"link","label":"IChainTxCountResponse","href":"/sdk/reference/interfaces/IChainTxCountResponse","docId":"sdk/reference/interfaces/IChainTxCountResponse"},{"type":"link","label":"IChainTxListResponse","href":"/sdk/reference/interfaces/IChainTxListResponse","docId":"sdk/reference/interfaces/IChainTxListResponse"},{"type":"link","label":"IChainTxReference","href":"/sdk/reference/interfaces/IChainTxReference","docId":"sdk/reference/interfaces/IChainTxReference"},{"type":"link","label":"IChainValidator","href":"/sdk/reference/interfaces/IChainValidator","docId":"sdk/reference/interfaces/IChainValidator"},{"type":"link","label":"IChainValidatorsListResponse","href":"/sdk/reference/interfaces/IChainValidatorsListResponse","docId":"sdk/reference/interfaces/IChainValidatorsListResponse"},{"type":"link","label":"IChoice","href":"/sdk/reference/interfaces/IChoice","docId":"sdk/reference/interfaces/IChoice"},{"type":"link","label":"ICspAuthStep","href":"/sdk/reference/interfaces/ICspAuthStep","docId":"sdk/reference/interfaces/ICspAuthStep"},{"type":"link","label":"ICspFinalStepResponse","href":"/sdk/reference/interfaces/ICspFinalStepResponse","docId":"sdk/reference/interfaces/ICspFinalStepResponse"},{"type":"link","label":"ICspInfoResponse","href":"/sdk/reference/interfaces/ICspInfoResponse","docId":"sdk/reference/interfaces/ICspInfoResponse"},{"type":"link","label":"ICspIntermediateStepResponse","href":"/sdk/reference/interfaces/ICspIntermediateStepResponse","docId":"sdk/reference/interfaces/ICspIntermediateStepResponse"},{"type":"link","label":"ICspSignResponse","href":"/sdk/reference/interfaces/ICspSignResponse","docId":"sdk/reference/interfaces/ICspSignResponse"},{"type":"link","label":"IElectionCreateResponse","href":"/sdk/reference/interfaces/IElectionCreateResponse","docId":"sdk/reference/interfaces/IElectionCreateResponse"},{"type":"link","label":"IElectionInfoResponse","href":"/sdk/reference/interfaces/IElectionInfoResponse","docId":"sdk/reference/interfaces/IElectionInfoResponse"},{"type":"link","label":"IElectionKeysResponse","href":"/sdk/reference/interfaces/IElectionKeysResponse","docId":"sdk/reference/interfaces/IElectionKeysResponse"},{"type":"link","label":"IElectionListFilter","href":"/sdk/reference/interfaces/IElectionListFilter","docId":"sdk/reference/interfaces/IElectionListFilter"},{"type":"link","label":"IElectionListResponse","href":"/sdk/reference/interfaces/IElectionListResponse","docId":"sdk/reference/interfaces/IElectionListResponse"},{"type":"link","label":"IElectionMode","href":"/sdk/reference/interfaces/IElectionMode","docId":"sdk/reference/interfaces/IElectionMode"},{"type":"link","label":"IElectionNextIdResponse","href":"/sdk/reference/interfaces/IElectionNextIdResponse","docId":"sdk/reference/interfaces/IElectionNextIdResponse"},{"type":"link","label":"IElectionParameters","href":"/sdk/reference/interfaces/IElectionParameters","docId":"sdk/reference/interfaces/IElectionParameters"},{"type":"link","label":"IElectionSummary","href":"/sdk/reference/interfaces/IElectionSummary","docId":"sdk/reference/interfaces/IElectionSummary"},{"type":"link","label":"IElectionType","href":"/sdk/reference/interfaces/IElectionType","docId":"sdk/reference/interfaces/IElectionType"},{"type":"link","label":"IElectionVote","href":"/sdk/reference/interfaces/IElectionVote","docId":"sdk/reference/interfaces/IElectionVote"},{"type":"link","label":"IElectionVoteListResponse","href":"/sdk/reference/interfaces/IElectionVoteListResponse","docId":"sdk/reference/interfaces/IElectionVoteListResponse"},{"type":"link","label":"IEncryptionKey","href":"/sdk/reference/interfaces/IEncryptionKey","docId":"sdk/reference/interfaces/IEncryptionKey"},{"type":"link","label":"IInvalidElectionParameters","href":"/sdk/reference/interfaces/IInvalidElectionParameters","docId":"sdk/reference/interfaces/IInvalidElectionParameters"},{"type":"link","label":"IMultiChoiceElectionParameters","href":"/sdk/reference/interfaces/IMultiChoiceElectionParameters","docId":"sdk/reference/interfaces/IMultiChoiceElectionParameters"},{"type":"link","label":"IPublishedElectionParameters","href":"/sdk/reference/interfaces/IPublishedElectionParameters","docId":"sdk/reference/interfaces/IPublishedElectionParameters"},{"type":"link","label":"IQuestion","href":"/sdk/reference/interfaces/IQuestion","docId":"sdk/reference/interfaces/IQuestion"},{"type":"link","label":"ITallyMode","href":"/sdk/reference/interfaces/ITallyMode","docId":"sdk/reference/interfaces/ITallyMode"},{"type":"link","label":"IVoteInfoResponse","href":"/sdk/reference/interfaces/IVoteInfoResponse","docId":"sdk/reference/interfaces/IVoteInfoResponse"},{"type":"link","label":"IVoteMode","href":"/sdk/reference/interfaces/IVoteMode","docId":"sdk/reference/interfaces/IVoteMode"},{"type":"link","label":"IVoteSubmitResponse","href":"/sdk/reference/interfaces/IVoteSubmitResponse","docId":"sdk/reference/interfaces/IVoteSubmitResponse"},{"type":"link","label":"IVoteType","href":"/sdk/reference/interfaces/IVoteType","docId":"sdk/reference/interfaces/IVoteType"},{"type":"link","label":"IZkProofResponse","href":"/sdk/reference/interfaces/IZkProofResponse","docId":"sdk/reference/interfaces/IZkProofResponse"},{"type":"link","label":"IZkSIKResponse","href":"/sdk/reference/interfaces/IZkSIKResponse","docId":"sdk/reference/interfaces/IZkSIKResponse"},{"type":"link","label":"MintTokensTx","href":"/sdk/reference/interfaces/MintTokensTx","docId":"sdk/reference/interfaces/MintTokensTx"},{"type":"link","label":"NewProcessTx","href":"/sdk/reference/interfaces/NewProcessTx","docId":"sdk/reference/interfaces/NewProcessTx"},{"type":"link","label":"Process","href":"/sdk/reference/interfaces/Process","docId":"sdk/reference/interfaces/Process"},{"type":"link","label":"Proof","href":"/sdk/reference/interfaces/Proof","docId":"sdk/reference/interfaces/Proof"},{"type":"link","label":"RegisterKeyTx","href":"/sdk/reference/interfaces/RegisterKeyTx","docId":"sdk/reference/interfaces/RegisterKeyTx"},{"type":"link","label":"SendTokensTx","href":"/sdk/reference/interfaces/SendTokensTx","docId":"sdk/reference/interfaces/SendTokensTx"},{"type":"link","label":"ServiceProperties","href":"/sdk/reference/interfaces/ServiceProperties","docId":"sdk/reference/interfaces/ServiceProperties"},{"type":"link","label":"SetAccountTx","href":"/sdk/reference/interfaces/SetAccountTx","docId":"sdk/reference/interfaces/SetAccountTx"},{"type":"link","label":"SetProcessTx","href":"/sdk/reference/interfaces/SetProcessTx","docId":"sdk/reference/interfaces/SetProcessTx"},{"type":"link","label":"SetTransactionCostsTx","href":"/sdk/reference/interfaces/SetTransactionCostsTx","docId":"sdk/reference/interfaces/SetTransactionCostsTx"},{"type":"link","label":"Tx","href":"/sdk/reference/interfaces/Tx","docId":"sdk/reference/interfaces/Tx"},{"type":"link","label":"VoteEnvelope","href":"/sdk/reference/interfaces/VoteEnvelope","docId":"sdk/reference/interfaces/VoteEnvelope"}]},{"type":"link","label":"Changelog","href":"/sdk/reference/changelog","docId":"sdk/reference/changelog"}],"href":"/sdk/reference/sdk-reference"}],"href":"/sdk/"},{"type":"category","label":"UI Components","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Organization components","href":"/ui-components/Organization","docId":"ui-components/Organization"},{"type":"link","label":"Election components","href":"/ui-components/Election","docId":"ui-components/Election"}],"href":"/ui-components/"},{"type":"category","label":"Vocdoni API","items":[{"type":"category","label":"Chain","items":[{"type":"link","label":"Estimate block to date","href":"/vocdoni-api/estimate-block-to-date","className":"api-method get","docId":"vocdoni-api/estimate-block-to-date"},{"type":"link","label":"Get block (by hash)","href":"/vocdoni-api/get-block-by-hash","className":"api-method get","docId":"vocdoni-api/get-block-by-hash"},{"type":"link","label":"Get block (by height)","href":"/vocdoni-api/get-block-by-height","className":"api-method get","docId":"vocdoni-api/get-block-by-height"},{"type":"link","label":"Transactions in a block","href":"/vocdoni-api/transactions-in-a-block","className":"api-method get","docId":"vocdoni-api/transactions-in-a-block"},{"type":"link","label":"Estimate date to block","href":"/vocdoni-api/estimate-date-to-block","className":"api-method get","docId":"vocdoni-api/estimate-date-to-block"},{"type":"link","label":"Vochain information","href":"/vocdoni-api/vochain-information","className":"api-method get","docId":"vocdoni-api/vochain-information"},{"type":"link","label":"Circuit info","href":"/vocdoni-api/circuit-info","className":"api-method get","docId":"vocdoni-api/circuit-info"},{"type":"link","label":"Price factors information","href":"/vocdoni-api/price-factors-information","className":"api-method get","docId":"vocdoni-api/price-factors-information"},{"type":"link","label":"Count organizations","href":"/vocdoni-api/count-organizations","className":"api-method get","docId":"vocdoni-api/count-organizations"},{"type":"link","label":"List organizations (filtered)","href":"/vocdoni-api/list-organizations-filtered","className":"api-method post","docId":"vocdoni-api/list-organizations-filtered"},{"type":"link","label":"List organizations","href":"/vocdoni-api/list-organizations","className":"api-method get","docId":"vocdoni-api/list-organizations"},{"type":"link","label":"Submit transaction","href":"/vocdoni-api/submit-transaction","className":"api-method post","docId":"vocdoni-api/submit-transaction"},{"type":"link","label":"Transaction costs","href":"/vocdoni-api/transaction-costs","className":"api-method get","docId":"vocdoni-api/transaction-costs"},{"type":"link","label":"Transactions count","href":"/vocdoni-api/transactions-count","className":"api-method get","docId":"vocdoni-api/transactions-count"},{"type":"link","label":"List Transactions","href":"/vocdoni-api/list-transactions","className":"api-method get","docId":"vocdoni-api/list-transactions"},{"type":"link","label":"Transaction by index","href":"/vocdoni-api/transaction-by-index","className":"api-method get","docId":"vocdoni-api/transaction-by-index"},{"type":"link","label":"Transaction by hash","href":"/vocdoni-api/transaction-by-hash","className":"api-method get","docId":"vocdoni-api/transaction-by-hash"},{"type":"link","label":"Transaction by block height and index","href":"/vocdoni-api/transaction-by-block-height-and-index","className":"api-method get","docId":"vocdoni-api/transaction-by-block-height-and-index"},{"type":"link","label":"List validators","href":"/vocdoni-api/list-validators","className":"api-method get","docId":"vocdoni-api/list-validators"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/chain"},{"type":"category","label":"Accounts","items":[{"type":"link","label":"Set account","href":"/vocdoni-api/set-account","className":"api-method post","docId":"vocdoni-api/set-account"},{"type":"link","label":"Total number of accounts","href":"/vocdoni-api/total-number-of-accounts","className":"api-method get","docId":"vocdoni-api/total-number-of-accounts"},{"type":"link","label":"List of the existing accounts","href":"/vocdoni-api/list-of-the-existing-accounts","className":"api-method get","docId":"vocdoni-api/list-of-the-existing-accounts"},{"type":"link","label":"List account token fees","href":"/vocdoni-api/list-account-token-fees","className":"api-method get","docId":"vocdoni-api/list-account-token-fees"},{"type":"link","label":"Total number of sent and received transactions","href":"/vocdoni-api/total-number-of-sent-and-received-transactions","className":"api-method get","docId":"vocdoni-api/total-number-of-sent-and-received-transactions"},{"type":"link","label":"List account received and sent token transfers","href":"/vocdoni-api/list-account-received-and-sent-token-transfers","className":"api-method get","docId":"vocdoni-api/list-account-received-and-sent-token-transfers"},{"type":"link","label":"Get account","href":"/vocdoni-api/get-account","className":"api-method get","docId":"vocdoni-api/get-account"},{"type":"link","label":"Get account","href":"/vocdoni-api/get-account","className":"api-method get","docId":"vocdoni-api/get-account"},{"type":"link","label":"Count organization elections","href":"/vocdoni-api/count-organization-elections","className":"api-method get","docId":"vocdoni-api/count-organization-elections"},{"type":"link","label":"List organization elections","href":"/vocdoni-api/list-organization-elections","className":"api-method get","docId":"vocdoni-api/list-organization-elections"},{"type":"link","label":"List organization elections by status","href":"/vocdoni-api/list-organization-elections-by-status","className":"api-method get","docId":"vocdoni-api/list-organization-elections-by-status"},{"type":"link","label":"List all token fees","href":"/vocdoni-api/list-all-token-fees","className":"api-method get","docId":"vocdoni-api/list-all-token-fees"},{"type":"link","label":"List all token fees by reference","href":"/vocdoni-api/list-all-token-fees-by-reference","className":"api-method get","docId":"vocdoni-api/list-all-token-fees-by-reference"},{"type":"link","label":"List all token fees by type","href":"/vocdoni-api/list-all-token-fees-by-type","className":"api-method get","docId":"vocdoni-api/list-all-token-fees-by-type"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/accounts"},{"type":"category","label":"Elections","items":[{"type":"link","label":"Create election","href":"/vocdoni-api/create-election","className":"api-method post","docId":"vocdoni-api/create-election"},{"type":"link","label":"List elections (filtered)","href":"/vocdoni-api/list-elections-filtered","className":"api-method post","docId":"vocdoni-api/list-elections-filtered"},{"type":"link","label":"Get next election ID","href":"/vocdoni-api/get-next-election-id","className":"api-method post","docId":"vocdoni-api/get-next-election-id"},{"type":"link","label":"List elections","href":"/vocdoni-api/list-elections","className":"api-method get","docId":"vocdoni-api/list-elections"},{"type":"link","label":"Compute election price","href":"/vocdoni-api/compute-election-price","className":"api-method post","docId":"vocdoni-api/compute-election-price"},{"type":"link","label":"Election information","href":"/vocdoni-api/election-information","className":"api-method get","docId":"vocdoni-api/election-information"},{"type":"link","label":"List encryption keys","href":"/vocdoni-api/list-encryption-keys","className":"api-method get","docId":"vocdoni-api/list-encryption-keys"},{"type":"link","label":"Election results","href":"/vocdoni-api/election-results","className":"api-method get","docId":"vocdoni-api/election-results"},{"type":"link","label":"Count election votes","href":"/vocdoni-api/count-election-votes","className":"api-method get","docId":"vocdoni-api/count-election-votes"},{"type":"link","label":"List election votes","href":"/vocdoni-api/list-election-votes","className":"api-method get","docId":"vocdoni-api/list-election-votes"},{"type":"link","label":"Compute IPFS CIDv1 of file","href":"/vocdoni-api/compute-ipfs-ci-dv-1-of-file","className":"api-method post","docId":"vocdoni-api/compute-ipfs-ci-dv-1-of-file"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/elections"},{"type":"category","label":"Censuses","items":[{"type":"link","label":"Export census database","href":"/vocdoni-api/export-census-database","className":"api-method get","docId":"vocdoni-api/export-census-database"},{"type":"link","label":"Import census database","href":"/vocdoni-api/import-census-database","className":"api-method post","docId":"vocdoni-api/import-census-database"},{"type":"link","label":"List all census references","href":"/vocdoni-api/list-all-census-references","className":"api-method get","docId":"vocdoni-api/list-all-census-references"},{"type":"link","label":"Delete census","href":"/vocdoni-api/delete-census","className":"api-method delete","docId":"vocdoni-api/delete-census"},{"type":"link","label":"Export census","href":"/vocdoni-api/export-census","className":"api-method get","docId":"vocdoni-api/export-census"},{"type":"link","label":"Import census","href":"/vocdoni-api/import-census","className":"api-method post","docId":"vocdoni-api/import-census"},{"type":"link","label":"Add participants to census","href":"/vocdoni-api/add-participants-to-census","className":"api-method post","docId":"vocdoni-api/add-participants-to-census"},{"type":"link","label":"Prove key to census","href":"/vocdoni-api/prove-key-to-census","className":"api-method get","docId":"vocdoni-api/prove-key-to-census"},{"type":"link","label":"Publish census","href":"/vocdoni-api/publish-census","className":"api-method post","docId":"vocdoni-api/publish-census"},{"type":"link","label":"Publish census at root","href":"/vocdoni-api/publish-census-at-root","className":"api-method post","docId":"vocdoni-api/publish-census-at-root"},{"type":"link","label":"Census Merkle Root","href":"/vocdoni-api/census-merkle-root","className":"api-method get","docId":"vocdoni-api/census-merkle-root"},{"type":"link","label":"Census size","href":"/vocdoni-api/census-size","className":"api-method get","docId":"vocdoni-api/census-size"},{"type":"link","label":"Get type of census","href":"/vocdoni-api/get-type-of-census","className":"api-method get","docId":"vocdoni-api/get-type-of-census"},{"type":"link","label":"Verify merkle proof","href":"/vocdoni-api/verify-merkle-proof","className":"api-method post","docId":"vocdoni-api/verify-merkle-proof"},{"type":"link","label":"Census total weight","href":"/vocdoni-api/census-total-weight","className":"api-method get","docId":"vocdoni-api/census-total-weight"},{"type":"link","label":"Create a new census","href":"/vocdoni-api/create-a-new-census","className":"api-method post","docId":"vocdoni-api/create-a-new-census"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/censuses"},{"type":"category","label":"Votes","items":[{"type":"link","label":"Submit a vote","href":"/vocdoni-api/submit-a-vote","className":"api-method post","docId":"vocdoni-api/submit-a-vote"},{"type":"link","label":"Verify vote","href":"/vocdoni-api/verify-vote","className":"api-method get","docId":"vocdoni-api/verify-vote"},{"type":"link","label":"Get vote","href":"/vocdoni-api/get-vote","className":"api-method get","docId":"vocdoni-api/get-vote"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/votes"},{"type":"category","label":"Wallet","items":[{"type":"link","label":"Add account","href":"/vocdoni-api/add-account","className":"api-method post","docId":"vocdoni-api/add-account"},{"type":"link","label":"Set wallet account","href":"/vocdoni-api/set-wallet-account","className":"api-method get","docId":"vocdoni-api/set-wallet-account"},{"type":"link","label":"Create election for wallet","href":"/vocdoni-api/create-election-for-wallet","className":"api-method post","docId":"vocdoni-api/create-election-for-wallet"},{"type":"link","label":"Transfer tokens","href":"/vocdoni-api/transfer-tokens","className":"api-method get","docId":"vocdoni-api/transfer-tokens"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/wallet"},{"type":"category","label":"SIK","items":[{"type":"link","label":"List of valid SIK roots","href":"/vocdoni-api/list-of-valid-sik-roots","className":"api-method get","docId":"vocdoni-api/list-of-valid-sik-roots"},{"type":"link","label":"List of valid SIK roots","href":"/vocdoni-api/list-of-valid-sik-roots","className":"api-method get","docId":"vocdoni-api/list-of-valid-sik-roots"},{"type":"link","label":"Returns if the address provided has a valid SIK","href":"/vocdoni-api/returns-if-the-address-provided-has-a-valid-sik","className":"api-method get","docId":"vocdoni-api/returns-if-the-address-provided-has-a-valid-sik"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/sik"},{"type":"category","label":"Indexer","items":[{"type":"link","label":"Exports the indexer database","href":"/vocdoni-api/exports-the-indexer-database","className":"api-method get","docId":"vocdoni-api/exports-the-indexer-database"}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/vocdoni-api"}]},"docs":{"intro":{"id":"intro","title":"Getting Started","description":"Vocdoni is the most open, secure, and universally verifiable voting protocol, used by hundreds of organizations worldwide. The core of our stack is a powerful decentralized backend, including blockchain, P2P gateway, and distributed file storage components.","sidebar":"defaultSidebar"},"protocol/anonymity/anonymity":{"id":"protocol/anonymity/anonymity","title":"Anonymous Voting","description":"- Anonymous voting is a type of voting process where the users can vote without revealing their identity, by proving that they are accepted as valid voters. Currently we have 2 types of anonymous voting schemes:","sidebar":"defaultSidebar"},"protocol/anonymity/blind-signatures":{"id":"protocol/anonymity/blind-signatures","title":"CSP Blind Signatures","description":"The current approach by Vocdoni regarding determining the eligibility of a potential voter is to use a Census Merkle Tree. All voter public keys must be known in advance and aggregated together into a hash tree to compute a Merkle root. Then each voter needs to fetch their own Merkle proof to demonstrate their eligibility on a public ledger. The Merkle proof can be anonymized using a zk-SNARK so that the public ledger will verify the SNARK proof instead.","sidebar":"defaultSidebar"},"protocol/anonymity/on-chain":{"id":"protocol/anonymity/on-chain","title":"On-Chain Census Anonymity","description":"On-chain cenuses created with the Census3 Service derive their contents from a public set of holders of a given token (or set of tokens) on the Ethereum blockchain. This information is turned into a census by generating a Merkle Proof on that set of data. This Merkle Proof is similar to that used for a typical off-chain tree census, and the same sort of ZK Census Proof can be used to compute voter validation anonymously.","sidebar":"defaultSidebar"},"protocol/anonymity/zk-census-proof":{"id":"protocol/anonymity/zk-census-proof","title":"Off-Chain Tree ZK Census Proof","description":"This document is divided in two sections:","sidebar":"defaultSidebar"},"protocol/ballot-protocol":{"id":"protocol/ballot-protocol","title":"Ballot Protocol","description":"Ballot protocol","sidebar":"defaultSidebar"},"protocol/census/census":{"id":"protocol/census/census","title":"The Census","description":"In Vocdoni, a census of identities can be represented in one of three ways. For Ethereum-based processes, in which eligible voters are represented by Ethereum addresses holding a specific token, an on-chain] (ERC-20) census is used. In cases where a central authority wants to manually validate each voter at the time of voting, [off-chain credential service provider is used. For all other voting processes (organizations that are not represented as DAOs), an off-chain tree census is used.","sidebar":"defaultSidebar"},"protocol/census/off-chain-csp":{"id":"protocol/census/off-chain-csp","title":"Off-Chain CSP Census","description":"A census approach based on Credential Service Providers (CSPs) allows organizations to validate users manually and based off of any arbitrary criteria. Rather than a static census published before-hand, CSP census allows each user to be evaluated for voting eligibility individually, throughout the duration of the voting process.","sidebar":"defaultSidebar"},"protocol/census/off-chain-tree":{"id":"protocol/census/off-chain-tree","title":"Off-Chain Tree Census","description":"The census itself is represented as a binary Merkle Tree, where the leaves of the tree contain the public keys of all eligible voters, hashed.","sidebar":"defaultSidebar"},"protocol/census/on-chain/census3":{"id":"protocol/census/on-chain/census3","title":"Census3 Service","description":"The Census3 Service is an API service which provides an easy way to create censuses for elections with holders of a single token or a combination of them. This is a wrapper of the on-chain census design and enables integrators to use on-chain censuses without manually registering tokens or generating storage proofs.","sidebar":"defaultSidebar"},"protocol/census/on-chain/on-chain":{"id":"protocol/census/on-chain/on-chain","title":"On-Chain Census","description":"An on-chain census is one which is dependent on the status of the Ethereum blockchain at a given point in time. This census type enables the set of eligible voters to be derived from the token holder balances for some ERC-20 Ethereum token, weighted according to token balances. The ideal use-case for such a census is an organization whose members are represented as holders of some token, such as a DAO.","sidebar":"defaultSidebar"},"protocol/data-schemes/data-schemes":{"id":"protocol/data-schemes/data-schemes","title":"Data Schemes","description":"When it comes to voting processes, there are two main types of data storage at the protocol-level: protocol-level data stored on the Vochain and readable metadata like election descriptions stored on IPFS.","sidebar":"defaultSidebar"},"protocol/data-schemes/election":{"id":"protocol/data-schemes/election","title":"Election Metadata","description":"Election metadata provides the human-readable data associated with an election.","sidebar":"defaultSidebar"},"protocol/data-schemes/organization":{"id":"protocol/data-schemes/organization","title":"Organization Metadata","description":"The metadata of an organization provides human readable content, featuring names, descriptions, images, the list of available processes and more.","sidebar":"defaultSidebar"},"protocol/data-schemes/vote":{"id":"protocol/data-schemes/vote","title":"Vote Data","description":"Vote Envelope","sidebar":"defaultSidebar"},"protocol/index":{"id":"protocol/index","title":"Vocdoni Protocol","description":"1. Introduction","sidebar":"defaultSidebar"},"sdk/index":{"id":"sdk/index","title":"Vocdoni SDK","description":"The Vocdoni SDK is a convenient way to interact with the Vocdoni Protocol through the API, allowing anyone to create, manage and participate in voting processes and collective decision-making. The SDK is the primary mode by which developers should interface with Vocdoni - if you think the SDK is missing functionality you need, please get in touch.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/census-types":{"id":"sdk/integration-details/census-types/census-types","title":"Census Types","description":"A census is a list of voters who are eligible to vote in a given election. There are multiple ways to define a census with Vocdoni, each with different privacy and verifiability considerations. The census types are defined and documented at a protocol level and include on-chain, off-chain Merkle tree, and off-chain Credential Service Provider.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/off-chain-csp":{"id":"sdk/integration-details/census-types/off-chain-csp","title":"Off-chain Credential Service Provider","description":"A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/off-chain-tree":{"id":"sdk/integration-details/census-types/off-chain-tree","title":"Off-chain Merkle Tree","description":"This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using census.add().","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/on-chain/complex-census":{"id":"sdk/integration-details/census-types/on-chain/complex-census","title":"Complex Census","description":"The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/on-chain/on-chain":{"id":"sdk/integration-details/census-types/on-chain/on-chain","title":"On-chain Token-Based Census","description":"An on-chain census is one whose voters are defined by holding tokens on the Ethereum blockchain. Currently the following token types are supported:","sidebar":"defaultSidebar"},"sdk/integration-details/integration-details":{"id":"sdk/integration-details/integration-details","title":"Integration Details","description":"The tutorial covers the basics, but here are some details you\'ll need to consider when integrating the Vocdoni SDK into your application.","sidebar":"defaultSidebar"},"sdk/integration-details/vocdoni-tokens":{"id":"sdk/integration-details/vocdoni-tokens","title":"Vocdoni Tokens","description":"Behind-the-scenes, Vocdoni is powered by a custom blockchain. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital \\"currency\\" of Vocdoni tokens that have no real-world value but help with spam reduction and self-sustainability. Actions that update data on the blockchain, such as creating an election, incur a \\"cost.\\" Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/approval":{"id":"sdk/integration-details/voting-types/approval","title":"Approval Voting (Multiple Choice)","description":"An election with Approval voting is a voting system where voters are allowed to indicate their support for multiple","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/quadratic":{"id":"sdk/integration-details/voting-types/quadratic","title":"Quadratic voting","description":"Quadratic voting is a voting mechanism that allows individuals to express their preferences on different issues with","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/ranked":{"id":"sdk/integration-details/voting-types/ranked","title":"Ranked Voting","description":"Ranked voting, also known as preferential voting or ranked-choice voting (RCV), is an electoral system where voters rank","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/single-choice":{"id":"sdk/integration-details/voting-types/single-choice","title":"Single Choice Voting","description":"An election with a single-choice result, also known as First-past-the-post voting (FPTP or FPP) or informally called","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/voting-types":{"id":"sdk/integration-details/voting-types/voting-types","title":"Voting Types","description":"In this section, we will provide a brief overview of the different types of voting supported by the Vocdoni protocol and","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/weighted":{"id":"sdk/integration-details/voting-types/weighted","title":"Weighted voting","description":"Weighted voting is a voting system where each voter is assigned a specific weight or value that reflects their relative influence or importance in the decision-making process.","sidebar":"defaultSidebar"},"sdk/reference/changelog":{"id":"sdk/reference/changelog","title":"Changelog","description":"All notable changes to this project will be documented in this file.","sidebar":"defaultSidebar"},"sdk/reference/classes/Account":{"id":"sdk/reference/classes/Account","title":"Account","description":"@vocdoni/sdk / Account","sidebar":"defaultSidebar"},"sdk/reference/classes/AccountAPI":{"id":"sdk/reference/classes/AccountAPI","title":"AccountAPI","description":"@vocdoni/sdk / AccountAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/AccountService":{"id":"sdk/reference/classes/AccountService","title":"AccountService","description":"@vocdoni/sdk / AccountService","sidebar":"defaultSidebar"},"sdk/reference/classes/AnonymousService":{"id":"sdk/reference/classes/AnonymousService","title":"AnonymousService","description":"@vocdoni/sdk / AnonymousService","sidebar":"defaultSidebar"},"sdk/reference/classes/AnonymousVote":{"id":"sdk/reference/classes/AnonymousVote","title":"AnonymousVote","description":"@vocdoni/sdk / AnonymousVote","sidebar":"defaultSidebar"},"sdk/reference/classes/ApprovalElection":{"id":"sdk/reference/classes/ApprovalElection","title":"ApprovalElection","description":"@vocdoni/sdk / ApprovalElection","sidebar":"defaultSidebar"},"sdk/reference/classes/ArchivedElection":{"id":"sdk/reference/classes/ArchivedElection","title":"ArchivedElection","description":"@vocdoni/sdk / ArchivedElection","sidebar":"defaultSidebar"},"sdk/reference/classes/BudgetElection":{"id":"sdk/reference/classes/BudgetElection","title":"BudgetElection","description":"@vocdoni/sdk / BudgetElection","sidebar":"defaultSidebar"},"sdk/reference/classes/Census":{"id":"sdk/reference/classes/Census","title":"Census","description":"@vocdoni/sdk / Census","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3CensusAPI":{"id":"sdk/reference/classes/Census3CensusAPI","title":"Census3CensusAPI","description":"@vocdoni/sdk / Census3CensusAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3ServiceAPI":{"id":"sdk/reference/classes/Census3ServiceAPI","title":"Census3ServiceAPI","description":"@vocdoni/sdk / Census3ServiceAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3StrategyAPI":{"id":"sdk/reference/classes/Census3StrategyAPI","title":"Census3StrategyAPI","description":"@vocdoni/sdk / Census3StrategyAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3TokenAPI":{"id":"sdk/reference/classes/Census3TokenAPI","title":"Census3TokenAPI","description":"@vocdoni/sdk / Census3TokenAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/CensusAPI":{"id":"sdk/reference/classes/CensusAPI","title":"CensusAPI","description":"@vocdoni/sdk / CensusAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/CensusService":{"id":"sdk/reference/classes/CensusService","title":"CensusService","description":"@vocdoni/sdk / CensusService","sidebar":"defaultSidebar"},"sdk/reference/classes/ChainAPI":{"id":"sdk/reference/classes/ChainAPI","title":"ChainAPI","description":"@vocdoni/sdk / ChainAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/ChainService":{"id":"sdk/reference/classes/ChainService","title":"ChainService","description":"@vocdoni/sdk / ChainService","sidebar":"defaultSidebar"},"sdk/reference/classes/CspAPI":{"id":"sdk/reference/classes/CspAPI","title":"CspAPI","description":"@vocdoni/sdk / CspAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/CspCensus":{"id":"sdk/reference/classes/CspCensus","title":"CspCensus","description":"@vocdoni/sdk / CspCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/CspService":{"id":"sdk/reference/classes/CspService","title":"CspService","description":"@vocdoni/sdk / CspService","sidebar":"defaultSidebar"},"sdk/reference/classes/CspVote":{"id":"sdk/reference/classes/CspVote","title":"CspVote","description":"@vocdoni/sdk / CspVote","sidebar":"defaultSidebar"},"sdk/reference/classes/Election":{"id":"sdk/reference/classes/Election","title":"Election","description":"@vocdoni/sdk / Election","sidebar":"defaultSidebar"},"sdk/reference/classes/ElectionAPI":{"id":"sdk/reference/classes/ElectionAPI","title":"ElectionAPI","description":"@vocdoni/sdk / ElectionAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/ElectionService":{"id":"sdk/reference/classes/ElectionService","title":"ElectionService","description":"@vocdoni/sdk / ElectionService","sidebar":"defaultSidebar"},"sdk/reference/classes/FaucetAPI":{"id":"sdk/reference/classes/FaucetAPI","title":"FaucetAPI","description":"@vocdoni/sdk / FaucetAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/FaucetService":{"id":"sdk/reference/classes/FaucetService","title":"FaucetService","description":"@vocdoni/sdk / FaucetService","sidebar":"defaultSidebar"},"sdk/reference/classes/FileAPI":{"id":"sdk/reference/classes/FileAPI","title":"FileAPI","description":"@vocdoni/sdk / FileAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/FileService":{"id":"sdk/reference/classes/FileService","title":"FileService","description":"@vocdoni/sdk / FileService","sidebar":"defaultSidebar"},"sdk/reference/classes/InvalidElection":{"id":"sdk/reference/classes/InvalidElection","title":"InvalidElection","description":"@vocdoni/sdk / InvalidElection","sidebar":"defaultSidebar"},"sdk/reference/classes/MultiChoiceElection":{"id":"sdk/reference/classes/MultiChoiceElection","title":"MultiChoiceElection","description":"@vocdoni/sdk / MultiChoiceElection","sidebar":"defaultSidebar"},"sdk/reference/classes/OffchainCensus":{"id":"sdk/reference/classes/OffchainCensus","title":"OffchainCensus","description":"@vocdoni/sdk / OffchainCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/PlainCensus":{"id":"sdk/reference/classes/PlainCensus","title":"PlainCensus","description":"@vocdoni/sdk / PlainCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/PublishedCensus":{"id":"sdk/reference/classes/PublishedCensus","title":"PublishedCensus","description":"@vocdoni/sdk / PublishedCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/PublishedElection":{"id":"sdk/reference/classes/PublishedElection","title":"PublishedElection","description":"@vocdoni/sdk / PublishedElection","sidebar":"defaultSidebar"},"sdk/reference/classes/Service":{"id":"sdk/reference/classes/Service","title":"Service","description":"@vocdoni/sdk / Service","sidebar":"defaultSidebar"},"sdk/reference/classes/StrategyCensus":{"id":"sdk/reference/classes/StrategyCensus","title":"StrategyCensus","description":"@vocdoni/sdk / StrategyCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/TokenCensus":{"id":"sdk/reference/classes/TokenCensus","title":"TokenCensus","description":"@vocdoni/sdk / TokenCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/UnpublishedElection":{"id":"sdk/reference/classes/UnpublishedElection","title":"UnpublishedElection","description":"@vocdoni/sdk / UnpublishedElection","sidebar":"defaultSidebar"},"sdk/reference/classes/VocdoniCensus3Client":{"id":"sdk/reference/classes/VocdoniCensus3Client","title":"VocdoniCensus3Client","description":"@vocdoni/sdk / VocdoniCensus3Client","sidebar":"defaultSidebar"},"sdk/reference/classes/VocdoniSDKClient":{"id":"sdk/reference/classes/VocdoniSDKClient","title":"VocdoniSDKClient","description":"@vocdoni/sdk / VocdoniSDKClient","sidebar":"defaultSidebar"},"sdk/reference/classes/Vote":{"id":"sdk/reference/classes/Vote","title":"Vote","description":"@vocdoni/sdk / Vote","sidebar":"defaultSidebar"},"sdk/reference/classes/VoteAPI":{"id":"sdk/reference/classes/VoteAPI","title":"VoteAPI","description":"@vocdoni/sdk / VoteAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/VoteService":{"id":"sdk/reference/classes/VoteService","title":"VoteService","description":"@vocdoni/sdk / VoteService","sidebar":"defaultSidebar"},"sdk/reference/classes/WalletAPI":{"id":"sdk/reference/classes/WalletAPI","title":"WalletAPI","description":"@vocdoni/sdk / WalletAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/WeightedCensus":{"id":"sdk/reference/classes/WeightedCensus","title":"WeightedCensus","description":"@vocdoni/sdk / WeightedCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/ZkAPI":{"id":"sdk/reference/classes/ZkAPI","title":"ZkAPI","description":"@vocdoni/sdk / ZkAPI","sidebar":"defaultSidebar"},"sdk/reference/enums/CensusOrigin":{"id":"sdk/reference/enums/CensusOrigin","title":"CensusOrigin","description":"@vocdoni/sdk / CensusOrigin","sidebar":"defaultSidebar"},"sdk/reference/enums/CensusType":{"id":"sdk/reference/enums/CensusType","title":"CensusType","description":"@vocdoni/sdk / CensusType","sidebar":"defaultSidebar"},"sdk/reference/enums/CensusTypeEnum":{"id":"sdk/reference/enums/CensusTypeEnum","title":"CensusTypeEnum","description":"@vocdoni/sdk / CensusTypeEnum","sidebar":"defaultSidebar"},"sdk/reference/enums/CspProofType":{"id":"sdk/reference/enums/CspProofType","title":"CspProofType","description":"@vocdoni/sdk / CspProofType","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionCreationSteps":{"id":"sdk/reference/enums/ElectionCreationSteps","title":"ElectionCreationSteps","description":"@vocdoni/sdk / ElectionCreationSteps","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionResultsTypeNames":{"id":"sdk/reference/enums/ElectionResultsTypeNames","title":"ElectionResultsTypeNames","description":"@vocdoni/sdk / ElectionResultsTypeNames","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionStatus":{"id":"sdk/reference/enums/ElectionStatus","title":"ElectionStatus","description":"@vocdoni/sdk / ElectionStatus","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionStatusReady":{"id":"sdk/reference/enums/ElectionStatusReady","title":"ElectionStatusReady","description":"@vocdoni/sdk / ElectionStatusReady","sidebar":"defaultSidebar"},"sdk/reference/enums/EnvOptions":{"id":"sdk/reference/enums/EnvOptions","title":"EnvOptions","description":"@vocdoni/sdk / EnvOptions","sidebar":"defaultSidebar"},"sdk/reference/enums/TransactionType":{"id":"sdk/reference/enums/TransactionType","title":"TransactionType","description":"@vocdoni/sdk / TransactionType","sidebar":"defaultSidebar"},"sdk/reference/enums/TxType":{"id":"sdk/reference/enums/TxType","title":"TxType","description":"@vocdoni/sdk / TxType","sidebar":"defaultSidebar"},"sdk/reference/enums/VoteSteps":{"id":"sdk/reference/enums/VoteSteps","title":"VoteSteps","description":"@vocdoni/sdk / VoteSteps","sidebar":"defaultSidebar"},"sdk/reference/interfaces/AccountMetadata":{"id":"sdk/reference/interfaces/AccountMetadata","title":"AccountMetadata","description":"@vocdoni/sdk / AccountMetadata","sidebar":"defaultSidebar"},"sdk/reference/interfaces/AdminTx":{"id":"sdk/reference/interfaces/AdminTx","title":"AdminTx","description":"@vocdoni/sdk / AdminTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/CircuitInputs":{"id":"sdk/reference/interfaces/CircuitInputs","title":"CircuitInputs","description":"@vocdoni/sdk / CircuitInputs","sidebar":"defaultSidebar"},"sdk/reference/interfaces/CollectFaucetTx":{"id":"sdk/reference/interfaces/CollectFaucetTx","title":"CollectFaucetTx","description":"@vocdoni/sdk / CollectFaucetTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ElectionMetadata":{"id":"sdk/reference/interfaces/ElectionMetadata","title":"ElectionMetadata","description":"@vocdoni/sdk / ElectionMetadata","sidebar":"defaultSidebar"},"sdk/reference/interfaces/FetchElectionsParameters":{"id":"sdk/reference/interfaces/FetchElectionsParameters","title":"FetchElectionsParameters","description":"@vocdoni/sdk / FetchElectionsParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccount":{"id":"sdk/reference/interfaces/IAccount","title":"IAccount","description":"@vocdoni/sdk / IAccount","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccountsCountResponse":{"id":"sdk/reference/interfaces/IAccountsCountResponse","title":"IAccountsCountResponse","description":"@vocdoni/sdk / IAccountsCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccountsListResponse":{"id":"sdk/reference/interfaces/IAccountsListResponse","title":"IAccountsListResponse","description":"@vocdoni/sdk / IAccountsListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccountTransfersCountResponse":{"id":"sdk/reference/interfaces/IAccountTransfersCountResponse","title":"IAccountTransfersCountResponse","description":"@vocdoni/sdk / IAccountTransfersCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IApprovalElectionParameters":{"id":"sdk/reference/interfaces/IApprovalElectionParameters","title":"IApprovalElectionParameters","description":"@vocdoni/sdk / IApprovalElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBlockTransactionsResponse":{"id":"sdk/reference/interfaces/IBlockTransactionsResponse","title":"IBlockTransactionsResponse","description":"@vocdoni/sdk / IBlockTransactionsResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBudgetElectionParametersInfo":{"id":"sdk/reference/interfaces/IBudgetElectionParametersInfo","title":"IBudgetElectionParametersInfo","description":"@vocdoni/sdk / IBudgetElectionParametersInfo","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBudgetElectionParametersWithBudget":{"id":"sdk/reference/interfaces/IBudgetElectionParametersWithBudget","title":"IBudgetElectionParametersWithBudget","description":"@vocdoni/sdk / IBudgetElectionParametersWithBudget","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight":{"id":"sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight","title":"IBudgetElectionParametersWithCensusWeight","description":"@vocdoni/sdk / IBudgetElectionParametersWithCensusWeight","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus":{"id":"sdk/reference/interfaces/ICensus","title":"ICensus","description":"@vocdoni/sdk / ICensus","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3CensusListResponse":{"id":"sdk/reference/interfaces/ICensus3CensusListResponse","title":"ICensus3CensusListResponse","description":"@vocdoni/sdk / ICensus3CensusListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3CensusQueueResponse":{"id":"sdk/reference/interfaces/ICensus3CensusQueueResponse","title":"ICensus3CensusQueueResponse","description":"@vocdoni/sdk / ICensus3CensusQueueResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3CensusResponse":{"id":"sdk/reference/interfaces/ICensus3CensusResponse","title":"ICensus3CensusResponse","description":"@vocdoni/sdk / ICensus3CensusResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ServiceInfoResponse":{"id":"sdk/reference/interfaces/ICensus3ServiceInfoResponse","title":"ICensus3ServiceInfoResponse","description":"@vocdoni/sdk / ICensus3ServiceInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesListResponse":{"id":"sdk/reference/interfaces/ICensus3StrategiesListResponse","title":"ICensus3StrategiesListResponse","description":"@vocdoni/sdk / ICensus3StrategiesListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated":{"id":"sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated","title":"ICensus3StrategiesListResponsePaginated","description":"@vocdoni/sdk / ICensus3StrategiesListResponsePaginated","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesOperator":{"id":"sdk/reference/interfaces/ICensus3StrategiesOperator","title":"ICensus3StrategiesOperator","description":"@vocdoni/sdk / ICensus3StrategiesOperator","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse":{"id":"sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse","title":"ICensus3StrategiesOperatorsResponse","description":"@vocdoni/sdk / ICensus3StrategiesOperatorsResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyCreateResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyCreateResponse","title":"ICensus3StrategyCreateResponse","description":"@vocdoni/sdk / ICensus3StrategyCreateResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse","title":"ICensus3StrategyEstimationQueueResponse","description":"@vocdoni/sdk / ICensus3StrategyEstimationQueueResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyHoldersResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyHoldersResponse","title":"ICensus3StrategyHoldersResponse","description":"@vocdoni/sdk / ICensus3StrategyHoldersResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated":{"id":"sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated","title":"ICensus3StrategyHoldersResponsePaginated","description":"@vocdoni/sdk / ICensus3StrategyHoldersResponsePaginated","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyImportQueueResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyImportQueueResponse","title":"ICensus3StrategyImportQueueResponse","description":"@vocdoni/sdk / ICensus3StrategyImportQueueResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyToken":{"id":"sdk/reference/interfaces/ICensus3StrategyToken","title":"ICensus3StrategyToken","description":"@vocdoni/sdk / ICensus3StrategyToken","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3SupportedChain":{"id":"sdk/reference/interfaces/ICensus3SupportedChain","title":"ICensus3SupportedChain","description":"@vocdoni/sdk / ICensus3SupportedChain","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenHolderResponse":{"id":"sdk/reference/interfaces/ICensus3TokenHolderResponse","title":"ICensus3TokenHolderResponse","description":"@vocdoni/sdk / ICensus3TokenHolderResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenListResponse":{"id":"sdk/reference/interfaces/ICensus3TokenListResponse","title":"ICensus3TokenListResponse","description":"@vocdoni/sdk / ICensus3TokenListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenListResponsePaginated":{"id":"sdk/reference/interfaces/ICensus3TokenListResponsePaginated","title":"ICensus3TokenListResponsePaginated","description":"@vocdoni/sdk / ICensus3TokenListResponsePaginated","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenTypesResponse":{"id":"sdk/reference/interfaces/ICensus3TokenTypesResponse","title":"ICensus3TokenTypesResponse","description":"@vocdoni/sdk / ICensus3TokenTypesResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ValidatePredicateChild":{"id":"sdk/reference/interfaces/ICensus3ValidatePredicateChild","title":"ICensus3ValidatePredicateChild","description":"@vocdoni/sdk / ICensus3ValidatePredicateChild","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ValidatePredicateResponse":{"id":"sdk/reference/interfaces/ICensus3ValidatePredicateResponse","title":"ICensus3ValidatePredicateResponse","description":"@vocdoni/sdk / ICensus3ValidatePredicateResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ValidatePredicateToken":{"id":"sdk/reference/interfaces/ICensus3ValidatePredicateToken","title":"ICensus3ValidatePredicateToken","description":"@vocdoni/sdk / ICensus3ValidatePredicateToken","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusExportResponse":{"id":"sdk/reference/interfaces/ICensusExportResponse","title":"ICensusExportResponse","description":"@vocdoni/sdk / ICensusExportResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusImportResponse":{"id":"sdk/reference/interfaces/ICensusImportResponse","title":"ICensusImportResponse","description":"@vocdoni/sdk / ICensusImportResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusParticipant":{"id":"sdk/reference/interfaces/ICensusParticipant","title":"ICensusParticipant","description":"@vocdoni/sdk / ICensusParticipant","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusProofResponse":{"id":"sdk/reference/interfaces/ICensusProofResponse","title":"ICensusProofResponse","description":"@vocdoni/sdk / ICensusProofResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusPublishResponse":{"id":"sdk/reference/interfaces/ICensusPublishResponse","title":"ICensusPublishResponse","description":"@vocdoni/sdk / ICensusPublishResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainBlockInfoResponse":{"id":"sdk/reference/interfaces/IChainBlockInfoResponse","title":"IChainBlockInfoResponse","description":"@vocdoni/sdk / IChainBlockInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainGetCircuitResponse":{"id":"sdk/reference/interfaces/IChainGetCircuitResponse","title":"IChainGetCircuitResponse","description":"@vocdoni/sdk / IChainGetCircuitResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainGetCostsResponse":{"id":"sdk/reference/interfaces/IChainGetCostsResponse","title":"IChainGetCostsResponse","description":"@vocdoni/sdk / IChainGetCostsResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainGetInfoResponse":{"id":"sdk/reference/interfaces/IChainGetInfoResponse","title":"IChainGetInfoResponse","description":"@vocdoni/sdk / IChainGetInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainOrganizationCountResponse":{"id":"sdk/reference/interfaces/IChainOrganizationCountResponse","title":"IChainOrganizationCountResponse","description":"@vocdoni/sdk / IChainOrganizationCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainOrganizationListResponse":{"id":"sdk/reference/interfaces/IChainOrganizationListResponse","title":"IChainOrganizationListResponse","description":"@vocdoni/sdk / IChainOrganizationListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainOrganizationResponse":{"id":"sdk/reference/interfaces/IChainOrganizationResponse","title":"IChainOrganizationResponse","description":"@vocdoni/sdk / IChainOrganizationResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainSubmitTxResponse":{"id":"sdk/reference/interfaces/IChainSubmitTxResponse","title":"IChainSubmitTxResponse","description":"@vocdoni/sdk / IChainSubmitTxResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainTxCountResponse":{"id":"sdk/reference/interfaces/IChainTxCountResponse","title":"IChainTxCountResponse","description":"@vocdoni/sdk / IChainTxCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainTxListResponse":{"id":"sdk/reference/interfaces/IChainTxListResponse","title":"IChainTxListResponse","description":"@vocdoni/sdk / IChainTxListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainTxReference":{"id":"sdk/reference/interfaces/IChainTxReference","title":"IChainTxReference","description":"@vocdoni/sdk / IChainTxReference","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainValidator":{"id":"sdk/reference/interfaces/IChainValidator","title":"IChainValidator","description":"@vocdoni/sdk / IChainValidator","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainValidatorsListResponse":{"id":"sdk/reference/interfaces/IChainValidatorsListResponse","title":"IChainValidatorsListResponse","description":"@vocdoni/sdk / IChainValidatorsListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChoice":{"id":"sdk/reference/interfaces/IChoice","title":"IChoice","description":"@vocdoni/sdk / IChoice","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspAuthStep":{"id":"sdk/reference/interfaces/ICspAuthStep","title":"ICspAuthStep","description":"@vocdoni/sdk / ICspAuthStep","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspFinalStepResponse":{"id":"sdk/reference/interfaces/ICspFinalStepResponse","title":"ICspFinalStepResponse","description":"@vocdoni/sdk / ICspFinalStepResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspInfoResponse":{"id":"sdk/reference/interfaces/ICspInfoResponse","title":"ICspInfoResponse","description":"@vocdoni/sdk / ICspInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspIntermediateStepResponse":{"id":"sdk/reference/interfaces/ICspIntermediateStepResponse","title":"ICspIntermediateStepResponse","description":"@vocdoni/sdk / ICspIntermediateStepResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspSignResponse":{"id":"sdk/reference/interfaces/ICspSignResponse","title":"ICspSignResponse","description":"@vocdoni/sdk / ICspSignResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionCreateResponse":{"id":"sdk/reference/interfaces/IElectionCreateResponse","title":"IElectionCreateResponse","description":"@vocdoni/sdk / IElectionCreateResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionInfoResponse":{"id":"sdk/reference/interfaces/IElectionInfoResponse","title":"IElectionInfoResponse","description":"@vocdoni/sdk / IElectionInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionKeysResponse":{"id":"sdk/reference/interfaces/IElectionKeysResponse","title":"IElectionKeysResponse","description":"@vocdoni/sdk / IElectionKeysResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionListFilter":{"id":"sdk/reference/interfaces/IElectionListFilter","title":"IElectionListFilter","description":"@vocdoni/sdk / IElectionListFilter","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionListResponse":{"id":"sdk/reference/interfaces/IElectionListResponse","title":"IElectionListResponse","description":"@vocdoni/sdk / IElectionListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionMode":{"id":"sdk/reference/interfaces/IElectionMode","title":"IElectionMode","description":"@vocdoni/sdk / IElectionMode","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionNextIdResponse":{"id":"sdk/reference/interfaces/IElectionNextIdResponse","title":"IElectionNextIdResponse","description":"@vocdoni/sdk / IElectionNextIdResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionParameters":{"id":"sdk/reference/interfaces/IElectionParameters","title":"IElectionParameters","description":"@vocdoni/sdk / IElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionSummary":{"id":"sdk/reference/interfaces/IElectionSummary","title":"IElectionSummary","description":"@vocdoni/sdk / IElectionSummary","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionType":{"id":"sdk/reference/interfaces/IElectionType","title":"IElectionType","description":"@vocdoni/sdk / IElectionType","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionVote":{"id":"sdk/reference/interfaces/IElectionVote","title":"IElectionVote","description":"@vocdoni/sdk / IElectionVote","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionVoteListResponse":{"id":"sdk/reference/interfaces/IElectionVoteListResponse","title":"IElectionVoteListResponse","description":"@vocdoni/sdk / IElectionVoteListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IEncryptionKey":{"id":"sdk/reference/interfaces/IEncryptionKey","title":"IEncryptionKey","description":"@vocdoni/sdk / IEncryptionKey","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IInvalidElectionParameters":{"id":"sdk/reference/interfaces/IInvalidElectionParameters","title":"IInvalidElectionParameters","description":"@vocdoni/sdk / IInvalidElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IMultiChoiceElectionParameters":{"id":"sdk/reference/interfaces/IMultiChoiceElectionParameters","title":"IMultiChoiceElectionParameters","description":"@vocdoni/sdk / IMultiChoiceElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IPublishedElectionParameters":{"id":"sdk/reference/interfaces/IPublishedElectionParameters","title":"IPublishedElectionParameters","description":"@vocdoni/sdk / IPublishedElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IQuestion":{"id":"sdk/reference/interfaces/IQuestion","title":"IQuestion","description":"@vocdoni/sdk / IQuestion","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ITallyMode":{"id":"sdk/reference/interfaces/ITallyMode","title":"ITallyMode","description":"@vocdoni/sdk / ITallyMode","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteInfoResponse":{"id":"sdk/reference/interfaces/IVoteInfoResponse","title":"IVoteInfoResponse","description":"@vocdoni/sdk / IVoteInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteMode":{"id":"sdk/reference/interfaces/IVoteMode","title":"IVoteMode","description":"@vocdoni/sdk / IVoteMode","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteSubmitResponse":{"id":"sdk/reference/interfaces/IVoteSubmitResponse","title":"IVoteSubmitResponse","description":"@vocdoni/sdk / IVoteSubmitResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteType":{"id":"sdk/reference/interfaces/IVoteType","title":"IVoteType","description":"@vocdoni/sdk / IVoteType","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IZkProofResponse":{"id":"sdk/reference/interfaces/IZkProofResponse","title":"IZkProofResponse","description":"@vocdoni/sdk / IZkProofResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IZkSIKResponse":{"id":"sdk/reference/interfaces/IZkSIKResponse","title":"IZkSIKResponse","description":"@vocdoni/sdk / IZkSIKResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/MintTokensTx":{"id":"sdk/reference/interfaces/MintTokensTx","title":"MintTokensTx","description":"@vocdoni/sdk / MintTokensTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/NewProcessTx":{"id":"sdk/reference/interfaces/NewProcessTx","title":"NewProcessTx","description":"@vocdoni/sdk / NewProcessTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/Process":{"id":"sdk/reference/interfaces/Process","title":"Process","description":"@vocdoni/sdk / Process","sidebar":"defaultSidebar"},"sdk/reference/interfaces/Proof":{"id":"sdk/reference/interfaces/Proof","title":"Proof","description":"@vocdoni/sdk / Proof","sidebar":"defaultSidebar"},"sdk/reference/interfaces/RegisterKeyTx":{"id":"sdk/reference/interfaces/RegisterKeyTx","title":"RegisterKeyTx","description":"@vocdoni/sdk / RegisterKeyTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SendTokensTx":{"id":"sdk/reference/interfaces/SendTokensTx","title":"SendTokensTx","description":"@vocdoni/sdk / SendTokensTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ServiceProperties":{"id":"sdk/reference/interfaces/ServiceProperties","title":"ServiceProperties","description":"@vocdoni/sdk / ServiceProperties","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SetAccountTx":{"id":"sdk/reference/interfaces/SetAccountTx","title":"SetAccountTx","description":"@vocdoni/sdk / SetAccountTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SetProcessTx":{"id":"sdk/reference/interfaces/SetProcessTx","title":"SetProcessTx","description":"@vocdoni/sdk / SetProcessTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SetTransactionCostsTx":{"id":"sdk/reference/interfaces/SetTransactionCostsTx","title":"SetTransactionCostsTx","description":"@vocdoni/sdk / SetTransactionCostsTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/Tx":{"id":"sdk/reference/interfaces/Tx","title":"Tx","description":"@vocdoni/sdk / Tx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/VoteEnvelope":{"id":"sdk/reference/interfaces/VoteEnvelope","title":"VoteEnvelope","description":"@vocdoni/sdk / VoteEnvelope","sidebar":"defaultSidebar"},"sdk/reference/sdk-reference":{"id":"sdk/reference/sdk-reference","title":"@vocdoni/sdk","description":"Table of contents","sidebar":"defaultSidebar"},"sdk/tutorial":{"id":"sdk/tutorial","title":"SDK Tutorial","description":"This tutorial will show you how to get your environment set up, start using the SDK, and create and vote in an election. We will be using typescript.","sidebar":"defaultSidebar"},"ui-components/Election":{"id":"ui-components/Election","title":"Election components","description":"Vocdoni Chakra components for Elections","sidebar":"defaultSidebar"},"ui-components/index":{"id":"ui-components/index","title":"UI Components","description":"Vocdoni Chakra components","sidebar":"defaultSidebar"},"ui-components/Organization":{"id":"ui-components/Organization","title":"Organization components","description":"Vocdoni Chakra components for Organizations","sidebar":"defaultSidebar"},"vocdoni-api/accounts":{"id":"vocdoni-api/accounts","title":"Accounts","description":"Accounts","sidebar":"defaultSidebar"},"vocdoni-api/add-account":{"id":"vocdoni-api/add-account","title":"Add account","description":"Add a new account to the local store. It returns a token used to manage this account on the future.","sidebar":"defaultSidebar"},"vocdoni-api/add-participants-to-census":{"id":"vocdoni-api/add-participants-to-census","title":"Add participants to census","description":"Add list of public key/address with its weight to an unpublished census and returns the resulting","sidebar":"defaultSidebar"},"vocdoni-api/census-merkle-root":{"id":"vocdoni-api/census-merkle-root","title":"Census Merkle Root","description":"Get census [Merkle Tree root](https://docs.vocdoni.io/architecture/census/off-chain-tree.html) hash, used to identify the census at specific snapshot.\\n\\n- Bearer token not required","sidebar":"defaultSidebar"},"vocdoni-api/census-size":{"id":"vocdoni-api/census-size","title":"Census size","description":"Total number of keys added to the census. Size as integer","sidebar":"defaultSidebar"},"vocdoni-api/census-total-weight":{"id":"vocdoni-api/census-total-weight","title":"Census total weight","description":"It sums all weights added to the census. Weight is a stringified bigInt","sidebar":"defaultSidebar"},"vocdoni-api/censuses":{"id":"vocdoni-api/censuses","title":"Censuses","description":"Censuses","sidebar":"defaultSidebar"},"vocdoni-api/chain":{"id":"vocdoni-api/chain","title":"Chain","description":"Chain","sidebar":"defaultSidebar"},"vocdoni-api/circuit-info":{"id":"vocdoni-api/circuit-info","title":"Circuit info","description":"Returns the circuit configuration according to the current circuit","sidebar":"defaultSidebar"},"vocdoni-api/compute-election-price":{"id":"vocdoni-api/compute-election-price","title":"Compute election price","description":"Helper endpoint to get the election price.","sidebar":"defaultSidebar"},"vocdoni-api/compute-ipfs-ci-dv-1-of-file":{"id":"vocdoni-api/compute-ipfs-ci-dv-1-of-file","title":"Compute IPFS CIDv1 of file","description":"Helper endpoint to get the IPFS CIDv1 hash of a file","sidebar":"defaultSidebar"},"vocdoni-api/count-election-votes":{"id":"vocdoni-api/count-election-votes","title":"Count election votes","description":"Get the number of votes for an election","sidebar":"defaultSidebar"},"vocdoni-api/count-organization-elections":{"id":"vocdoni-api/count-organization-elections","title":"Count organization elections","description":"Returns the number of elections for an organization","sidebar":"defaultSidebar"},"vocdoni-api/count-organizations":{"id":"vocdoni-api/count-organizations","title":"Count organizations","description":"Return the number of organizations","sidebar":"defaultSidebar"},"vocdoni-api/create-a-new-census":{"id":"vocdoni-api/create-a-new-census","title":"Create a new census","description":"Create a new census on the backend side. The census is still unpublished until [publish](publish-census) is called.","sidebar":"defaultSidebar"},"vocdoni-api/create-election":{"id":"vocdoni-api/create-election","title":"Create election","description":"It creates an election on the Vochain.","sidebar":"defaultSidebar"},"vocdoni-api/create-election-for-wallet":{"id":"vocdoni-api/create-election-for-wallet","title":"Create election for wallet","description":"Creates an election. Requires the bearer token of the account you want to create the election.","sidebar":"defaultSidebar"},"vocdoni-api/delete-census":{"id":"vocdoni-api/delete-census","title":"Delete census","description":"Delete unpublished census (not on the storage yet). See [publish census](census-publish)\\n","sidebar":"defaultSidebar"},"vocdoni-api/election-information":{"id":"vocdoni-api/election-information","title":"Election information","description":"Get full election information","sidebar":"defaultSidebar"},"vocdoni-api/election-results":{"id":"vocdoni-api/election-results","title":"Election results","description":"Returns a given election consensus results and useful information about the results. Results represented with BigInt strings.","sidebar":"defaultSidebar"},"vocdoni-api/elections":{"id":"vocdoni-api/elections","title":"Elections","description":"Elections","sidebar":"defaultSidebar"},"vocdoni-api/estimate-block-to-date":{"id":"vocdoni-api/estimate-block-to-date","title":"Estimate block to date","description":"Returns the estimated timestamp for the block height provided","sidebar":"defaultSidebar"},"vocdoni-api/estimate-date-to-block":{"id":"vocdoni-api/estimate-date-to-block","title":"Estimate date to block","description":"Returns the estimated block height for the timestamp provided","sidebar":"defaultSidebar"},"vocdoni-api/export-census":{"id":"vocdoni-api/export-census","title":"Export census","description":"Export census to JSON format. Requires Bearer token","sidebar":"defaultSidebar"},"vocdoni-api/export-census-database":{"id":"vocdoni-api/export-census-database","title":"Export census database","description":"Export the whole census database to a JSON file. Requires Admin Bearer token.","sidebar":"defaultSidebar"},"vocdoni-api/exports-the-indexer-database":{"id":"vocdoni-api/exports-the-indexer-database","title":"Exports the indexer database","description":"Exports the indexer SQL database in raw format","sidebar":"defaultSidebar"},"vocdoni-api/get-account":{"id":"vocdoni-api/get-account","title":"Get account","description":"Get account information by its address or public key. The `infoURI` parameter contain where account metadata is uploaded (like avatar, name...). It return also an already parsed \'metadata\' object from this infoUri.","sidebar":"defaultSidebar"},"vocdoni-api/get-block-by-hash":{"id":"vocdoni-api/get-block-by-hash","title":"Get block (by hash)","description":"Returns the block from the given hash","sidebar":"defaultSidebar"},"vocdoni-api/get-block-by-height":{"id":"vocdoni-api/get-block-by-height","title":"Get block (by height)","description":"Returns the full block information at the given height","sidebar":"defaultSidebar"},"vocdoni-api/get-next-election-id":{"id":"vocdoni-api/get-next-election-id","title":"Get next election ID","description":"nextElectionIDHandler","sidebar":"defaultSidebar"},"vocdoni-api/get-type-of-census":{"id":"vocdoni-api/get-type-of-census","title":"Get type of census","description":"Get the census type","sidebar":"defaultSidebar"},"vocdoni-api/get-vote":{"id":"vocdoni-api/get-vote","title":"Get vote","description":"Get the content of an existing Vote. If is an encrypted election it return the `encryptionKeys` indexes and the package will be codified.","sidebar":"defaultSidebar"},"vocdoni-api/import-census":{"id":"vocdoni-api/import-census","title":"Import census","description":"Import census from JSON previously exported using [`/censuses/{censusId}/export`](census-export). Requires Bearer token","sidebar":"defaultSidebar"},"vocdoni-api/import-census-database":{"id":"vocdoni-api/import-census-database","title":"Import census database","description":"Import the whole census database from a JSON file.","sidebar":"defaultSidebar"},"vocdoni-api/list-account-received-and-sent-token-transfers":{"id":"vocdoni-api/list-account-received-and-sent-token-transfers","title":"List account received and sent token transfers","description":"Returns the token transfers for an account. A transfer is a token transference from one account to other (excepting the burn address).","sidebar":"defaultSidebar"},"vocdoni-api/list-account-token-fees":{"id":"vocdoni-api/list-account-token-fees","title":"List account token fees","description":"Returns the token fees for an account. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-census-references":{"id":"vocdoni-api/list-all-census-references","title":"List all census references","description":"List all census references. Requires Admin Bearer token.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-token-fees":{"id":"vocdoni-api/list-all-token-fees","title":"List all token fees","description":"Returns the token fees list ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-token-fees-by-reference":{"id":"vocdoni-api/list-all-token-fees-by-reference","title":"List all token fees by reference","description":"Returns the token fees list filtered by reference and ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-token-fees-by-type":{"id":"vocdoni-api/list-all-token-fees-by-type","title":"List all token fees by type","description":"Returns the token fees list filtered by type and ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-election-votes":{"id":"vocdoni-api/list-election-votes","title":"List election votes","description":"Returns the list of voteIDs for an election (paginated)","sidebar":"defaultSidebar"},"vocdoni-api/list-elections":{"id":"vocdoni-api/list-elections","title":"List elections","description":"Get a list of elections summaries.","sidebar":"defaultSidebar"},"vocdoni-api/list-elections-filtered":{"id":"vocdoni-api/list-elections-filtered","title":"List elections (filtered)","description":"Return a filtered elections list, the available filters have to be sent on the request body. Available are:","sidebar":"defaultSidebar"},"vocdoni-api/list-encryption-keys":{"id":"vocdoni-api/list-encryption-keys","title":"List encryption keys","description":"Returns the list of public/private encryption keys","sidebar":"defaultSidebar"},"vocdoni-api/list-of-the-existing-accounts":{"id":"vocdoni-api/list-of-the-existing-accounts","title":"List of the existing accounts","description":"Returns information (address, balance and nonce) of the existing accounts","sidebar":"defaultSidebar"},"vocdoni-api/list-of-valid-sik-roots":{"id":"vocdoni-api/list-of-valid-sik-roots","title":"List of valid SIK roots","description":"Returns the list of currently valid roots of the merkle tree where the vochain account SIK\'s are stored.","sidebar":"defaultSidebar"},"vocdoni-api/list-organization-elections":{"id":"vocdoni-api/list-organization-elections","title":"List organization elections","description":"List the elections of an organization","sidebar":"defaultSidebar"},"vocdoni-api/list-organization-elections-by-status":{"id":"vocdoni-api/list-organization-elections-by-status","title":"List organization elections by status","description":"List the elections of an organization by status","sidebar":"defaultSidebar"},"vocdoni-api/list-organizations":{"id":"vocdoni-api/list-organizations","title":"List organizations","description":"An **Organizations** is an account with `infoUri` that contains organization associated metadata.","sidebar":"defaultSidebar"},"vocdoni-api/list-organizations-filtered":{"id":"vocdoni-api/list-organizations-filtered","title":"List organizations (filtered)","description":"Returns a list of organizations filtered by its partial id, paginated by the given page","sidebar":"defaultSidebar"},"vocdoni-api/list-transactions":{"id":"vocdoni-api/list-transactions","title":"List Transactions","description":"To get full transaction information use [/chain/transaction/{blockHeight}/{txIndex}](transaction-by-block-index).\\nWhere transactionIndex is the index of the transaction on the containing block.","sidebar":"defaultSidebar"},"vocdoni-api/list-validators":{"id":"vocdoni-api/list-validators","title":"List validators","description":"Returns the list of validators","sidebar":"defaultSidebar"},"vocdoni-api/price-factors-information":{"id":"vocdoni-api/price-factors-information","title":"Price factors information","description":"Package electionprice provides a mechanism for calculating the price of an election based on its characteristics.","sidebar":"defaultSidebar"},"vocdoni-api/prove-key-to-census":{"id":"vocdoni-api/prove-key-to-census","title":"Prove key to census","description":"Prove the key and weight belong to the census root hash.","sidebar":"defaultSidebar"},"vocdoni-api/publish-census":{"id":"vocdoni-api/publish-census","title":"Publish census","description":"Register a census to the storage (IPFS in our case). After this, the census can\'t be edited.","sidebar":"defaultSidebar"},"vocdoni-api/publish-census-at-root":{"id":"vocdoni-api/publish-census-at-root","title":"Publish census at root","description":"Register a census to the storage (IPFS in our case). After this, the census can\'t be edited.","sidebar":"defaultSidebar"},"vocdoni-api/returns-if-the-address-provided-has-a-valid-sik":{"id":"vocdoni-api/returns-if-the-address-provided-has-a-valid-sik","title":"Returns if the address provided has a valid SIK","description":"Returns if the address provided, associated to an a registered account or not, has a valid SIK already registered or not.","sidebar":"defaultSidebar"},"vocdoni-api/set-account":{"id":"vocdoni-api/set-account","title":"Set account","description":"It register an account to the blockchain including IPFS metadata upload.","sidebar":"defaultSidebar"},"vocdoni-api/set-wallet-account":{"id":"vocdoni-api/set-wallet-account","title":"Set wallet account","description":"Set a new account. Needed the bearer token associated the account.","sidebar":"defaultSidebar"},"vocdoni-api/sik":{"id":"vocdoni-api/sik","title":"SIK","description":"SIK","sidebar":"defaultSidebar"},"vocdoni-api/submit-a-vote":{"id":"vocdoni-api/submit-a-vote","title":"Submit a vote","description":"Submit a vote using a protobuf signed transaction. The corresponding result are the vote id and transaction hash where the vote is registered.","sidebar":"defaultSidebar"},"vocdoni-api/submit-transaction":{"id":"vocdoni-api/submit-transaction","title":"Submit transaction","description":"It submit a transaction. Depending of transaction type will return different kinds of responses:","sidebar":"defaultSidebar"},"vocdoni-api/total-number-of-accounts":{"id":"vocdoni-api/total-number-of-accounts","title":"Total number of accounts","description":"Returns the count of total number of existing accounts","sidebar":"defaultSidebar"},"vocdoni-api/total-number-of-sent-and-received-transactions":{"id":"vocdoni-api/total-number-of-sent-and-received-transactions","title":"Total number of sent and received transactions","description":"Returns the count of total number of sent and received transactions for an account. A transaction is a token transfer from one account to another existing account","sidebar":"defaultSidebar"},"vocdoni-api/transaction-by-block-height-and-index":{"id":"vocdoni-api/transaction-by-block-height-and-index","title":"Transaction by block height and index","description":"Get transaction full information by block height and index. It returns JSON transaction protobuf encoded. Depending of transaction type will return different types of objects. Current transaction types can be found calling `/chain/transactions/cost`","sidebar":"defaultSidebar"},"vocdoni-api/transaction-by-hash":{"id":"vocdoni-api/transaction-by-hash","title":"Transaction by hash","description":"Using transaction hash it return the `block` and `index` containing that contains the transaction. After, you could use this `block` and `index` to retrieve transaction full info using [transaction by block and index](transaction-by-block-index)","sidebar":"defaultSidebar"},"vocdoni-api/transaction-by-index":{"id":"vocdoni-api/transaction-by-index","title":"Transaction by index","description":"Get transaction by its index. This is not transaction reference (hash), and neither the block height and block index. The transaction index is an incremental counter for each transaction. You could use the transaction `block` and `index` to retrieve full info using [transaction by block and index](transaction-by-block-index).","sidebar":"defaultSidebar"},"vocdoni-api/transaction-costs":{"id":"vocdoni-api/transaction-costs","title":"Transaction costs","description":"Returns the list of transactions and its cost","sidebar":"defaultSidebar"},"vocdoni-api/transactions-count":{"id":"vocdoni-api/transactions-count","title":"Transactions count","description":"Returns the number of transactions","sidebar":"defaultSidebar"},"vocdoni-api/transactions-in-a-block":{"id":"vocdoni-api/transactions-in-a-block","title":"Transactions in a block","description":"Given a block returns the list of transactions for that block","sidebar":"defaultSidebar"},"vocdoni-api/transfer-tokens":{"id":"vocdoni-api/transfer-tokens","title":"Transfer tokens","description":"Transfer balance to another account. Needed the bearer token associated the account.","sidebar":"defaultSidebar"},"vocdoni-api/verify-merkle-proof":{"id":"vocdoni-api/verify-merkle-proof","title":"Verify merkle proof","description":"Verify that a previously obtained Merkle proof for a key, acquired via [/censuses/{censusId}/proof/{publicKey}](prove-key-to-census) is still correct.","sidebar":"defaultSidebar"},"vocdoni-api/verify-vote":{"id":"vocdoni-api/verify-vote","title":"Verify vote","description":"Check if vote is registered on the blockchain on specific election. Just return Ok status code","sidebar":"defaultSidebar"},"vocdoni-api/vocdoni-api":{"id":"vocdoni-api/vocdoni-api","title":"Vocdoni API","description":"The Vocdoni API is a REST API that substitutes the previous RPCs in order to make it easier for developers/integrators to build on top of the voting protocol. This API facilitates creating votings using Vocdoni, without the hassle of learning a complex blockchain platform, allowing to perform all the features that enable the voting protocol such as creating an account, entity, voting process, census & vote, abstracting as much as possible the complexity and offering simple and straightforward methods to perform those actions.","sidebar":"defaultSidebar"},"vocdoni-api/vochain-information":{"id":"vocdoni-api/vochain-information","title":"Vochain information","description":"Return basic Vocdoni Blockchain (Vochain) information like blockTime, chainId, current height...","sidebar":"defaultSidebar"},"vocdoni-api/votes":{"id":"vocdoni-api/votes","title":"Votes","description":"Votes","sidebar":"defaultSidebar"},"vocdoni-api/wallet":{"id":"vocdoni-api/wallet","title":"Wallet","description":"Wallet","sidebar":"defaultSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.f323c678.js b/assets/js/935f2afb.f323c678.js deleted file mode 100644 index 38c8538fb..000000000 --- a/assets/js/935f2afb.f323c678.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"Getting Started","href":"/intro","docId":"intro"},{"type":"category","label":"Vocdoni Protocol","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Anonymous Voting","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CSP Blind Signatures","href":"/protocol/anonymity/blind-signatures","docId":"protocol/anonymity/blind-signatures"},{"type":"link","label":"On-Chain Census Anonymity","href":"/protocol/anonymity/on-chain","docId":"protocol/anonymity/on-chain"},{"type":"link","label":"Off-Chain Tree ZK Census Proof","href":"/protocol/anonymity/zk-census-proof","docId":"protocol/anonymity/zk-census-proof"}],"href":"/protocol/anonymity/"},{"type":"link","label":"Ballot Protocol","href":"/protocol/ballot-protocol","docId":"protocol/ballot-protocol"},{"type":"category","label":"The Census","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Off-Chain CSP Census","href":"/protocol/census/off-chain-csp","docId":"protocol/census/off-chain-csp"},{"type":"link","label":"Off-Chain Tree Census","href":"/protocol/census/off-chain-tree","docId":"protocol/census/off-chain-tree"},{"type":"category","label":"On-Chain Census","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Census3 Service","href":"/protocol/census/on-chain/census3","docId":"protocol/census/on-chain/census3"}],"href":"/protocol/census/on-chain/"}],"href":"/protocol/census/"},{"type":"category","label":"Data Schemes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Election Metadata","href":"/protocol/data-schemes/election","docId":"protocol/data-schemes/election"},{"type":"link","label":"Organization Metadata","href":"/protocol/data-schemes/organization","docId":"protocol/data-schemes/organization"},{"type":"link","label":"Vote Data","href":"/protocol/data-schemes/vote","docId":"protocol/data-schemes/vote"}],"href":"/protocol/data-schemes/"}],"href":"/protocol/"},{"type":"category","label":"Vocdoni SDK","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"SDK Tutorial","href":"/sdk/tutorial","docId":"sdk/tutorial"},{"type":"category","label":"Integration Details","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Census Types","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Off-chain Credential Service Provider","href":"/sdk/integration-details/census-types/off-chain-csp","docId":"sdk/integration-details/census-types/off-chain-csp"},{"type":"link","label":"Off-chain Merkle Tree","href":"/sdk/integration-details/census-types/off-chain-tree","docId":"sdk/integration-details/census-types/off-chain-tree"},{"type":"category","label":"On-chain Token-Based Census","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Complex Census","href":"/sdk/integration-details/census-types/on-chain/complex-census","docId":"sdk/integration-details/census-types/on-chain/complex-census"}],"href":"/sdk/integration-details/census-types/on-chain/"}],"href":"/sdk/integration-details/census-types/"},{"type":"link","label":"Vocdoni Tokens","href":"/sdk/integration-details/vocdoni-tokens","docId":"sdk/integration-details/vocdoni-tokens"},{"type":"category","label":"Voting Types","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Single Choice Voting","href":"/sdk/integration-details/voting-types/single-choice","docId":"sdk/integration-details/voting-types/single-choice"},{"type":"link","label":"Ranked Voting","href":"/sdk/integration-details/voting-types/ranked","docId":"sdk/integration-details/voting-types/ranked"},{"type":"link","label":"Approval Voting (Multiple Choice)","href":"/sdk/integration-details/voting-types/approval","docId":"sdk/integration-details/voting-types/approval"},{"type":"link","label":"Weighted voting","href":"/sdk/integration-details/voting-types/weighted","docId":"sdk/integration-details/voting-types/weighted"},{"type":"link","label":"Quadratic voting","href":"/sdk/integration-details/voting-types/quadratic","docId":"sdk/integration-details/voting-types/quadratic"}],"href":"/sdk/integration-details/voting-types/"}],"href":"/sdk/integration-details/"},{"type":"category","label":"Reference","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"@vocdoni/sdk","href":"/sdk/reference/sdk-reference","docId":"sdk/reference/sdk-reference"},{"type":"category","label":"Classes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Account","href":"/sdk/reference/classes/Account","docId":"sdk/reference/classes/Account"},{"type":"link","label":"AccountAPI","href":"/sdk/reference/classes/AccountAPI","docId":"sdk/reference/classes/AccountAPI"},{"type":"link","label":"AccountService","href":"/sdk/reference/classes/AccountService","docId":"sdk/reference/classes/AccountService"},{"type":"link","label":"AnonymousService","href":"/sdk/reference/classes/AnonymousService","docId":"sdk/reference/classes/AnonymousService"},{"type":"link","label":"AnonymousVote","href":"/sdk/reference/classes/AnonymousVote","docId":"sdk/reference/classes/AnonymousVote"},{"type":"link","label":"ApprovalElection","href":"/sdk/reference/classes/ApprovalElection","docId":"sdk/reference/classes/ApprovalElection"},{"type":"link","label":"ArchivedElection","href":"/sdk/reference/classes/ArchivedElection","docId":"sdk/reference/classes/ArchivedElection"},{"type":"link","label":"BudgetElection","href":"/sdk/reference/classes/BudgetElection","docId":"sdk/reference/classes/BudgetElection"},{"type":"link","label":"Census","href":"/sdk/reference/classes/Census","docId":"sdk/reference/classes/Census"},{"type":"link","label":"Census3CensusAPI","href":"/sdk/reference/classes/Census3CensusAPI","docId":"sdk/reference/classes/Census3CensusAPI"},{"type":"link","label":"Census3ServiceAPI","href":"/sdk/reference/classes/Census3ServiceAPI","docId":"sdk/reference/classes/Census3ServiceAPI"},{"type":"link","label":"Census3StrategyAPI","href":"/sdk/reference/classes/Census3StrategyAPI","docId":"sdk/reference/classes/Census3StrategyAPI"},{"type":"link","label":"Census3TokenAPI","href":"/sdk/reference/classes/Census3TokenAPI","docId":"sdk/reference/classes/Census3TokenAPI"},{"type":"link","label":"CensusAPI","href":"/sdk/reference/classes/CensusAPI","docId":"sdk/reference/classes/CensusAPI"},{"type":"link","label":"CensusService","href":"/sdk/reference/classes/CensusService","docId":"sdk/reference/classes/CensusService"},{"type":"link","label":"ChainAPI","href":"/sdk/reference/classes/ChainAPI","docId":"sdk/reference/classes/ChainAPI"},{"type":"link","label":"ChainService","href":"/sdk/reference/classes/ChainService","docId":"sdk/reference/classes/ChainService"},{"type":"link","label":"CspAPI","href":"/sdk/reference/classes/CspAPI","docId":"sdk/reference/classes/CspAPI"},{"type":"link","label":"CspCensus","href":"/sdk/reference/classes/CspCensus","docId":"sdk/reference/classes/CspCensus"},{"type":"link","label":"CspService","href":"/sdk/reference/classes/CspService","docId":"sdk/reference/classes/CspService"},{"type":"link","label":"CspVote","href":"/sdk/reference/classes/CspVote","docId":"sdk/reference/classes/CspVote"},{"type":"link","label":"Election","href":"/sdk/reference/classes/Election","docId":"sdk/reference/classes/Election"},{"type":"link","label":"ElectionAPI","href":"/sdk/reference/classes/ElectionAPI","docId":"sdk/reference/classes/ElectionAPI"},{"type":"link","label":"ElectionService","href":"/sdk/reference/classes/ElectionService","docId":"sdk/reference/classes/ElectionService"},{"type":"link","label":"FaucetAPI","href":"/sdk/reference/classes/FaucetAPI","docId":"sdk/reference/classes/FaucetAPI"},{"type":"link","label":"FaucetService","href":"/sdk/reference/classes/FaucetService","docId":"sdk/reference/classes/FaucetService"},{"type":"link","label":"FileAPI","href":"/sdk/reference/classes/FileAPI","docId":"sdk/reference/classes/FileAPI"},{"type":"link","label":"FileService","href":"/sdk/reference/classes/FileService","docId":"sdk/reference/classes/FileService"},{"type":"link","label":"InvalidElection","href":"/sdk/reference/classes/InvalidElection","docId":"sdk/reference/classes/InvalidElection"},{"type":"link","label":"MultiChoiceElection","href":"/sdk/reference/classes/MultiChoiceElection","docId":"sdk/reference/classes/MultiChoiceElection"},{"type":"link","label":"OffchainCensus","href":"/sdk/reference/classes/OffchainCensus","docId":"sdk/reference/classes/OffchainCensus"},{"type":"link","label":"PlainCensus","href":"/sdk/reference/classes/PlainCensus","docId":"sdk/reference/classes/PlainCensus"},{"type":"link","label":"PublishedCensus","href":"/sdk/reference/classes/PublishedCensus","docId":"sdk/reference/classes/PublishedCensus"},{"type":"link","label":"PublishedElection","href":"/sdk/reference/classes/PublishedElection","docId":"sdk/reference/classes/PublishedElection"},{"type":"link","label":"Service","href":"/sdk/reference/classes/Service","docId":"sdk/reference/classes/Service"},{"type":"link","label":"StrategyCensus","href":"/sdk/reference/classes/StrategyCensus","docId":"sdk/reference/classes/StrategyCensus"},{"type":"link","label":"TokenCensus","href":"/sdk/reference/classes/TokenCensus","docId":"sdk/reference/classes/TokenCensus"},{"type":"link","label":"UnpublishedElection","href":"/sdk/reference/classes/UnpublishedElection","docId":"sdk/reference/classes/UnpublishedElection"},{"type":"link","label":"VocdoniCensus3Client","href":"/sdk/reference/classes/VocdoniCensus3Client","docId":"sdk/reference/classes/VocdoniCensus3Client"},{"type":"link","label":"VocdoniSDKClient","href":"/sdk/reference/classes/VocdoniSDKClient","docId":"sdk/reference/classes/VocdoniSDKClient"},{"type":"link","label":"Vote","href":"/sdk/reference/classes/Vote","docId":"sdk/reference/classes/Vote"},{"type":"link","label":"VoteAPI","href":"/sdk/reference/classes/VoteAPI","docId":"sdk/reference/classes/VoteAPI"},{"type":"link","label":"VoteService","href":"/sdk/reference/classes/VoteService","docId":"sdk/reference/classes/VoteService"},{"type":"link","label":"WalletAPI","href":"/sdk/reference/classes/WalletAPI","docId":"sdk/reference/classes/WalletAPI"},{"type":"link","label":"WeightedCensus","href":"/sdk/reference/classes/WeightedCensus","docId":"sdk/reference/classes/WeightedCensus"},{"type":"link","label":"ZkAPI","href":"/sdk/reference/classes/ZkAPI","docId":"sdk/reference/classes/ZkAPI"}]},{"type":"category","label":"Enums","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"CensusOrigin","href":"/sdk/reference/enums/CensusOrigin","docId":"sdk/reference/enums/CensusOrigin"},{"type":"link","label":"CensusType","href":"/sdk/reference/enums/CensusType","docId":"sdk/reference/enums/CensusType"},{"type":"link","label":"CensusTypeEnum","href":"/sdk/reference/enums/CensusTypeEnum","docId":"sdk/reference/enums/CensusTypeEnum"},{"type":"link","label":"CspProofType","href":"/sdk/reference/enums/CspProofType","docId":"sdk/reference/enums/CspProofType"},{"type":"link","label":"ElectionCreationSteps","href":"/sdk/reference/enums/ElectionCreationSteps","docId":"sdk/reference/enums/ElectionCreationSteps"},{"type":"link","label":"ElectionResultsTypeNames","href":"/sdk/reference/enums/ElectionResultsTypeNames","docId":"sdk/reference/enums/ElectionResultsTypeNames"},{"type":"link","label":"ElectionStatus","href":"/sdk/reference/enums/ElectionStatus","docId":"sdk/reference/enums/ElectionStatus"},{"type":"link","label":"ElectionStatusReady","href":"/sdk/reference/enums/ElectionStatusReady","docId":"sdk/reference/enums/ElectionStatusReady"},{"type":"link","label":"EnvOptions","href":"/sdk/reference/enums/EnvOptions","docId":"sdk/reference/enums/EnvOptions"},{"type":"link","label":"TransactionType","href":"/sdk/reference/enums/TransactionType","docId":"sdk/reference/enums/TransactionType"},{"type":"link","label":"TxType","href":"/sdk/reference/enums/TxType","docId":"sdk/reference/enums/TxType"},{"type":"link","label":"VoteSteps","href":"/sdk/reference/enums/VoteSteps","docId":"sdk/reference/enums/VoteSteps"}]},{"type":"category","label":"Interfaces","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"AccountMetadata","href":"/sdk/reference/interfaces/AccountMetadata","docId":"sdk/reference/interfaces/AccountMetadata"},{"type":"link","label":"AdminTx","href":"/sdk/reference/interfaces/AdminTx","docId":"sdk/reference/interfaces/AdminTx"},{"type":"link","label":"CircuitInputs","href":"/sdk/reference/interfaces/CircuitInputs","docId":"sdk/reference/interfaces/CircuitInputs"},{"type":"link","label":"CollectFaucetTx","href":"/sdk/reference/interfaces/CollectFaucetTx","docId":"sdk/reference/interfaces/CollectFaucetTx"},{"type":"link","label":"ElectionMetadata","href":"/sdk/reference/interfaces/ElectionMetadata","docId":"sdk/reference/interfaces/ElectionMetadata"},{"type":"link","label":"FetchElectionsParameters","href":"/sdk/reference/interfaces/FetchElectionsParameters","docId":"sdk/reference/interfaces/FetchElectionsParameters"},{"type":"link","label":"IAccount","href":"/sdk/reference/interfaces/IAccount","docId":"sdk/reference/interfaces/IAccount"},{"type":"link","label":"IAccountTransfersCountResponse","href":"/sdk/reference/interfaces/IAccountTransfersCountResponse","docId":"sdk/reference/interfaces/IAccountTransfersCountResponse"},{"type":"link","label":"IAccountsCountResponse","href":"/sdk/reference/interfaces/IAccountsCountResponse","docId":"sdk/reference/interfaces/IAccountsCountResponse"},{"type":"link","label":"IAccountsListResponse","href":"/sdk/reference/interfaces/IAccountsListResponse","docId":"sdk/reference/interfaces/IAccountsListResponse"},{"type":"link","label":"IApprovalElectionParameters","href":"/sdk/reference/interfaces/IApprovalElectionParameters","docId":"sdk/reference/interfaces/IApprovalElectionParameters"},{"type":"link","label":"IBlockTransactionsResponse","href":"/sdk/reference/interfaces/IBlockTransactionsResponse","docId":"sdk/reference/interfaces/IBlockTransactionsResponse"},{"type":"link","label":"IBudgetElectionParametersInfo","href":"/sdk/reference/interfaces/IBudgetElectionParametersInfo","docId":"sdk/reference/interfaces/IBudgetElectionParametersInfo"},{"type":"link","label":"IBudgetElectionParametersWithBudget","href":"/sdk/reference/interfaces/IBudgetElectionParametersWithBudget","docId":"sdk/reference/interfaces/IBudgetElectionParametersWithBudget"},{"type":"link","label":"IBudgetElectionParametersWithCensusWeight","href":"/sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight","docId":"sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight"},{"type":"link","label":"ICensus","href":"/sdk/reference/interfaces/ICensus","docId":"sdk/reference/interfaces/ICensus"},{"type":"link","label":"ICensus3CensusListResponse","href":"/sdk/reference/interfaces/ICensus3CensusListResponse","docId":"sdk/reference/interfaces/ICensus3CensusListResponse"},{"type":"link","label":"ICensus3CensusQueueResponse","href":"/sdk/reference/interfaces/ICensus3CensusQueueResponse","docId":"sdk/reference/interfaces/ICensus3CensusQueueResponse"},{"type":"link","label":"ICensus3CensusResponse","href":"/sdk/reference/interfaces/ICensus3CensusResponse","docId":"sdk/reference/interfaces/ICensus3CensusResponse"},{"type":"link","label":"ICensus3ServiceInfoResponse","href":"/sdk/reference/interfaces/ICensus3ServiceInfoResponse","docId":"sdk/reference/interfaces/ICensus3ServiceInfoResponse"},{"type":"link","label":"ICensus3StrategiesListResponse","href":"/sdk/reference/interfaces/ICensus3StrategiesListResponse","docId":"sdk/reference/interfaces/ICensus3StrategiesListResponse"},{"type":"link","label":"ICensus3StrategiesListResponsePaginated","href":"/sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated","docId":"sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated"},{"type":"link","label":"ICensus3StrategiesOperator","href":"/sdk/reference/interfaces/ICensus3StrategiesOperator","docId":"sdk/reference/interfaces/ICensus3StrategiesOperator"},{"type":"link","label":"ICensus3StrategiesOperatorsResponse","href":"/sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse","docId":"sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse"},{"type":"link","label":"ICensus3StrategyCreateResponse","href":"/sdk/reference/interfaces/ICensus3StrategyCreateResponse","docId":"sdk/reference/interfaces/ICensus3StrategyCreateResponse"},{"type":"link","label":"ICensus3StrategyEstimationQueueResponse","href":"/sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse","docId":"sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse"},{"type":"link","label":"ICensus3StrategyHoldersResponse","href":"/sdk/reference/interfaces/ICensus3StrategyHoldersResponse","docId":"sdk/reference/interfaces/ICensus3StrategyHoldersResponse"},{"type":"link","label":"ICensus3StrategyHoldersResponsePaginated","href":"/sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated","docId":"sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated"},{"type":"link","label":"ICensus3StrategyImportQueueResponse","href":"/sdk/reference/interfaces/ICensus3StrategyImportQueueResponse","docId":"sdk/reference/interfaces/ICensus3StrategyImportQueueResponse"},{"type":"link","label":"ICensus3StrategyToken","href":"/sdk/reference/interfaces/ICensus3StrategyToken","docId":"sdk/reference/interfaces/ICensus3StrategyToken"},{"type":"link","label":"ICensus3SupportedChain","href":"/sdk/reference/interfaces/ICensus3SupportedChain","docId":"sdk/reference/interfaces/ICensus3SupportedChain"},{"type":"link","label":"ICensus3TokenHolderResponse","href":"/sdk/reference/interfaces/ICensus3TokenHolderResponse","docId":"sdk/reference/interfaces/ICensus3TokenHolderResponse"},{"type":"link","label":"ICensus3TokenListResponse","href":"/sdk/reference/interfaces/ICensus3TokenListResponse","docId":"sdk/reference/interfaces/ICensus3TokenListResponse"},{"type":"link","label":"ICensus3TokenListResponsePaginated","href":"/sdk/reference/interfaces/ICensus3TokenListResponsePaginated","docId":"sdk/reference/interfaces/ICensus3TokenListResponsePaginated"},{"type":"link","label":"ICensus3TokenTypesResponse","href":"/sdk/reference/interfaces/ICensus3TokenTypesResponse","docId":"sdk/reference/interfaces/ICensus3TokenTypesResponse"},{"type":"link","label":"ICensus3ValidatePredicateChild","href":"/sdk/reference/interfaces/ICensus3ValidatePredicateChild","docId":"sdk/reference/interfaces/ICensus3ValidatePredicateChild"},{"type":"link","label":"ICensus3ValidatePredicateResponse","href":"/sdk/reference/interfaces/ICensus3ValidatePredicateResponse","docId":"sdk/reference/interfaces/ICensus3ValidatePredicateResponse"},{"type":"link","label":"ICensus3ValidatePredicateToken","href":"/sdk/reference/interfaces/ICensus3ValidatePredicateToken","docId":"sdk/reference/interfaces/ICensus3ValidatePredicateToken"},{"type":"link","label":"ICensusExportResponse","href":"/sdk/reference/interfaces/ICensusExportResponse","docId":"sdk/reference/interfaces/ICensusExportResponse"},{"type":"link","label":"ICensusImportResponse","href":"/sdk/reference/interfaces/ICensusImportResponse","docId":"sdk/reference/interfaces/ICensusImportResponse"},{"type":"link","label":"ICensusParticipant","href":"/sdk/reference/interfaces/ICensusParticipant","docId":"sdk/reference/interfaces/ICensusParticipant"},{"type":"link","label":"ICensusProofResponse","href":"/sdk/reference/interfaces/ICensusProofResponse","docId":"sdk/reference/interfaces/ICensusProofResponse"},{"type":"link","label":"ICensusPublishResponse","href":"/sdk/reference/interfaces/ICensusPublishResponse","docId":"sdk/reference/interfaces/ICensusPublishResponse"},{"type":"link","label":"IChainBlockInfoResponse","href":"/sdk/reference/interfaces/IChainBlockInfoResponse","docId":"sdk/reference/interfaces/IChainBlockInfoResponse"},{"type":"link","label":"IChainGetCircuitResponse","href":"/sdk/reference/interfaces/IChainGetCircuitResponse","docId":"sdk/reference/interfaces/IChainGetCircuitResponse"},{"type":"link","label":"IChainGetCostsResponse","href":"/sdk/reference/interfaces/IChainGetCostsResponse","docId":"sdk/reference/interfaces/IChainGetCostsResponse"},{"type":"link","label":"IChainGetInfoResponse","href":"/sdk/reference/interfaces/IChainGetInfoResponse","docId":"sdk/reference/interfaces/IChainGetInfoResponse"},{"type":"link","label":"IChainOrganizationCountResponse","href":"/sdk/reference/interfaces/IChainOrganizationCountResponse","docId":"sdk/reference/interfaces/IChainOrganizationCountResponse"},{"type":"link","label":"IChainOrganizationListResponse","href":"/sdk/reference/interfaces/IChainOrganizationListResponse","docId":"sdk/reference/interfaces/IChainOrganizationListResponse"},{"type":"link","label":"IChainOrganizationResponse","href":"/sdk/reference/interfaces/IChainOrganizationResponse","docId":"sdk/reference/interfaces/IChainOrganizationResponse"},{"type":"link","label":"IChainSubmitTxResponse","href":"/sdk/reference/interfaces/IChainSubmitTxResponse","docId":"sdk/reference/interfaces/IChainSubmitTxResponse"},{"type":"link","label":"IChainTxCountResponse","href":"/sdk/reference/interfaces/IChainTxCountResponse","docId":"sdk/reference/interfaces/IChainTxCountResponse"},{"type":"link","label":"IChainTxListResponse","href":"/sdk/reference/interfaces/IChainTxListResponse","docId":"sdk/reference/interfaces/IChainTxListResponse"},{"type":"link","label":"IChainTxReference","href":"/sdk/reference/interfaces/IChainTxReference","docId":"sdk/reference/interfaces/IChainTxReference"},{"type":"link","label":"IChainValidator","href":"/sdk/reference/interfaces/IChainValidator","docId":"sdk/reference/interfaces/IChainValidator"},{"type":"link","label":"IChainValidatorsListResponse","href":"/sdk/reference/interfaces/IChainValidatorsListResponse","docId":"sdk/reference/interfaces/IChainValidatorsListResponse"},{"type":"link","label":"IChoice","href":"/sdk/reference/interfaces/IChoice","docId":"sdk/reference/interfaces/IChoice"},{"type":"link","label":"ICspAuthStep","href":"/sdk/reference/interfaces/ICspAuthStep","docId":"sdk/reference/interfaces/ICspAuthStep"},{"type":"link","label":"ICspFinalStepResponse","href":"/sdk/reference/interfaces/ICspFinalStepResponse","docId":"sdk/reference/interfaces/ICspFinalStepResponse"},{"type":"link","label":"ICspInfoResponse","href":"/sdk/reference/interfaces/ICspInfoResponse","docId":"sdk/reference/interfaces/ICspInfoResponse"},{"type":"link","label":"ICspIntermediateStepResponse","href":"/sdk/reference/interfaces/ICspIntermediateStepResponse","docId":"sdk/reference/interfaces/ICspIntermediateStepResponse"},{"type":"link","label":"ICspSignResponse","href":"/sdk/reference/interfaces/ICspSignResponse","docId":"sdk/reference/interfaces/ICspSignResponse"},{"type":"link","label":"IElectionCreateResponse","href":"/sdk/reference/interfaces/IElectionCreateResponse","docId":"sdk/reference/interfaces/IElectionCreateResponse"},{"type":"link","label":"IElectionInfoResponse","href":"/sdk/reference/interfaces/IElectionInfoResponse","docId":"sdk/reference/interfaces/IElectionInfoResponse"},{"type":"link","label":"IElectionKeysResponse","href":"/sdk/reference/interfaces/IElectionKeysResponse","docId":"sdk/reference/interfaces/IElectionKeysResponse"},{"type":"link","label":"IElectionListFilter","href":"/sdk/reference/interfaces/IElectionListFilter","docId":"sdk/reference/interfaces/IElectionListFilter"},{"type":"link","label":"IElectionListResponse","href":"/sdk/reference/interfaces/IElectionListResponse","docId":"sdk/reference/interfaces/IElectionListResponse"},{"type":"link","label":"IElectionMode","href":"/sdk/reference/interfaces/IElectionMode","docId":"sdk/reference/interfaces/IElectionMode"},{"type":"link","label":"IElectionNextIdResponse","href":"/sdk/reference/interfaces/IElectionNextIdResponse","docId":"sdk/reference/interfaces/IElectionNextIdResponse"},{"type":"link","label":"IElectionParameters","href":"/sdk/reference/interfaces/IElectionParameters","docId":"sdk/reference/interfaces/IElectionParameters"},{"type":"link","label":"IElectionSummary","href":"/sdk/reference/interfaces/IElectionSummary","docId":"sdk/reference/interfaces/IElectionSummary"},{"type":"link","label":"IElectionType","href":"/sdk/reference/interfaces/IElectionType","docId":"sdk/reference/interfaces/IElectionType"},{"type":"link","label":"IElectionVote","href":"/sdk/reference/interfaces/IElectionVote","docId":"sdk/reference/interfaces/IElectionVote"},{"type":"link","label":"IElectionVoteListResponse","href":"/sdk/reference/interfaces/IElectionVoteListResponse","docId":"sdk/reference/interfaces/IElectionVoteListResponse"},{"type":"link","label":"IEncryptionKey","href":"/sdk/reference/interfaces/IEncryptionKey","docId":"sdk/reference/interfaces/IEncryptionKey"},{"type":"link","label":"IInvalidElectionParameters","href":"/sdk/reference/interfaces/IInvalidElectionParameters","docId":"sdk/reference/interfaces/IInvalidElectionParameters"},{"type":"link","label":"IMultiChoiceElectionParameters","href":"/sdk/reference/interfaces/IMultiChoiceElectionParameters","docId":"sdk/reference/interfaces/IMultiChoiceElectionParameters"},{"type":"link","label":"IPublishedElectionParameters","href":"/sdk/reference/interfaces/IPublishedElectionParameters","docId":"sdk/reference/interfaces/IPublishedElectionParameters"},{"type":"link","label":"IQuestion","href":"/sdk/reference/interfaces/IQuestion","docId":"sdk/reference/interfaces/IQuestion"},{"type":"link","label":"ITallyMode","href":"/sdk/reference/interfaces/ITallyMode","docId":"sdk/reference/interfaces/ITallyMode"},{"type":"link","label":"IVoteInfoResponse","href":"/sdk/reference/interfaces/IVoteInfoResponse","docId":"sdk/reference/interfaces/IVoteInfoResponse"},{"type":"link","label":"IVoteMode","href":"/sdk/reference/interfaces/IVoteMode","docId":"sdk/reference/interfaces/IVoteMode"},{"type":"link","label":"IVoteSubmitResponse","href":"/sdk/reference/interfaces/IVoteSubmitResponse","docId":"sdk/reference/interfaces/IVoteSubmitResponse"},{"type":"link","label":"IVoteType","href":"/sdk/reference/interfaces/IVoteType","docId":"sdk/reference/interfaces/IVoteType"},{"type":"link","label":"IZkProofResponse","href":"/sdk/reference/interfaces/IZkProofResponse","docId":"sdk/reference/interfaces/IZkProofResponse"},{"type":"link","label":"IZkSIKResponse","href":"/sdk/reference/interfaces/IZkSIKResponse","docId":"sdk/reference/interfaces/IZkSIKResponse"},{"type":"link","label":"MintTokensTx","href":"/sdk/reference/interfaces/MintTokensTx","docId":"sdk/reference/interfaces/MintTokensTx"},{"type":"link","label":"NewProcessTx","href":"/sdk/reference/interfaces/NewProcessTx","docId":"sdk/reference/interfaces/NewProcessTx"},{"type":"link","label":"Process","href":"/sdk/reference/interfaces/Process","docId":"sdk/reference/interfaces/Process"},{"type":"link","label":"Proof","href":"/sdk/reference/interfaces/Proof","docId":"sdk/reference/interfaces/Proof"},{"type":"link","label":"RegisterKeyTx","href":"/sdk/reference/interfaces/RegisterKeyTx","docId":"sdk/reference/interfaces/RegisterKeyTx"},{"type":"link","label":"SendTokensTx","href":"/sdk/reference/interfaces/SendTokensTx","docId":"sdk/reference/interfaces/SendTokensTx"},{"type":"link","label":"ServiceProperties","href":"/sdk/reference/interfaces/ServiceProperties","docId":"sdk/reference/interfaces/ServiceProperties"},{"type":"link","label":"SetAccountTx","href":"/sdk/reference/interfaces/SetAccountTx","docId":"sdk/reference/interfaces/SetAccountTx"},{"type":"link","label":"SetProcessTx","href":"/sdk/reference/interfaces/SetProcessTx","docId":"sdk/reference/interfaces/SetProcessTx"},{"type":"link","label":"SetTransactionCostsTx","href":"/sdk/reference/interfaces/SetTransactionCostsTx","docId":"sdk/reference/interfaces/SetTransactionCostsTx"},{"type":"link","label":"Tx","href":"/sdk/reference/interfaces/Tx","docId":"sdk/reference/interfaces/Tx"},{"type":"link","label":"VoteEnvelope","href":"/sdk/reference/interfaces/VoteEnvelope","docId":"sdk/reference/interfaces/VoteEnvelope"}]},{"type":"link","label":"Changelog","href":"/sdk/reference/changelog","docId":"sdk/reference/changelog"}],"href":"/sdk/reference/sdk-reference"}],"href":"/sdk/"},{"type":"category","label":"UI Components","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Organization components","href":"/ui-components/Organization","docId":"ui-components/Organization"},{"type":"link","label":"Election components","href":"/ui-components/Election","docId":"ui-components/Election"}],"href":"/ui-components/"},{"type":"category","label":"Vocdoni API","items":[{"type":"category","label":"Chain","items":[{"type":"link","label":"Estimate block to date","href":"/vocdoni-api/estimate-block-to-date","className":"api-method get","docId":"vocdoni-api/estimate-block-to-date"},{"type":"link","label":"Get block (by hash)","href":"/vocdoni-api/get-block-by-hash","className":"api-method get","docId":"vocdoni-api/get-block-by-hash"},{"type":"link","label":"Get block (by height)","href":"/vocdoni-api/get-block-by-height","className":"api-method get","docId":"vocdoni-api/get-block-by-height"},{"type":"link","label":"Transactions in a block","href":"/vocdoni-api/transactions-in-a-block","className":"api-method get","docId":"vocdoni-api/transactions-in-a-block"},{"type":"link","label":"Estimate date to block","href":"/vocdoni-api/estimate-date-to-block","className":"api-method get","docId":"vocdoni-api/estimate-date-to-block"},{"type":"link","label":"Vochain information","href":"/vocdoni-api/vochain-information","className":"api-method get","docId":"vocdoni-api/vochain-information"},{"type":"link","label":"Circuit info","href":"/vocdoni-api/circuit-info","className":"api-method get","docId":"vocdoni-api/circuit-info"},{"type":"link","label":"Price factors information","href":"/vocdoni-api/price-factors-information","className":"api-method get","docId":"vocdoni-api/price-factors-information"},{"type":"link","label":"Count organizations","href":"/vocdoni-api/count-organizations","className":"api-method get","docId":"vocdoni-api/count-organizations"},{"type":"link","label":"List organizations (filtered)","href":"/vocdoni-api/list-organizations-filtered","className":"api-method post","docId":"vocdoni-api/list-organizations-filtered"},{"type":"link","label":"List organizations","href":"/vocdoni-api/list-organizations","className":"api-method get","docId":"vocdoni-api/list-organizations"},{"type":"link","label":"Submit transaction","href":"/vocdoni-api/submit-transaction","className":"api-method post","docId":"vocdoni-api/submit-transaction"},{"type":"link","label":"Transaction costs","href":"/vocdoni-api/transaction-costs","className":"api-method get","docId":"vocdoni-api/transaction-costs"},{"type":"link","label":"Transactions count","href":"/vocdoni-api/transactions-count","className":"api-method get","docId":"vocdoni-api/transactions-count"},{"type":"link","label":"List Transactions","href":"/vocdoni-api/list-transactions","className":"api-method get","docId":"vocdoni-api/list-transactions"},{"type":"link","label":"Transaction by index","href":"/vocdoni-api/transaction-by-index","className":"api-method get","docId":"vocdoni-api/transaction-by-index"},{"type":"link","label":"Transaction by hash","href":"/vocdoni-api/transaction-by-hash","className":"api-method get","docId":"vocdoni-api/transaction-by-hash"},{"type":"link","label":"Transaction by block height and index","href":"/vocdoni-api/transaction-by-block-height-and-index","className":"api-method get","docId":"vocdoni-api/transaction-by-block-height-and-index"},{"type":"link","label":"List validators","href":"/vocdoni-api/list-validators","className":"api-method get","docId":"vocdoni-api/list-validators"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/chain"},{"type":"category","label":"Accounts","items":[{"type":"link","label":"Set account","href":"/vocdoni-api/set-account","className":"api-method post","docId":"vocdoni-api/set-account"},{"type":"link","label":"Total number of accounts","href":"/vocdoni-api/total-number-of-accounts","className":"api-method get","docId":"vocdoni-api/total-number-of-accounts"},{"type":"link","label":"List of the existing accounts","href":"/vocdoni-api/list-of-the-existing-accounts","className":"api-method get","docId":"vocdoni-api/list-of-the-existing-accounts"},{"type":"link","label":"List account token fees","href":"/vocdoni-api/list-account-token-fees","className":"api-method get","docId":"vocdoni-api/list-account-token-fees"},{"type":"link","label":"Total number of sent and received transactions","href":"/vocdoni-api/total-number-of-sent-and-received-transactions","className":"api-method get","docId":"vocdoni-api/total-number-of-sent-and-received-transactions"},{"type":"link","label":"List account received and sent token transfers","href":"/vocdoni-api/list-account-received-and-sent-token-transfers","className":"api-method get","docId":"vocdoni-api/list-account-received-and-sent-token-transfers"},{"type":"link","label":"Get account","href":"/vocdoni-api/get-account","className":"api-method get","docId":"vocdoni-api/get-account"},{"type":"link","label":"Get account","href":"/vocdoni-api/get-account","className":"api-method get","docId":"vocdoni-api/get-account"},{"type":"link","label":"Count organization elections","href":"/vocdoni-api/count-organization-elections","className":"api-method get","docId":"vocdoni-api/count-organization-elections"},{"type":"link","label":"List organization elections","href":"/vocdoni-api/list-organization-elections","className":"api-method get","docId":"vocdoni-api/list-organization-elections"},{"type":"link","label":"List organization elections by status","href":"/vocdoni-api/list-organization-elections-by-status","className":"api-method get","docId":"vocdoni-api/list-organization-elections-by-status"},{"type":"link","label":"List all token fees","href":"/vocdoni-api/list-all-token-fees","className":"api-method get","docId":"vocdoni-api/list-all-token-fees"},{"type":"link","label":"List all token fees by reference","href":"/vocdoni-api/list-all-token-fees-by-reference","className":"api-method get","docId":"vocdoni-api/list-all-token-fees-by-reference"},{"type":"link","label":"List all token fees by type","href":"/vocdoni-api/list-all-token-fees-by-type","className":"api-method get","docId":"vocdoni-api/list-all-token-fees-by-type"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/accounts"},{"type":"category","label":"Elections","items":[{"type":"link","label":"Create election","href":"/vocdoni-api/create-election","className":"api-method post","docId":"vocdoni-api/create-election"},{"type":"link","label":"List elections (filtered)","href":"/vocdoni-api/list-elections-filtered","className":"api-method post","docId":"vocdoni-api/list-elections-filtered"},{"type":"link","label":"Get next election ID","href":"/vocdoni-api/get-next-election-id","className":"api-method post","docId":"vocdoni-api/get-next-election-id"},{"type":"link","label":"List elections","href":"/vocdoni-api/list-elections","className":"api-method get","docId":"vocdoni-api/list-elections"},{"type":"link","label":"Compute election price","href":"/vocdoni-api/compute-election-price","className":"api-method post","docId":"vocdoni-api/compute-election-price"},{"type":"link","label":"Election information","href":"/vocdoni-api/election-information","className":"api-method get","docId":"vocdoni-api/election-information"},{"type":"link","label":"List encryption keys","href":"/vocdoni-api/list-encryption-keys","className":"api-method get","docId":"vocdoni-api/list-encryption-keys"},{"type":"link","label":"Election results","href":"/vocdoni-api/election-results","className":"api-method get","docId":"vocdoni-api/election-results"},{"type":"link","label":"Count election votes","href":"/vocdoni-api/count-election-votes","className":"api-method get","docId":"vocdoni-api/count-election-votes"},{"type":"link","label":"List election votes","href":"/vocdoni-api/list-election-votes","className":"api-method get","docId":"vocdoni-api/list-election-votes"},{"type":"link","label":"Compute IPFS CIDv1 of file","href":"/vocdoni-api/compute-ipfs-ci-dv-1-of-file","className":"api-method post","docId":"vocdoni-api/compute-ipfs-ci-dv-1-of-file"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/elections"},{"type":"category","label":"Censuses","items":[{"type":"link","label":"Export census database","href":"/vocdoni-api/export-census-database","className":"api-method get","docId":"vocdoni-api/export-census-database"},{"type":"link","label":"Import census database","href":"/vocdoni-api/import-census-database","className":"api-method post","docId":"vocdoni-api/import-census-database"},{"type":"link","label":"List all census references","href":"/vocdoni-api/list-all-census-references","className":"api-method get","docId":"vocdoni-api/list-all-census-references"},{"type":"link","label":"Delete census","href":"/vocdoni-api/delete-census","className":"api-method delete","docId":"vocdoni-api/delete-census"},{"type":"link","label":"Export census","href":"/vocdoni-api/export-census","className":"api-method get","docId":"vocdoni-api/export-census"},{"type":"link","label":"Import census","href":"/vocdoni-api/import-census","className":"api-method post","docId":"vocdoni-api/import-census"},{"type":"link","label":"Add participants to census","href":"/vocdoni-api/add-participants-to-census","className":"api-method post","docId":"vocdoni-api/add-participants-to-census"},{"type":"link","label":"Prove key to census","href":"/vocdoni-api/prove-key-to-census","className":"api-method get","docId":"vocdoni-api/prove-key-to-census"},{"type":"link","label":"Publish census","href":"/vocdoni-api/publish-census","className":"api-method post","docId":"vocdoni-api/publish-census"},{"type":"link","label":"Publish census at root","href":"/vocdoni-api/publish-census-at-root","className":"api-method post","docId":"vocdoni-api/publish-census-at-root"},{"type":"link","label":"Census Merkle Root","href":"/vocdoni-api/census-merkle-root","className":"api-method get","docId":"vocdoni-api/census-merkle-root"},{"type":"link","label":"Census size","href":"/vocdoni-api/census-size","className":"api-method get","docId":"vocdoni-api/census-size"},{"type":"link","label":"Get type of census","href":"/vocdoni-api/get-type-of-census","className":"api-method get","docId":"vocdoni-api/get-type-of-census"},{"type":"link","label":"Verify merkle proof","href":"/vocdoni-api/verify-merkle-proof","className":"api-method post","docId":"vocdoni-api/verify-merkle-proof"},{"type":"link","label":"Census total weight","href":"/vocdoni-api/census-total-weight","className":"api-method get","docId":"vocdoni-api/census-total-weight"},{"type":"link","label":"Create a new census","href":"/vocdoni-api/create-a-new-census","className":"api-method post","docId":"vocdoni-api/create-a-new-census"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/censuses"},{"type":"category","label":"Votes","items":[{"type":"link","label":"Submit a vote","href":"/vocdoni-api/submit-a-vote","className":"api-method post","docId":"vocdoni-api/submit-a-vote"},{"type":"link","label":"Verify vote","href":"/vocdoni-api/verify-vote","className":"api-method get","docId":"vocdoni-api/verify-vote"},{"type":"link","label":"Get vote","href":"/vocdoni-api/get-vote","className":"api-method get","docId":"vocdoni-api/get-vote"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/votes"},{"type":"category","label":"Wallet","items":[{"type":"link","label":"Add account","href":"/vocdoni-api/add-account","className":"api-method post","docId":"vocdoni-api/add-account"},{"type":"link","label":"Set wallet account","href":"/vocdoni-api/set-wallet-account","className":"api-method get","docId":"vocdoni-api/set-wallet-account"},{"type":"link","label":"Create election for wallet","href":"/vocdoni-api/create-election-for-wallet","className":"api-method post","docId":"vocdoni-api/create-election-for-wallet"},{"type":"link","label":"Transfer tokens","href":"/vocdoni-api/transfer-tokens","className":"api-method get","docId":"vocdoni-api/transfer-tokens"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/wallet"},{"type":"category","label":"SIK","items":[{"type":"link","label":"List of valid SIK roots","href":"/vocdoni-api/list-of-valid-sik-roots","className":"api-method get","docId":"vocdoni-api/list-of-valid-sik-roots"},{"type":"link","label":"List of valid SIK roots","href":"/vocdoni-api/list-of-valid-sik-roots","className":"api-method get","docId":"vocdoni-api/list-of-valid-sik-roots"},{"type":"link","label":"Returns if the address provided has a valid SIK","href":"/vocdoni-api/returns-if-the-address-provided-has-a-valid-sik","className":"api-method get","docId":"vocdoni-api/returns-if-the-address-provided-has-a-valid-sik"}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/sik"},{"type":"category","label":"Indexer","items":[{"type":"link","label":"Exports the indexer database","href":"/vocdoni-api/exports-the-indexer-database","className":"api-method get","docId":"vocdoni-api/exports-the-indexer-database"}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true,"href":"/vocdoni-api/vocdoni-api"}]},"docs":{"intro":{"id":"intro","title":"Getting Started","description":"Vocdoni is the most open, secure, and universally verifiable voting protocol, used by hundreds of organizations worldwide. The core of our stack is a powerful decentralized backend, including blockchain, P2P gateway, and distributed file storage components.","sidebar":"defaultSidebar"},"protocol/anonymity/anonymity":{"id":"protocol/anonymity/anonymity","title":"Anonymous Voting","description":"- Anonymous voting is a type of voting process where the users can vote without revealing their identity, by proving that they are accepted as valid voters. Currently we have 2 types of anonymous voting schemes:","sidebar":"defaultSidebar"},"protocol/anonymity/blind-signatures":{"id":"protocol/anonymity/blind-signatures","title":"CSP Blind Signatures","description":"The current approach by Vocdoni regarding determining the eligibility of a potential voter is to use a Census Merkle Tree. All voter public keys must be known in advance and aggregated together into a hash tree to compute a Merkle root. Then each voter needs to fetch their own Merkle proof to demonstrate their eligibility on a public ledger. The Merkle proof can be anonymized using a zk-SNARK so that the public ledger will verify the SNARK proof instead.","sidebar":"defaultSidebar"},"protocol/anonymity/on-chain":{"id":"protocol/anonymity/on-chain","title":"On-Chain Census Anonymity","description":"On-chain cenuses created with the Census3 Service derive their contents from a public set of holders of a given token (or set of tokens) on the Ethereum blockchain. This information is turned into a census by generating a Merkle Proof on that set of data. This Merkle Proof is similar to that used for a typical off-chain tree census, and the same sort of ZK Census Proof can be used to compute voter validation anonymously.","sidebar":"defaultSidebar"},"protocol/anonymity/zk-census-proof":{"id":"protocol/anonymity/zk-census-proof","title":"Off-Chain Tree ZK Census Proof","description":"This document is divided in two sections:","sidebar":"defaultSidebar"},"protocol/ballot-protocol":{"id":"protocol/ballot-protocol","title":"Ballot Protocol","description":"Ballot protocol","sidebar":"defaultSidebar"},"protocol/census/census":{"id":"protocol/census/census","title":"The Census","description":"In Vocdoni, a census of identities can be represented in one of three ways. For Ethereum-based processes, in which eligible voters are represented by Ethereum addresses holding a specific token, an on-chain] (ERC-20) census is used. In cases where a central authority wants to manually validate each voter at the time of voting, [off-chain credential service provider is used. For all other voting processes (organizations that are not represented as DAOs), an off-chain tree census is used.","sidebar":"defaultSidebar"},"protocol/census/off-chain-csp":{"id":"protocol/census/off-chain-csp","title":"Off-Chain CSP Census","description":"A census approach based on Credential Service Providers (CSPs) allows organizations to validate users manually and based off of any arbitrary criteria. Rather than a static census published before-hand, CSP census allows each user to be evaluated for voting eligibility individually, throughout the duration of the voting process.","sidebar":"defaultSidebar"},"protocol/census/off-chain-tree":{"id":"protocol/census/off-chain-tree","title":"Off-Chain Tree Census","description":"The census itself is represented as a binary Merkle Tree, where the leaves of the tree contain the public keys of all eligible voters, hashed.","sidebar":"defaultSidebar"},"protocol/census/on-chain/census3":{"id":"protocol/census/on-chain/census3","title":"Census3 Service","description":"The Census3 Service is an API service which provides an easy way to create censuses for elections with holders of a single token or a combination of them. This is a wrapper of the on-chain census design and enables integrators to use on-chain censuses without manually registering tokens or generating storage proofs.","sidebar":"defaultSidebar"},"protocol/census/on-chain/on-chain":{"id":"protocol/census/on-chain/on-chain","title":"On-Chain Census","description":"An on-chain census is one which is dependent on the status of the Ethereum blockchain at a given point in time. This census type enables the set of eligible voters to be derived from the token holder balances for some ERC-20 Ethereum token, weighted according to token balances. The ideal use-case for such a census is an organization whose members are represented as holders of some token, such as a DAO.","sidebar":"defaultSidebar"},"protocol/data-schemes/data-schemes":{"id":"protocol/data-schemes/data-schemes","title":"Data Schemes","description":"When it comes to voting processes, there are two main types of data storage at the protocol-level: protocol-level data stored on the Vochain and readable metadata like election descriptions stored on IPFS.","sidebar":"defaultSidebar"},"protocol/data-schemes/election":{"id":"protocol/data-schemes/election","title":"Election Metadata","description":"Election metadata provides the human-readable data associated with an election.","sidebar":"defaultSidebar"},"protocol/data-schemes/organization":{"id":"protocol/data-schemes/organization","title":"Organization Metadata","description":"The metadata of an organization provides human readable content, featuring names, descriptions, images, the list of available processes and more.","sidebar":"defaultSidebar"},"protocol/data-schemes/vote":{"id":"protocol/data-schemes/vote","title":"Vote Data","description":"Vote Envelope","sidebar":"defaultSidebar"},"protocol/index":{"id":"protocol/index","title":"Vocdoni Protocol","description":"1. Introduction","sidebar":"defaultSidebar"},"sdk/index":{"id":"sdk/index","title":"Vocdoni SDK","description":"The Vocdoni SDK is a convenient way to interact with the Vocdoni Protocol through the API, allowing anyone to create, manage and participate in voting processes and collective decision-making. The SDK is the primary mode by which developers should interface with Vocdoni - if you think the SDK is missing functionality you need, please get in touch.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/census-types":{"id":"sdk/integration-details/census-types/census-types","title":"Census Types","description":"A census is a list of voters who are eligible to vote in a given election. There are multiple ways to define a census with Vocdoni, each with different privacy and verifiability considerations. The census types are defined and documented at a protocol level and include on-chain, off-chain Merkle tree, and off-chain Credential Service Provider.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/off-chain-csp":{"id":"sdk/integration-details/census-types/off-chain-csp","title":"Off-chain Credential Service Provider","description":"A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/off-chain-tree":{"id":"sdk/integration-details/census-types/off-chain-tree","title":"Off-chain Merkle Tree","description":"This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using census.add().","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/on-chain/complex-census":{"id":"sdk/integration-details/census-types/on-chain/complex-census","title":"Complex Census","description":"The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once.","sidebar":"defaultSidebar"},"sdk/integration-details/census-types/on-chain/on-chain":{"id":"sdk/integration-details/census-types/on-chain/on-chain","title":"On-chain Token-Based Census","description":"An on-chain census is one whose voters are defined by holding tokens on the Ethereum blockchain. Currently the following token types are supported:","sidebar":"defaultSidebar"},"sdk/integration-details/integration-details":{"id":"sdk/integration-details/integration-details","title":"Integration Details","description":"The tutorial covers the basics, but here are some details you\'ll need to consider when integrating the Vocdoni SDK into your application.","sidebar":"defaultSidebar"},"sdk/integration-details/vocdoni-tokens":{"id":"sdk/integration-details/vocdoni-tokens","title":"Vocdoni Tokens","description":"Behind-the-scenes, Vocdoni is powered by a custom blockchain. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital \\"currency\\" of Vocdoni tokens that have no real-world value but help with load-balancing and spam reduction. Actions that update data on the blockchain, such as creating an election, incur a \\"cost.\\" Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/approval":{"id":"sdk/integration-details/voting-types/approval","title":"Approval Voting (Multiple Choice)","description":"An election with Approval voting is a voting system where voters are allowed to indicate their support for multiple","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/quadratic":{"id":"sdk/integration-details/voting-types/quadratic","title":"Quadratic voting","description":"Quadratic voting is a voting mechanism that allows individuals to express their preferences on different issues with","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/ranked":{"id":"sdk/integration-details/voting-types/ranked","title":"Ranked Voting","description":"Ranked voting, also known as preferential voting or ranked-choice voting (RCV), is an electoral system where voters rank","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/single-choice":{"id":"sdk/integration-details/voting-types/single-choice","title":"Single Choice Voting","description":"An election with a single-choice result, also known as First-past-the-post voting (FPTP or FPP) or informally called","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/voting-types":{"id":"sdk/integration-details/voting-types/voting-types","title":"Voting Types","description":"In this section, we will provide a brief overview of the different types of voting supported by the Vocdoni protocol and","sidebar":"defaultSidebar"},"sdk/integration-details/voting-types/weighted":{"id":"sdk/integration-details/voting-types/weighted","title":"Weighted voting","description":"Weighted voting is a voting system where each voter is assigned a specific weight or value that reflects their relative influence or importance in the decision-making process.","sidebar":"defaultSidebar"},"sdk/reference/changelog":{"id":"sdk/reference/changelog","title":"Changelog","description":"All notable changes to this project will be documented in this file.","sidebar":"defaultSidebar"},"sdk/reference/classes/Account":{"id":"sdk/reference/classes/Account","title":"Account","description":"@vocdoni/sdk / Account","sidebar":"defaultSidebar"},"sdk/reference/classes/AccountAPI":{"id":"sdk/reference/classes/AccountAPI","title":"AccountAPI","description":"@vocdoni/sdk / AccountAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/AccountService":{"id":"sdk/reference/classes/AccountService","title":"AccountService","description":"@vocdoni/sdk / AccountService","sidebar":"defaultSidebar"},"sdk/reference/classes/AnonymousService":{"id":"sdk/reference/classes/AnonymousService","title":"AnonymousService","description":"@vocdoni/sdk / AnonymousService","sidebar":"defaultSidebar"},"sdk/reference/classes/AnonymousVote":{"id":"sdk/reference/classes/AnonymousVote","title":"AnonymousVote","description":"@vocdoni/sdk / AnonymousVote","sidebar":"defaultSidebar"},"sdk/reference/classes/ApprovalElection":{"id":"sdk/reference/classes/ApprovalElection","title":"ApprovalElection","description":"@vocdoni/sdk / ApprovalElection","sidebar":"defaultSidebar"},"sdk/reference/classes/ArchivedElection":{"id":"sdk/reference/classes/ArchivedElection","title":"ArchivedElection","description":"@vocdoni/sdk / ArchivedElection","sidebar":"defaultSidebar"},"sdk/reference/classes/BudgetElection":{"id":"sdk/reference/classes/BudgetElection","title":"BudgetElection","description":"@vocdoni/sdk / BudgetElection","sidebar":"defaultSidebar"},"sdk/reference/classes/Census":{"id":"sdk/reference/classes/Census","title":"Census","description":"@vocdoni/sdk / Census","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3CensusAPI":{"id":"sdk/reference/classes/Census3CensusAPI","title":"Census3CensusAPI","description":"@vocdoni/sdk / Census3CensusAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3ServiceAPI":{"id":"sdk/reference/classes/Census3ServiceAPI","title":"Census3ServiceAPI","description":"@vocdoni/sdk / Census3ServiceAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3StrategyAPI":{"id":"sdk/reference/classes/Census3StrategyAPI","title":"Census3StrategyAPI","description":"@vocdoni/sdk / Census3StrategyAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/Census3TokenAPI":{"id":"sdk/reference/classes/Census3TokenAPI","title":"Census3TokenAPI","description":"@vocdoni/sdk / Census3TokenAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/CensusAPI":{"id":"sdk/reference/classes/CensusAPI","title":"CensusAPI","description":"@vocdoni/sdk / CensusAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/CensusService":{"id":"sdk/reference/classes/CensusService","title":"CensusService","description":"@vocdoni/sdk / CensusService","sidebar":"defaultSidebar"},"sdk/reference/classes/ChainAPI":{"id":"sdk/reference/classes/ChainAPI","title":"ChainAPI","description":"@vocdoni/sdk / ChainAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/ChainService":{"id":"sdk/reference/classes/ChainService","title":"ChainService","description":"@vocdoni/sdk / ChainService","sidebar":"defaultSidebar"},"sdk/reference/classes/CspAPI":{"id":"sdk/reference/classes/CspAPI","title":"CspAPI","description":"@vocdoni/sdk / CspAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/CspCensus":{"id":"sdk/reference/classes/CspCensus","title":"CspCensus","description":"@vocdoni/sdk / CspCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/CspService":{"id":"sdk/reference/classes/CspService","title":"CspService","description":"@vocdoni/sdk / CspService","sidebar":"defaultSidebar"},"sdk/reference/classes/CspVote":{"id":"sdk/reference/classes/CspVote","title":"CspVote","description":"@vocdoni/sdk / CspVote","sidebar":"defaultSidebar"},"sdk/reference/classes/Election":{"id":"sdk/reference/classes/Election","title":"Election","description":"@vocdoni/sdk / Election","sidebar":"defaultSidebar"},"sdk/reference/classes/ElectionAPI":{"id":"sdk/reference/classes/ElectionAPI","title":"ElectionAPI","description":"@vocdoni/sdk / ElectionAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/ElectionService":{"id":"sdk/reference/classes/ElectionService","title":"ElectionService","description":"@vocdoni/sdk / ElectionService","sidebar":"defaultSidebar"},"sdk/reference/classes/FaucetAPI":{"id":"sdk/reference/classes/FaucetAPI","title":"FaucetAPI","description":"@vocdoni/sdk / FaucetAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/FaucetService":{"id":"sdk/reference/classes/FaucetService","title":"FaucetService","description":"@vocdoni/sdk / FaucetService","sidebar":"defaultSidebar"},"sdk/reference/classes/FileAPI":{"id":"sdk/reference/classes/FileAPI","title":"FileAPI","description":"@vocdoni/sdk / FileAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/FileService":{"id":"sdk/reference/classes/FileService","title":"FileService","description":"@vocdoni/sdk / FileService","sidebar":"defaultSidebar"},"sdk/reference/classes/InvalidElection":{"id":"sdk/reference/classes/InvalidElection","title":"InvalidElection","description":"@vocdoni/sdk / InvalidElection","sidebar":"defaultSidebar"},"sdk/reference/classes/MultiChoiceElection":{"id":"sdk/reference/classes/MultiChoiceElection","title":"MultiChoiceElection","description":"@vocdoni/sdk / MultiChoiceElection","sidebar":"defaultSidebar"},"sdk/reference/classes/OffchainCensus":{"id":"sdk/reference/classes/OffchainCensus","title":"OffchainCensus","description":"@vocdoni/sdk / OffchainCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/PlainCensus":{"id":"sdk/reference/classes/PlainCensus","title":"PlainCensus","description":"@vocdoni/sdk / PlainCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/PublishedCensus":{"id":"sdk/reference/classes/PublishedCensus","title":"PublishedCensus","description":"@vocdoni/sdk / PublishedCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/PublishedElection":{"id":"sdk/reference/classes/PublishedElection","title":"PublishedElection","description":"@vocdoni/sdk / PublishedElection","sidebar":"defaultSidebar"},"sdk/reference/classes/Service":{"id":"sdk/reference/classes/Service","title":"Service","description":"@vocdoni/sdk / Service","sidebar":"defaultSidebar"},"sdk/reference/classes/StrategyCensus":{"id":"sdk/reference/classes/StrategyCensus","title":"StrategyCensus","description":"@vocdoni/sdk / StrategyCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/TokenCensus":{"id":"sdk/reference/classes/TokenCensus","title":"TokenCensus","description":"@vocdoni/sdk / TokenCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/UnpublishedElection":{"id":"sdk/reference/classes/UnpublishedElection","title":"UnpublishedElection","description":"@vocdoni/sdk / UnpublishedElection","sidebar":"defaultSidebar"},"sdk/reference/classes/VocdoniCensus3Client":{"id":"sdk/reference/classes/VocdoniCensus3Client","title":"VocdoniCensus3Client","description":"@vocdoni/sdk / VocdoniCensus3Client","sidebar":"defaultSidebar"},"sdk/reference/classes/VocdoniSDKClient":{"id":"sdk/reference/classes/VocdoniSDKClient","title":"VocdoniSDKClient","description":"@vocdoni/sdk / VocdoniSDKClient","sidebar":"defaultSidebar"},"sdk/reference/classes/Vote":{"id":"sdk/reference/classes/Vote","title":"Vote","description":"@vocdoni/sdk / Vote","sidebar":"defaultSidebar"},"sdk/reference/classes/VoteAPI":{"id":"sdk/reference/classes/VoteAPI","title":"VoteAPI","description":"@vocdoni/sdk / VoteAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/VoteService":{"id":"sdk/reference/classes/VoteService","title":"VoteService","description":"@vocdoni/sdk / VoteService","sidebar":"defaultSidebar"},"sdk/reference/classes/WalletAPI":{"id":"sdk/reference/classes/WalletAPI","title":"WalletAPI","description":"@vocdoni/sdk / WalletAPI","sidebar":"defaultSidebar"},"sdk/reference/classes/WeightedCensus":{"id":"sdk/reference/classes/WeightedCensus","title":"WeightedCensus","description":"@vocdoni/sdk / WeightedCensus","sidebar":"defaultSidebar"},"sdk/reference/classes/ZkAPI":{"id":"sdk/reference/classes/ZkAPI","title":"ZkAPI","description":"@vocdoni/sdk / ZkAPI","sidebar":"defaultSidebar"},"sdk/reference/enums/CensusOrigin":{"id":"sdk/reference/enums/CensusOrigin","title":"CensusOrigin","description":"@vocdoni/sdk / CensusOrigin","sidebar":"defaultSidebar"},"sdk/reference/enums/CensusType":{"id":"sdk/reference/enums/CensusType","title":"CensusType","description":"@vocdoni/sdk / CensusType","sidebar":"defaultSidebar"},"sdk/reference/enums/CensusTypeEnum":{"id":"sdk/reference/enums/CensusTypeEnum","title":"CensusTypeEnum","description":"@vocdoni/sdk / CensusTypeEnum","sidebar":"defaultSidebar"},"sdk/reference/enums/CspProofType":{"id":"sdk/reference/enums/CspProofType","title":"CspProofType","description":"@vocdoni/sdk / CspProofType","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionCreationSteps":{"id":"sdk/reference/enums/ElectionCreationSteps","title":"ElectionCreationSteps","description":"@vocdoni/sdk / ElectionCreationSteps","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionResultsTypeNames":{"id":"sdk/reference/enums/ElectionResultsTypeNames","title":"ElectionResultsTypeNames","description":"@vocdoni/sdk / ElectionResultsTypeNames","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionStatus":{"id":"sdk/reference/enums/ElectionStatus","title":"ElectionStatus","description":"@vocdoni/sdk / ElectionStatus","sidebar":"defaultSidebar"},"sdk/reference/enums/ElectionStatusReady":{"id":"sdk/reference/enums/ElectionStatusReady","title":"ElectionStatusReady","description":"@vocdoni/sdk / ElectionStatusReady","sidebar":"defaultSidebar"},"sdk/reference/enums/EnvOptions":{"id":"sdk/reference/enums/EnvOptions","title":"EnvOptions","description":"@vocdoni/sdk / EnvOptions","sidebar":"defaultSidebar"},"sdk/reference/enums/TransactionType":{"id":"sdk/reference/enums/TransactionType","title":"TransactionType","description":"@vocdoni/sdk / TransactionType","sidebar":"defaultSidebar"},"sdk/reference/enums/TxType":{"id":"sdk/reference/enums/TxType","title":"TxType","description":"@vocdoni/sdk / TxType","sidebar":"defaultSidebar"},"sdk/reference/enums/VoteSteps":{"id":"sdk/reference/enums/VoteSteps","title":"VoteSteps","description":"@vocdoni/sdk / VoteSteps","sidebar":"defaultSidebar"},"sdk/reference/interfaces/AccountMetadata":{"id":"sdk/reference/interfaces/AccountMetadata","title":"AccountMetadata","description":"@vocdoni/sdk / AccountMetadata","sidebar":"defaultSidebar"},"sdk/reference/interfaces/AdminTx":{"id":"sdk/reference/interfaces/AdminTx","title":"AdminTx","description":"@vocdoni/sdk / AdminTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/CircuitInputs":{"id":"sdk/reference/interfaces/CircuitInputs","title":"CircuitInputs","description":"@vocdoni/sdk / CircuitInputs","sidebar":"defaultSidebar"},"sdk/reference/interfaces/CollectFaucetTx":{"id":"sdk/reference/interfaces/CollectFaucetTx","title":"CollectFaucetTx","description":"@vocdoni/sdk / CollectFaucetTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ElectionMetadata":{"id":"sdk/reference/interfaces/ElectionMetadata","title":"ElectionMetadata","description":"@vocdoni/sdk / ElectionMetadata","sidebar":"defaultSidebar"},"sdk/reference/interfaces/FetchElectionsParameters":{"id":"sdk/reference/interfaces/FetchElectionsParameters","title":"FetchElectionsParameters","description":"@vocdoni/sdk / FetchElectionsParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccount":{"id":"sdk/reference/interfaces/IAccount","title":"IAccount","description":"@vocdoni/sdk / IAccount","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccountsCountResponse":{"id":"sdk/reference/interfaces/IAccountsCountResponse","title":"IAccountsCountResponse","description":"@vocdoni/sdk / IAccountsCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccountsListResponse":{"id":"sdk/reference/interfaces/IAccountsListResponse","title":"IAccountsListResponse","description":"@vocdoni/sdk / IAccountsListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IAccountTransfersCountResponse":{"id":"sdk/reference/interfaces/IAccountTransfersCountResponse","title":"IAccountTransfersCountResponse","description":"@vocdoni/sdk / IAccountTransfersCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IApprovalElectionParameters":{"id":"sdk/reference/interfaces/IApprovalElectionParameters","title":"IApprovalElectionParameters","description":"@vocdoni/sdk / IApprovalElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBlockTransactionsResponse":{"id":"sdk/reference/interfaces/IBlockTransactionsResponse","title":"IBlockTransactionsResponse","description":"@vocdoni/sdk / IBlockTransactionsResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBudgetElectionParametersInfo":{"id":"sdk/reference/interfaces/IBudgetElectionParametersInfo","title":"IBudgetElectionParametersInfo","description":"@vocdoni/sdk / IBudgetElectionParametersInfo","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBudgetElectionParametersWithBudget":{"id":"sdk/reference/interfaces/IBudgetElectionParametersWithBudget","title":"IBudgetElectionParametersWithBudget","description":"@vocdoni/sdk / IBudgetElectionParametersWithBudget","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight":{"id":"sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight","title":"IBudgetElectionParametersWithCensusWeight","description":"@vocdoni/sdk / IBudgetElectionParametersWithCensusWeight","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus":{"id":"sdk/reference/interfaces/ICensus","title":"ICensus","description":"@vocdoni/sdk / ICensus","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3CensusListResponse":{"id":"sdk/reference/interfaces/ICensus3CensusListResponse","title":"ICensus3CensusListResponse","description":"@vocdoni/sdk / ICensus3CensusListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3CensusQueueResponse":{"id":"sdk/reference/interfaces/ICensus3CensusQueueResponse","title":"ICensus3CensusQueueResponse","description":"@vocdoni/sdk / ICensus3CensusQueueResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3CensusResponse":{"id":"sdk/reference/interfaces/ICensus3CensusResponse","title":"ICensus3CensusResponse","description":"@vocdoni/sdk / ICensus3CensusResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ServiceInfoResponse":{"id":"sdk/reference/interfaces/ICensus3ServiceInfoResponse","title":"ICensus3ServiceInfoResponse","description":"@vocdoni/sdk / ICensus3ServiceInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesListResponse":{"id":"sdk/reference/interfaces/ICensus3StrategiesListResponse","title":"ICensus3StrategiesListResponse","description":"@vocdoni/sdk / ICensus3StrategiesListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated":{"id":"sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated","title":"ICensus3StrategiesListResponsePaginated","description":"@vocdoni/sdk / ICensus3StrategiesListResponsePaginated","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesOperator":{"id":"sdk/reference/interfaces/ICensus3StrategiesOperator","title":"ICensus3StrategiesOperator","description":"@vocdoni/sdk / ICensus3StrategiesOperator","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse":{"id":"sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse","title":"ICensus3StrategiesOperatorsResponse","description":"@vocdoni/sdk / ICensus3StrategiesOperatorsResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyCreateResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyCreateResponse","title":"ICensus3StrategyCreateResponse","description":"@vocdoni/sdk / ICensus3StrategyCreateResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse","title":"ICensus3StrategyEstimationQueueResponse","description":"@vocdoni/sdk / ICensus3StrategyEstimationQueueResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyHoldersResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyHoldersResponse","title":"ICensus3StrategyHoldersResponse","description":"@vocdoni/sdk / ICensus3StrategyHoldersResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated":{"id":"sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated","title":"ICensus3StrategyHoldersResponsePaginated","description":"@vocdoni/sdk / ICensus3StrategyHoldersResponsePaginated","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyImportQueueResponse":{"id":"sdk/reference/interfaces/ICensus3StrategyImportQueueResponse","title":"ICensus3StrategyImportQueueResponse","description":"@vocdoni/sdk / ICensus3StrategyImportQueueResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3StrategyToken":{"id":"sdk/reference/interfaces/ICensus3StrategyToken","title":"ICensus3StrategyToken","description":"@vocdoni/sdk / ICensus3StrategyToken","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3SupportedChain":{"id":"sdk/reference/interfaces/ICensus3SupportedChain","title":"ICensus3SupportedChain","description":"@vocdoni/sdk / ICensus3SupportedChain","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenHolderResponse":{"id":"sdk/reference/interfaces/ICensus3TokenHolderResponse","title":"ICensus3TokenHolderResponse","description":"@vocdoni/sdk / ICensus3TokenHolderResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenListResponse":{"id":"sdk/reference/interfaces/ICensus3TokenListResponse","title":"ICensus3TokenListResponse","description":"@vocdoni/sdk / ICensus3TokenListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenListResponsePaginated":{"id":"sdk/reference/interfaces/ICensus3TokenListResponsePaginated","title":"ICensus3TokenListResponsePaginated","description":"@vocdoni/sdk / ICensus3TokenListResponsePaginated","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3TokenTypesResponse":{"id":"sdk/reference/interfaces/ICensus3TokenTypesResponse","title":"ICensus3TokenTypesResponse","description":"@vocdoni/sdk / ICensus3TokenTypesResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ValidatePredicateChild":{"id":"sdk/reference/interfaces/ICensus3ValidatePredicateChild","title":"ICensus3ValidatePredicateChild","description":"@vocdoni/sdk / ICensus3ValidatePredicateChild","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ValidatePredicateResponse":{"id":"sdk/reference/interfaces/ICensus3ValidatePredicateResponse","title":"ICensus3ValidatePredicateResponse","description":"@vocdoni/sdk / ICensus3ValidatePredicateResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensus3ValidatePredicateToken":{"id":"sdk/reference/interfaces/ICensus3ValidatePredicateToken","title":"ICensus3ValidatePredicateToken","description":"@vocdoni/sdk / ICensus3ValidatePredicateToken","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusExportResponse":{"id":"sdk/reference/interfaces/ICensusExportResponse","title":"ICensusExportResponse","description":"@vocdoni/sdk / ICensusExportResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusImportResponse":{"id":"sdk/reference/interfaces/ICensusImportResponse","title":"ICensusImportResponse","description":"@vocdoni/sdk / ICensusImportResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusParticipant":{"id":"sdk/reference/interfaces/ICensusParticipant","title":"ICensusParticipant","description":"@vocdoni/sdk / ICensusParticipant","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusProofResponse":{"id":"sdk/reference/interfaces/ICensusProofResponse","title":"ICensusProofResponse","description":"@vocdoni/sdk / ICensusProofResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICensusPublishResponse":{"id":"sdk/reference/interfaces/ICensusPublishResponse","title":"ICensusPublishResponse","description":"@vocdoni/sdk / ICensusPublishResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainBlockInfoResponse":{"id":"sdk/reference/interfaces/IChainBlockInfoResponse","title":"IChainBlockInfoResponse","description":"@vocdoni/sdk / IChainBlockInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainGetCircuitResponse":{"id":"sdk/reference/interfaces/IChainGetCircuitResponse","title":"IChainGetCircuitResponse","description":"@vocdoni/sdk / IChainGetCircuitResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainGetCostsResponse":{"id":"sdk/reference/interfaces/IChainGetCostsResponse","title":"IChainGetCostsResponse","description":"@vocdoni/sdk / IChainGetCostsResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainGetInfoResponse":{"id":"sdk/reference/interfaces/IChainGetInfoResponse","title":"IChainGetInfoResponse","description":"@vocdoni/sdk / IChainGetInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainOrganizationCountResponse":{"id":"sdk/reference/interfaces/IChainOrganizationCountResponse","title":"IChainOrganizationCountResponse","description":"@vocdoni/sdk / IChainOrganizationCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainOrganizationListResponse":{"id":"sdk/reference/interfaces/IChainOrganizationListResponse","title":"IChainOrganizationListResponse","description":"@vocdoni/sdk / IChainOrganizationListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainOrganizationResponse":{"id":"sdk/reference/interfaces/IChainOrganizationResponse","title":"IChainOrganizationResponse","description":"@vocdoni/sdk / IChainOrganizationResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainSubmitTxResponse":{"id":"sdk/reference/interfaces/IChainSubmitTxResponse","title":"IChainSubmitTxResponse","description":"@vocdoni/sdk / IChainSubmitTxResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainTxCountResponse":{"id":"sdk/reference/interfaces/IChainTxCountResponse","title":"IChainTxCountResponse","description":"@vocdoni/sdk / IChainTxCountResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainTxListResponse":{"id":"sdk/reference/interfaces/IChainTxListResponse","title":"IChainTxListResponse","description":"@vocdoni/sdk / IChainTxListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainTxReference":{"id":"sdk/reference/interfaces/IChainTxReference","title":"IChainTxReference","description":"@vocdoni/sdk / IChainTxReference","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainValidator":{"id":"sdk/reference/interfaces/IChainValidator","title":"IChainValidator","description":"@vocdoni/sdk / IChainValidator","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChainValidatorsListResponse":{"id":"sdk/reference/interfaces/IChainValidatorsListResponse","title":"IChainValidatorsListResponse","description":"@vocdoni/sdk / IChainValidatorsListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IChoice":{"id":"sdk/reference/interfaces/IChoice","title":"IChoice","description":"@vocdoni/sdk / IChoice","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspAuthStep":{"id":"sdk/reference/interfaces/ICspAuthStep","title":"ICspAuthStep","description":"@vocdoni/sdk / ICspAuthStep","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspFinalStepResponse":{"id":"sdk/reference/interfaces/ICspFinalStepResponse","title":"ICspFinalStepResponse","description":"@vocdoni/sdk / ICspFinalStepResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspInfoResponse":{"id":"sdk/reference/interfaces/ICspInfoResponse","title":"ICspInfoResponse","description":"@vocdoni/sdk / ICspInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspIntermediateStepResponse":{"id":"sdk/reference/interfaces/ICspIntermediateStepResponse","title":"ICspIntermediateStepResponse","description":"@vocdoni/sdk / ICspIntermediateStepResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ICspSignResponse":{"id":"sdk/reference/interfaces/ICspSignResponse","title":"ICspSignResponse","description":"@vocdoni/sdk / ICspSignResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionCreateResponse":{"id":"sdk/reference/interfaces/IElectionCreateResponse","title":"IElectionCreateResponse","description":"@vocdoni/sdk / IElectionCreateResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionInfoResponse":{"id":"sdk/reference/interfaces/IElectionInfoResponse","title":"IElectionInfoResponse","description":"@vocdoni/sdk / IElectionInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionKeysResponse":{"id":"sdk/reference/interfaces/IElectionKeysResponse","title":"IElectionKeysResponse","description":"@vocdoni/sdk / IElectionKeysResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionListFilter":{"id":"sdk/reference/interfaces/IElectionListFilter","title":"IElectionListFilter","description":"@vocdoni/sdk / IElectionListFilter","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionListResponse":{"id":"sdk/reference/interfaces/IElectionListResponse","title":"IElectionListResponse","description":"@vocdoni/sdk / IElectionListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionMode":{"id":"sdk/reference/interfaces/IElectionMode","title":"IElectionMode","description":"@vocdoni/sdk / IElectionMode","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionNextIdResponse":{"id":"sdk/reference/interfaces/IElectionNextIdResponse","title":"IElectionNextIdResponse","description":"@vocdoni/sdk / IElectionNextIdResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionParameters":{"id":"sdk/reference/interfaces/IElectionParameters","title":"IElectionParameters","description":"@vocdoni/sdk / IElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionSummary":{"id":"sdk/reference/interfaces/IElectionSummary","title":"IElectionSummary","description":"@vocdoni/sdk / IElectionSummary","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionType":{"id":"sdk/reference/interfaces/IElectionType","title":"IElectionType","description":"@vocdoni/sdk / IElectionType","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionVote":{"id":"sdk/reference/interfaces/IElectionVote","title":"IElectionVote","description":"@vocdoni/sdk / IElectionVote","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IElectionVoteListResponse":{"id":"sdk/reference/interfaces/IElectionVoteListResponse","title":"IElectionVoteListResponse","description":"@vocdoni/sdk / IElectionVoteListResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IEncryptionKey":{"id":"sdk/reference/interfaces/IEncryptionKey","title":"IEncryptionKey","description":"@vocdoni/sdk / IEncryptionKey","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IInvalidElectionParameters":{"id":"sdk/reference/interfaces/IInvalidElectionParameters","title":"IInvalidElectionParameters","description":"@vocdoni/sdk / IInvalidElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IMultiChoiceElectionParameters":{"id":"sdk/reference/interfaces/IMultiChoiceElectionParameters","title":"IMultiChoiceElectionParameters","description":"@vocdoni/sdk / IMultiChoiceElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IPublishedElectionParameters":{"id":"sdk/reference/interfaces/IPublishedElectionParameters","title":"IPublishedElectionParameters","description":"@vocdoni/sdk / IPublishedElectionParameters","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IQuestion":{"id":"sdk/reference/interfaces/IQuestion","title":"IQuestion","description":"@vocdoni/sdk / IQuestion","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ITallyMode":{"id":"sdk/reference/interfaces/ITallyMode","title":"ITallyMode","description":"@vocdoni/sdk / ITallyMode","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteInfoResponse":{"id":"sdk/reference/interfaces/IVoteInfoResponse","title":"IVoteInfoResponse","description":"@vocdoni/sdk / IVoteInfoResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteMode":{"id":"sdk/reference/interfaces/IVoteMode","title":"IVoteMode","description":"@vocdoni/sdk / IVoteMode","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteSubmitResponse":{"id":"sdk/reference/interfaces/IVoteSubmitResponse","title":"IVoteSubmitResponse","description":"@vocdoni/sdk / IVoteSubmitResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IVoteType":{"id":"sdk/reference/interfaces/IVoteType","title":"IVoteType","description":"@vocdoni/sdk / IVoteType","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IZkProofResponse":{"id":"sdk/reference/interfaces/IZkProofResponse","title":"IZkProofResponse","description":"@vocdoni/sdk / IZkProofResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/IZkSIKResponse":{"id":"sdk/reference/interfaces/IZkSIKResponse","title":"IZkSIKResponse","description":"@vocdoni/sdk / IZkSIKResponse","sidebar":"defaultSidebar"},"sdk/reference/interfaces/MintTokensTx":{"id":"sdk/reference/interfaces/MintTokensTx","title":"MintTokensTx","description":"@vocdoni/sdk / MintTokensTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/NewProcessTx":{"id":"sdk/reference/interfaces/NewProcessTx","title":"NewProcessTx","description":"@vocdoni/sdk / NewProcessTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/Process":{"id":"sdk/reference/interfaces/Process","title":"Process","description":"@vocdoni/sdk / Process","sidebar":"defaultSidebar"},"sdk/reference/interfaces/Proof":{"id":"sdk/reference/interfaces/Proof","title":"Proof","description":"@vocdoni/sdk / Proof","sidebar":"defaultSidebar"},"sdk/reference/interfaces/RegisterKeyTx":{"id":"sdk/reference/interfaces/RegisterKeyTx","title":"RegisterKeyTx","description":"@vocdoni/sdk / RegisterKeyTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SendTokensTx":{"id":"sdk/reference/interfaces/SendTokensTx","title":"SendTokensTx","description":"@vocdoni/sdk / SendTokensTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/ServiceProperties":{"id":"sdk/reference/interfaces/ServiceProperties","title":"ServiceProperties","description":"@vocdoni/sdk / ServiceProperties","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SetAccountTx":{"id":"sdk/reference/interfaces/SetAccountTx","title":"SetAccountTx","description":"@vocdoni/sdk / SetAccountTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SetProcessTx":{"id":"sdk/reference/interfaces/SetProcessTx","title":"SetProcessTx","description":"@vocdoni/sdk / SetProcessTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/SetTransactionCostsTx":{"id":"sdk/reference/interfaces/SetTransactionCostsTx","title":"SetTransactionCostsTx","description":"@vocdoni/sdk / SetTransactionCostsTx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/Tx":{"id":"sdk/reference/interfaces/Tx","title":"Tx","description":"@vocdoni/sdk / Tx","sidebar":"defaultSidebar"},"sdk/reference/interfaces/VoteEnvelope":{"id":"sdk/reference/interfaces/VoteEnvelope","title":"VoteEnvelope","description":"@vocdoni/sdk / VoteEnvelope","sidebar":"defaultSidebar"},"sdk/reference/sdk-reference":{"id":"sdk/reference/sdk-reference","title":"@vocdoni/sdk","description":"Table of contents","sidebar":"defaultSidebar"},"sdk/tutorial":{"id":"sdk/tutorial","title":"SDK Tutorial","description":"This tutorial will show you how to get your environment set up, start using the SDK, and create and vote in an election. We will be using typescript.","sidebar":"defaultSidebar"},"ui-components/Election":{"id":"ui-components/Election","title":"Election components","description":"Vocdoni Chakra components for Elections","sidebar":"defaultSidebar"},"ui-components/index":{"id":"ui-components/index","title":"UI Components","description":"Vocdoni Chakra components","sidebar":"defaultSidebar"},"ui-components/Organization":{"id":"ui-components/Organization","title":"Organization components","description":"Vocdoni Chakra components for Organizations","sidebar":"defaultSidebar"},"vocdoni-api/accounts":{"id":"vocdoni-api/accounts","title":"Accounts","description":"Accounts","sidebar":"defaultSidebar"},"vocdoni-api/add-account":{"id":"vocdoni-api/add-account","title":"Add account","description":"Add a new account to the local store. It returns a token used to manage this account on the future.","sidebar":"defaultSidebar"},"vocdoni-api/add-participants-to-census":{"id":"vocdoni-api/add-participants-to-census","title":"Add participants to census","description":"Add list of public key/address with its weight to an unpublished census and returns the resulting","sidebar":"defaultSidebar"},"vocdoni-api/census-merkle-root":{"id":"vocdoni-api/census-merkle-root","title":"Census Merkle Root","description":"Get census [Merkle Tree root](https://docs.vocdoni.io/architecture/census/off-chain-tree.html) hash, used to identify the census at specific snapshot.\\n\\n- Bearer token not required","sidebar":"defaultSidebar"},"vocdoni-api/census-size":{"id":"vocdoni-api/census-size","title":"Census size","description":"Total number of keys added to the census. Size as integer","sidebar":"defaultSidebar"},"vocdoni-api/census-total-weight":{"id":"vocdoni-api/census-total-weight","title":"Census total weight","description":"It sums all weights added to the census. Weight is a stringified bigInt","sidebar":"defaultSidebar"},"vocdoni-api/censuses":{"id":"vocdoni-api/censuses","title":"Censuses","description":"Censuses","sidebar":"defaultSidebar"},"vocdoni-api/chain":{"id":"vocdoni-api/chain","title":"Chain","description":"Chain","sidebar":"defaultSidebar"},"vocdoni-api/circuit-info":{"id":"vocdoni-api/circuit-info","title":"Circuit info","description":"Returns the circuit configuration according to the current circuit","sidebar":"defaultSidebar"},"vocdoni-api/compute-election-price":{"id":"vocdoni-api/compute-election-price","title":"Compute election price","description":"Helper endpoint to get the election price.","sidebar":"defaultSidebar"},"vocdoni-api/compute-ipfs-ci-dv-1-of-file":{"id":"vocdoni-api/compute-ipfs-ci-dv-1-of-file","title":"Compute IPFS CIDv1 of file","description":"Helper endpoint to get the IPFS CIDv1 hash of a file","sidebar":"defaultSidebar"},"vocdoni-api/count-election-votes":{"id":"vocdoni-api/count-election-votes","title":"Count election votes","description":"Get the number of votes for an election","sidebar":"defaultSidebar"},"vocdoni-api/count-organization-elections":{"id":"vocdoni-api/count-organization-elections","title":"Count organization elections","description":"Returns the number of elections for an organization","sidebar":"defaultSidebar"},"vocdoni-api/count-organizations":{"id":"vocdoni-api/count-organizations","title":"Count organizations","description":"Return the number of organizations","sidebar":"defaultSidebar"},"vocdoni-api/create-a-new-census":{"id":"vocdoni-api/create-a-new-census","title":"Create a new census","description":"Create a new census on the backend side. The census is still unpublished until [publish](publish-census) is called.","sidebar":"defaultSidebar"},"vocdoni-api/create-election":{"id":"vocdoni-api/create-election","title":"Create election","description":"It creates an election on the Vochain.","sidebar":"defaultSidebar"},"vocdoni-api/create-election-for-wallet":{"id":"vocdoni-api/create-election-for-wallet","title":"Create election for wallet","description":"Creates an election. Requires the bearer token of the account you want to create the election.","sidebar":"defaultSidebar"},"vocdoni-api/delete-census":{"id":"vocdoni-api/delete-census","title":"Delete census","description":"Delete unpublished census (not on the storage yet). See [publish census](census-publish)\\n","sidebar":"defaultSidebar"},"vocdoni-api/election-information":{"id":"vocdoni-api/election-information","title":"Election information","description":"Get full election information","sidebar":"defaultSidebar"},"vocdoni-api/election-results":{"id":"vocdoni-api/election-results","title":"Election results","description":"Returns a given election consensus results and useful information about the results. Results represented with BigInt strings.","sidebar":"defaultSidebar"},"vocdoni-api/elections":{"id":"vocdoni-api/elections","title":"Elections","description":"Elections","sidebar":"defaultSidebar"},"vocdoni-api/estimate-block-to-date":{"id":"vocdoni-api/estimate-block-to-date","title":"Estimate block to date","description":"Returns the estimated timestamp for the block height provided","sidebar":"defaultSidebar"},"vocdoni-api/estimate-date-to-block":{"id":"vocdoni-api/estimate-date-to-block","title":"Estimate date to block","description":"Returns the estimated block height for the timestamp provided","sidebar":"defaultSidebar"},"vocdoni-api/export-census":{"id":"vocdoni-api/export-census","title":"Export census","description":"Export census to JSON format. Requires Bearer token","sidebar":"defaultSidebar"},"vocdoni-api/export-census-database":{"id":"vocdoni-api/export-census-database","title":"Export census database","description":"Export the whole census database to a JSON file. Requires Admin Bearer token.","sidebar":"defaultSidebar"},"vocdoni-api/exports-the-indexer-database":{"id":"vocdoni-api/exports-the-indexer-database","title":"Exports the indexer database","description":"Exports the indexer SQL database in raw format","sidebar":"defaultSidebar"},"vocdoni-api/get-account":{"id":"vocdoni-api/get-account","title":"Get account","description":"Get account information by its address or public key. The `infoURI` parameter contain where account metadata is uploaded (like avatar, name...). It return also an already parsed \'metadata\' object from this infoUri.","sidebar":"defaultSidebar"},"vocdoni-api/get-block-by-hash":{"id":"vocdoni-api/get-block-by-hash","title":"Get block (by hash)","description":"Returns the block from the given hash","sidebar":"defaultSidebar"},"vocdoni-api/get-block-by-height":{"id":"vocdoni-api/get-block-by-height","title":"Get block (by height)","description":"Returns the full block information at the given height","sidebar":"defaultSidebar"},"vocdoni-api/get-next-election-id":{"id":"vocdoni-api/get-next-election-id","title":"Get next election ID","description":"nextElectionIDHandler","sidebar":"defaultSidebar"},"vocdoni-api/get-type-of-census":{"id":"vocdoni-api/get-type-of-census","title":"Get type of census","description":"Get the census type","sidebar":"defaultSidebar"},"vocdoni-api/get-vote":{"id":"vocdoni-api/get-vote","title":"Get vote","description":"Get the content of an existing Vote. If is an encrypted election it return the `encryptionKeys` indexes and the package will be codified.","sidebar":"defaultSidebar"},"vocdoni-api/import-census":{"id":"vocdoni-api/import-census","title":"Import census","description":"Import census from JSON previously exported using [`/censuses/{censusId}/export`](census-export). Requires Bearer token","sidebar":"defaultSidebar"},"vocdoni-api/import-census-database":{"id":"vocdoni-api/import-census-database","title":"Import census database","description":"Import the whole census database from a JSON file.","sidebar":"defaultSidebar"},"vocdoni-api/list-account-received-and-sent-token-transfers":{"id":"vocdoni-api/list-account-received-and-sent-token-transfers","title":"List account received and sent token transfers","description":"Returns the token transfers for an account. A transfer is a token transference from one account to other (excepting the burn address).","sidebar":"defaultSidebar"},"vocdoni-api/list-account-token-fees":{"id":"vocdoni-api/list-account-token-fees","title":"List account token fees","description":"Returns the token fees for an account. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-census-references":{"id":"vocdoni-api/list-all-census-references","title":"List all census references","description":"List all census references. Requires Admin Bearer token.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-token-fees":{"id":"vocdoni-api/list-all-token-fees","title":"List all token fees","description":"Returns the token fees list ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-token-fees-by-reference":{"id":"vocdoni-api/list-all-token-fees-by-reference","title":"List all token fees by reference","description":"Returns the token fees list filtered by reference and ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-all-token-fees-by-type":{"id":"vocdoni-api/list-all-token-fees-by-type","title":"List all token fees by type","description":"Returns the token fees list filtered by type and ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.","sidebar":"defaultSidebar"},"vocdoni-api/list-election-votes":{"id":"vocdoni-api/list-election-votes","title":"List election votes","description":"Returns the list of voteIDs for an election (paginated)","sidebar":"defaultSidebar"},"vocdoni-api/list-elections":{"id":"vocdoni-api/list-elections","title":"List elections","description":"Get a list of elections summaries.","sidebar":"defaultSidebar"},"vocdoni-api/list-elections-filtered":{"id":"vocdoni-api/list-elections-filtered","title":"List elections (filtered)","description":"Return a filtered elections list, the available filters have to be sent on the request body. Available are:","sidebar":"defaultSidebar"},"vocdoni-api/list-encryption-keys":{"id":"vocdoni-api/list-encryption-keys","title":"List encryption keys","description":"Returns the list of public/private encryption keys","sidebar":"defaultSidebar"},"vocdoni-api/list-of-the-existing-accounts":{"id":"vocdoni-api/list-of-the-existing-accounts","title":"List of the existing accounts","description":"Returns information (address, balance and nonce) of the existing accounts","sidebar":"defaultSidebar"},"vocdoni-api/list-of-valid-sik-roots":{"id":"vocdoni-api/list-of-valid-sik-roots","title":"List of valid SIK roots","description":"Returns the list of currently valid roots of the merkle tree where the vochain account SIK\'s are stored.","sidebar":"defaultSidebar"},"vocdoni-api/list-organization-elections":{"id":"vocdoni-api/list-organization-elections","title":"List organization elections","description":"List the elections of an organization","sidebar":"defaultSidebar"},"vocdoni-api/list-organization-elections-by-status":{"id":"vocdoni-api/list-organization-elections-by-status","title":"List organization elections by status","description":"List the elections of an organization by status","sidebar":"defaultSidebar"},"vocdoni-api/list-organizations":{"id":"vocdoni-api/list-organizations","title":"List organizations","description":"An **Organizations** is an account with `infoUri` that contains organization associated metadata.","sidebar":"defaultSidebar"},"vocdoni-api/list-organizations-filtered":{"id":"vocdoni-api/list-organizations-filtered","title":"List organizations (filtered)","description":"Returns a list of organizations filtered by its partial id, paginated by the given page","sidebar":"defaultSidebar"},"vocdoni-api/list-transactions":{"id":"vocdoni-api/list-transactions","title":"List Transactions","description":"To get full transaction information use [/chain/transaction/{blockHeight}/{txIndex}](transaction-by-block-index).\\nWhere transactionIndex is the index of the transaction on the containing block.","sidebar":"defaultSidebar"},"vocdoni-api/list-validators":{"id":"vocdoni-api/list-validators","title":"List validators","description":"Returns the list of validators","sidebar":"defaultSidebar"},"vocdoni-api/price-factors-information":{"id":"vocdoni-api/price-factors-information","title":"Price factors information","description":"Package electionprice provides a mechanism for calculating the price of an election based on its characteristics.","sidebar":"defaultSidebar"},"vocdoni-api/prove-key-to-census":{"id":"vocdoni-api/prove-key-to-census","title":"Prove key to census","description":"Prove the key and weight belong to the census root hash.","sidebar":"defaultSidebar"},"vocdoni-api/publish-census":{"id":"vocdoni-api/publish-census","title":"Publish census","description":"Register a census to the storage (IPFS in our case). After this, the census can\'t be edited.","sidebar":"defaultSidebar"},"vocdoni-api/publish-census-at-root":{"id":"vocdoni-api/publish-census-at-root","title":"Publish census at root","description":"Register a census to the storage (IPFS in our case). After this, the census can\'t be edited.","sidebar":"defaultSidebar"},"vocdoni-api/returns-if-the-address-provided-has-a-valid-sik":{"id":"vocdoni-api/returns-if-the-address-provided-has-a-valid-sik","title":"Returns if the address provided has a valid SIK","description":"Returns if the address provided, associated to an a registered account or not, has a valid SIK already registered or not.","sidebar":"defaultSidebar"},"vocdoni-api/set-account":{"id":"vocdoni-api/set-account","title":"Set account","description":"It register an account to the blockchain including IPFS metadata upload.","sidebar":"defaultSidebar"},"vocdoni-api/set-wallet-account":{"id":"vocdoni-api/set-wallet-account","title":"Set wallet account","description":"Set a new account. Needed the bearer token associated the account.","sidebar":"defaultSidebar"},"vocdoni-api/sik":{"id":"vocdoni-api/sik","title":"SIK","description":"SIK","sidebar":"defaultSidebar"},"vocdoni-api/submit-a-vote":{"id":"vocdoni-api/submit-a-vote","title":"Submit a vote","description":"Submit a vote using a protobuf signed transaction. The corresponding result are the vote id and transaction hash where the vote is registered.","sidebar":"defaultSidebar"},"vocdoni-api/submit-transaction":{"id":"vocdoni-api/submit-transaction","title":"Submit transaction","description":"It submit a transaction. Depending of transaction type will return different kinds of responses:","sidebar":"defaultSidebar"},"vocdoni-api/total-number-of-accounts":{"id":"vocdoni-api/total-number-of-accounts","title":"Total number of accounts","description":"Returns the count of total number of existing accounts","sidebar":"defaultSidebar"},"vocdoni-api/total-number-of-sent-and-received-transactions":{"id":"vocdoni-api/total-number-of-sent-and-received-transactions","title":"Total number of sent and received transactions","description":"Returns the count of total number of sent and received transactions for an account. A transaction is a token transfer from one account to another existing account","sidebar":"defaultSidebar"},"vocdoni-api/transaction-by-block-height-and-index":{"id":"vocdoni-api/transaction-by-block-height-and-index","title":"Transaction by block height and index","description":"Get transaction full information by block height and index. It returns JSON transaction protobuf encoded. Depending of transaction type will return different types of objects. Current transaction types can be found calling `/chain/transactions/cost`","sidebar":"defaultSidebar"},"vocdoni-api/transaction-by-hash":{"id":"vocdoni-api/transaction-by-hash","title":"Transaction by hash","description":"Using transaction hash it return the `block` and `index` containing that contains the transaction. After, you could use this `block` and `index` to retrieve transaction full info using [transaction by block and index](transaction-by-block-index)","sidebar":"defaultSidebar"},"vocdoni-api/transaction-by-index":{"id":"vocdoni-api/transaction-by-index","title":"Transaction by index","description":"Get transaction by its index. This is not transaction reference (hash), and neither the block height and block index. The transaction index is an incremental counter for each transaction. You could use the transaction `block` and `index` to retrieve full info using [transaction by block and index](transaction-by-block-index).","sidebar":"defaultSidebar"},"vocdoni-api/transaction-costs":{"id":"vocdoni-api/transaction-costs","title":"Transaction costs","description":"Returns the list of transactions and its cost","sidebar":"defaultSidebar"},"vocdoni-api/transactions-count":{"id":"vocdoni-api/transactions-count","title":"Transactions count","description":"Returns the number of transactions","sidebar":"defaultSidebar"},"vocdoni-api/transactions-in-a-block":{"id":"vocdoni-api/transactions-in-a-block","title":"Transactions in a block","description":"Given a block returns the list of transactions for that block","sidebar":"defaultSidebar"},"vocdoni-api/transfer-tokens":{"id":"vocdoni-api/transfer-tokens","title":"Transfer tokens","description":"Transfer balance to another account. Needed the bearer token associated the account.","sidebar":"defaultSidebar"},"vocdoni-api/verify-merkle-proof":{"id":"vocdoni-api/verify-merkle-proof","title":"Verify merkle proof","description":"Verify that a previously obtained Merkle proof for a key, acquired via [/censuses/{censusId}/proof/{publicKey}](prove-key-to-census) is still correct.","sidebar":"defaultSidebar"},"vocdoni-api/verify-vote":{"id":"vocdoni-api/verify-vote","title":"Verify vote","description":"Check if vote is registered on the blockchain on specific election. Just return Ok status code","sidebar":"defaultSidebar"},"vocdoni-api/vocdoni-api":{"id":"vocdoni-api/vocdoni-api","title":"Vocdoni API","description":"The Vocdoni API is a REST API that substitutes the previous RPCs in order to make it easier for developers/integrators to build on top of the voting protocol. This API facilitates creating votings using Vocdoni, without the hassle of learning a complex blockchain platform, allowing to perform all the features that enable the voting protocol such as creating an account, entity, voting process, census & vote, abstracting as much as possible the complexity and offering simple and straightforward methods to perform those actions.","sidebar":"defaultSidebar"},"vocdoni-api/vochain-information":{"id":"vocdoni-api/vochain-information","title":"Vochain information","description":"Return basic Vocdoni Blockchain (Vochain) information like blockTime, chainId, current height...","sidebar":"defaultSidebar"},"vocdoni-api/votes":{"id":"vocdoni-api/votes","title":"Votes","description":"Votes","sidebar":"defaultSidebar"},"vocdoni-api/wallet":{"id":"vocdoni-api/wallet","title":"Wallet","description":"Wallet","sidebar":"defaultSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/9728e091.c0cb931b.js b/assets/js/9728e091.606ff7ce.js similarity index 98% rename from assets/js/9728e091.c0cb931b.js rename to assets/js/9728e091.606ff7ce.js index 675fdfa64..588063c8a 100644 --- a/assets/js/9728e091.c0cb931b.js +++ b/assets/js/9728e091.606ff7ce.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[5470],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,s=e.mdxType,a=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=l(n),f=s,h=p["".concat(c,".").concat(f)]||p[f]||d[f]||a;return n?r.createElement(h,i(i({ref:t},u),{},{components:n})):r.createElement(h,i({ref:t},u))}));function f(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=n.length,i=new Array(a);i[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:s,i[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=n(87462),s=(n(67294),n(3905));const a={},i="Off-chain Merkle Tree",o={unversionedId:"sdk/integration-details/census-types/off-chain-tree",id:"sdk/integration-details/census-types/off-chain-tree",title:"Off-chain Merkle Tree",description:"This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using census.add().",source:"@site/docs/sdk/integration-details/census-types/off-chain-tree.md",sourceDirName:"sdk/integration-details/census-types",slug:"/sdk/integration-details/census-types/off-chain-tree",permalink:"/sdk/integration-details/census-types/off-chain-tree",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Off-chain Credential Service Provider",permalink:"/sdk/integration-details/census-types/off-chain-csp"},next:{title:"On-chain Token-Based Census",permalink:"/sdk/integration-details/census-types/on-chain/"}},c={},l=[{value:"Anonymity",id:"anonymity",level:2}],u={toc:l};function d(e){let{components:t,...n}=e;return(0,s.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"off-chain-merkle-tree"},"Off-chain Merkle Tree"),(0,s.kt)("p",null,"This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/PlainCensus#add"},(0,s.kt)("inlineCode",{parentName:"a"},"census.add()")),". "),(0,s.kt)("p",null,"This is the census type used in the ",(0,s.kt)("a",{parentName:"p",href:"/sdk/tutorial"},"SDK Tutorial"),". Follow along or look at the tutorial code for basic usage of the Merkle tree census."),(0,s.kt)("p",null,"Off-chain tree census can be created as ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/PlainCensus"},(0,s.kt)("inlineCode",{parentName:"a"},"PlainCensus"))," or ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/WeightedCensus"},(0,s.kt)("inlineCode",{parentName:"a"},"WeightedCensus")),". If a weighted census is used, voters can be assigned a weight which proportionally determines the power of their vote: "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-js"},"weightedCensus.add([\n {\n key: address1,\n weight: BigInt(1),\n },\n {\n key: address2,\n // This voter will have 100x the vote power as voter1. This is not a very equitable election.\n weight: BigInt(100),\n },\n ]);\n")),(0,s.kt)("h2",{id:"anonymity"},"Anonymity"),(0,s.kt)("p",null,"Complete cryptographic anonymity is possible alongside universal verifiability with anonymous Merkle tree-based censuses. This is possible due to a cutting-edge technology called zk-SNARKs. The protocol-level design is detailed ",(0,s.kt)("a",{parentName:"p",href:"/protocol/anonymity/zk-census-proof"},"here"),"."),(0,s.kt)("p",null,"For an anonymous off-chain tree election, the election must be created with the option "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"electionType: {\n anonymous: true\n}\n")),(0,s.kt)("p",null,"In this case, votes must also be cast as ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/AnonymousVote"},(0,s.kt)("inlineCode",{parentName:"a"},"AnonymousVote")),"s. The cryptography needed for anonymous voting is very different from typical voting, but this is all handled by the SDK without any other changes needed."))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[5470],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,s=e.mdxType,a=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=l(n),f=s,h=p["".concat(c,".").concat(f)]||p[f]||d[f]||a;return n?r.createElement(h,i(i({ref:t},u),{},{components:n})):r.createElement(h,i({ref:t},u))}));function f(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=n.length,i=new Array(a);i[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:s,i[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=n(87462),s=(n(67294),n(3905));const a={},i="Off-chain Merkle Tree",o={unversionedId:"sdk/integration-details/census-types/off-chain-tree",id:"sdk/integration-details/census-types/off-chain-tree",title:"Off-chain Merkle Tree",description:"This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using census.add().",source:"@site/docs/sdk/integration-details/census-types/off-chain-tree.md",sourceDirName:"sdk/integration-details/census-types",slug:"/sdk/integration-details/census-types/off-chain-tree",permalink:"/sdk/integration-details/census-types/off-chain-tree",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Off-chain Credential Service Provider",permalink:"/sdk/integration-details/census-types/off-chain-csp"},next:{title:"On-chain Token-Based Census",permalink:"/sdk/integration-details/census-types/on-chain/"}},c={},l=[{value:"Anonymity",id:"anonymity",level:2}],u={toc:l};function d(e){let{components:t,...n}=e;return(0,s.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"off-chain-merkle-tree"},"Off-chain Merkle Tree"),(0,s.kt)("p",null,"This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/PlainCensus#add"},(0,s.kt)("inlineCode",{parentName:"a"},"census.add()")),". "),(0,s.kt)("p",null,"This is the census type used in the ",(0,s.kt)("a",{parentName:"p",href:"/sdk/tutorial"},"SDK Tutorial"),". Follow along or look at the tutorial code for basic usage of the Merkle tree census."),(0,s.kt)("p",null,"Off-chain tree census can be created as ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/PlainCensus"},(0,s.kt)("inlineCode",{parentName:"a"},"PlainCensus"))," or ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/WeightedCensus"},(0,s.kt)("inlineCode",{parentName:"a"},"WeightedCensus")),". If a weighted census is used, voters can be assigned a weight which proportionally determines the power of their vote: "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"weightedCensus.add([\n {\n key: address1,\n weight: BigInt(1),\n },\n {\n key: address2,\n // This voter will have 100x the vote power as voter1. This is not a very equitable election.\n weight: BigInt(100),\n },\n ]);\n")),(0,s.kt)("h2",{id:"anonymity"},"Anonymity"),(0,s.kt)("p",null,"Complete cryptographic anonymity is possible alongside universal verifiability with anonymous Merkle tree-based censuses. This is possible due to a cutting-edge technology called zk-SNARKs. The protocol-level design is detailed ",(0,s.kt)("a",{parentName:"p",href:"/protocol/anonymity/zk-census-proof"},"here"),"."),(0,s.kt)("p",null,"For an anonymous off-chain tree election, the election must be created with the option "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"electionType: {\n anonymous: true\n}\n")),(0,s.kt)("p",null,"In this case, votes must also be cast as ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/AnonymousVote"},(0,s.kt)("inlineCode",{parentName:"a"},"AnonymousVote")),"s. The cryptography needed for anonymous voting is very different from typical voting, but this is all handled by the SDK without any other changes needed."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e24c431f.70c28301.js b/assets/js/e24c431f.443d80ae.js similarity index 86% rename from assets/js/e24c431f.70c28301.js rename to assets/js/e24c431f.443d80ae.js index 2e8224051..6d247b9df 100644 --- a/assets/js/e24c431f.70c28301.js +++ b/assets/js/e24c431f.443d80ae.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[2872],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,s=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=c(n),h=s,m=d["".concat(l,".").concat(h)]||d[h]||p[h]||o;return n?a.createElement(m,r(r({ref:t},u),{},{components:n})):a.createElement(m,r({ref:t},u))}));function h(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=n.length,r=new Array(o);r[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:s,r[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var a=n(87462),s=(n(67294),n(3905));const o={},r="Complex Census",i={unversionedId:"sdk/integration-details/census-types/on-chain/complex-census",id:"sdk/integration-details/census-types/on-chain/complex-census",title:"Complex Census",description:"The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once.",source:"@site/docs/sdk/integration-details/census-types/on-chain/complex-census.md",sourceDirName:"sdk/integration-details/census-types/on-chain",slug:"/sdk/integration-details/census-types/on-chain/complex-census",permalink:"/sdk/integration-details/census-types/on-chain/complex-census",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"On-chain Token-Based Census",permalink:"/sdk/integration-details/census-types/on-chain/"},next:{title:"Vocdoni Tokens",permalink:"/sdk/integration-details/vocdoni-tokens"}},l={},c=[{value:"Strategies",id:"strategies",level:2},{value:"Predicates",id:"predicates",level:2},{value:"Creating a Census",id:"creating-a-census",level:2}],u={toc:c};function p(e){let{components:t,...n}=e;return(0,s.kt)("wrapper",(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"complex-census"},"Complex Census"),(0,s.kt)("p",null,"The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once."),(0,s.kt)("h2",{id:"strategies"},"Strategies"),(0,s.kt)("p",null,"The logic that defines inclusion in a token-based census is called a 'strategy.' For the basic token-holder use case, the strategy is defined solely by that token. ",(0,s.kt)("inlineCode",{parentName:"p"},"createTokenCensus")," chooses the default strategy for that token, so for a basic token-based census you don't need to worry about strategies at all."),(0,s.kt)("p",null,'More complex strategies exist, however, such as "holders of both ',(0,s.kt)("inlineCode",{parentName:"p"},"VOC1")," token AND ",(0,s.kt)("inlineCode",{parentName:"p"},"VOC2"),' token."'),(0,s.kt)("p",null,"Just like checking for supported tokens, you can see a list of the strategies supported by the census3 service:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const strategies = await census3Client.getStrategies();\nconsole.log(JSON.stringify(strategies, null, 4));\n")),(0,s.kt)("p",null,"This will print a long list of strategies. Some of them will be basic strategies for a single token:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-bash"},'...\n {\n "ID": 72,\n "alias": "Default strategy for token VOC3TEST",\n "predicate": "VOC3TEST",\n "uri": "ipfs://bafybeih7rmjsdzqjr6pyjv46jo4kjpl3qfv2yufpdxzmcw2j63z47u6czy",\n "tokens": {\n "VOC3TEST": {\n "ID": "0x9286d95DB5a59306113028EF0BA85bF7068A199F",\n "chainID": 11155111,\n "minBalance": "1",\n "chainAddress": "sep:0x9286d95DB5a59306113028EF0BA85bF7068A199F"\n }\n }\n },\n...\n')),(0,s.kt)("p",null,"Some, on the other hand, will be more complex strategies involving multiple tokens:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-bash"},'...\n {\n "ID": 103,\n "alias": "gitcoin_onvote_1711040172449",\n "predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)",\n "uri": "ipfs://bafybeidopynxc746oorzkh7yvhomcw56w72aaw3klqce4gkjcczc7ry3uu",\n "tokens": {\n "GPS": {\n "ID": "0x000000000000000000000000000000000000006C",\n "chainID": 1,\n "minBalance": "16",\n "chainAddress": "eth:0x000000000000000000000000000000000000006C"\n },\n "GPS:Discord": {\n "ID": "0x000000000000000000000000000000000000006C",\n "chainID": 1,\n "minBalance": "1",\n "chainAddress": "eth:0x000000000000000000000000000000000000006C",\n "externalID": "Discord"\n },\n "GPS:Github": {\n "ID": "0x000000000000000000000000000000000000006C",\n "chainID": 1,\n "minBalance": "1",\n "chainAddress": "eth:0x000000000000000000000000000000000000006C",\n "externalID": "Github"\n }\n }\n },\n...\n')),(0,s.kt)("h2",{id:"predicates"},"Predicates"),(0,s.kt)("p",null,"As you can see, there are two main differences between the simple and complex strategies: the ",(0,s.kt)("inlineCode",{parentName:"p"},"predicate")," and the ",(0,s.kt)("inlineCode",{parentName:"p"},"tokens"),". "),(0,s.kt)("p",null,"Predicates are logical operators that define how strategies create a census. There are currently two logical operators (",(0,s.kt)("inlineCode",{parentName:"p"},"AND")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"OR"),"), each with two additional 'powerups' (",(0,s.kt)("inlineCode",{parentName:"p"},"sum")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"mul"),")."),(0,s.kt)("p",null,"The predicate syntax and available operators are documented in-depth at ",(0,s.kt)("a",{parentName:"p",href:"/protocol/census/on-chain/census3#creating-a-strategy"},"Creating a Strategy"),"."),(0,s.kt)("p",null,"You can also query the census3 service for a list of available operators:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const operators = await census3Client.getSupportedOperators();\nconsole.log(operators);\n")),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-bash"},"[\n {\n description: 'AND logical operator that returns the common token holders between symbols with fixed balance to 1',\n tag: 'AND'\n },\n {\n description: 'AND:sum logical operator that returns the common token holders between symbols with the sum of their balances on both tokens',\n tag: 'AND:sum'\n },\n {\n description: 'AND:mul logical operator that returns the common token holders between symbols with the multiplication of their balances on both tokens',\n tag: 'AND:mul'\n },\n {\n description: 'OR logical operator that returns the token holders of both symbols with fixed balance to 1',\n tag: 'OR'\n },\n {\n description: 'OR:sum logical operator that returns the token holders of both symbols with the sum of their balances on both tokens',\n tag: 'OR:sum'\n },\n {\n description: 'OR:mul logical operator that returns the token holders of both symbols with the multiplication of their balances on both tokens',\n tag: 'OR:mul'\n }\n]\n")),(0,s.kt)("p",null,"As seen in the strategy example above, you can combine operators to create complex predicates with many tokens: "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'"predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)"\n')),(0,s.kt)("h2",{id:"creating-a-census"},"Creating a Census"),(0,s.kt)("p",null,"The first step in creating a complex census is to create the strategy itself. You can write a predicate with the operators defined above and use the predicate with ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/vocdonicensus3client#createstrategy"},(0,s.kt)("inlineCode",{parentName:"a"},"createStrategy()")),". The only requirement is that you include a list of the necessary tokens used by this predicate, including the token ",(0,s.kt)("inlineCode",{parentName:"p"},"ID")," (address), ",(0,s.kt)("inlineCode",{parentName:"p"},"chainID"),", and optionally the ",(0,s.kt)("inlineCode",{parentName:"p"},"minBalance")," (the minimum necessary balance to include a token-holder in a census)."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const strategyID = await census3Client.createStrategy('voc_test_strategy', 'VOC3TEST AND VOC3TEST3', {\n VOC3TEST: {\n ID: '0x9286d95DB5a59306113028EF0BA85bF7068A199F',\n chainID: 11155111,\n minBalance: '1',\n },\n VOC3TEST3: {\n ID: '0x61353Bc49B062EEe99F4768225f4e4f0df5DB1b9',\n chainID: 11155111,\n minBalance: '1',\n },\n});\n")),(0,s.kt)("p",null,"This API call, if successful, returns the ID of the newly-created strategy. You can also use ",(0,s.kt)("inlineCode",{parentName:"p"},"getStrategies()")," again to make sure the strategy is supported. This ID is needed to create the census based off of the strategy:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const censusInfo = await census3Client.createCensus(strategyID);\n")),(0,s.kt)("p",null,"This returns a set of information about the census but cannot be used to directly create an election. To do this, just manually create a ",(0,s.kt)("inlineCode",{parentName:"p"},"PublishedCensus"),"."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const census = new PublishedCensus(\n censusInfo.merkleRoot,\n censusInfo.uri,\n censusInfo.anonymous ? CensusType.ANONYMOUS : CensusType.WEIGHTED,\n censusInfo.size,\n BigInt(censusInfo.weight)\n);\n")),(0,s.kt)("p",null,"This census can be used to create an election just like any other. In this case, the census would represent all token-holders of the ",(0,s.kt)("inlineCode",{parentName:"p"},"VOC3TEST")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"VOC3TEST3")," tokens, all with a weight of 1."))}p.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[2872],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,s=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=c(n),h=s,m=d["".concat(l,".").concat(h)]||d[h]||u[h]||o;return n?a.createElement(m,r(r({ref:t},p),{},{components:n})):a.createElement(m,r({ref:t},p))}));function h(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=n.length,r=new Array(o);r[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:s,r[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var a=n(87462),s=(n(67294),n(3905));const o={},r="Complex Census",i={unversionedId:"sdk/integration-details/census-types/on-chain/complex-census",id:"sdk/integration-details/census-types/on-chain/complex-census",title:"Complex Census",description:"The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once.",source:"@site/docs/sdk/integration-details/census-types/on-chain/complex-census.md",sourceDirName:"sdk/integration-details/census-types/on-chain",slug:"/sdk/integration-details/census-types/on-chain/complex-census",permalink:"/sdk/integration-details/census-types/on-chain/complex-census",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"On-chain Token-Based Census",permalink:"/sdk/integration-details/census-types/on-chain/"},next:{title:"Vocdoni Tokens",permalink:"/sdk/integration-details/vocdoni-tokens"}},l={},c=[{value:"Strategies",id:"strategies",level:2},{value:"Predicates",id:"predicates",level:2},{value:"Creating a Census",id:"creating-a-census",level:2}],p={toc:c};function u(e){let{components:t,...n}=e;return(0,s.kt)("wrapper",(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"complex-census"},"Complex Census"),(0,s.kt)("p",null,"The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once."),(0,s.kt)("h2",{id:"strategies"},"Strategies"),(0,s.kt)("p",null,"The logic that defines inclusion in a token-based census is called a 'strategy.' For the basic token-holder use case, the strategy is defined solely by that token. ",(0,s.kt)("inlineCode",{parentName:"p"},"createTokenCensus")," chooses the default strategy for that token, so for a basic token-based census you don't need to worry about strategies at all."),(0,s.kt)("p",null,'More complex strategies exist, however, such as "holders of both ',(0,s.kt)("inlineCode",{parentName:"p"},"VOC1")," token AND ",(0,s.kt)("inlineCode",{parentName:"p"},"VOC2"),' token."'),(0,s.kt)("p",null,"Just like checking for supported tokens, you can see a list of the strategies supported by the census3 service:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const strategies = await census3Client.getStrategies();\nconsole.log(JSON.stringify(strategies, null, 4));\n")),(0,s.kt)("p",null,"This will print a long list of strategies. Some of them will be basic strategies for a single token:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-bash"},'...\n {\n "ID": 72,\n "alias": "Default strategy for token VOC3TEST",\n "predicate": "VOC3TEST",\n "uri": "ipfs://bafybeih7rmjsdzqjr6pyjv46jo4kjpl3qfv2yufpdxzmcw2j63z47u6czy",\n "tokens": {\n "VOC3TEST": {\n "ID": "0x9286d95DB5a59306113028EF0BA85bF7068A199F",\n "chainID": 11155111,\n "minBalance": "1",\n "chainAddress": "sep:0x9286d95DB5a59306113028EF0BA85bF7068A199F"\n }\n }\n },\n...\n')),(0,s.kt)("p",null,"Some, on the other hand, will be more complex strategies involving multiple tokens:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-bash"},'...\n {\n "ID": 103,\n "alias": "gitcoin_onvote_1711040172449",\n "predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)",\n "uri": "ipfs://bafybeidopynxc746oorzkh7yvhomcw56w72aaw3klqce4gkjcczc7ry3uu",\n "tokens": {\n "GPS": {\n "ID": "0x000000000000000000000000000000000000006C",\n "chainID": 1,\n "minBalance": "16",\n "chainAddress": "eth:0x000000000000000000000000000000000000006C"\n },\n "GPS:Discord": {\n "ID": "0x000000000000000000000000000000000000006C",\n "chainID": 1,\n "minBalance": "1",\n "chainAddress": "eth:0x000000000000000000000000000000000000006C",\n "externalID": "Discord"\n },\n "GPS:Github": {\n "ID": "0x000000000000000000000000000000000000006C",\n "chainID": 1,\n "minBalance": "1",\n "chainAddress": "eth:0x000000000000000000000000000000000000006C",\n "externalID": "Github"\n }\n }\n },\n...\n')),(0,s.kt)("h2",{id:"predicates"},"Predicates"),(0,s.kt)("p",null,"As you can see, there are two main differences between the simple and complex strategies: the ",(0,s.kt)("inlineCode",{parentName:"p"},"predicate")," and the ",(0,s.kt)("inlineCode",{parentName:"p"},"tokens"),". "),(0,s.kt)("p",null,"Predicates are logical operators that define how strategies create a census. There are currently two logical operators (",(0,s.kt)("inlineCode",{parentName:"p"},"AND")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"OR"),"), each with two additional 'powerups' (",(0,s.kt)("inlineCode",{parentName:"p"},"sum")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"mul"),")."),(0,s.kt)("p",null,"The predicate syntax and available operators are documented in-depth at ",(0,s.kt)("a",{parentName:"p",href:"/protocol/census/on-chain/census3#creating-a-strategy"},"Creating a Strategy"),"."),(0,s.kt)("p",null,"You can also query the census3 service for a list of available operators:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const operators = await census3Client.getSupportedOperators();\nconsole.log(operators);\n")),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-bash"},"[\n {\n description: 'AND logical operator that returns the common token holders between symbols with fixed balance to 1',\n tag: 'AND'\n },\n {\n description: 'AND:sum logical operator that returns the common token holders between symbols with the sum of their balances on both tokens',\n tag: 'AND:sum'\n },\n {\n description: 'AND:mul logical operator that returns the common token holders between symbols with the multiplication of their balances on both tokens',\n tag: 'AND:mul'\n },\n {\n description: 'OR logical operator that returns the token holders of both symbols with fixed balance to 1',\n tag: 'OR'\n },\n {\n description: 'OR:sum logical operator that returns the token holders of both symbols with the sum of their balances on both tokens',\n tag: 'OR:sum'\n },\n {\n description: 'OR:mul logical operator that returns the token holders of both symbols with the multiplication of their balances on both tokens',\n tag: 'OR:mul'\n }\n]\n")),(0,s.kt)("p",null,"As seen in the strategy example above, you can combine operators to create complex predicates with many tokens: "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'"predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)"\n')),(0,s.kt)("h2",{id:"creating-a-census"},"Creating a Census"),(0,s.kt)("p",null,"The first step in creating a complex census is to create the strategy itself. You can write a predicate with the operators defined above and use the predicate with ",(0,s.kt)("a",{parentName:"p",href:"/sdk/reference/classes/vocdonicensus3client#createstrategy"},(0,s.kt)("inlineCode",{parentName:"a"},"createStrategy()")),". The only requirement is that you include a list of the necessary tokens used by this predicate, including the token ",(0,s.kt)("inlineCode",{parentName:"p"},"ID")," (address), ",(0,s.kt)("inlineCode",{parentName:"p"},"chainID"),", and optionally the ",(0,s.kt)("inlineCode",{parentName:"p"},"minBalance")," (the minimum necessary balance to include a token-holder in a census)."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const strategyID = await census3Client.createStrategy('voc_test_strategy', 'VOC3TEST AND VOC3TEST2', {\n VOC3TEST: {\n ID: '0x9286d95DB5a59306113028EF0BA85bF7068A199F',\n chainID: 11155111,\n minBalance: '1',\n },\n VOC3TEST2: {\n ID: '0x61353Bc49B062EEe99F4768225f4e4f0df5DB1b9',\n chainID: 11155111,\n minBalance: '1',\n },\n});\n")),(0,s.kt)("p",null,"This API call, if successful, returns the ID of the newly-created strategy. You can also use ",(0,s.kt)("inlineCode",{parentName:"p"},"getStrategies()")," again to make sure the strategy is supported. This ID is needed to create the census based off of the strategy:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-ts"},"const census = await census3Client.createStrategyCensus(strategyID);\n")),(0,s.kt)("p",null,"This returns a census can be used to create an election just like any other. In this case, the census would represent all token-holders of the ",(0,s.kt)("inlineCode",{parentName:"p"},"VOC3TEST")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"VOC3TEST3")," tokens, all with a weight of 1. The selected strategy is displayed in the ",(0,s.kt)("inlineCode",{parentName:"p"},"meta")," field of a token-based election."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.b3411c4f.js b/assets/js/runtime~main.a9db251a.js similarity index 98% rename from assets/js/runtime~main.b3411c4f.js rename to assets/js/runtime~main.a9db251a.js index fc30987ec..4374c4498 100644 --- a/assets/js/runtime~main.b3411c4f.js +++ b/assets/js/runtime~main.a9db251a.js @@ -1 +1 @@ -(()=>{"use strict";var e,d,f,a,c,b={},t={};function r(e){var d=t[e];if(void 0!==d)return d.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=b,r.amdO={},e=[],r.O=(d,f,a,c)=>{if(!f){var b=1/0;for(i=0;i=c)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[f,a,c]},r.n=e=>{var d=e&&e.__esModule?()=>e.default:()=>e;return r.d(d,{a:d}),d},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var c=Object.create(null);r.r(c);var b={};d=d||[null,f({}),f([]),f(f)];for(var t=2&a&&e;"object"==typeof t&&!~d.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((d=>b[d]=()=>e[d]));return b.default=()=>e,r.d(c,b),c},r.d=(e,d)=>{for(var f in d)r.o(d,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:d[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((d,f)=>(r.f[f](e,d),d)),[])),r.u=e=>"assets/js/"+({47:"bddc6002",53:"935f2afb",67:"d94ccd67",100:"0032f96f",135:"491af8ad",173:"df5c78e6",182:"c12940ed",211:"bec6d9ae",248:"e7df0fec",260:"aab6ad66",274:"2f59b2ef",297:"ae74964d",306:"39a96d3a",374:"08636a24",422:"c626f2cc",469:"e6e6cd34",522:"7acd0d27",534:"11bcc7e5",656:"3da0b0fe",674:"4f59b7e9",689:"5945b6f4",738:"134f4ebc",830:"15bb616c",848:"ac57e32f",891:"576aa68d",992:"ffeeb722",1011:"b7def961",1054:"d79e07b2",1084:"e07651bc",1094:"9f9eec24",1117:"fd8596db",1126:"9029ef47",1132:"fe9260cd",1142:"dfccb580",1173:"db5a5176",1187:"4f32f676",1205:"5125b704",1270:"b2b5a0c0",1290:"99a9ad46",1317:"f64e1fa2",1357:"d970501b",1371:"0fa69d70",1378:"d6b477f2",1414:"1c3bce93",1425:"11667d91",1510:"1821d9d7",1528:"d8c91af8",1557:"59d5b983",1573:"7c0d6738",1591:"47d20a96",1597:"c8cd88a5",1655:"71f8faad",1738:"dae27e03",1739:"123fab3b",1786:"d71b54cc",1806:"8b196d05",1865:"c2c73492",1871:"65e31fed",1893:"4c5e977b",1935:"d2ab4b32",1966:"a2cbb706",1968:"b0d01e95",2005:"d7d13fd1",2050:"ec0516f7",2079:"7365c198",2116:"54a4f78f",2175:"d8c992a6",2184:"8b5652a7",2192:"57136864",2226:"e7ebf400",2241:"ff7cb792",2277:"6aeb5732",2323:"5383e2bf",2329:"dded7333",2360:"2eb5a7fb",2367:"fbd96b78",2428:"1d5be7b1",2467:"0f556ffa",2470:"e9c5307c",2551:"8a23d602",2600:"999cbc12",2609:"63e7154e",2636:"0128e05f",2691:"de66f94a",2733:"fe008fee",2756:"0af2e8f6",2827:"404eb028",2832:"ea74a8a9",2859:"b491e6b8",2870:"109756a8",2872:"e24c431f",2931:"8ed7db60",2956:"7ccdd76e",2975:"f77e462c",3013:"d5851cb1",3021:"6846a7ba",3023:"b0b03425",3038:"64aa0b9a",3044:"d46fdf20",3082:"46b36dc0",3086:"d6e648af",3158:"467b2519",3168:"3930cc8a",3195:"c121c8d5",3204:"5c4d0554",3227:"835897f5",3237:"1df93b7f",3334:"a21738db",3496:"ae785ce1",3516:"377fc202",3625:"3c152c78",3665:"f601f941",3706:"54bc495f",3754:"d4ce7faf",3773:"74b5ba26",3786:"ef46077c",3796:"437ed742",3802:"65d7ebf2",3868:"3aefc2b6",3913:"080a9ee7",3987:"f50a63d5",4013:"47d37469",4019:"d95cd4ff",4108:"ea27d690",4182:"5c98d4ea",4183:"aa9e799f",4201:"d28adde9",4243:"f9b740ff",4246:"64c2e320",4253:"4d61d27d",4259:"c4573554",4324:"c84aae18",4376:"2340828a",4463:"29c8ca5d",4519:"5344dd0e",4539:"5954c450",4540:"335f69d6",4600:"ad99c2e7",4635:"ee2798c9",4674:"c87cc133",4719:"1e6527e1",4720:"03c6674d",4721:"af663d33",4792:"efcaecf7",4805:"93908748",4820:"9ea3e4a5",4881:"1e8e5e9a",5058:"9f384d53",5104:"945f0be5",5122:"0a3f3d31",5210:"8db7ed3c",5214:"260b3d09",5220:"fc1a6383",5253:"0fc92a72",5268:"22155637",5277:"4bef2fb3",5288:"1edcfddb",5326:"24ee6be4",5347:"ed25d525",5378:"2dbb09aa",5421:"7644a8b6",5469:"900ced3f",5470:"9728e091",5487:"8d8eb18d",5580:"af55f10e",5596:"6a02f24e",5642:"fc158ac8",5673:"25c97383",5677:"d250e750",5698:"99ffa32d",5861:"5708b463",5882:"4b742bf9",5909:"4a1ec646",5913:"fcca6750",5978:"3b56eb8e",5995:"78bbaf06",6133:"0ce9971d",6135:"8e01bad3",6142:"d9f2d88a",6178:"29694922",6204:"59e232ee",6220:"e20b99b5",6349:"f116289e",6354:"925c0bed",6386:"a217fb3c",6412:"a674c74b",6418:"16e8ae75",6425:"af3402af",6483:"effdce5d",6499:"13df6360",6563:"6b41ffc9",6567:"9611c1ba",6686:"cce83bc5",6689:"8a92166d",6723:"a7835d3e",6781:"01f4109f",6811:"00ff508f",6873:"dffc9575",6891:"0bcfcae9",6906:"6bf5cd43",6956:"6a011cfc",6990:"5ddc4d53",7037:"518b90c0",7055:"b16aadd2",7071:"d4d2d783",7082:"6d3dfbcd",7136:"515de0d7",7165:"ed887fb8",7347:"a87232fc",7374:"783013b2",7454:"21fe5cbf",7456:"445f6f2d",7493:"10dce6d4",7533:"16c4bb07",7583:"49b14676",7592:"b8b370b8",7612:"ace89945",7631:"b3153972",7673:"787465aa",7694:"c5434c58",7799:"bfbab14f",7813:"6b697fd9",7862:"a7c28e13",7920:"1a4e3797",7926:"1302233f",7998:"1ed63671",8004:"80975cc5",8016:"23e9e137",8033:"4adb919a",8048:"dcb8c93b",8119:"545dbd82",8149:"b80cad64",8161:"caece487",8168:"6b798853",8180:"94050a54",8253:"fe83dea5",8257:"e1594dfa",8277:"d234883f",8389:"7b4f5a52",8399:"8ec8cf1f",8493:"ed5700b4",8545:"1cd58b57",8597:"2730d8e4",8740:"3b8a1714",8756:"f8d5f1d3",8759:"11d03c56",8882:"4f61726b",8883:"705711d3",8913:"427be892",8930:"70e3ad0d",8976:"8d68bc4a",8999:"388546f3",9057:"4e2de210",9097:"b7cc9ed0",9128:"9e4ccdce",9184:"79e28b2f",9192:"fc441bf1",9202:"4d66e9ad",9203:"e0557e97",9209:"5977a97c",9217:"3fa72254",9229:"b83e4bd7",9232:"b212ee85",9347:"5f8415ed",9379:"ddb99459",9410:"09cca914",9470:"6b74149a",9514:"1be78505",9589:"b5881b04",9671:"0e384e19",9694:"9b026235",9756:"b862b811",9849:"e3461e1c",9875:"e964279c",9940:"92348782",9942:"725284f7",9967:"03d8c746"}[e]||e)+"."+{47:"9ca95f5b",53:"f323c678",67:"19e47ad6",100:"8143ca91",135:"d3b16a06",173:"086adaed",182:"ea0e6428",211:"c1b394ae",248:"34687bc6",260:"6fedf50b",274:"b21cbb3d",297:"0a840e1c",306:"fb532f7a",374:"d9dba056",422:"7b40f66d",469:"4094ce40",522:"1607213e",534:"b3b22741",656:"f3f73c3d",674:"66780907",689:"46a216f4",738:"99bbe153",830:"5ec6b582",848:"0b4e1756",891:"29c1031e",992:"f680bf1c",1011:"76601344",1054:"b20f833a",1084:"e725b53a",1094:"c92f7ef3",1117:"c3053c9b",1126:"922aa1eb",1132:"3d372225",1142:"ab437776",1173:"4d153375",1187:"f982f11f",1205:"efae5873",1270:"e379dee7",1290:"c9ca9aa1",1317:"7b11faae",1357:"5e3c81bf",1371:"2b9c2f13",1378:"6ef24540",1414:"fda488f0",1425:"3b72dcdc",1510:"4a981fa5",1528:"0da8ebf7",1557:"71b5a3f0",1573:"a0caf6c4",1591:"b9274118",1597:"b6c41e15",1655:"982338c1",1738:"62cd1f33",1739:"a083e977",1786:"440099dd",1806:"1b9e26cd",1865:"4ae558c4",1871:"fa60a062",1893:"44f245e4",1935:"e6923c35",1966:"4841e98a",1968:"e2153dc7",2005:"29248ba5",2050:"6cec812a",2079:"5cbfcd46",2116:"7fd3616d",2175:"ee7c8df2",2184:"c922196d",2192:"3a947d0a",2226:"27c3ff88",2241:"7021c5db",2277:"ee29d770",2284:"f53edd07",2323:"f4777c60",2329:"3814f812",2360:"ce5744dd",2367:"8a3801d9",2428:"dc680d4c",2467:"973c6567",2470:"b7d23a90",2551:"3221e6d3",2600:"c6c50d40",2609:"90935b54",2636:"c715c0dc",2691:"c9fc39fd",2733:"afe02eae",2756:"f327654b",2827:"926ffc64",2832:"4ffc12ca",2859:"2a43bd49",2870:"8ee02337",2872:"70c28301",2931:"9185bd82",2956:"c9b7d867",2975:"ac2d855f",3013:"9cd21f69",3021:"31b890f7",3023:"fc8239c7",3038:"1f0b1c50",3044:"7adf0f9c",3082:"080e3f08",3086:"5470238d",3158:"20f03033",3168:"fe35a089",3195:"99ea9065",3204:"6b187dd8",3227:"2560cb82",3237:"c2bd2738",3334:"ca512a6b",3496:"fa1f3b94",3516:"86dcf2b2",3625:"101705de",3665:"df975761",3706:"261c6427",3750:"9c762273",3754:"95dcb56a",3773:"1d9653a1",3786:"1f80b3c2",3796:"ec4ed7df",3802:"128c3a17",3849:"c1dab010",3868:"1f4c6549",3913:"513675e2",3987:"658b39ff",4013:"5181bb2b",4019:"cb8c2e9f",4108:"d6b665c1",4182:"24528c62",4183:"5fdc864b",4201:"61ef31b4",4243:"602e8aff",4246:"75481cc5",4253:"9f05a97c",4259:"aa15c68f",4324:"2bb3c1af",4376:"de99ed8d",4463:"fc43b64d",4519:"1dc03d01",4539:"6305f34e",4540:"898366dc",4600:"a98c185c",4635:"1c940824",4674:"e369ef6b",4719:"7953cf6d",4720:"ece84c8b",4721:"be152df9",4792:"3340e6a5",4805:"55cc6f1b",4820:"2640dc57",4881:"1ecdc602",4972:"a1407955",5058:"1cade3d4",5104:"578a6e14",5122:"21c9ba82",5210:"91a5cddd",5214:"0a2cf9fb",5220:"64e6ad7b",5253:"a5dfbe50",5268:"ed881385",5277:"dc40082e",5288:"d5bf8aca",5326:"7a2b35a1",5347:"34cbef9c",5378:"055c8460",5421:"b2bd439c",5469:"726967e9",5470:"c0cb931b",5487:"0c8db86a",5580:"b047af32",5596:"304e8c05",5642:"018b0bd1",5673:"f3231357",5677:"7908fbcc",5698:"ca885f06",5861:"c60777e4",5882:"77485e6e",5909:"7a3fa26e",5913:"6ab3da63",5978:"1ede3679",5995:"d3323e91",6057:"1dee8281",6133:"30d7dda2",6135:"c653b3f0",6142:"c3db47e0",6178:"b8af4a05",6204:"41ef5e52",6220:"1b3ac2b7",6349:"37463805",6354:"8f46cc44",6386:"8e8e3b55",6412:"8560d493",6418:"e9887111",6425:"fc9a5a33",6483:"9526610f",6499:"e05ab8a6",6563:"158534c9",6567:"088e6a2d",6686:"d9168be9",6689:"7ddde9eb",6723:"3f4d912a",6780:"ced0dfaf",6781:"4ce59af9",6811:"7e2216fa",6873:"949148ad",6882:"f806a2af",6891:"7f539b97",6906:"94eee830",6945:"316f91de",6956:"c0142071",6990:"becbb39b",7037:"d18e7d71",7055:"0d579216",7071:"26afd096",7082:"6cf870e5",7136:"10ef946d",7165:"cd9b93dc",7347:"3e4fc5cb",7374:"dd2f4170",7454:"a09f4995",7456:"6c3e7826",7493:"e1d111d5",7533:"d342a6b5",7583:"20851354",7592:"e3257804",7612:"01f0d9fe",7631:"a5b879c1",7673:"b225e000",7694:"be41a059",7799:"179a9719",7813:"1184cb32",7862:"40fad2a9",7920:"affc72c9",7926:"f3c9a0f0",7998:"a2a42e49",8004:"c869bf2f",8016:"c0346236",8033:"182975a4",8048:"5fc165f9",8119:"426988eb",8149:"65b0a0b3",8161:"387f4295",8168:"7103efea",8180:"f37159fe",8253:"4947cfb5",8257:"ae037dd7",8277:"b0f80fd5",8389:"32597e34",8399:"2c041906",8493:"ea0d0747",8545:"5595aca5",8597:"63e982c2",8740:"31123a79",8756:"0c3d26f5",8759:"ec0c844c",8882:"87a165f1",8883:"790ef05c",8894:"7edbb6c9",8913:"201b1acd",8930:"53e654a0",8976:"d78e71b1",8999:"06ee90aa",9052:"a20c6099",9057:"a00aa087",9097:"6db3b6e7",9128:"879c72ce",9184:"016cb049",9192:"3b135463",9202:"2d2a0407",9203:"01a37119",9209:"b25d9b86",9217:"af4e2c09",9229:"6664ad23",9232:"b8670774",9347:"dee91760",9379:"eb7ff1f0",9410:"11d4fab2",9470:"eaa4c3dc",9514:"cc715246",9589:"cb85772e",9671:"c68aeaec",9694:"3e4475e4",9756:"53777f76",9849:"9e442403",9875:"196867be",9940:"c1f83678",9942:"91025a12",9967:"a4c91323"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,d)=>Object.prototype.hasOwnProperty.call(e,d),a={},c="demo:",r.l=(e,d,f,b)=>{if(a[e])a[e].push(d);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var c=a[e];if(delete a[e],t.parentNode&&t.parentNode.removeChild(t),c&&c.forEach((e=>e(f))),d)return d(f)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",r.gca=function(e){return e={22155637:"5268",29694922:"6178",57136864:"2192",92348782:"9940",93908748:"4805",bddc6002:"47","935f2afb":"53",d94ccd67:"67","0032f96f":"100","491af8ad":"135",df5c78e6:"173",c12940ed:"182",bec6d9ae:"211",e7df0fec:"248",aab6ad66:"260","2f59b2ef":"274",ae74964d:"297","39a96d3a":"306","08636a24":"374",c626f2cc:"422",e6e6cd34:"469","7acd0d27":"522","11bcc7e5":"534","3da0b0fe":"656","4f59b7e9":"674","5945b6f4":"689","134f4ebc":"738","15bb616c":"830",ac57e32f:"848","576aa68d":"891",ffeeb722:"992",b7def961:"1011",d79e07b2:"1054",e07651bc:"1084","9f9eec24":"1094",fd8596db:"1117","9029ef47":"1126",fe9260cd:"1132",dfccb580:"1142",db5a5176:"1173","4f32f676":"1187","5125b704":"1205",b2b5a0c0:"1270","99a9ad46":"1290",f64e1fa2:"1317",d970501b:"1357","0fa69d70":"1371",d6b477f2:"1378","1c3bce93":"1414","11667d91":"1425","1821d9d7":"1510",d8c91af8:"1528","59d5b983":"1557","7c0d6738":"1573","47d20a96":"1591",c8cd88a5:"1597","71f8faad":"1655",dae27e03:"1738","123fab3b":"1739",d71b54cc:"1786","8b196d05":"1806",c2c73492:"1865","65e31fed":"1871","4c5e977b":"1893",d2ab4b32:"1935",a2cbb706:"1966",b0d01e95:"1968",d7d13fd1:"2005",ec0516f7:"2050","7365c198":"2079","54a4f78f":"2116",d8c992a6:"2175","8b5652a7":"2184",e7ebf400:"2226",ff7cb792:"2241","6aeb5732":"2277","5383e2bf":"2323",dded7333:"2329","2eb5a7fb":"2360",fbd96b78:"2367","1d5be7b1":"2428","0f556ffa":"2467",e9c5307c:"2470","8a23d602":"2551","999cbc12":"2600","63e7154e":"2609","0128e05f":"2636",de66f94a:"2691",fe008fee:"2733","0af2e8f6":"2756","404eb028":"2827",ea74a8a9:"2832",b491e6b8:"2859","109756a8":"2870",e24c431f:"2872","8ed7db60":"2931","7ccdd76e":"2956",f77e462c:"2975",d5851cb1:"3013","6846a7ba":"3021",b0b03425:"3023","64aa0b9a":"3038",d46fdf20:"3044","46b36dc0":"3082",d6e648af:"3086","467b2519":"3158","3930cc8a":"3168",c121c8d5:"3195","5c4d0554":"3204","835897f5":"3227","1df93b7f":"3237",a21738db:"3334",ae785ce1:"3496","377fc202":"3516","3c152c78":"3625",f601f941:"3665","54bc495f":"3706",d4ce7faf:"3754","74b5ba26":"3773",ef46077c:"3786","437ed742":"3796","65d7ebf2":"3802","3aefc2b6":"3868","080a9ee7":"3913",f50a63d5:"3987","47d37469":"4013",d95cd4ff:"4019",ea27d690:"4108","5c98d4ea":"4182",aa9e799f:"4183",d28adde9:"4201",f9b740ff:"4243","64c2e320":"4246","4d61d27d":"4253",c4573554:"4259",c84aae18:"4324","2340828a":"4376","29c8ca5d":"4463","5344dd0e":"4519","5954c450":"4539","335f69d6":"4540",ad99c2e7:"4600",ee2798c9:"4635",c87cc133:"4674","1e6527e1":"4719","03c6674d":"4720",af663d33:"4721",efcaecf7:"4792","9ea3e4a5":"4820","1e8e5e9a":"4881","9f384d53":"5058","945f0be5":"5104","0a3f3d31":"5122","8db7ed3c":"5210","260b3d09":"5214",fc1a6383:"5220","0fc92a72":"5253","4bef2fb3":"5277","1edcfddb":"5288","24ee6be4":"5326",ed25d525:"5347","2dbb09aa":"5378","7644a8b6":"5421","900ced3f":"5469","9728e091":"5470","8d8eb18d":"5487",af55f10e:"5580","6a02f24e":"5596",fc158ac8:"5642","25c97383":"5673",d250e750:"5677","99ffa32d":"5698","5708b463":"5861","4b742bf9":"5882","4a1ec646":"5909",fcca6750:"5913","3b56eb8e":"5978","78bbaf06":"5995","0ce9971d":"6133","8e01bad3":"6135",d9f2d88a:"6142","59e232ee":"6204",e20b99b5:"6220",f116289e:"6349","925c0bed":"6354",a217fb3c:"6386",a674c74b:"6412","16e8ae75":"6418",af3402af:"6425",effdce5d:"6483","13df6360":"6499","6b41ffc9":"6563","9611c1ba":"6567",cce83bc5:"6686","8a92166d":"6689",a7835d3e:"6723","01f4109f":"6781","00ff508f":"6811",dffc9575:"6873","0bcfcae9":"6891","6bf5cd43":"6906","6a011cfc":"6956","5ddc4d53":"6990","518b90c0":"7037",b16aadd2:"7055",d4d2d783:"7071","6d3dfbcd":"7082","515de0d7":"7136",ed887fb8:"7165",a87232fc:"7347","783013b2":"7374","21fe5cbf":"7454","445f6f2d":"7456","10dce6d4":"7493","16c4bb07":"7533","49b14676":"7583",b8b370b8:"7592",ace89945:"7612",b3153972:"7631","787465aa":"7673",c5434c58:"7694",bfbab14f:"7799","6b697fd9":"7813",a7c28e13:"7862","1a4e3797":"7920","1302233f":"7926","1ed63671":"7998","80975cc5":"8004","23e9e137":"8016","4adb919a":"8033",dcb8c93b:"8048","545dbd82":"8119",b80cad64:"8149",caece487:"8161","6b798853":"8168","94050a54":"8180",fe83dea5:"8253",e1594dfa:"8257",d234883f:"8277","7b4f5a52":"8389","8ec8cf1f":"8399",ed5700b4:"8493","1cd58b57":"8545","2730d8e4":"8597","3b8a1714":"8740",f8d5f1d3:"8756","11d03c56":"8759","4f61726b":"8882","705711d3":"8883","427be892":"8913","70e3ad0d":"8930","8d68bc4a":"8976","388546f3":"8999","4e2de210":"9057",b7cc9ed0:"9097","9e4ccdce":"9128","79e28b2f":"9184",fc441bf1:"9192","4d66e9ad":"9202",e0557e97:"9203","5977a97c":"9209","3fa72254":"9217",b83e4bd7:"9229",b212ee85:"9232","5f8415ed":"9347",ddb99459:"9379","09cca914":"9410","6b74149a":"9470","1be78505":"9514",b5881b04:"9589","0e384e19":"9671","9b026235":"9694",b862b811:"9756",e3461e1c:"9849",e964279c:"9875","725284f7":"9942","03d8c746":"9967"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(d,f)=>{var a=r.o(e,d)?e[d]:void 0;if(0!==a)if(a)f.push(a[2]);else if(/^(1303|532)$/.test(d))e[d]=0;else{var c=new Promise(((f,c)=>a=e[d]=[f,c]));f.push(a[2]=c);var b=r.p+r.u(d),t=new Error;r.l(b,(f=>{if(r.o(e,d)&&(0!==(a=e[d])&&(e[d]=void 0),a)){var c=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;t.message="Loading chunk "+d+" failed.\n("+c+": "+b+")",t.name="ChunkLoadError",t.type=c,t.request=b,a[1](t)}}),"chunk-"+d,d)}},r.O.j=d=>0===e[d];var d=(d,f)=>{var a,c,b=f[0],t=f[1],o=f[2],n=0;if(b.some((d=>0!==e[d]))){for(a in t)r.o(t,a)&&(r.m[a]=t[a]);if(o)var i=o(r)}for(d&&d(f);n{"use strict";var e,d,f,a,c,b={},t={};function r(e){var d=t[e];if(void 0!==d)return d.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=b,r.amdO={},e=[],r.O=(d,f,a,c)=>{if(!f){var b=1/0;for(i=0;i=c)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[f,a,c]},r.n=e=>{var d=e&&e.__esModule?()=>e.default:()=>e;return r.d(d,{a:d}),d},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var c=Object.create(null);r.r(c);var b={};d=d||[null,f({}),f([]),f(f)];for(var t=2&a&&e;"object"==typeof t&&!~d.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((d=>b[d]=()=>e[d]));return b.default=()=>e,r.d(c,b),c},r.d=(e,d)=>{for(var f in d)r.o(d,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:d[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((d,f)=>(r.f[f](e,d),d)),[])),r.u=e=>"assets/js/"+({47:"bddc6002",53:"935f2afb",67:"d94ccd67",100:"0032f96f",135:"491af8ad",173:"df5c78e6",182:"c12940ed",211:"bec6d9ae",248:"e7df0fec",260:"aab6ad66",274:"2f59b2ef",297:"ae74964d",306:"39a96d3a",374:"08636a24",422:"c626f2cc",469:"e6e6cd34",522:"7acd0d27",534:"11bcc7e5",656:"3da0b0fe",674:"4f59b7e9",689:"5945b6f4",738:"134f4ebc",830:"15bb616c",848:"ac57e32f",891:"576aa68d",992:"ffeeb722",1011:"b7def961",1054:"d79e07b2",1084:"e07651bc",1094:"9f9eec24",1117:"fd8596db",1126:"9029ef47",1132:"fe9260cd",1142:"dfccb580",1173:"db5a5176",1187:"4f32f676",1205:"5125b704",1270:"b2b5a0c0",1290:"99a9ad46",1317:"f64e1fa2",1357:"d970501b",1371:"0fa69d70",1378:"d6b477f2",1414:"1c3bce93",1425:"11667d91",1510:"1821d9d7",1528:"d8c91af8",1557:"59d5b983",1573:"7c0d6738",1591:"47d20a96",1597:"c8cd88a5",1655:"71f8faad",1738:"dae27e03",1739:"123fab3b",1786:"d71b54cc",1806:"8b196d05",1865:"c2c73492",1871:"65e31fed",1893:"4c5e977b",1935:"d2ab4b32",1966:"a2cbb706",1968:"b0d01e95",2005:"d7d13fd1",2050:"ec0516f7",2079:"7365c198",2116:"54a4f78f",2175:"d8c992a6",2184:"8b5652a7",2192:"57136864",2226:"e7ebf400",2241:"ff7cb792",2277:"6aeb5732",2323:"5383e2bf",2329:"dded7333",2360:"2eb5a7fb",2367:"fbd96b78",2428:"1d5be7b1",2467:"0f556ffa",2470:"e9c5307c",2551:"8a23d602",2600:"999cbc12",2609:"63e7154e",2636:"0128e05f",2691:"de66f94a",2733:"fe008fee",2756:"0af2e8f6",2827:"404eb028",2832:"ea74a8a9",2859:"b491e6b8",2870:"109756a8",2872:"e24c431f",2931:"8ed7db60",2956:"7ccdd76e",2975:"f77e462c",3013:"d5851cb1",3021:"6846a7ba",3023:"b0b03425",3038:"64aa0b9a",3044:"d46fdf20",3082:"46b36dc0",3086:"d6e648af",3158:"467b2519",3168:"3930cc8a",3195:"c121c8d5",3204:"5c4d0554",3227:"835897f5",3237:"1df93b7f",3334:"a21738db",3496:"ae785ce1",3516:"377fc202",3625:"3c152c78",3665:"f601f941",3706:"54bc495f",3754:"d4ce7faf",3773:"74b5ba26",3786:"ef46077c",3796:"437ed742",3802:"65d7ebf2",3868:"3aefc2b6",3913:"080a9ee7",3987:"f50a63d5",4013:"47d37469",4019:"d95cd4ff",4108:"ea27d690",4182:"5c98d4ea",4183:"aa9e799f",4201:"d28adde9",4243:"f9b740ff",4246:"64c2e320",4253:"4d61d27d",4259:"c4573554",4324:"c84aae18",4376:"2340828a",4463:"29c8ca5d",4519:"5344dd0e",4539:"5954c450",4540:"335f69d6",4600:"ad99c2e7",4635:"ee2798c9",4674:"c87cc133",4719:"1e6527e1",4720:"03c6674d",4721:"af663d33",4792:"efcaecf7",4805:"93908748",4820:"9ea3e4a5",4881:"1e8e5e9a",5058:"9f384d53",5104:"945f0be5",5122:"0a3f3d31",5210:"8db7ed3c",5214:"260b3d09",5220:"fc1a6383",5253:"0fc92a72",5268:"22155637",5277:"4bef2fb3",5288:"1edcfddb",5326:"24ee6be4",5347:"ed25d525",5378:"2dbb09aa",5421:"7644a8b6",5469:"900ced3f",5470:"9728e091",5487:"8d8eb18d",5580:"af55f10e",5596:"6a02f24e",5642:"fc158ac8",5673:"25c97383",5677:"d250e750",5698:"99ffa32d",5861:"5708b463",5882:"4b742bf9",5909:"4a1ec646",5913:"fcca6750",5978:"3b56eb8e",5995:"78bbaf06",6133:"0ce9971d",6135:"8e01bad3",6142:"d9f2d88a",6178:"29694922",6204:"59e232ee",6220:"e20b99b5",6349:"f116289e",6354:"925c0bed",6386:"a217fb3c",6412:"a674c74b",6418:"16e8ae75",6425:"af3402af",6483:"effdce5d",6499:"13df6360",6563:"6b41ffc9",6567:"9611c1ba",6686:"cce83bc5",6689:"8a92166d",6723:"a7835d3e",6781:"01f4109f",6811:"00ff508f",6873:"dffc9575",6891:"0bcfcae9",6906:"6bf5cd43",6956:"6a011cfc",6990:"5ddc4d53",7037:"518b90c0",7055:"b16aadd2",7071:"d4d2d783",7082:"6d3dfbcd",7136:"515de0d7",7165:"ed887fb8",7347:"a87232fc",7374:"783013b2",7454:"21fe5cbf",7456:"445f6f2d",7493:"10dce6d4",7533:"16c4bb07",7583:"49b14676",7592:"b8b370b8",7612:"ace89945",7631:"b3153972",7673:"787465aa",7694:"c5434c58",7799:"bfbab14f",7813:"6b697fd9",7862:"a7c28e13",7920:"1a4e3797",7926:"1302233f",7998:"1ed63671",8004:"80975cc5",8016:"23e9e137",8033:"4adb919a",8048:"dcb8c93b",8119:"545dbd82",8149:"b80cad64",8161:"caece487",8168:"6b798853",8180:"94050a54",8253:"fe83dea5",8257:"e1594dfa",8277:"d234883f",8389:"7b4f5a52",8399:"8ec8cf1f",8493:"ed5700b4",8545:"1cd58b57",8597:"2730d8e4",8740:"3b8a1714",8756:"f8d5f1d3",8759:"11d03c56",8882:"4f61726b",8883:"705711d3",8913:"427be892",8930:"70e3ad0d",8976:"8d68bc4a",8999:"388546f3",9057:"4e2de210",9097:"b7cc9ed0",9128:"9e4ccdce",9184:"79e28b2f",9192:"fc441bf1",9202:"4d66e9ad",9203:"e0557e97",9209:"5977a97c",9217:"3fa72254",9229:"b83e4bd7",9232:"b212ee85",9347:"5f8415ed",9379:"ddb99459",9410:"09cca914",9470:"6b74149a",9514:"1be78505",9589:"b5881b04",9671:"0e384e19",9694:"9b026235",9756:"b862b811",9849:"e3461e1c",9875:"e964279c",9940:"92348782",9942:"725284f7",9967:"03d8c746"}[e]||e)+"."+{47:"9ca95f5b",53:"4312d1cd",67:"19e47ad6",100:"8143ca91",135:"d3b16a06",173:"086adaed",182:"ea0e6428",211:"c1b394ae",248:"34687bc6",260:"6fedf50b",274:"b21cbb3d",297:"0a840e1c",306:"fb532f7a",374:"d9dba056",422:"7b40f66d",469:"4094ce40",522:"1607213e",534:"b3b22741",656:"f3f73c3d",674:"66780907",689:"46a216f4",738:"99bbe153",830:"5ec6b582",848:"0b4e1756",891:"29c1031e",992:"f680bf1c",1011:"76601344",1054:"b20f833a",1084:"e725b53a",1094:"c92f7ef3",1117:"c3053c9b",1126:"922aa1eb",1132:"3d372225",1142:"ab437776",1173:"4d153375",1187:"f982f11f",1205:"efae5873",1270:"e379dee7",1290:"c9ca9aa1",1317:"7b11faae",1357:"5e3c81bf",1371:"2b9c2f13",1378:"6ef24540",1414:"fda488f0",1425:"3b72dcdc",1510:"4a981fa5",1528:"0da8ebf7",1557:"71b5a3f0",1573:"a0caf6c4",1591:"b9274118",1597:"b6c41e15",1655:"982338c1",1738:"62cd1f33",1739:"a083e977",1786:"440099dd",1806:"1b9e26cd",1865:"4ae558c4",1871:"fa60a062",1893:"44f245e4",1935:"e6923c35",1966:"4841e98a",1968:"e2153dc7",2005:"29248ba5",2050:"6cec812a",2079:"5cbfcd46",2116:"7fd3616d",2175:"ee7c8df2",2184:"c922196d",2192:"3a947d0a",2226:"27c3ff88",2241:"7021c5db",2277:"ee29d770",2284:"f53edd07",2323:"f4777c60",2329:"3814f812",2360:"ce5744dd",2367:"8a3801d9",2428:"dc680d4c",2467:"973c6567",2470:"b7d23a90",2551:"3221e6d3",2600:"c6c50d40",2609:"90935b54",2636:"c715c0dc",2691:"c9fc39fd",2733:"afe02eae",2756:"f327654b",2827:"926ffc64",2832:"4ffc12ca",2859:"2a43bd49",2870:"8ee02337",2872:"443d80ae",2931:"9185bd82",2956:"c9b7d867",2975:"ac2d855f",3013:"9cd21f69",3021:"31b890f7",3023:"fc8239c7",3038:"1f0b1c50",3044:"7adf0f9c",3082:"080e3f08",3086:"5470238d",3158:"20f03033",3168:"fe35a089",3195:"99ea9065",3204:"6b187dd8",3227:"2560cb82",3237:"c2bd2738",3334:"ca512a6b",3496:"fa1f3b94",3516:"86dcf2b2",3625:"101705de",3665:"df975761",3706:"261c6427",3750:"9c762273",3754:"95dcb56a",3773:"1d9653a1",3786:"1f80b3c2",3796:"ec4ed7df",3802:"128c3a17",3849:"c1dab010",3868:"1f4c6549",3913:"513675e2",3987:"658b39ff",4013:"5181bb2b",4019:"cb8c2e9f",4108:"d6b665c1",4182:"24528c62",4183:"5fdc864b",4201:"61ef31b4",4243:"602e8aff",4246:"75481cc5",4253:"9f05a97c",4259:"aa15c68f",4324:"2bb3c1af",4376:"de99ed8d",4463:"fc43b64d",4519:"1dc03d01",4539:"6305f34e",4540:"898366dc",4600:"a98c185c",4635:"1c940824",4674:"e369ef6b",4719:"7953cf6d",4720:"ece84c8b",4721:"be152df9",4792:"3340e6a5",4805:"55cc6f1b",4820:"2640dc57",4881:"1ecdc602",4972:"a1407955",5058:"1cade3d4",5104:"578a6e14",5122:"21c9ba82",5210:"91a5cddd",5214:"0a2cf9fb",5220:"64e6ad7b",5253:"a5dfbe50",5268:"ed881385",5277:"dc40082e",5288:"d5bf8aca",5326:"7a2b35a1",5347:"34cbef9c",5378:"055c8460",5421:"b2bd439c",5469:"726967e9",5470:"606ff7ce",5487:"0c8db86a",5580:"b047af32",5596:"304e8c05",5642:"018b0bd1",5673:"f3231357",5677:"7908fbcc",5698:"ca885f06",5861:"c60777e4",5882:"77485e6e",5909:"cbd46be4",5913:"6ab3da63",5978:"1ede3679",5995:"d3323e91",6057:"1dee8281",6133:"30d7dda2",6135:"c653b3f0",6142:"c3db47e0",6178:"b8af4a05",6204:"41ef5e52",6220:"1b3ac2b7",6349:"37463805",6354:"8f46cc44",6386:"8e8e3b55",6412:"8560d493",6418:"e9887111",6425:"fc9a5a33",6483:"9526610f",6499:"e05ab8a6",6563:"158534c9",6567:"088e6a2d",6686:"d9168be9",6689:"7ddde9eb",6723:"3f4d912a",6780:"ced0dfaf",6781:"4ce59af9",6811:"7e2216fa",6873:"949148ad",6882:"f806a2af",6891:"7f539b97",6906:"94eee830",6945:"316f91de",6956:"c0142071",6990:"becbb39b",7037:"d18e7d71",7055:"0d579216",7071:"26afd096",7082:"6cf870e5",7136:"10ef946d",7165:"cd9b93dc",7347:"3e4fc5cb",7374:"dd2f4170",7454:"a09f4995",7456:"6c3e7826",7493:"e1d111d5",7533:"d342a6b5",7583:"20851354",7592:"e3257804",7612:"01f0d9fe",7631:"a5b879c1",7673:"b225e000",7694:"be41a059",7799:"179a9719",7813:"1184cb32",7862:"40fad2a9",7920:"affc72c9",7926:"f3c9a0f0",7998:"a2a42e49",8004:"c869bf2f",8016:"c0346236",8033:"182975a4",8048:"5fc165f9",8119:"426988eb",8149:"65b0a0b3",8161:"387f4295",8168:"7103efea",8180:"f37159fe",8253:"4947cfb5",8257:"ae037dd7",8277:"b0f80fd5",8389:"32597e34",8399:"2c041906",8493:"ea0d0747",8545:"5595aca5",8597:"63e982c2",8740:"31123a79",8756:"0c3d26f5",8759:"ec0c844c",8882:"1fb8ecc1",8883:"790ef05c",8894:"7edbb6c9",8913:"201b1acd",8930:"53e654a0",8976:"d78e71b1",8999:"06ee90aa",9052:"a20c6099",9057:"a00aa087",9097:"6db3b6e7",9128:"879c72ce",9184:"016cb049",9192:"3b135463",9202:"2d2a0407",9203:"01a37119",9209:"b25d9b86",9217:"af4e2c09",9229:"6664ad23",9232:"b8670774",9347:"dee91760",9379:"eb7ff1f0",9410:"11d4fab2",9470:"eaa4c3dc",9514:"cc715246",9589:"cb85772e",9671:"c68aeaec",9694:"3e4475e4",9756:"53777f76",9849:"9e442403",9875:"196867be",9940:"c1f83678",9942:"91025a12",9967:"a4c91323"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,d)=>Object.prototype.hasOwnProperty.call(e,d),a={},c="demo:",r.l=(e,d,f,b)=>{if(a[e])a[e].push(d);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var c=a[e];if(delete a[e],t.parentNode&&t.parentNode.removeChild(t),c&&c.forEach((e=>e(f))),d)return d(f)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",r.gca=function(e){return e={22155637:"5268",29694922:"6178",57136864:"2192",92348782:"9940",93908748:"4805",bddc6002:"47","935f2afb":"53",d94ccd67:"67","0032f96f":"100","491af8ad":"135",df5c78e6:"173",c12940ed:"182",bec6d9ae:"211",e7df0fec:"248",aab6ad66:"260","2f59b2ef":"274",ae74964d:"297","39a96d3a":"306","08636a24":"374",c626f2cc:"422",e6e6cd34:"469","7acd0d27":"522","11bcc7e5":"534","3da0b0fe":"656","4f59b7e9":"674","5945b6f4":"689","134f4ebc":"738","15bb616c":"830",ac57e32f:"848","576aa68d":"891",ffeeb722:"992",b7def961:"1011",d79e07b2:"1054",e07651bc:"1084","9f9eec24":"1094",fd8596db:"1117","9029ef47":"1126",fe9260cd:"1132",dfccb580:"1142",db5a5176:"1173","4f32f676":"1187","5125b704":"1205",b2b5a0c0:"1270","99a9ad46":"1290",f64e1fa2:"1317",d970501b:"1357","0fa69d70":"1371",d6b477f2:"1378","1c3bce93":"1414","11667d91":"1425","1821d9d7":"1510",d8c91af8:"1528","59d5b983":"1557","7c0d6738":"1573","47d20a96":"1591",c8cd88a5:"1597","71f8faad":"1655",dae27e03:"1738","123fab3b":"1739",d71b54cc:"1786","8b196d05":"1806",c2c73492:"1865","65e31fed":"1871","4c5e977b":"1893",d2ab4b32:"1935",a2cbb706:"1966",b0d01e95:"1968",d7d13fd1:"2005",ec0516f7:"2050","7365c198":"2079","54a4f78f":"2116",d8c992a6:"2175","8b5652a7":"2184",e7ebf400:"2226",ff7cb792:"2241","6aeb5732":"2277","5383e2bf":"2323",dded7333:"2329","2eb5a7fb":"2360",fbd96b78:"2367","1d5be7b1":"2428","0f556ffa":"2467",e9c5307c:"2470","8a23d602":"2551","999cbc12":"2600","63e7154e":"2609","0128e05f":"2636",de66f94a:"2691",fe008fee:"2733","0af2e8f6":"2756","404eb028":"2827",ea74a8a9:"2832",b491e6b8:"2859","109756a8":"2870",e24c431f:"2872","8ed7db60":"2931","7ccdd76e":"2956",f77e462c:"2975",d5851cb1:"3013","6846a7ba":"3021",b0b03425:"3023","64aa0b9a":"3038",d46fdf20:"3044","46b36dc0":"3082",d6e648af:"3086","467b2519":"3158","3930cc8a":"3168",c121c8d5:"3195","5c4d0554":"3204","835897f5":"3227","1df93b7f":"3237",a21738db:"3334",ae785ce1:"3496","377fc202":"3516","3c152c78":"3625",f601f941:"3665","54bc495f":"3706",d4ce7faf:"3754","74b5ba26":"3773",ef46077c:"3786","437ed742":"3796","65d7ebf2":"3802","3aefc2b6":"3868","080a9ee7":"3913",f50a63d5:"3987","47d37469":"4013",d95cd4ff:"4019",ea27d690:"4108","5c98d4ea":"4182",aa9e799f:"4183",d28adde9:"4201",f9b740ff:"4243","64c2e320":"4246","4d61d27d":"4253",c4573554:"4259",c84aae18:"4324","2340828a":"4376","29c8ca5d":"4463","5344dd0e":"4519","5954c450":"4539","335f69d6":"4540",ad99c2e7:"4600",ee2798c9:"4635",c87cc133:"4674","1e6527e1":"4719","03c6674d":"4720",af663d33:"4721",efcaecf7:"4792","9ea3e4a5":"4820","1e8e5e9a":"4881","9f384d53":"5058","945f0be5":"5104","0a3f3d31":"5122","8db7ed3c":"5210","260b3d09":"5214",fc1a6383:"5220","0fc92a72":"5253","4bef2fb3":"5277","1edcfddb":"5288","24ee6be4":"5326",ed25d525:"5347","2dbb09aa":"5378","7644a8b6":"5421","900ced3f":"5469","9728e091":"5470","8d8eb18d":"5487",af55f10e:"5580","6a02f24e":"5596",fc158ac8:"5642","25c97383":"5673",d250e750:"5677","99ffa32d":"5698","5708b463":"5861","4b742bf9":"5882","4a1ec646":"5909",fcca6750:"5913","3b56eb8e":"5978","78bbaf06":"5995","0ce9971d":"6133","8e01bad3":"6135",d9f2d88a:"6142","59e232ee":"6204",e20b99b5:"6220",f116289e:"6349","925c0bed":"6354",a217fb3c:"6386",a674c74b:"6412","16e8ae75":"6418",af3402af:"6425",effdce5d:"6483","13df6360":"6499","6b41ffc9":"6563","9611c1ba":"6567",cce83bc5:"6686","8a92166d":"6689",a7835d3e:"6723","01f4109f":"6781","00ff508f":"6811",dffc9575:"6873","0bcfcae9":"6891","6bf5cd43":"6906","6a011cfc":"6956","5ddc4d53":"6990","518b90c0":"7037",b16aadd2:"7055",d4d2d783:"7071","6d3dfbcd":"7082","515de0d7":"7136",ed887fb8:"7165",a87232fc:"7347","783013b2":"7374","21fe5cbf":"7454","445f6f2d":"7456","10dce6d4":"7493","16c4bb07":"7533","49b14676":"7583",b8b370b8:"7592",ace89945:"7612",b3153972:"7631","787465aa":"7673",c5434c58:"7694",bfbab14f:"7799","6b697fd9":"7813",a7c28e13:"7862","1a4e3797":"7920","1302233f":"7926","1ed63671":"7998","80975cc5":"8004","23e9e137":"8016","4adb919a":"8033",dcb8c93b:"8048","545dbd82":"8119",b80cad64:"8149",caece487:"8161","6b798853":"8168","94050a54":"8180",fe83dea5:"8253",e1594dfa:"8257",d234883f:"8277","7b4f5a52":"8389","8ec8cf1f":"8399",ed5700b4:"8493","1cd58b57":"8545","2730d8e4":"8597","3b8a1714":"8740",f8d5f1d3:"8756","11d03c56":"8759","4f61726b":"8882","705711d3":"8883","427be892":"8913","70e3ad0d":"8930","8d68bc4a":"8976","388546f3":"8999","4e2de210":"9057",b7cc9ed0:"9097","9e4ccdce":"9128","79e28b2f":"9184",fc441bf1:"9192","4d66e9ad":"9202",e0557e97:"9203","5977a97c":"9209","3fa72254":"9217",b83e4bd7:"9229",b212ee85:"9232","5f8415ed":"9347",ddb99459:"9379","09cca914":"9410","6b74149a":"9470","1be78505":"9514",b5881b04:"9589","0e384e19":"9671","9b026235":"9694",b862b811:"9756",e3461e1c:"9849",e964279c:"9875","725284f7":"9942","03d8c746":"9967"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(d,f)=>{var a=r.o(e,d)?e[d]:void 0;if(0!==a)if(a)f.push(a[2]);else if(/^(1303|532)$/.test(d))e[d]=0;else{var c=new Promise(((f,c)=>a=e[d]=[f,c]));f.push(a[2]=c);var b=r.p+r.u(d),t=new Error;r.l(b,(f=>{if(r.o(e,d)&&(0!==(a=e[d])&&(e[d]=void 0),a)){var c=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;t.message="Loading chunk "+d+" failed.\n("+c+": "+b+")",t.name="ChunkLoadError",t.type=c,t.request=b,a[1](t)}}),"chunk-"+d,d)}},r.O.j=d=>0===e[d];var d=(d,f)=>{var a,c,b=f[0],t=f[1],o=f[2],n=0;if(b.some((d=>0!==e[d]))){for(a in t)r.o(t,a)&&(r.m[a]=t[a]);if(o)var i=o(r)}for(d&&d(f);n - +

Develop secure & private digital voting apps with few lines of code

Designed for developers, abstracting the complexities involved in secure and private voting protocols. Create AGMs, elections and proposals with ease, multiple election types, check voter eligibility and much more!

Try it out!


Create and integrate
applications quickly and easily.

SDK

Check the docs for registering an account, creating a voting process, fetch election info, voting to a process and more!

DEMO

A live preview for testing the SDK, connect your wallet and start creating an election in less than 10 sec.

EXAMPLES

Review examples on how to implement Vocdoni SDK into your react applications.

Easy way to get started


Easily create variety of Elections

With just a few simple steps, it is very easy to set up everything, from basic surveys to complex voting systems, with single vote, weighted vote or anonymous, just with a simple configuration flag.

Docs

A first generation voting protocol

A completely anonymous voting system that guarantees the availability of the data and a censorship resistant of the data and a communication protocol resistant to censorship. Based on decentralised technologies such as Ethereum, Daichain, Tendermint, IPFS and zero-knowledge proofs.

hands up

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/intro.html b/intro.html index df0ffe368..ac63de554 100644 --- a/intro.html +++ b/intro.html @@ -12,13 +12,13 @@ - +

Getting Started

Vocdoni is the most open, secure, and universally verifiable voting protocol, used by hundreds of organizations worldwide. The core of our stack is a powerful decentralized backend, including blockchain, P2P gateway, and distributed file storage components.

The Vocdoni Protocol layer is accessible via a public API. This API is great for querying data, but running an election requires some advanced understanding of the protocol. Thus, we recommend integrators use the SDK.

The Software Development Kit is a wrapper for the API and provides developers with an easy way to integrate the functionality of the Vocdoni Protocol.

The UI Components library provides various basic React components for Vocdoni elections.

Looking to integrate digital voting into your web application?

Start with the SDK Tutorial

Live preview

These components all come together in our live demo. You can explore a basic Vocdoni implementation by creating some fake voters and starting a simple, single-question election. You will be able to cast a vote for each fake voter and see the results.

Live preview

This demo requires Metamask (or Walletconnect) to sign transactions. Metamask is a browser extension that holds custody of private keys and cryptocurrencies, but it is simple to install and use, and you need no prior knowledge of this technology.

No balance is needed

Metamask is used to sign the transactions that create elections and cast votes. Testing tokens are automatically sent once the account is created. No value is used or exchanged.

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/protocol.html b/protocol.html index 6a473c6e4..032314084 100644 --- a/protocol.html +++ b/protocol.html @@ -12,13 +12,13 @@ - +

Vocdoni Protocol

1. Introduction

Voĉdoni in Esperanto translates to "to give voice". We aim to achieve change by empowering society from the bottom up, building the necessary primitives and tools to enable every voice to be heard, from a few individuals to millions of citizens. We aspire to be the most accessible and functional toolset on earth, open to every group of people, regardless of their position or resources.

We perceive voting as a collective signaling mechanism "to give voice", that can be fully digitalized, if provided with cryptographic guarantees about its integrity and its outcome. To this end, we have designed and implemented the Vocdoni Protocol, a universally verifiable set of rules and primitives that allow anyone to create and participate in collective decision making.

1.1 The blockchain

The Vocdoni blockchain is named Vochain. It is a Byzantine fault-tolerant network based on Tendermint that executes the Vocdoni Protocol logic represented as a state machine. Its main purpose is to register votes in a decentralized and verifiable format. Currently, the network can process more than 30K votes per minute while using no more than the resources found on commodity computers.

The Vocdoni blockchain requires a native token (VOC) to execute management transactions (i.e creating elections), but not for casting votes. Therefore, the voters can participate in governance processes in a free and gasless manner.

Vochain is currently based on Proof-of-Authority consensus. However, we are already working towards transitioning to Proof-of-Stake in 2023. Until then, the tokens are free and can be obtained by anyone by using our faucet service.

The current vocdoni-node code can be found in our github repository.

1.2 Gateways

The Gateways provide entry points to our P2P network. They allow clients to reach decentralized services through a standard HTTP(s) API interface.

Internally, the Gateways act as a standard blockchain full node, but also as indexers, meaning that they store and update a separate non state-related database that contains digested information useful for fulfilling client query requirements. For instance, Gateways compute election results (which are not part of the state) and provide census services (so voters can fetch their election Merkle proof). To perform the indexer function, Gateways need access to the auxiliary distributed filestore.

1.3 Distributed storage

Vocdoni currently relies on the InterPlanetary File System (IPFS) for storing auxiliary information. In a voting process, this includes information such as texts (questions, descriptions, and options), complementary images, as well as census. This data does not need to be permanent in order to ensure the voting guarantees, and is expensive to keep it around, so it is published to IPFS until it can be discarded.

We have designed the Vocdoni primitives in a modular fashion, which allows us to incorporate more data layers in the future, such as Ethersphere Swarm, DAT, STORj or Filecoin.

2. Process overview

This section provides an overview of the Vocdoni flow for creating a participatory process, its main attributes, and configuration options.

The following diagram is a summary of the flow, from creating an organization account to the vote casting.

process overview schema

Let's explore in more detail the different concepts.

2.1 The census

The census is a key component of every voting process. It defines the set of users (identified by a public key or address) who are eligible for participating in an election.

Vocdoni is designed to be as flexible as possible and to enable, at the very least, the most common use cases for elections. To this end, the protocol currently supports several census types and origins, and more may be added in the future.

The current census origins available are:

  • weighted merkle tree: for standard elections, allowing participants to vote with different "weights" (e.g. someone with 50 points might have 50 votes)
  • indexed merkle tree: an optimized merkle tree for voting on zkSnarks
  • credential service provider (CSP): for elections where an authority provides voting credentials (such as OAUTH, mailing, SMS, etc.)
  • ERC20 based on storage proofs: for Ethereum based tokens, the user needs to fetch an EIP1186 proof from a web3 provider (implemented as part of https://voice.aragon.org)

The current implementation of our Vocdoni API/SDK only provides the weighted merkle tree, so we will focus on this specific origin. More options will become available in the following months.

Weighted merkle tree census

The census itself is represented as a binary Merkle Tree, where the keys of the tree contain the (hashed) public keys or addresses of all eligible voters and the leafs (values) represent the voting weight.

Using Merkle Trees, we can efficiently prove that a key/value belongs to the tree. For a tree of size N elements, only log(N) elements are needed to generate a proof. A tree with 1 million leaves, for example, would only need 20 hashes to prove the inclusion of any one leaf.

A prover is able to prove the inclusion of any leaf of the Merkle Tree to a verifier:

  • The verifier only needs to know the Root Hash
  • The prover only needs to provide the Leaf and its Sibling, as well as the siblings of each of its ancestors (hence, log(N) elements).

2.2 Accounts

A Vocdoni account is identified by an Ethereum-like address. This allows us to use standard Web3 signers such as Metamask.

An account can:

  • Create and manage elections
  • Transfer tokens
  • Authorize other accounts to act on his behalf (delegates)
  • Manage its metadata

For creating an account, a faucet package is required, since bootstrapping requires a fee in Voc tokens. At the moment, Vocdoni provides a free faucet service for distributing such tokens (integrated within the client SDK).

An account often represents an organization and might have associated an infoURL pointing to an external IPFS file containing the metadata details (name, description, logo, etc.). All Vochain nodes automatically distribute and store this data. 

2.3 Elections

An Election (named a process internally) is a rule-set of options and requirements written into the blockchain state, thus guaranteeing that they can no longer be modified (unless explicitly configured to be upgradeable). The election is created and configured by an account owner or account delegates.

The following election options can be configured:

  • Census origin: description of the eligible voters or rules.
  • Lifecycle: initial state, start, and end blocks.
  • Election mode: how should the process behave.
  • Vote mode: the kind of ballots expected from voters.
  • Tally mode: how should the results be computed as defined by the Vocdoni Ballot protocol. Details and examples can be found here.

Election lifecycle states

An election must be in one of the following states:

  • Ready: the process is open to voters.
  • Paused: the process is active, but votes are not accepted.
  • Ended: the process is finished and the state can no longer be updated.
  • Canceled: the process is terminated by the election official and is no longer considered valid.
  • Result: the process has ended and results have been published.

The states can transition in the following ways:

Election mode

  • Auto-start: Enables the voting process to be started manually by the election administrator, as opposed to setting a start date.
  • Interruptible: The election administrator may pause or end the process at any point in time.
  • Encrypted metadata: Allows the questions and options of a process to be encrypted, so an external observer won't be able to see the questions unless they have the key.
  • Dynamic census: By default, the census is immutable and cannot be changed once published. However, long lasting polls may enable a dynamic census so that new members of a community may vote on a process after joining.
  • Allow override: If enabled, a voter may vote multiple times and replace any prior vote envelope. This protects voters from coercion and accidental mistakes.

Vote mode

  • Anonymous: If enabled, the voter’s public key will remain unrecoverable. Instead, the voter will prove that they are registered to vote by computing a zk-SNARK proof (ZKP) on their device. If this option is not chosen, the vote envelope will contain a signed vote, resulting in a pseudonymous vote. If an observer correlates the voter’s public key with personal data, the voter could be identified.
  • Encrypted: If enabled, the payload of the votes emitted will remain encrypted until the end of the process. The results will be available once the encryption keys are published by the miners at the end of the process. If disabled, the results can be seen in real time.
  • CostFromWeight: If enabled, the total cost defined in the ballot protocol will equal the voter's census weight.

2.4 Anonymous vote

A voting envelope is composed of two parts: the census proof (which defines the eligibility of the voter) and the ballot (the actual contents of the vote, containing the chosen options). The anonymization of the voting envelope is achieved by anonymizing the census proof using zk-SNARKs technology.

zk-SNARK proofs are a convenient method to prove something to a third-party verifier without revealing the contents of what is being proven.

The goal of the Vocdoni zk-SNARK circuit is to prove that a voter (identified by a public key) is part of a Census (a Merkle Tree composed of such public keys) without revealing the identity (public key) of that voter. This circuit produces a unique and deterministic identifier (nullifier) that can be processed by a public ledger/blockchain to distinguish whether the voter has previously submitted a vote.

Note: while zk-SNARK voting is enabled in the protocol and available at https://vocdoni.app, it is not yet implemented as part of the current SDK.

2.5 Results

The results are computed by a set of rules configured by the election owner and following the Vocdoni ballot protocol, which allows for almost any type of voting such as Range or Quadratic.

Results are represented as a matrix of numbers such as [ [1,2], [0,1] ] which can be interpreted as:

  • for the first question, the first option received 1 vote and the second option 2 votes
  • for the second question, the first option received 0 votes and the second option 1 vote

The computation of results is intricately woven into the fabric of blockchain logic. In this setup, each node within the network independently calculates the results and subsequently commits to the prevailing state. Should a node incorrectly evaluate the election results, it risks alienating itself from the network consensus, thereby impairing its continued participation.

Moreover, the system ensures absolute verifiability. Every end user possesses the capability to retrieve the comprehensive list of votes related to a specific election from the blockchain state, facilitating local replication of the tally. This accessibility further solidifies the credibility of the election results, fostering trust within the network.

2.6 Transactions and fees

Vochain transactions are protobuf encoded and signed by the sender. However, the SDK handles this operation transparently for the end user.

Transactions may have a fee that the sender needs to cover from its own balance. The fee cost per transaction is currently fixed and configured in the blockchain genesis file. At the moment, once a transaction is executed, the fee is automatically burned. This is an intermediate solution that will become invalid once the full features of the Voc tokenomics chain are implemented.

The following list shows the transactions:

Organization accounts

  • CreateAccount: create a new account in the blockchain, identified by an Ethereum compatible address
  • SendTokens: send tokens from to another account of the blockchain
  • CollectFaucet: collect a faucet code, provided and signed by an existing account
  • NewProcess: create a new election
  • SetProcessStatus: set the election status (see election lifecycle)
  • SetAccountInfoURI: set the external info URI for the account (containing account metadata)
  • SetProcessCensus: update the election census (only if dynamic census is enabled)
  • AddDelegateForAccount: add a delegate to the account
  • DelDelegateForAccount: delete a delegate from the account

Election participants

  • Vote: cast a vote to an existing election

Validators

  • RegisterKey: register a new encryption key for the election

More information

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/protocol/anonymity.html b/protocol/anonymity.html index 31d478e4c..2c572e192 100644 --- a/protocol/anonymity.html +++ b/protocol/anonymity.html @@ -12,13 +12,13 @@ - +

Anonymous Voting

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/protocol/anonymity/blind-signatures.html b/protocol/anonymity/blind-signatures.html index ffb591314..9fc32931d 100644 --- a/protocol/anonymity/blind-signatures.html +++ b/protocol/anonymity/blind-signatures.html @@ -12,14 +12,14 @@ - +

CSP Blind Signatures

The current approach by Vocdoni regarding determining the eligibility of a potential voter is to use a Census Merkle Tree. All voter public keys must be known in advance and aggregated together into a hash tree to compute a Merkle root. Then each voter needs to fetch their own Merkle proof to demonstrate their eligibility on a public ledger. The Merkle proof can be anonymized using a zk-SNARK so that the public ledger will verify the SNARK proof instead.

This approach is nice since the same census Merkle Tree can be reused repeatedly and by anyone (not only the owner). It adds resiliency to the process since any third party can obtain the tree (there is no private information involved; thus, it can be published into IPFS) to help the potential voters fetch their proofs. Finally, it is reproducible since anyone with the same list of keys could build the same root hash and verify the Tree generation was correctly executed.

However, this approach lacks flexibility since it is a static way to create a voter list (adding or deleting a public key requires rebuilding and publishing the census again). The current Vocdoni protocol implements an updateCensus mechanism, but this is not very convenient for use cases that require constant census modifications (each update requires an Ethereum transaction).

In order to support such scenarios and bring more flexibility to the Vocdoni stack, a new approach is proposed based on Credential Service Providers (CSP). A voter will need to show a proof provided by the election CSP for proving its eligibility which is made up of the CSP's signature to the voter's public key.

For preserving the anonymity of the voter, the CSP server will perform a blind signature. Blind signatures were first suggested by David Chaum: a cryptographic scheme that allows for signatures over disguised (blinded) messages. The blinder (voter in our scenario) can then un-blind the signature and use it as a normal/standard one. This protocol was designed for RSA, but we will use it over EC secp256k1 (Ethereum and Vocdoni standard).

Salted CSP keys

For making the CSP voter approval valid only for a specific election process (processId) and attached to a specific weight while preserving the privacy, a deterministic key derivation is used. So the CSP is only required to publish a single root public key. The specific per-election keys will be computed independently by all parties (CSP will derive its election private key and the election organizers will derive the election public key). To this end we use the following simple approach (G is the EC generator point):

PubKeyRoot = PrivKeyRoot * G
PrivKey2 = PrivkeyRoot + ProcessId + Weight
PubKey2 = PubKeyRoot + (ProcessId + Weight)*G

So if PubKey2 becomes the election CSP public key, there is no way the CSP can share signature proofs before the processId is known and there is no way to reuse a CSP signature for a different election process.

Flow diagram

flow_diagram_csp

Known Problems

  • Time correlation, the CSP might know which voter is actually casting a vote. Could be solved using a delay mixnet (such as Nymtech)
  1. H. Mala, N. Nezhadansari, "New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem" https://sci-hub.st/10.1109/iccke.2013.6682844 Implementation: https://github.com/arnaucube/go-blindsecp256k1
  2. EC deterministic derivation key schema PoC implementationhttps://github.com/p4u/go-eckey-derivation
  3. CSP server implementation https://github.com/vocdoni/blind-csp

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/protocol/anonymity/on-chain.html b/protocol/anonymity/on-chain.html index 8246fe951..85bf21e61 100644 --- a/protocol/anonymity/on-chain.html +++ b/protocol/anonymity/on-chain.html @@ -12,13 +12,13 @@ - +

On-Chain Census Anonymity

On-chain cenuses created with the Census3 Service derive their contents from a public set of holders of a given token (or set of tokens) on the Ethereum blockchain. This information is turned into a census by generating a Merkle Proof on that set of data. This Merkle Proof is similar to that used for a typical off-chain tree census, and the same sort of ZK Census Proof can be used to compute voter validation anonymously.

Unfortunately a zero-knowledge census itself is not enough to anonymize an on-chain election, because voters are weighted according to their unique token balances, making them easy to identify as the weight of a vote can be correlated with an address. We address this problem by rounding voter weights in order to hide unique token balances.

ethereum storage proofs

On-chain censuses created manually with Ethereum Storage Proofs cannot be anonymized

Rounding Censuses

To ensure that the balances of token-based censuses remain private, we must alter them in some way. However, any change must meet two requirements:

  1. The resulting balance must be less than or equal to the original one.

  2. The resulting balance should stay as close to the original as possible.

Our algorithm rounds balances to a nearby value, forming groups of equal rounded balance of a least some privacyThreshold in size (minimum 3). This process obscures individual holder's balances. The algorithm optimizes the number of members in a group, taking in account the difference between balances, to reduce accuracy loss.

Basic Steps

  1. Identify and exclude outliers: Participants balances are analyzed to detect outliers using z-score algorithm.

  2. Forming groups: Participants are initially grouped based on the privacy threshold. A group can extend to include participants with identical balances or with balances differences falling below the groupBalanceDiff criteria.

  3. Balancing groups: For each group, we adjust the balances, rounding them down to the smallest amount within the group to obscure individual values.

  4. Accuracy loop: The algorithm tries to find the highest accuracy possible while maintaining a minimum privacy threshold. It starts with the minimum privacy threshold and increases it by a small amount until the accuracy is maximized.

Results Accuracy

Because voter weights are rounded, there is a chance for the accuracy of elections to be affected.

To measure accuracy, we compare the total of the adjusted balances from the census against the sum of the original balances, incorporating outliers into both calculations for consistency.

Our tests covered censuses involving 21 different tokens, showcasing various holder counts and token formats, including ERC20, ERC721, and POAP. This comprehensive testing ensures our approach is robust across different Web3 assets.

accuracy-testing

Evidently, accuracy cannot be maintained under all possible conditions. We've established parameter settings that generally perform well across various token types and distributions, and under these conditions we consider accuracy levels to be sufficient.

Anonymity Level

This scheme for token-based census anonymity is not as absolutely anonymous as a zk-merkle-proof. The parameter settings are important- a privacyThreshold that is too small could result in a rounded group of voters who all vote for the same result, effectively de-anonymizing every member of the group. If this threshold is too high, however, accuracy is lost.

There are also potential vulnerabilities to specific attacks. For example, acquiring a certain amount of a token to manipulate the algorithm into grouping an address with others could theoretically expose that address. However, such strategies are impractical and unlikely to significantly impact election outcomes. This type of attack also requires an analysis of balance distributions, complicating its execution.

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/protocol/anonymity/zk-census-proof.html b/protocol/anonymity/zk-census-proof.html index 48f6a68ff..0cd8ee284 100644 --- a/protocol/anonymity/zk-census-proof.html +++ b/protocol/anonymity/zk-census-proof.html @@ -12,7 +12,7 @@ - + @@ -29,7 +29,7 @@ all the parameters are string or []string that represent bigInt or []bigInt :::

  • censusRoot: computed by the CensusAuthority from the Census Tree
  • censusSiblings: computed by the CensusAuthority, is the Merkle Proof
    • the User retrieves the siblings from the Vochain through the Gateway
    • the length of censusSiblings will depend on the zkCircuit:
      • The design of the MerkleTree used in circomlib provokes different lengths in the siblings returned when generating a MerkleProof
    • This is due the design of the MerkleTree defines a tree in which the deep of the tree (from the root to the leafs) will depend on each leaf and its neighbors. More details can be found in the MerkleTree spec.
      • In order to input those siblings into the circuit, the nLevels of the circuit is fixed, so the length of siblings needs to be fixed also.
      • So, the len(siblings) will depend on the zkCircuit being used, specifically from the nLevels parameter of the circuit
  • index: determined by the Vochain when adding the User's zkCensusKey into the CensusTree
  • secretKey: generated by the User
  • voteHash: hashed value of the User vote, composed by two big integers.
    • The raw user vote is a variable-length array of values and its values do not need to be checked in the circuit. Furthermore, the values can be encrypted.
    • Since the encoded vote values may not fit into a constant number of circuit inputs, we calculate a summary of the raw user vote using an EVM-friendly hash function: sha256(vote_bytes). The output of the sha256 hash is slightly larger than the field used in SNARKS, so we split the hash output (32-bytes) into 2 16-byte arrays, take them as integers (in little-endian), and use them as circuit inputs.
      • sha256 hash is used, as if necessary in the future it can be verified inside the circuit. This usage has two characteristics to keep in mind:
        • sha256 is twice as expensive as keccak256 in terms of gas in EVM, but it is implemented in circom, so it can be checked inside a circuit (keccak256 is also implemented inside a circuit, but it takes too many constraints for the current use case)
        • checking the sha256 inside a circom circuit is expensive in terms of number of constraints (in the current version of this spec, this is not checked inside the circuit)
    • example:
      h := sha256.Sum256(voteBytes) // voteBytes can be the votes array converted to bytes, or the encrypted votes
      b1 := new(big.Int).SetBytes(swapEndianness(h[:16])) // swap endianness, as golang big int package works in big-endian, and we use little-endian
      b2 := new(big.Int).SetBytes(swapEndianness(h[16:]))
      And the json input of the voteHash for the circuit would be: "voteHash": [b1, b2]
  • processId: the process ID in which the User is participating. As the process ID is a 32 byte array, we use the same method used for the voteHash: the 32 bytes of process ID are splitted by the half, and each one is represented as a big integer (little-endian).
    • example:
      processID0 := new(big.Int).SetBytes(swapEndianness(processIDBytes[:16])) // swap endianness, as golang big int package works in big-endian, and we use little-endian
    processID1 := new(big.Int).SetBytes(swapEndianness(processIDBytes[16:]))
  • nullifier: computed by User
    • nullifier = poseidon.Hash(sk, processID[0], processID[1])

Circuit identification

There will be different circuits of the zk-census-proof depending on the census size, also there could be more use cases with different circuit designs. Both the client and the Vochain need a way to univocally identify those circuits, in order to user the proper Proving key, Witness calculator and Verification key for each circuit.

Circuits are identified across the stack by using a Protobuf enum type. Each ProofZkSNARK protobuf package will have a Type identifier indicating which circuit the proof belongs to, so the Vochain knows which Verification Key to use for verifying the proof.

Format: CIRCUITNAME_PARAMETER1_PARAMETER2

List of current types:

  • ZKCENSUSPROOF_NLEVELS
    • Circuit name: ZKCENSUSPROOF
    • Parameters: nLevels
    • Example:
      • ZKCENSUSPROOF_100
      • ZKCENSUSPROOF_1000

Annex

Examples of flags combinations

Below there are listed some common combinations of flags used when created a new process:

  • Census MerkleTree (from CSV file or private database) with pre-register: preRegister=true, CensusOrigin=OFF_CHAIN_TREE
  • Census MerkleTree (from CSV file or private database) with the Organization defining the CensusRoot (creating the user's keys, without pre-register phase): preRegister=false, CensusOrigin=OFF_CHAIN_TREE
  • Ethereum Storage Proofs with an ERC20 token: preRegister=false, CensusOrigin=ERC20

KeyKeepers reveal and commit keys

A set of commitment keys are generated for each election process by a set of trusted identities named keykeepers. Only if all keykeepers are malicious could they tamper with the process, so it is crucial to distribute these special identities well. Once all these keys are revealed, anyone can generate a valid proof. This mechanism is added to the circuit in order to avoid vote buying when the process is over. Since anyone can now generate a valid proof, a voter will no longer be able to prove that they are the owner of a specific vote nullifier.

Circuit with keykeepers diagram

zkInputs of this alternative scheme:

// Example of zkInputs
{
"censusRoot": "51642541620950251760298704744678482162425252475654827255045491135352807540162",
"censusSiblings": ["0","0","0","0"],
"secretKey": "6190793965647866647574058687473278714480561351424348391693421151024369116465",
"voteHash": ["100964581237483263846637432502620436451", "278307331411790712608582894981321409946"],
"processId": ["242108076058607163538102198631955675649", "142667662805314151155817304537028292174"],
"nullifier": "1938187656076799017313903315498318464349291455761501098436114043715056719301",
"relayerPublicKey": "100",
"relayerProof": "21349690342514405503176665977362532634490340702670001813783738965751319356478",
"revealKey": ["0"],
"commitKey": ["19014214495641488759237505126948346942972912379615652741039992445865937985820"]
}
  • relayerPublicKey: given by the KeyKeeper
  • relayerProof: computed by the User
    • relayerProof = poseidon.Hash(nullifier, relayerPublicKey)
  • revealKey: not known by the user at the proof generation moment
    • the length of this array is determined by the nMiners parameter of the circuit
  • commitKey: given by the KeyKeeper
    • the length of this array is determined by the nMiners parameter of the circuit
    • poseidon.Hash(relayerPublicKey)

Resources

Guides
Soon

Tutorials
Soon

Copyright © 2024 Vocdoni, Inc. All rights reserved.
- + \ No newline at end of file diff --git a/protocol/ballot-protocol.html b/protocol/ballot-protocol.html index 7ca490a5c..1257b7434 100644 --- a/protocol/ballot-protocol.html +++ b/protocol/ballot-protocol.html @@ -12,7 +12,7 @@ - + @@ -29,7 +29,7 @@ The exponent that will be used to compute the "cost" of the field values.
  • totalCost = Σ (value[i] ^ costExponent) <= maxTotalCost
  • costExponent is represented as exp * 10000 so:
    • 0 => 0.0000
    • 10000 => 1.0000
    • 65535 => 6.5535
  • https://blog.vocdoni.io/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fpapyrus_images%2Fb8d920f2d64cf347ff2f47f7e34a3340.png&w=1920&q=75


    Results and example

    The result is represented as a matrix of natural numbers. Let's take this JSON example:

    [
    [1,2,3], // in field 1: value 0 got 1 vote, value 1 got 2, value 2 got 3
    [1,4,2], // in field 2: value 0 got 1 vote, value 1 got 4, value 2 got 2
    [0,1,0] // in field 3: value 0 got 0 vote, value 1 got 1, value 2 got 0
    ]

    Each row of the matrix represents a field, there are three fields: [ [First field], [Second field], [Third field] ]

    The ballot protocol does not cover interpretation. However, a very common interpretation would be to consider each field as the multiplier (weight) equal to its position.

    • First question [1,2,3] = 0*1 + 1*2 + 2*3 = 0 + 2 + 6 = 8
    • Second question [0,4,2] = 0*0 + 1*4 + 2*2 = 8
    • Third question [5,1,0] = 0*5 + 1*1 + 2*0 = 1

    6 votes have been cast.

    Example

    Lets see an example with maxCount=3 and maxValue=5

    The human-friendly question would be: Rate these 3 candidates to the best rock music player of the 20th century, from 0 to 5 stars.

    • Lennon is the candidate 0, so question 0
    • Hendrix is the candidate 1, so question 1
    • Joplin is the candidate 2, so question 2

    Let's start, currently there are no votes cast:

    Results: Lennon:[0,0,0] Hendrix:[0,0,0] Joplin:[0,0,0]

    New vote [2,1,2] =>

    • give 2 points to candidate 0
    • give 1 point to candidate 1
    • give 2 points to candidate 2

    Results: Lennon:[0,0,1] Hendrix:[0,1,0] Joplin:[0,0,1]

    • candidate 0 = 2 points (1·2)
    • candidate 1 = 1 point (1·1)
    • candidate 2 = 2 points (1·2)

    New vote [0,1,2] =>

    • give 0 points to candidate 0
    • give 1 point to candidate 1
    • give 2 points to candidate 2

    Results: Lennon:[1,0,1] Hendrix:[0,2,0] Joplin:[0,0,2]

    • candidate 0 = 2 points
    • candidate 1 = 2 point
    • candidate 2 = 4 points

    New vote [0,0,0] =>

    • give 0 points to candidate 0
    • give 0 points to candidate 1
    • give 0 points to candidate 2

    Results: Lennon:[2,0,1] Hendrix:[1,2,0] Joplin:[1,0,2]

    • candidate 0 = 2 points
    • candidate 1 = 2 point
    • candidate 2 = 4 points

    Final Results: [ [2,0,1], [1,2,0], [1,0,2] ]

    • Lennon got 2*0 + 1*0 + 2*1 = 2 points
    • Hendrix got 0*1 + 1*2 + 2*0 = 2 points
    • Joplin got 0*1 + 1*0 + 2*2 = 4 points
    • Participation is 3 votes: [2+0+1] || [1+2+0] || [1+0+2]

    More Examples

    Rate a product

    Give a value from 0-5 to a product

    • Vote Envelopes: [2] [5] [2]
    • Results: [ [0,0,2,0,0,1] ]
    • Two users have given 2 stars
    • One user have given 5 stars

    Parameters

    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    105---No

    Rate 3 candidates

    Lennon, Hendrix, Joplin ⇒ 0, 1, 2

    • Vote Envelope: [2,1,2] [0,1,2] [0,0,0]
    • Results: [ [2,0,1], [1,2,0], [1,0,2] ]
    • Lennon got 2*0 + 0*1 + 1*2 = 2 points
    • Hendrix got 1*0 + 2*1 + 0*2 = 2 points
    • Joplin got 1*0 + 0*1 + 2*2 = 4 points
    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    302---Yes

    Single choice

    How do you feel today? Choose 1 out of 3 possible options: Bad, Good, Amazing

    • Vote Envelopes: [0,1,0] [0,1,0] [0,0,1]
    • Results: [ [3,0,0], [1,2,0], [2,1,0] ]
    • Bad: 0*3 + 1*0 + 2*0 = 0
    • Good: 0*1 + 1*2 + 2*0 = 2
    • Amazing: 0*2 + 1*1 + 2*0 = 1
    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    30111-No

    Multiple choice

    Choose your 3 favorite colours out of 5: green:0, blue:1, pink:2, orange:3, black:4

    • Vote Envelope: [1,1,1,0,0] [0,1,1,1,0] [1,1,1,0,0]
    • Results: [ [1, 2], [0, 3], [0, 3], [2, 1], [3, 0] ]
    • green: 0*1 + 2*1 = 2
    • blue: 0*0 + 1*3 = 3
    • pink: 0*0 + 1*3 = 3
    • orange: 0*2 + 1*1 = 1
    • black: 0*3 + 0*1 = 0
    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    50133-No

    Linear Weighted choice

    Sort your 5 favorite blockchains: Bitcoin: 0, Ethereum: 1, Monero: 2, Zcash: 3, Polkadot: 4.

    Your first option gets 4 points,... the last 0 points.

    • Vote Envelope: [0,3,1,4,2] [3,0,1,4,2] [1,2,3,4,0]
    • Results;[ [1,1,0,1,0], [1,0,1,1,0], [0,2,1,0,0], [0,0,0,0,3], [1,0,2,0,0] ]
    • Bitcoin: 0*1 + 1*1 + 2*0 + 3*1 + 0*4 = 4
    • Ethereum: 0*1 + 1*0 + 2*1 + 3*1 + 0*4 = 5
    • Monero: 0*1 + 1*2 + 2*1 + 3*0 + 4*0 = 6
    • Zcash: 0*0 + 1*0 + 2*0 + 3*0 + 4*3 = 12
    • Polkadot: 0*1 + 1*0 + 2*2 + 3*0 + 4*0 = 4
    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    504---Yes

    Quadratic voting

    You might distribute 12 credits among 4 NGOs. You can give as many tokens as you wish to a single option, but the cost raises exponentially with each additional token added to an option.

    NGOs are: greenpeace:0, redcross:1, msf:2, amnesty:3

    • Vote Envelopes: [2,2,2,0] [1,1,2,2] [0,3,1,1]
    Cost exponent calculations:

    [2, 2, 2, 0]
    envelope 1 calculation: 2^2 + 2^2 + 2^2 + 0^2
    = 4 + 4 + 4 + 0 = 12 credits

    [1, 1, 2, 2]
    envelope 2 calculation: 1^2 + 1^2 + 2^2 + 2^2
    = 1 + 1 + 4 + 4 = 10 credits

    [0, 3, 1, 1]
    envelope 3 calculation: 0^2 + 3^2 + 1^2 + 1^2
    = 0 + 9 + 1 + 1 = 11 credits
    • Results: [ [1,1,1,0], [0,1,1,1], [0,1,2,0], [1,1,1,0] ]
    • greenpeace: 0*1 + 1*1 + 2*1 + 3*0 = 3
    • redcross: 0*0 + 1*1 + 2*1 + 3*1 = 6
    • msf: 0*0 + 1*1 + 2*2 + 3*0 = 5
    • amnesty: 0*1 + 1*1 + 2*1 + 3*0 = 3
    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    40-0122No

    Multiquestion

    This mode requires a different way of interpreting the results, since each position of the results array is not multiplied by its index.

    3 positions (CEO, COO, CFO), 5 candidates

    • Ballots: [4,3,2] [4,2,3] [0,1,4]
    • Results: [ [1,0,0,0,2], [0,1,1,1,0], [0,0,1,1,1] ]
    • CEO: candidate0:1 candidate4:2
    • COO: candidate1:1 candidate2:1 candidate3:1
    • CFO: candidate2:1 candidate3:1 candidate4:1
    Vote Envelopes: [4,3,2] [4,2,3] [0,1,4]

    CEO COO CFO
    Option A results: [ [1, 0, 0, 0, 2], [0, 1, 1, 1, 0], [0, 0, 1, 1, 1] ]

    Candidate 5 has won the CEO position, whereas COO is tied between candidates 2, 3, and 4, and CFO is tied between candidates 3, 4, and 5.

    maxCountminValuemaxValueminTotalCostmaxTotalCostcostExponentuniqueValues
    304---No

    Vocdoni results interpretation

    Results interpretation is not part of the ballot protocol, but it informs how the protocol should be understood and displayed by clients. The Process Metadata has a couple of flags that can be used to tell clients how to interpret a results matrix:

        "results": {
    "aggregation": "index-weighted", // "index-weighted" | "discrete-counting",
    "display": "rating" // "rating" | "simple-question" | "multiple-choice" | "linear-weighted" | "quadratic-voting" | "multiple-question" | "raw"
    }

    The results provided by the scrutinizer contain a preliminary aggregation in a 2-dimensional matrix, where the final step needs to be completed by UI clients, depending on results.aggregation.

    Single question

    Index-weighted: each option's value is multiplied by its position index, then summed.

    [ [1,0,1], [2,0,0], [0,1,1] ] => [0*1+1*0+2*1], [0*2+1*0+2*0], [0*1+1*1+2*1] => [2,0,3]
    option1: 2 votes
    option2: 0 votes
    option3: 3 votes

    This interpretation suits any case with extended features, such as multiple choice, quadratic voting, linear-weighted, etc. This is because it is able to weigh multiple possible values for a single field.

    https://blog.vocdoni.io/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fpapyrus_images%2F345a07aee1ddf6a6aad51db7e58fd399.png&w=1920&q=75

    Multi question

    Discrete values: field values are just counted (weight = 1)

    [ [1,2,0], [0,1,2], [1,1,1] ] => [ [question1], [question2], [question3] ]
    field1: candidate0: 1 vote, candidate1: 2 votes, candidate 3: 0 votes
    field2: candidate0: 0 votes, candidate1: 1 vote, candidate 2: 2 votes
    field2: candidate0: 1 vote, candidate1: 1 vote, candidate 2: 1 vote

    As this format can only accept binary (yes/no) input for each option, it is only available for use with a basic set of features (multi-question, single-choice)

    https://blog.vocdoni.io/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fpapyrus_images%2F97e8bca257a9b118b86ee3dd31165107.png&w=1920&q=75

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/census.html b/protocol/census.html index c895505a8..36c6d9cde 100644 --- a/protocol/census.html +++ b/protocol/census.html @@ -12,13 +12,13 @@ - +

    The Census

    In Vocdoni, a census of identities can be represented in one of three ways. For Ethereum-based processes, in which eligible voters are represented by Ethereum addresses holding a specific token, an on-chain (ERC-20) census is used. In cases where a central authority wants to manually validate each voter at the time of voting, off-chain credential service provider is used. For all other voting processes (organizations that are not represented as DAOs), an off-chain tree census is used.

    tip

    Between the three of these census methods, an incredible range of use-cases and third-party integrations for voter eligibility management is possible. Furthermore, the flexibility of the voting protocol is designed to allow more census types to be easily added in the future.

    When a voting process is created, the Census Origin is set to signify which type of census the process should expect to use.

    On-Chain Based Census (Ethereum ERC-20)

    On-chain census allow the set of eligible voters to be expressed as a weighted census of holders of a specific token on an Ethereum blockchain. This type of census is useful for organizations whose members are represented as token-holders. This is possible with either Ethereum Storage Proofs or the Census3 Service (only the Census3 Service is supported by the Vocdoni SDK).

    Technical details for on-chain censuses can be found at On-Chain Census.

    Off-Chain CSP Based Census (Credential Service Provider)

    In order to support frequent modifications to the census of an ongoing process and to bring more flexibility to the Vocdoni stack, a census based on Credential Service Providers (CSP) or Certificate Authorities (CAs) is implemented. This method allows organizations to set up a centralized authority that provides credentials to each voter, one-by-one, based on any arbitrary criteria decided by the organization.

    Technical details for off-chain CSP census can be found at Off-Chain CSP Census.

    Off-Chain Tree Based Census (Merkle Tree)

    An off-chain tree census allows organizations to centrally manage the set of members who can vote on any given process. Organizations can generate the Census Merkle Tree itself with the help of the Census Service, but they are responsible for manually generating a list of voters. Vocdoni.app currently provides a CSV-based census mechanism.

    Technical details for off-chain tree census can be found at Off-Chain Tree Census.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/census/off-chain-csp.html b/protocol/census/off-chain-csp.html index 398ca5e8c..db01b3d35 100644 --- a/protocol/census/off-chain-csp.html +++ b/protocol/census/off-chain-csp.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@

    Off-Chain CSP Census

    A census approach based on Credential Service Providers (CSPs) allows organizations to validate users manually and based off of any arbitrary criteria. Rather than a static census published before-hand, CSP census allows each user to be evaluated for voting eligibility individually, throughout the duration of the voting process.

    In order to prove they are a member of the census, a voter needs to retrieve a certificate of eligibility from the CSP for that process. The CSP first verifies the user's validity (eg. resident of Istanbul or human being standing in front of me) and then provides this certificate by signing the voter's public key.

    Blind Signatures

    In order to preserve the anonymity of each voter, the CSP server will perform a blind signature. Blind signatures were first suggested by David Chaum, who designed a cryptographic scheme that allows for signatures over disguised (blinded) messages. The blinder (voter in our scenario) can then un-blind the signature and use it as a standard one. This protocol was designed for RSA, but we will use it over EC secp256k1 (Ethereum and Vocdoni standard).

    In order to ensure that each CSP voter approval is valid only for one specific election process (processId), a deterministic key derivation is be used. Thus, the CSP is only required to publish a single root public key. The specific per-election keys are computed independently by all parties (CSP will derive its election private key and the election organizers will derive the election public key). To this end we use the following simple approach (G is the elliptic curve generator):

    PubKeyRoot=PrivKeyRootGPubKeyRoot = PrivKeyRoot * G
    PrivKey2=PrivkeyRoot+ProcessIdPrivKey2 = PrivkeyRoot + ProcessId
    PubKey2=PubKeyRoot+ProcessIdPubKey2 = PubKeyRoot + ProcessId

    Following this derivation, PubKey2PubKey2 becomes the election public key. Thus, there is no way the CSP can share claims before the ProcessId is known and there is no way to reuse a CSP signature for a different election process.

    The SDK comes with an implementation of the common handler API of a CSP which is explained here.

    csp voting diagram

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/census/off-chain-tree.html b/protocol/census/off-chain-tree.html index 3e10c7e68..92ee5f32e 100644 --- a/protocol/census/off-chain-tree.html +++ b/protocol/census/off-chain-tree.html @@ -12,13 +12,13 @@ - +

    Off-Chain Tree Census

    The census itself is represented as a binary Merkle Tree, where the leaves of the tree contain the public keys of all eligible voters, hashed.

    A Merkle Tree can efficiently prove that a leaf belongs to the tree. For a tree of size N elements, only log(N) elements are needed to generate a proof. A tree with 1 million leaves, for example, would only need 20 hashes to prove the inclusion of any one leaf.

    The tree structure is made of nodes. Terminal nodes contain the actual values; every other node contains the hash of its two children. If a leaf is updated, all its parent nodes are affected.

    A prover is able to prove the inclusion of any leaf of the Merkle Tree to a verifier:

    • The verifier only needs to know the Root Hash
    • The prover only needs to provide the Leaf and its Sibling, as well as the sibling of each of its ancestors (hence, log(N) elements).

    This means that, in the case of our example Voting Merkle Tree, the owner of PubKey1 only needs HashPubKey1 + H4 + H2 (highlighted in green on the graph below) to prove that their key is part of the Merkle Tree, and therefore that their public key is in the voter census.

    To verify this proof, the verifier simply computes hash( hash( hash(HashPubKey1) + H4 ) + H2 ) and compares this result with the known Root hash of the Merkle Tree.

    This Merkle Proof design allows voters to prove census inclusion without knowing any other voters' keys, and with a computation time that is logarithmically proportionate to the census size.

    Vocdoni stores a hash of public keys instead of public keys themselves to provide an additional privacy layer when publishing the census.

    Creating & publishing the census

    Any organization which does not wish to use the on-chain census mechanism is required to generate and publish a census Merkle Tree in order to host a voting process on the Voting Blockchain. The method for managing and filtering users and generating the Merkle Tree, however, is up to integrators of the Voting Protocol. The census module is further documented on the census integration page.

    Accessing the census

    The Gateways deployed by Vocdoni and third parties constantly monitor the Process Smart Contract. Upon identifying a new process, they will fetch and import that process' Census Merkle Tree. At this point, users can use any available Gateway to check whether they are eligible for voting and then fetch their Merkle Proof (this as well may be handled by the client implementation)

    Users with a valid Merkle Proof can efficiently show that their key belongs to a large census by providing a very small fraction of the whole tree.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/census/on-chain.html b/protocol/census/on-chain.html index 8d34464b3..e39e48cd0 100644 --- a/protocol/census/on-chain.html +++ b/protocol/census/on-chain.html @@ -12,14 +12,14 @@ - +

    On-Chain Census

    An on-chain census is one which is dependent on the status of the Ethereum blockchain at a given point in time. This census type enables the set of eligible voters to be derived from the token holder balances for some ERC-20 Ethereum token, weighted according to token balances. The ideal use-case for such a census is an organization whose members are represented as holders of some token, such as a DAO.

    There are two ways with Vocdoni to create an on-chain census: Ethereum Storage Proofs and the Census3 service. Ethereum Storage Proofs is the legacy method which requires a higher setup cost and more manual work by integrators. The Census3 Service provided by Vocdoni abstracts this complexity away and exposes an API to create and access token-holder censuses.

    Census3 Service

    The Census3 Service is an API service which provides an easy way to create censuses for elections with holders of a single token or a combination of them. This is a wrapper of the on-chain census design and enables integrators to use on-chain censuses without manually registering tokens or generating storage proofs.

    The Census3 Service is documented in-depth here.

    ERC-20 Token Storage Proofs

    An Ethereum Storage Proof is a way to create an on-chain census without the use of the Census3 Service. This approach uses a Token Storage Proof Smart Contract to generate a proof of a given token's holders which can then be used directly as a census.

    Anyone can permissionlessly register a token to the Storage Proof Smart Contract, incurring some gas cost. Then any holder of the token can create a voting process for that token and set the proper census origin value to signal the use of an on-chain census. The Census Merkle Root is the Ethereum Root Hash at a given block height, and any user can request a Merkle Proof that their address holds tokens on the target ERC20 smart contract. They can then provide this proof to vote on processes for the entity representing that token address. Weighted processes enable users to employ a voting power that is proportionate to the number of tokens they hold.

    Storage Tries

    Each Ethereum account has its own Storage Trie, which is where all of the contract data lives for that account. A 256-bit hash of the storage trie’s root node is stored as the storageRoot value in the global Ethereum state trie. In the context of storage proofs, we are concerned with ERC-20 Token Smart Contract accounts, whose Storage Tries contain the list of token balances of each token holder.

    A storage proof is a Merkle Proof computed on this storage trie. For the scope of this proposal, the storage proof allows anyone to demonstrate the balance of a token holder for a given ERC-20 token, at a specific State Root Hash (Ethereum block). In other words, we can cheaply generate a proof of any user's balance of a token, and this proof can be used in a Vocdoni voting census.

    Token Registration

    Before starting an election, the target token needs to be registered to the Token StorageProof Smart Contract. Any token holder can register the token by providing a valid storage proof.

    In order to create a storage proof, on a mapping-based ERC20 contract, the index slot must be found. This depends on the contract implementation and refers to the storage layout of the Ethereum EVM. Most of the index slots are between 1 and 10.

    The user registering a new token must first try to find the index slot. To this aim, a web-frontend and a typescript library will be available. Once the index slot is found, the user must send a transaction to the Token StorageProof SC indicating the index slot and providing the Merkle proof that demonstrates the index slot and their possession of the token.

    Election creation

    When a token holder wants to create a process with an on-chain census origin, they must send a transaction to the Vocdoni Smart Contract with the election process details, including the token contract address for which the process is being created. The Smart Contract will check if the sender holds some minimum threshold tokens on the ERC20 contract address.

    Voting

    In order to cast a vote, each user needs to fetch their Census Merkle Proof. The client connects to a Web3 endpoint and uses the RPC call eth_getProof to retrieve this proof.

    Once the user decides to cast a vote, a package will be forged containing the census proof, vote choice (represented as an array of integers) and signature (using Metamask).

    The transaction of sending a vote is as follows:

    {
    "eth_getProof": {
    "type":"vote",
    "processId": "0x47384...",
    "weight": "0x123",
    "proof": "MerkleProof",
    "votePackage": "base64encoded vote package",
    "signature": "signature performed with the privkey that computes the address"
    }
    }

    The vote will be considered valid only if the signature computes an Ethereum address for which the provided Merkle proof and its weight (balance) is valid for the census root hash (Ethereum storage root) at the height of the process start block.

    The storage proofs contract acts as a registry which allows token holders to prove that they held funds at a given point in time and therefore are eligible voters for a process.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/census/on-chain/census3.html b/protocol/census/on-chain/census3.html index d40724c06..50213ce4c 100644 --- a/protocol/census/on-chain/census3.html +++ b/protocol/census/on-chain/census3.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@

    Census3 Service

    The Census3 Service is an API service which provides an easy way to create censuses for elections with holders of a single token or a combination of them. This is a wrapper of the on-chain census design and enables integrators to use on-chain censuses without manually registering tokens or generating storage proofs.

    census3

    This section only describes how the Census3 service works. In order to use this service, we recommend using the Vocdoni SDK Census3 client. The details for using the census3 client are documented here.

    The service creates a list of token-holder addresses and balances for every registered token. It does this by regularly scanning Ethereum-based networks and analyzing all transactions. In order to generate a census, the service uses token-holder data to create a Merkle Tree with the relation HolderAddress->Balance. This Merkle tree represents a census identically to an off-chain merkle tree census, with those those holders as the set of voters and their balances as vote weights.

    Using the Census3 Service

    There are three main steps in using the Census3 Service: registering a token, creating a strategy, and generating a census.

    Registering a token

    Before a token can be used to create a census, it must be registered. A user requests that the service register a given token, and the service then begins to scan the target Ethereum network for transactions, building an index of that token. This may take some time.

    The service suports the following token types:

    • ERC20
    • ERC721
    • ERC777
    • POAP
    • Gitcoin Passport Score
    • Gitcoin Passport Shields (coming soon)
    • ERC1155 (coming soon)
    token selection

    While all of the above token types are supported, the recommended use-case for a token-based census is a custom token created specifically to govern an organization. It is theoretically possible to create a census with a popular token such as ETH, but it would be infeasible for the Census3 service to keep an updated index of all Ethereum transactions.

    Creating a strategy

    A strategy is the logic behind building a single Merkle Tree from the set of holders of a token. The most basic strategy is "everyone who holds token X", but there can be more restrictions such as "everyone who holds more than 900 of token X", or complex statements like "everyone who holds token X AND token Y or Z".

    Predicates

    Strategies are defined by statements called "predicates." A predicate is comprised of:

    • A operator, which is a function associated with a tag (e.g. AND) that is used to combine token holders and define how to combine them.
    • Token symbols (e.g. BTC), that identify the token holders to combine. Predicates are structured by the following format: <token_symbol> <operator> <token_symbol>, e.g. BTC OR ETH. The syntax also support groups of operators, e.g. USDC AND (ETH OR (BTC AND DAI))

    Operators

    Each of the operators uses a different logical strategy for combining token holder balances to create a weighted census:

    OperatorPowerupUsageDescription
    ANDANDHolders of both tokens, with a fixed weight of 1.
    OROR Holders of either or both tokens, with fixed weight of 1.
    ANDsumAND:sumHolders of both tokens, with a weight adding the token balances.
    ANDmulAND:mulHolders of both tokens, with a weight multiplying the token balances.
    ORsumOR:sumHolders of either or both tokens, with a weight adding the token balances.
    ORmulOR:mulHolders of either or both tokens, with a weight multiplying the token balances if both are non-zero, or equaling the balance that is non-zero.

    Generating a census

    A census is created from a given strategy and a registered token (or tokens) pertaining to that strategy. The service scans its index of token-holder data to accumulate a set of token holders and balance values and creates a Merkle tree to serve as the census. In the case of an anonymous census, there is one extra step called rounding.

    Some details about the census:

    • The censuses are published on IPFS after their creation.
    • Census3 uses go.vocdoni.io/dvote/tree/arbo to build the census merkle trees.
    • The censuses can be created with the holders of just one token or a combination of tokens, using complex strategies.
    • The censuses are zk-friendly and can also be used for anonymous voting.

    API Defintion

    The Census3 Service provides a REST API with all of the above functionality. There is an example bash script that shows the basic usage of this API.

    The service should be available at the following URLs, depending on the environment:

    dev: 'https://census3-dev.vocdoni.net/api',
    stg: 'https://census3-stg.vocdoni.net/api',
    prod: 'https://census3.vocdoni.io/api',

    Endpoints:


    API Info

    GET /info

    Show information about the API service.

    • 📥 response:
    {
    "supportedChains": [
    {
    "chainID": 5,
    "shortName": "gor",
    "name": "Goerli"
    },
    {
    "chainID": 137,
    "shortName": "matic",
    "name": "Polygon Mainnet"
    },
    {
    "chainID": 80001,
    "shortName": "maticmum",
    "name": "Mumbai"
    },
    {
    "chainID": 1,
    "shortName": "eth",
    "name": "Ethereum Mainnet"
    }
    ]
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    500error encoding API info5023

    Tokens

    GET /tokens

    List of already added tokens.

    Pagination URL params

    URL keyDescriptionExample
    pageSize(optional) Defines the number of results per page. By default, 100.?pageSize=2
    nextCursor(optional) When is defined, it is used to get the page results, going forward. By default, "".?nextCursor=0x1234
    prevCursor(optional) When is defined, it is used to get the page results, going backwards. By default, "".?prevCursor=0x1234

    The maximus default page size is 10, but if you provide a page size of -1, the endpoint will return all the results, and it does not require to be paginated.

    • 📥 response:
    {
    "tokens": [
    {
    "ID": "0x1324",
    "type": "erc20",
    "decimals": 18,
    "startBlock": 123456,
    "symbol": "$",
    "totalSupply": "21323",
    "name": "Amazing token",
    "synced": true|false,
    "defaultStrategy": 1,
    "tags": "testTag1,testTag2",
    "chainID": 1,
    "externalID": "",
    "chainAddress": "eth:0x1234",
    "iconURI": "http://...png"
    }
    ],
    "pagination": {
    "nextCursor": "",
    "prevCursor": "0x1234",
    "pageSize": 10
    }
    }

    If tags is empty, it will be ommited.

    If externalID is empty, it will be ommited.

    • ⚠️ errors:
    HTTP StatusMessageInternal error
    204no tokens found4007
    400malformed pagination params4022
    500error getting tokens information5005
    500error encoding tokens5011

    GET /tokens/types

    List the supported token types.

    • 📥 response:
    {
    "supportedTypes": [
    "erc20",
    "erc721",
    "erc777",
    "erc1155",
    "nation3",
    "wANT",
    "poap"
    ]
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    500error encoding supported tokens types5012

    POST /tokens

    Creates a new token in the database to be scanned. It gets the token information from the provider associated to the token type defined. If the creation success the token will be scanned in the next scanner iteration. The scan process status can be checked getting the token information.

    Important: When a token is created, the API also creates a simple strategy with just the holders of that token, which is assigned to it as defaultStrategy.

    • 📤 request:
    {
    "ID": "0x1234",
    "type": "erc20|erc721|erc777|erc1155|nation3|wANT|poap",
    "tags": "testTag1,testTag2",
    "chainID": 1,
    "externalID": "" // id for external holders providers
    }

    tags attribute is optional.

    externalID URL parameter is optional by default, but required for external provided tokens like POAPs.

    • ⚠️ errors:
     HTTP StatusMessageInternal error
    400malformed token information4000
    409token already created4009
    400chain ID provided not supported4013
    500the token cannot be created5000
    500error getting token information5004
    500error initialising web3 client5019

    GET /tokens/{tokenID}?chainID={chainID}&externalID={externalID}

    Returns the information about the token referenced by the provided ID and chain ID, the external ID is optional.

    chainID URL parameter is mandatory.

    externalID URL parameter is optional by default, but required for external provided tokens like POAPs.

    • 📥 response:
    {
    "ID": "0x1324",
    "type": "erc20",
    "size": 120,
    "decimals": 18,
    "startBlock": 123456,
    "symbol": "$",
    "totalSupply": "21323",
    "name": "Amazing token",
    "status": {
    "atBlock": 12345,
    "synced": true|false,
    "progress": 87
    },
    "defaultStrategy": 1,
    "tags": "testTag1,testTag2",
    "chainID": 1,
    "externalID": "",
    "chainAddress": "eth:0x1234",
    "iconURI": "http://...png"
    }

    If tags is empty, it will be ommited.

    If externalID is empty, it will be ommited.

    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed token information4001
    400malformed chain ID4018
    404no token found4003
    500error getting token information5004
    500error encoding token5010
    500chain ID provided not supported5013
    500error initialising web3 client5019
    500error getting number of token holders5020
    500error getting last block number from web3 endpoint5021

    GET /tokens/{tokenID}/holders/{holderID}?chainID={chainID}&externalID={externalID}

    Returns the holder balance if the holder ID is already registered in the database as a holder of the token ID and chain ID provided, the external ID is optional.

    chainID URL parameter is mandatory.

    externalID URL parameter is optional by default, but required for external provided tokens like POAPs.

    • 📥 response:
    {
    "balance": "1234567890"
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed token information4001
    400malformed chain ID4018
    404no token found4003
    404token holder not found for the token provided4023
    500error getting token holders5006

    Strategies

    GET /strategies

    Returns the ID's list of the strategies registered.

    Pagination URL params

    URL keyDescriptionExample
    pageSize(optional) Defines the number of results per page. By default, 100.?pageSize=2
    nextCursor(optional) When is defined, it is used to get the page results, going forward. By default, "".?nextCursor=3
    prevCursor(optional) When is defined, it is used to get the page results, going backwards. By default, "".?prevCursor=1

    The maximus default page size is 10, but if you provide a page size of -1, the endpoint will return all the results, and it does not require to be paginated

    • 📥 response:
    {
    "strategies": [
    {
    "ID": 1,
    "alias": "default MON strategy",
    "predicate": "MON",
    "uri": "ipfs://...",
    "tokens": {
    "MON": {
    "ID": "0x1234",
    "chainID": 5,
    "chainAddress": "gor:0x1234",
    "externalID": "mon_id_on_external_holder_provider"
    }
    }
    },
    {
    "ID": 2,
    "alias": "default ANT strategy",
    "predicate": "ANT",
    "uri": "ipfs://...",
    "tokens": {
    "ANT": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234"
    }
    }
    },
    {
    "ID": 3,
    "alias": "default USDC strategy",
    "predicate": "USDC",
    "uri": "ipfs://...",
    "tokens": {
    "USDC": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234"
    }
    }
    },
    {
    "ID": 4,
    "alias": "strategy_alias",
    "predicate": "MON AND (ANT OR USDC)",
    "uri": "ipfs://...",
    "tokens": {
    "MON": {
    "ID": "0x1234",
    "chainID": 5,
    "chainAddress": "gor:0x1234",
    "externalID": "mon_id_on_external_holder_provider"
    },
    "ANT": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234",
    "minBalance": "1"
    },
    "USDC": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234"
    }
    }
    }
    ],
    "pagination": {
    "nextCursor": "",
    "prevCursor": "1",
    "pageSize": 10
    }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    204-4008
    400malformed pagination params4022
    500error getting strategies information5008
    500error encoding strategies5016

    POST /strategies

    Stores a new strategy based on the defined combination of tokens provided, these tokens must be registered previously.

    • 📤 request:
        {
    "alias": "test_strategy",
    "predicate": "(wANT OR ANT) AND USDC",
    "tokens": {
    "wANT": {
    "ID": "0x1324",
    "chainID": 1,
    "minBalance": "10000"
    },
    "ANT": {
    "ID": "0x1324",
    "chainID": 5,
    },
    "USDC": {
    "ID": "0x1324",
    "chainID": 1,
    "minBalance": "50"
    },
    }
    }
    • 📥 response:
    {
    "strategyID": 1
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    404no token found4003
    400malformed strategy provided4014
    400the predicate provided is not valid4015
    400the predicate includes tokens that are not included in the request4016
    500error encoding strategy info5015
    500error creating strategy5025

    POST /strategies/import/{cid}

    Imports a strategy from IPFS downloading it with the cid provided in background. The strategy import will fail if the strategy tokens are not previously created in the database.

    • 📥 response:
    {
    "queueID": "0123456789abcdef0123456789abcdef01234567"
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed strategy provided4014
    500error encoding strategy info5015

    GET /strategies/import/queue/{queueID}

    Returns the information of the strategy that are in the creation queue.

    • 📥 response:
    {
    "done": true,
    "error": {
    "code": 0,
    "error": "error message or null"
    },
    "progress": 0,
    "data": { /* <same_get_strategy_response> */ }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    404strategy not found4006
    400malformed queue ID4011
    500error getting strategy information5009
    500error encoding queue item5022
    • ⚠️ possible error values inside the body:
    The request could response `OK 200` and at the same time includes an error because it is an error of the enqueued process and not of the request processing).

    GET /strategies/{strategyID}

    Returns the information of the strategy related to the provided ID.

    • 📥 response:
    {
    "ID": 4,
    "alias": "strategy_alias",
    "predicate": "MON AND (ANT OR USDC)",
    "uri": "ipfs://...",
    "tokens": {
    "MON": {
    "ID": "0x1234",
    "chainID": 5,
    "chainAddress": "gor:0x1234",
    "externalID": "mon_id_on_external_holder_provider"
    },
    "ANT": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234",
    "minBalance": "1"
    },
    "USDC": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234"
    }
    }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed strategy ID, it must be an integer4002
    404no strategy found with the ID provided4005
    500error getting tokens information5005
    500error getting strategy information5007
    500error encoding strategy info5015

    GET /strategies/{strategyID}/estimation?anonymous={true|false}

    Enqueue the estimation of size and time (in milliseconds) to create the census generated for the provided strategy. It also calculates the accuracy of the resulting census, it could be different to 100% if the census will be anonymous.

    • 📥 response:
    {
    "queueID": "0123456789abcdef0123456789abcdef01234567",
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed strategy ID, it must be an integer4002
    500error encoding strategy info5015

    GET /strategies/{strategyID}/estimation/queue/{queueID}

    Returns the estimation of size and time (in milliseconds) to create the census generated for the strategy related to the queue ID.

    • 📥 response:
    {
    "done": true,
    "error": {
    "code": 0,
    "error": "error message or null"
    },
    "progress": 50,
    "data": {
    "size": 15000,
    "timeToCreateCensus": 10900,
    "accuracy": 100.0,
    }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    404no strategy found with the ID provided4005
    400malformed queue ID4020
    500error encoding queue item5022
    • ⚠️ possible error values inside the body:
    The request could response `OK 200` and at the same time includes an error because it is an error of the enqueued process and not of the request processing).
    HTTP StatusMessageInternal error
    404no strategy found with the ID provided4005
    400the predicate provided is not valid4015
    204strategy has not registered holders4017
    500error getting strategy information5007
    500error evaluating strategy predicate5026

    GET /strategies/{strategyID}/holders

    Returns the list of holders with their balances for a strategy. This endpoint only works with single token strategies like default ones.

    Pagination URL params

    URL keyDescriptionExample
    pageSize(optional) Defines the number of results per page. By default, 1000.?pageSize=2
    nextCursor(optional) When is defined, it is used to get the page results, going forward. By default, "".?nextCursor=0x1234
    prevCursor(optional) When is defined, it is used to get the page results, going backwards. By default, "".?prevCursor=0x1234
    • 📥 response:
    {
    "holders": {
    "0x1": "1",
    "0x2": "2",
    "0x3": "3",
    "0x4": "4",
    "0x...": "1000",
    },
    "pagination": {
    "nextCursor": "0x5",
    "prevCursor": "0x1",
    "pageSize": 5
    }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed strategy ID, it must be an integer4002
    404no token holders found4004
    404no strategy found with the ID provided4005
    400malformed pagination params4022
    500error encoding token holders5013
    500error getting strategy holders5030

    GET /strategies/token/{tokenID}?chainID={chainID}&externalID={externalID}

    Returns strategies registered that includes the token provided for the chain also provided, the external token id is an optional parameter.

    externalID URL parameter is optional by default, but required for external provided tokens like POAPs.

    • 📥 response:
    {
    "strategies": [
    {
    "ID": 1,
    "alias": "default MON strategy",
    "predicate": "MON",
    "tokens": {
    "MON": {
    "ID": "0x1234",
    "chainID": 5,
    "chainAddress": "gor:0x1234"
    }
    }
    },
    {
    "ID": 4,
    "alias": "strategy_alias",
    "predicate": "MON AND (ANT OR USDC)",
    "tokens": {
    "MON": {
    "ID": "0x1234",
    "chainID": 5,
    "chainAddress": "gor:0x1234",
    "externalID": "mon_id_on_external_holder_provider"
    },
    "ANT": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234",
    "minBalance": "1"
    },
    "USDC": {
    "ID": "0x1234",
    "chainID": 1,
    "chainAddress": "eth:0x1234"
    }
    }
    }
    ]
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    204-4008
    500error getting strategies information5008
    500error encoding strategies5016

    POST /strategies/predicate/validate

    Returns if the provided strategy predicate is valid and well-formatted. If the predicate is valid the handler returns a parsed version of the predicate as a JSON.

    • 📤 request:
    {
    "predicate": "DAI AND (ANT OR ETH)"
    }
    • 📥 response:
    {
    "result": {
    "childs": {
    "operator": "AND",
    "tokens": [
    {
    "literal": "DAI"
    },
    {
    "childs": {
    "operator": "OR",
    "tokens": [
    {
    "literal": "ANT"
    },
    {
    "literal": "ETH"
    }
    ]
    }
    }
    ]
    }
    }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed strategy provided4014
    400the predicate provided is not valid4015
    500error encoding validated strategy predicate5024

    GET /strategies/predicate/operators

    Returns the list of supported operators to build strategy predicates.

    • 📥 response:
    {
    "operators": [
    {
    "description": "logical operator that returns the common token holders between symbols with fixed balance to 1",
    "tag": "AND"
    },
    {
    "description": "logical operator that returns the token holders of both symbols with fixed balance to 1",
    "tag": "OR"
    }
    ]
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    500error encoding supported strategy predicate operators5027

    Censuses

    POST /censuses

    Request the creation of a new census with the strategy provided and returns the census ID.

    • 📤 request:
    {
    "strategyID": 1,
    "anonymous": false
    }
    • 📥 response:
    {
    "queueID": "0123456789abcdef0123456789abcdef01234567"
    }
    • ⚠️ errors :
    HTTP StatusMessageInternal error
    400malformed strategy ID, it must be an integer4002
    500error encoding census5017

    GET /censuses/{censusID}

    Returns the information of the snapshots related to the provided ID.

    • 📥 response:
    { 
    "ID": 2,
    "strategyID": 1,
    "merkleRoot": "e3cb8941e25dcdb36fc21acbe5f6c5a42e0d4f89839ae94952f0ebbd9acd04ac",
    "uri": "ipfs://Qma....",
    "size": 1000,
    "weight": "200000000000000000000",
    "anonymous": true,
    "accuracy": 100.0
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    400malformed census ID, it must be a integer4001
    404census not found4006
    500error getting census information5009
    500error encoding census5017

    GET /censuses/queue/{queueID}

    Returns the information of the census that are in the creation queue.

    • 📥 response:
    {
    "done": true,
    "error": {
    "code": 0,
    "error": "error message or null"
    },
    "progress": 100,
    "data": { /* <same_get_census_response> */ }
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    404census not found4006
    400malformed queue ID4011
    500error getting census information5009
    500error encoding queue item5022
    • ⚠️ possible error values inside the body:
    The request could response `OK 200` and at the same time includes an error because it is an error of the enqueued process and not of the request processing).
    HTTP StatusMessageInternal error
    404no token holders found4004
    404no strategy found with the ID provided4005
    400no tokens found for the strategy provided4010
    409census already exists4012
    400the predicate provided is not valid4015
    204strategy has not registered holders4017
    500error creating the census tree on the census database5001
    500error evaluating strategy predicate5026

    GET /censuses/strategy/{strategyID}

    Returns a list of censuses previously created for the strategy provided.

    • 📥 response:
    {
    "censuses": [
    {
    "ID": 1,
    "strategyID": 1,
    "merkleRoot": "e3cb8941e25dcdb36fc21acbe5f6c5a42e0d4f89839ae94952f0ebbd9acd04ac",
    "uri": "ipfs://Qma....",
    "size": 1000,
    "weight": "200000000000000000000",
    "anonymous": true,
    "accuracy": 100.0
    }
    ]
    }
    • ⚠️ errors:
    HTTP StatusMessageInternal error
    204-4007
    400malformed census ID, it must be a integer4001
    404census not found4006
    500error getting census information5009
    500error encoding censuses5018

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/data-schemes.html b/protocol/data-schemes.html index 3bad08ffa..5eab1f6ee 100644 --- a/protocol/data-schemes.html +++ b/protocol/data-schemes.html @@ -12,13 +12,13 @@ - +

    Data Schemes

    When it comes to voting processes, there are two main types of data storage at the protocol-level: protocol-level data stored on the Vochain and readable metadata like election descriptions stored on IPFS.

    Protocol Data

    Protocol data is data that is published directly to the blockchain and determines how election, votes, and organizations behave. Much of the protocol data is defined by Protobuf-encoded packages sent in blockchain transactions.

    Metadata

    Metadata is typically human-readable data that is important but does not define how an election behaves at a protocol level. Metadata is represented as a JSON file that conforms to a specific schema. This data is typically retrieved using a P2P storage system like IPFS, with an immutable URI and hash of that data stored on the blockchain to ensure it cannot be tampered with.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/data-schemes/election.html b/protocol/data-schemes/election.html index c9d75bca2..d779ff297 100644 --- a/protocol/data-schemes/election.html +++ b/protocol/data-schemes/election.html @@ -12,13 +12,13 @@ - +

    Election Metadata

    Election metadata provides the human-readable data associated with an election.

    The creation of this data structure is critical. Multiple checks should be in place to ensure that the data is coherent (well formatted, all relevant locales present, etc).

    The Election Metadata should not be confused with the Election Parameters, which define how the election should behave.

    JSON Schema

    The metadata of a election is represented as follows:

    {
    "version": "1.1", // Protocol version
    "title": {
    "en": "Universal Basic Income",
    "ca": "Renda Bàsica Universal"
    },
    "description": {
    "en": "The description goes here",
    "ca": "La descripció va aquí"
    },
    "media": {
    "header": "<content uri>",
    "streamUri": "https://.../"
    },
    "questions": [
    {
    "title": {
    "en": "Should universal basic income become a human right?",
    "ca": "Estàs d'acord amb que la renda bàsica universal sigui un dret humà?"
    },
    "description": {
    "en": "The description goes here",
    "ca": "La descripció va aquí"
    },
    "choices": [
    {
    "title": {
    "en": "Yes",
    "ca": "Sí"
    },
    "value": 0
    },
    {
    "title": {
    "en": "No",
    "ca": "No"
    },
    "value": 1
    }
    ]
    }
    ],
    "results": {
    "aggregation": "index-weighted", // "index-weighted" | "discrete-counting",
    "display": "rating" // "rating" | "simple-question" | "multiple-choice" | "linear-weighted" | "quadratic-voting" | "multiple-question" | "raw"
    }
    }

    The results fields are informational only. Regardless of the chosen aggregation or display, the scrutiny is the same for all cases. However, these fields help the UI components to interpret and display the results according to the ballot protocol

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/data-schemes/organization.html b/protocol/data-schemes/organization.html index 4219d4252..1a5f08770 100644 --- a/protocol/data-schemes/organization.html +++ b/protocol/data-schemes/organization.html @@ -12,13 +12,13 @@ - +

    Organization Metadata

    The metadata of an organization provides human readable content, featuring names, descriptions, images, the list of available processes and more.

    JSON schema

    {
    "version": "1.0",
    // The first language in the list is the default one
    // Use "default" or https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
    "languages": ["en", "fr"],
    "name": {
    "en": "Free Republic of Liberland",
    "fr": "République Libre de Liberland"
    },
    "description": {
    "en": "In a sovereign state...",
    "fr": "Dans un état souverain..."
    },
    "votingProcesses": {
    "active":["0x987...","0x876..."], // Process ID of the active votes
    "ended":["0x887...","0x886..."] // Process ID of the ended votes
    },
    "newsFeed": { // Unused, subject to revision
    "en": "ipfs://34567,https://hipsterpixel.co/feed.json",
    "fr": "ipfs://23456,https://feed2json.org/convert?url=http://www.intertwingly.net/blog/index.atom"
    },
    "media": {
    "avatar": "https://liberland.org/logo.png,ipfs://12345,ipfs://12345",
    "header": "https://liberland.org/header.png,ipfs://12345,ipfs://12345",
    },

    "actions": [ <ActionSchema>, ... ], // Unused, subject to revision

    "bootEntities": [ <OrganizationReference>, ... ], // Unused, subject to revision

    "fallbackBootNodeEntities": [ <OrganizationReference>, ... ], // Unused, subject to revision

    "trustedEntities": [ <OrganizationReference>, ... ], // Unused, subject to revision

    "censusServiceManagedEntities": [ <OrganizationReference>, ... ] // Unused, subject to revision
    }

    Register

    Open a registration form within the client app.

    {
    "type": "register",
    "actionKey": "sign-up", // The name you give to identify the action

    "name": {
    "default": "Register",
    "fr": "S'inscrire"
    },

    // The URL to POST the provided data to.
    // See the format below.
    "url": "https://census-registry.cloud/lambda/actions/",

    // Endpoint to query for the visibility (if dynamic).
    // Returning true will show the action and hide it otherwise.
    // See Action Visibility below.
    "visible": "https://census-registry.cloud/lambda/actions/"

    // "visible": "always" (or make it always visible)
    }

    The body of the POST request submitted to url will contain a JSON body like:

    {
    "request": {
    "method": "register",
    "actionKey": "sign-up",
    "organizationId": "0xaabbccdd...",
    "firstName": "John",
    "lastName:": "Snow",
    "dateOfBirth": "2020-02-19T10:09:19.738Z",
    "email": "john@snow.me",
    "phone": "+1235678838",
    "timestamp": 1556110671
    },
    "signature": "0x1234..." // The public key will be extracted from the signature
    ̣}

    As this all happens through Gateway requests, signature is computed from the stringified JSON of request, where its keys are sorted alphabetically.

    The response from the backend should look like like:

    {
    "response": {
    "ok": true,
    // "error": "Something went wrong", // Only if `ok` == false
    "timestamp": 1556110671
    },
    "signature": "" // Empty until registry public keys are available
    }

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/protocol/data-schemes/vote.html b/protocol/data-schemes/vote.html index d03b05fa6..25cfd1d80 100644 --- a/protocol/data-schemes/vote.html +++ b/protocol/data-schemes/vote.html @@ -12,13 +12,13 @@ - +

    Vote Data

    Vote Envelope

    The Vote Envelope contains a (possibly encrypted) Vote Package and provides details to prove that the incoming vote is valid. Some fields may be optional depending on the election mode and envelopeType.

    When envelopeType.ANONYMOUS is enabled

    This section will be available soon.

    When envelopeType.ANONYMOUS is disabled

    A signed (non-anonymous) Vote Envelope features the election ID, the Census Merkle Proof of the user, a nonce to prevent replay attacks, the index of the encryption keys used, a Base64 representation of the Vote Package and the user's signature.

    In order to guarantee 100% reproduceability of the signature, the Vote Envelope is encoded as a Protobuf model and serialized into a byte array. This byte array is then signed and both fields are sent via a SignedTx model to a Gateway.

    // Protobuf models

    message VoteEnvelope {
    bytes nonce = 1; // Unique number per vote attempt, so that replay attacks can't reuse this payload
    bytes electionId = 2; // The election for which the vote is cast
    Proof proof = 3; // One of ProofGraviton, ProofIden3, ProofEthereumStorage, ProofEthereumAccount, or ProofCA
    bytes votePackage = 4; // JSON string of the Vote Package, encoded as bytes. It may be encrypted.
    bytes nullifier = 5; // Hash of the private key + electionId (optional, depending on the type)

    repeated uint32 encryptionKeyIndexes = 6; // On encrypted votes, contains the (sorted) indexes of the keys used to encrypt
    }

    // ...

    message Tx {
    oneof payload {
    VoteEnvelope vote = 1;
    // ...
    }
    }

    message SignedTx {
    bytes tx = 1; // The bytes produced by Marshaling a Tx{} message
    optional bytes signature = 2; // The signature for the tx bytes.
    // signature is only required in those transactions that actually need a signature.
    // I.e zk-SNARKs based transactions won't needed, however the transaction should use
    // this message type in order to preserve consistency on the Vochain
    }

    Vote Package

    Contains the actual votes and is part of the Vote Envelope.

    {
    "nonce": "01234567890abcdef", // 8+ byte random string to prevent guessing the encrypted payload before the reveal key is released
    "votes": [ // Directly mapped to the `questions` field of the metadata
    1, 3, 2
    ]
    }
    When envelopeType.ENCRYPTED_VOTE is disabled
    • The nonce can be omitted.
    • The package has to be serialized as a JSON string and encoded as bytes.
    When envelopeType.ENCRYPTED_VOTE is enabled
    • The nonce is mandatory.
    • The package has to be serialized as a JSON string encoded as bytes.
    • It must be encrypted with a subset of the public keys or all of them.
    • The index of the public keys used to encrypt must be included in the Vote Envelope in the exact order they have been used.

    Results

    Requests to the Results API will return an Array of number arrays, following the Ballot Protocol. They will contain a bi-dimensional array of integers, aggregating the values currently stored on the Vochain.

    The interpretation of these values is left to the Client apps, and is determined by the results.aggregation and results.display fields of the Election Metadata, listed above.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk.html b/sdk.html index 9acc8e77d..333295017 100644 --- a/sdk.html +++ b/sdk.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@

    Vocdoni SDK

    The Vocdoni SDK is a convenient way to interact with the Vocdoni Protocol through the API, allowing anyone to create, manage and participate in voting processes and collective decision-making. The SDK is the primary mode by which developers should interface with Vocdoni - if you think the SDK is missing functionality you need, please get in touch.

    Start by following along with the SDK tutorial

    There is also a tutorial for using an on-chain token-based census

    Detailed SDK reference

    Examples

    You can find examples using es modules, typescript, and vite react in the examples folder.

    example-esm demo

    Reference Docs

    You can find the autogenerated docs in our SDK Reference. You can build them following this guide.

    Disclaimer

    The Vocdoni SDK and the underlying API is WIP. Please beware that it can be broken at any time if the release is alpha or beta. We encourage to review this repository for any change.

    License

    This SDK is licensed under the GNU Affero General Public License v3.0.

    Vocdoni API Typescript SDK
    Copyright (C) 2022 Vocdoni Roots MCU

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program. If not, see <https://www.gnu.org/licenses/>.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details.html b/sdk/integration-details.html index a5f629103..2fa383674 100644 --- a/sdk/integration-details.html +++ b/sdk/integration-details.html @@ -12,7 +12,7 @@ - + @@ -25,7 +25,7 @@ Wallet based on arbitrary data, like, for example, the user and hash password from a custom CRM.

    Here is an example of client.generateWalletFromData where a Wallet is generated using the username and the hash of the password which we would use to identify the user in our platform. This Wallet can then be used for the census and for voting purposes. This enables users to keep the same private key without having to store it in their browser or application.

    // 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 is the sha256 of 'test'
    const userWallet = VocdoniSDKClient.generateWalletFromData(['user1', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08']);
    console.log(userWallet) // address is 0x8AF1b3EDB817b5854e3311d583905a3421F49829

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/census-types.html b/sdk/integration-details/census-types.html index d994852e6..c430732ca 100644 --- a/sdk/integration-details/census-types.html +++ b/sdk/integration-details/census-types.html @@ -12,13 +12,13 @@ - +

    Census Types

    A census is a list of voters who are eligible to vote in a given election. There are multiple ways to define a census with Vocdoni, each with different privacy and verifiability considerations. The census types are defined and documented at a protocol level and include on-chain, off-chain Merkle tree, and off-chain Credential Service Provider.

    The census type is selected from the SDK by using a census of that type when creating an election. The SDK census types correspond to the three protocol-level census types according to the following table:

    SDK Census TypeProtocol TypeweightedanonymousCensusType
    CSPCensusOff-chain CSPnooptionalCSP
    PublishedCensus -> TokenCensusOn-chainyesnoWEIGHTED
    PublishedCensus -> TokenCensusOn-chainyesyesANONYMOUS
    OffchainCensus -> PlainCensusOff-chain treenonoWEIGHTED
    OffchainCensus -> PlainCensusOff-chain treenoyesWEIGHTED
    OffchainCensus -> WeightedCensusOff-chain treeyesnoANONYMOUS
    OffchainCensus -> WeightedCensusOff-chain treeyesyesANONYMOUS
    note

    A weighted census is one where some voters' votes have more power than others, set by a weight value. PlainCensus is described by a WEIGHTED CensusType because it technically is a weighted census, with every weight set to 1.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/census-types/off-chain-csp.html b/sdk/integration-details/census-types/off-chain-csp.html index b64469d82..2751ea18b 100644 --- a/sdk/integration-details/census-types/off-chain-csp.html +++ b/sdk/integration-details/census-types/off-chain-csp.html @@ -12,14 +12,13 @@ - +
    -

    Off-chain Credential Service Provider

    A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote.

    Because using an off-chain CSP census requires a custom CSP for each use-case, it is not ready to use out-of-the-box. If you are interested in setting up a CSP election, please reach out to us for help.

    CSP census elections have the option of full-anonymity with the use of Blind Signatures.

    If a CSP is set up for a census, minor modifications are needed on the client side. For creating a CSP based election, a CspCensus has to be used with the CSP's public key and URL as parameters.

    const election = Election.from({
    title: 'Election title',
    description: 'Election description',
    // a header image for your process (this is for example purposes; avoid using random sources)
    header: 'https://source.unsplash.com/random/2048x600',
    endDate: new Date('2023-01-23 23:23:23'),
    census: new CspCensus(CSP_PUBKEY, CSP_URL),
    })
    // The election can be created the same way from here...

    The next step is requesting a blind signature from the CSP for each voter before casting their vote.

    This is done with client.cspStep. This function sends an API call to the given CSP to perform an "authentication step" predefined by whoever sets up the CSP. A step could be validating a name, sending an authentication token, or anything else. Non-final steps should return a ICspIntermediateStepResponse object containing an authToken and arbitrary response data. -Once the predefined set of steps has been performed successfully, the final step should return a ICspFinalStepResponse object containing a token registered to the verified voter.

    // Client initialization
    const client = new VocdoniSDKClient({
    env: EnvOptions.DEV,
    wallet: voter, // the signer used (Metamask, Walletconnect)
    electionId: '934234...', // The election identifier (has to be a CSP configured election)
    })

    // Auth steps for the CSP (can vary of the type of the CSP)
    const step0 = (await client.cspStep(0, ['Name test'])) as ICspIntermediateStepResponse;
    const step1 = (await client.cspStep(
    1,
    [step0.response.reduce((acc, v) => +acc + +v, 0).toString()],
    step0.authToken
    )) as ICspFinalStepResponse;

    Once this token has been received, the client requests blind signature from the CSP and then uses this signature to cast vote. Because this signature is blinded, the vote cannot be traced back to the voter address or verification information.

    // Get the blind signature
    const signature = await client.cspSign(voter.address, step1.token);

    // Get the vote based on the signature
    const vote = client.cspVote(new Vote([Math.round(Math.random())]), signature);

    // Vote
    const voteId = await client.submitVote(vote);

    Anonymity

    Credential Service Provider elections provide strong anonymity by the use of Blind Signatures. This is a slight modification on the standard CSP Census design, in which users are able to send a "blinded" version of their vote to the CSP after getting verified. The CSP signs this blinded package, and the user is then able cast their vote signed by the CSP without their identity being traced to that vote by anybody, including the CSP.

    Ask us if you would like to try setting up at CSP that can compute blind signatures.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - +

    Off-chain Credential Service Provider

    A Credential Service Provider is an external component that serves as a validator for the identities of voters. An example of this could be a service set up by a municipal government that validates if a given voter is registered, or a forum that validates if a given voter has an active account. With this type of census, voters show proof of registry and receive a cryptographic package from the CSP allowing them to cast a vote.

    anonymous

    CSP census elections have the option of full anonymity with the use of Blind Signatures.

    Because using an off-chain CSP census requires a custom CSP for each use-case, it is not ready to use out-of-the-box. If you are interested in setting up a CSP election, please reach out to us for help.

    Tutorial

    You can check out a full working example of this tutorial here

    This tutorial uses an example Credential Service Provider that "verifies" voters with a simple arithmetic problem. For a real use-case you need to reach out to us for help with setting up a CSP that suits your needs.

    Census

    Once a CSP has been set up, you should have a URL and a Public Key belonging to that CSP. These parameters are used to create a CspCensus.

    const cspCensus = new CspCensus(CSP_PUBKEY, CSP_URL);
    csp public key

    Make sure that your are using the correct public key for your CSP. The protocol cannot tell if the public key is correct, but you will have a signature error when casting votes with an incorrect CSP public key.

    Election

    This census can then be used to create an election like any other. The only restriction is you must assign a maxCensusSize to the election.

    const election = Election.from({
    title: 'Election title',
    description: 'Election description',
    header: 'https://source.unsplash.com/random',
    endDate: new Date().getTime() + 100000000,
    maxCensusSize: 200,
    census: cspCensus,
    });

    From this point on you can create the election as you would with any other census type.

    Voting

    The next step is requesting a signature from the CSP for each voter before casting their vote. In a real application, this might be done interactively with user input (like address or phone number), or it could be handled automatically using existing information (like a user login info, or a voter ID number).

    There can be multiple steps in order to validate a voter. This authorization is done in discrete steps which should be known for a CSP. We can also get a short description of the required steps with client.cspInfo.

    csp info

    Before getting the CSP info, the client CSP service needs to know which CSP to communiate with. The CSP url is set automatically when voting, but you can also use setUrlFromElection.

    client.cspService.setUrlFromElection(election);
    const info = await client.cspInfo();
    {
    "title": "Simple math challenge",
    "signatureType": [
    "blind",
    "ecdsa",
    "sharedkey"
    ],
    "authType": "auth",
    "authSteps": [
    {
    "title": "Name",
    "type": "text"
    },
    {
    "title": "Solution",
    "type": "int4"
    }
    ]
    }

    For our example CSP, there are two steps. The first step involves sending a "name" (really any string). The second step requires the user to solve a simple math problem.

    The authorization steps are completed one-by-one with client.cspStep. This function sends an API call to the given CSP to perform a predefined "authentication step". A step could be validating a name, sending an authentication token, or really anything else. Non-final steps return a ICspIntermediateStepResponse object containing an authToken and arbitrary response data.

    For our example first step, we just need to send some "name" string.

    const step0 = (await client.cspStep(0, ['Name test'])) as ICspIntermediateStepResponse;
    {
    "authToken": "280b3b5f-d982-4277-aa73-bd2d3b0d0d8c",
    "response": [
    "319",
    "303"
    ]
    }

    In this case, the second (and final) step asks us to add together the two values from the response to step0. We do this by computing the sum and then using this sum as the "challenge" for the next step. We also include the authToken from the prior step so that the CSP knows we are validating for the same voter.

    const challenge = step0.response.reduce((accumulator, value) => +accumulator + +value, 0).toString();
    const step1 = (await client.cspStep(1, [challenge], step0.authToken)) as ICspFinalStepResponse;

    Once the predefined set of steps has been performed successfully, the final step should return a ICspFinalStepResponse object containing a token registered to the verified voter.

    This token represents a 'permission slip' allowing a user to vote but it cannot be used to cast a vote directly. First, the voter must be represented by a wallet address, just like in the typical off-chain tree census example. This wallet can belong to the user and be saved somewhere, but for the example we can just create a random address:

    const voter = Wallet.createRandom();

    We then send this address to the CSP, along with the token validating that this voter is validated. The CSP checks that the token is valid and unique, computes a signature on the voter's address, and sends that signature back to the client.

    const signature = await client.cspSign(voter.address, step1.token);

    We can now create a cspVote using this signature as the vote proof and then submit it as usual:

    const vote = client.cspVote(new Vote([Math.round(Math.random())]), signature);
    await client.submitVote(vote);

    Anonymity

    Credential Service Provider elections provide strong anonymity with the use of Blind Signatures. If blind signatures are enabled, the client "blinds" the user's address before sending it with the token to be signed by the CSP. This is the default behavior of the SDK. The CSP is then able to validate the token and sign the "blinded" payload without seeing the actual voter address. This signature is sent back to the client, which then un-blinds the signature. The blind-signatures protocol means that this signature is only valid for this specific voter address, but the CSP has no way of associating it with the blinded payload it originally signed. Thus, the voter cannot be associated with the validation token they used to request the blind signature. The user is thus able cast their vote signed by the CSP without their identity being traced to that vote by anybody, including the CSP.

    Ask us if you would like to try setting up at CSP that can compute blind signatures.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    + \ No newline at end of file diff --git a/sdk/integration-details/census-types/off-chain-tree.html b/sdk/integration-details/census-types/off-chain-tree.html index 4884ef2c0..23228191a 100644 --- a/sdk/integration-details/census-types/off-chain-tree.html +++ b/sdk/integration-details/census-types/off-chain-tree.html @@ -12,13 +12,13 @@ - +
    -

    Off-chain Merkle Tree

    This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using census.add().

    This is the census type used in the SDK Tutorial. Follow along or look at the tutorial code for basic usage of the Merkle tree census.

    Off-chain tree census can be created as PlainCensus or WeightedCensus. If a weighted census is used, voters can be assigned a weight which proportionally determines the power of their vote:

    weightedCensus.add([
    {
    key: address1,
    weight: BigInt(1),
    },
    {
    key: address2,
    // This voter will have 100x the vote power as voter1. This is not a very equitable election.
    weight: BigInt(100),
    },
    ]);

    Anonymity

    Complete cryptographic anonymity is possible alongside universal verifiability with anonymous Merkle tree-based censuses. This is possible due to a cutting-edge technology called zk-SNARKs. The protocol-level design is detailed here.

    For an anonymous off-chain tree election, the election must be created with the option

    electionType: {
    anonymous: true
    }

    In this case, votes must also be cast as AnonymousVotes. The cryptography needed for anonymous voting is very different from typical voting, but this is all handled by the SDK without any other changes needed.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - +

    Off-chain Merkle Tree

    This is the most basic census type, is the default when creating an election, and is the one used in the SDK tutorial. In this scheme, the census is essentially a basic list of voter, with some behind-the-scenes cryptography. With an off-train tree census, voters are added as wallet addresses using census.add().

    This is the census type used in the SDK Tutorial. Follow along or look at the tutorial code for basic usage of the Merkle tree census.

    Off-chain tree census can be created as PlainCensus or WeightedCensus. If a weighted census is used, voters can be assigned a weight which proportionally determines the power of their vote:

    weightedCensus.add([
    {
    key: address1,
    weight: BigInt(1),
    },
    {
    key: address2,
    // This voter will have 100x the vote power as voter1. This is not a very equitable election.
    weight: BigInt(100),
    },
    ]);

    Anonymity

    Complete cryptographic anonymity is possible alongside universal verifiability with anonymous Merkle tree-based censuses. This is possible due to a cutting-edge technology called zk-SNARKs. The protocol-level design is detailed here.

    For an anonymous off-chain tree election, the election must be created with the option

    electionType: {
    anonymous: true
    }

    In this case, votes must also be cast as AnonymousVotes. The cryptography needed for anonymous voting is very different from typical voting, but this is all handled by the SDK without any other changes needed.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    + \ No newline at end of file diff --git a/sdk/integration-details/census-types/on-chain.html b/sdk/integration-details/census-types/on-chain.html index a8dd22120..a16ccd4fd 100644 --- a/sdk/integration-details/census-types/on-chain.html +++ b/sdk/integration-details/census-types/on-chain.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@

    On-chain Token-Based Census

    An on-chain census is one whose voters are defined by holding tokens on the Ethereum blockchain. Currently the following token types are supported:

    • ERC20
    • ERC721
    • ERC777
    • POAP
    • Gitcoin Passport Score
    • Gitcoin Passport Shields (coming soon)
    • ERC1155 (coming soon)
    token selection

    While all of the above token types are supported, the recommended use-case for a token-based census is a custom token created specifically to govern an organization. It is theoretically possible to create a census with a popular token such as ETH, but the number of token-holders and frequency of transactions for such a token make census generation impractical.

    This census type is supported by our Census3 service which serves as a bridge between Ethereum and clients, collecting token-holder data and generating census trees.

    Tutorial

    You can check out a full working example of this tutorial here

    The on-chain census requires some extra setup, as censuses depend on indexing token balances from a public blockchain. Luckily the SDK provides a client to the Census3 service which keeps track of token balances and translates blockchain data to a straightforward census of voters. This tutorial explains how to set up your environment and use the VocdoniCensus3Client.

    Setup

    The first consideration when setting up an on-chain census is which token you will use to validate voters. This section will explain how to create a token for testing and register that token to the census3 service.

    Creating a Token

    existing token

    If you already have a token that represents your organization, feel free to skip this step and register your token with the census3 service.

    The easiest way to start using and testing the census3 service is to create a testing token on a testnet (a blockchain network built for testing integrations, where tokens have no real value). We will use a free service to generate a token on the Sepolia testnet. Before you can generate a token, however, there are two steps:

    • Make sure you have a wallet such as Metamask and an account to use for testing.
    • Request some Sepolia ETH from the Sepolia faucet. You need testnet Ethereum to "pay" for transactions on Sepolia.

    You can use Coin Factory to create a standard token. For testing purposes the name, symbol, and initial supply of the token do not matter. After pressing "create token" and signing with you metamask account, make sure to open the token's etherscan page and copy its address.

    Registering Your Token

    With a token created, you now need to register this token to the census3 service. You can set up a fresh Vocdoni SDK environment as described in the tutorial.

    For the sake of testing, let's simply hard-code some information about the token we want to use. We need the address of the token you just published as well as the public Chain ID for the testnet (or mainnet) you are using. Sepolia's chainID is 11155111. We also need the token type, which in this case is erc20.

    const myToken = {
    address: '0x...',
    chainID: 11155111,
    type: 'erc20',
    };

    In addition to creating a normal VocdoniSDKClient, you also need a VocdoniCensus3Client. Use the same environment as you would for the standard SDK client, in this case Staging for a stable testing environment.

    const census3client = new VocdoniCensus3Client({ env: EnvOptions.STG });

    Make sure the Sepolia network is supported by the census3 service with getSupportedChains. Sepolia should always be supported, but if it is not, you need to create a token on a chain that is.

    let chains = await census3Client.getSupportedChains();
    let supportsChain = false;
    for (let chain of chains) {
    if (chain.chainID == myToken.chainID) {
    supportsChain = true;
    }
    }

    Similarly, before registering the token, you can double-check whether it already is supported with getSupportedTokens. Here we convert our target token address to lowercase because it is represented by a case-insensitive hex-string. If the token is already supported (not possible if the token is brand-new), you can skip the next step.

    let tokens = await census3Client.getSupportedTokens();
    let supportsToken = false;
    for (let token of tokens) {
    if (token.ID.toLowerCase() === myToken.address.toLowerCase()) {
    supportsToken = true;
    }
    }

    Now we can register the token.

    await census3Client.createToken(myToken.address, myToken.type, myToken.chainID);
    warning

    The createToken function asks the census3 service to add the token to its registry, but this does not mean the token is ready to use.

    Now that the token is registered, we can request the token info from the census3 service. Before using this token to create a census or getting information about the number of token-holders, however, we need to wait for the census3 service to peruse the blockchain and index the entire history of the token. Even with a brand new token this can take some time in the range of 30 minutes. info.status reports whether the token has synced and the syncing progress percentage.

    let status = (await census3Client.getToken(myToken.address, myToken.chainID)).status;
    if (!status.synced) {
    console.log('Token %s is syncing. Progress %d%. Try again later.', myToken.address, status.progress);
    return;
    }

    Creating the Census

    Once a token has been registered and is synced, the steps above never have to be performed again. Simple censuses can be created with createTokenCensus: this creates the 'default' census, in which every token-holder has a weighted vote according to their token balance.

    const census = await census3Client.createTokenCensus(myToken.address, myToken.chainID);

    Complex Census

    It is possible to create a census with more complex inclusion criteria, such as holders of two different tokens. In order to do this, each token must individually be supported by the census3 service. The first step is to create a 'strategy' with census3Client.createStrategy. This strategy ID is then passed to census3Client.createCensus to generate the census itself. createStrategy takes a predicate string which defines the logical operations representing inclusion criteria for the census strategy.

    For a detailed guide on creating complex on-chain censuses, check out Complex Census

    Election & Voting

    Once a census has been created, the entire process is identical to the off-chain tree census process.

    1. Create account
    2. Create election
    3. Publish election & wait for it to be posted
    4. Cast votes
    5. Count votes

    The one difference here is how voter wallets are accessed. Because we are using a token-based census, voters are expected to have custody of their private keys. In a web application, you would need to ask users to connect with a wallet provider (like Metamask) to provide the public key associated with their token-holder account and to sign their vote transaction. You can see how we implemented this in our vite-react example.

    For the purposes of this tutorial, we can just manually import the private key of the testing-only wallet we used to generate the token initially. You could also make other testing wallets and send some of your testing token to them so you can use multiple voters with different weights.

    // Private-keys copied from your wallet provider. NEVER do this with an account you use to hold real funds.
    const voters = ['...', '...'];
    for (const voter of voters) {
    const wallet = new Wallet(voter);
    const client = new VocdoniSDKClient({ env: EnvOptions.STG, wallet: wallet, electionId: electionId });
    ...
    // Create the vote and cast is as you would with an off-chain census

    Anonymity

    Anonymity may seem impossible for token-based censuses, as votes are weighted based on public token balance values. However, we have been able to design a sufficiently-anonymous approach by rounding token values, which you can read about on our blog. This form of anonymity has some drawbacks and theoretical weaknesses that users should be aware of, but it provides a strong layer of anonymity under the right conditions.

    All you need to do to create an anonymous token-based census is to set the anonymous parameter to true:

    const census = await census3Client.createTokenCensus(myToken.address, myToken.chainID, true);

    You can then use this census with an anonymous election:

    electionType: { anonymous: true },

    Voting proceeds as normal and the anonymity is applied.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/census-types/on-chain/complex-census.html b/sdk/integration-details/census-types/on-chain/complex-census.html index 6a37de4b2..03ac8a2c8 100644 --- a/sdk/integration-details/census-types/on-chain/complex-census.html +++ b/sdk/integration-details/census-types/on-chain/complex-census.html @@ -12,13 +12,13 @@ - +
    -

    Complex Census

    The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once.

    Strategies

    The logic that defines inclusion in a token-based census is called a 'strategy.' For the basic token-holder use case, the strategy is defined solely by that token. createTokenCensus chooses the default strategy for that token, so for a basic token-based census you don't need to worry about strategies at all.

    More complex strategies exist, however, such as "holders of both VOC1 token AND VOC2 token."

    Just like checking for supported tokens, you can see a list of the strategies supported by the census3 service:

    const strategies = await census3Client.getStrategies();
    console.log(JSON.stringify(strategies, null, 4));

    This will print a long list of strategies. Some of them will be basic strategies for a single token:

    ...
    {
    "ID": 72,
    "alias": "Default strategy for token VOC3TEST",
    "predicate": "VOC3TEST",
    "uri": "ipfs://bafybeih7rmjsdzqjr6pyjv46jo4kjpl3qfv2yufpdxzmcw2j63z47u6czy",
    "tokens": {
    "VOC3TEST": {
    "ID": "0x9286d95DB5a59306113028EF0BA85bF7068A199F",
    "chainID": 11155111,
    "minBalance": "1",
    "chainAddress": "sep:0x9286d95DB5a59306113028EF0BA85bF7068A199F"
    }
    }
    },
    ...

    Some, on the other hand, will be more complex strategies involving multiple tokens:

    ...
    {
    "ID": 103,
    "alias": "gitcoin_onvote_1711040172449",
    "predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)",
    "uri": "ipfs://bafybeidopynxc746oorzkh7yvhomcw56w72aaw3klqce4gkjcczc7ry3uu",
    "tokens": {
    "GPS": {
    "ID": "0x000000000000000000000000000000000000006C",
    "chainID": 1,
    "minBalance": "16",
    "chainAddress": "eth:0x000000000000000000000000000000000000006C"
    },
    "GPS:Discord": {
    "ID": "0x000000000000000000000000000000000000006C",
    "chainID": 1,
    "minBalance": "1",
    "chainAddress": "eth:0x000000000000000000000000000000000000006C",
    "externalID": "Discord"
    },
    "GPS:Github": {
    "ID": "0x000000000000000000000000000000000000006C",
    "chainID": 1,
    "minBalance": "1",
    "chainAddress": "eth:0x000000000000000000000000000000000000006C",
    "externalID": "Github"
    }
    }
    },
    ...

    Predicates

    As you can see, there are two main differences between the simple and complex strategies: the predicate and the tokens.

    Predicates are logical operators that define how strategies create a census. There are currently two logical operators (AND and OR), each with two additional 'powerups' (sum and mul).

    The predicate syntax and available operators are documented in-depth at Creating a Strategy.

    You can also query the census3 service for a list of available operators:

    const operators = await census3Client.getSupportedOperators();
    console.log(operators);
    [
    {
    description: 'AND logical operator that returns the common token holders between symbols with fixed balance to 1',
    tag: 'AND'
    },
    {
    description: 'AND:sum logical operator that returns the common token holders between symbols with the sum of their balances on both tokens',
    tag: 'AND:sum'
    },
    {
    description: 'AND:mul logical operator that returns the common token holders between symbols with the multiplication of their balances on both tokens',
    tag: 'AND:mul'
    },
    {
    description: 'OR logical operator that returns the token holders of both symbols with fixed balance to 1',
    tag: 'OR'
    },
    {
    description: 'OR:sum logical operator that returns the token holders of both symbols with the sum of their balances on both tokens',
    tag: 'OR:sum'
    },
    {
    description: 'OR:mul logical operator that returns the token holders of both symbols with the multiplication of their balances on both tokens',
    tag: 'OR:mul'
    }
    ]

    As seen in the strategy example above, you can combine operators to create complex predicates with many tokens:

    "predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)"

    Creating a Census

    The first step in creating a complex census is to create the strategy itself. You can write a predicate with the operators defined above and use the predicate with createStrategy(). The only requirement is that you include a list of the necessary tokens used by this predicate, including the token ID (address), chainID, and optionally the minBalance (the minimum necessary balance to include a token-holder in a census).

    const strategyID = await census3Client.createStrategy('voc_test_strategy', 'VOC3TEST AND VOC3TEST3', {
    VOC3TEST: {
    ID: '0x9286d95DB5a59306113028EF0BA85bF7068A199F',
    chainID: 11155111,
    minBalance: '1',
    },
    VOC3TEST3: {
    ID: '0x61353Bc49B062EEe99F4768225f4e4f0df5DB1b9',
    chainID: 11155111,
    minBalance: '1',
    },
    });

    This API call, if successful, returns the ID of the newly-created strategy. You can also use getStrategies() again to make sure the strategy is supported. This ID is needed to create the census based off of the strategy:

    const censusInfo = await census3Client.createCensus(strategyID);

    This returns a set of information about the census but cannot be used to directly create an election. To do this, just manually create a PublishedCensus.

    const census = new PublishedCensus(
    censusInfo.merkleRoot,
    censusInfo.uri,
    censusInfo.anonymous ? CensusType.ANONYMOUS : CensusType.WEIGHTED,
    censusInfo.size,
    BigInt(censusInfo.weight)
    );

    This census can be used to create an election just like any other. In this case, the census would represent all token-holders of the VOC3TEST and VOC3TEST3 tokens, all with a weight of 1.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - +

    Complex Census

    The census3 service makes it easy to create a census based off of the balance holders of a token taken to represent an organization. It is possible, however, to create a token-based census with more complex logic, incorporating balance information from multiple tokens at once.

    Strategies

    The logic that defines inclusion in a token-based census is called a 'strategy.' For the basic token-holder use case, the strategy is defined solely by that token. createTokenCensus chooses the default strategy for that token, so for a basic token-based census you don't need to worry about strategies at all.

    More complex strategies exist, however, such as "holders of both VOC1 token AND VOC2 token."

    Just like checking for supported tokens, you can see a list of the strategies supported by the census3 service:

    const strategies = await census3Client.getStrategies();
    console.log(JSON.stringify(strategies, null, 4));

    This will print a long list of strategies. Some of them will be basic strategies for a single token:

    ...
    {
    "ID": 72,
    "alias": "Default strategy for token VOC3TEST",
    "predicate": "VOC3TEST",
    "uri": "ipfs://bafybeih7rmjsdzqjr6pyjv46jo4kjpl3qfv2yufpdxzmcw2j63z47u6czy",
    "tokens": {
    "VOC3TEST": {
    "ID": "0x9286d95DB5a59306113028EF0BA85bF7068A199F",
    "chainID": 11155111,
    "minBalance": "1",
    "chainAddress": "sep:0x9286d95DB5a59306113028EF0BA85bF7068A199F"
    }
    }
    },
    ...

    Some, on the other hand, will be more complex strategies involving multiple tokens:

    ...
    {
    "ID": 103,
    "alias": "gitcoin_onvote_1711040172449",
    "predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)",
    "uri": "ipfs://bafybeidopynxc746oorzkh7yvhomcw56w72aaw3klqce4gkjcczc7ry3uu",
    "tokens": {
    "GPS": {
    "ID": "0x000000000000000000000000000000000000006C",
    "chainID": 1,
    "minBalance": "16",
    "chainAddress": "eth:0x000000000000000000000000000000000000006C"
    },
    "GPS:Discord": {
    "ID": "0x000000000000000000000000000000000000006C",
    "chainID": 1,
    "minBalance": "1",
    "chainAddress": "eth:0x000000000000000000000000000000000000006C",
    "externalID": "Discord"
    },
    "GPS:Github": {
    "ID": "0x000000000000000000000000000000000000006C",
    "chainID": 1,
    "minBalance": "1",
    "chainAddress": "eth:0x000000000000000000000000000000000000006C",
    "externalID": "Github"
    }
    }
    },
    ...

    Predicates

    As you can see, there are two main differences between the simple and complex strategies: the predicate and the tokens.

    Predicates are logical operators that define how strategies create a census. There are currently two logical operators (AND and OR), each with two additional 'powerups' (sum and mul).

    The predicate syntax and available operators are documented in-depth at Creating a Strategy.

    You can also query the census3 service for a list of available operators:

    const operators = await census3Client.getSupportedOperators();
    console.log(operators);
    [
    {
    description: 'AND logical operator that returns the common token holders between symbols with fixed balance to 1',
    tag: 'AND'
    },
    {
    description: 'AND:sum logical operator that returns the common token holders between symbols with the sum of their balances on both tokens',
    tag: 'AND:sum'
    },
    {
    description: 'AND:mul logical operator that returns the common token holders between symbols with the multiplication of their balances on both tokens',
    tag: 'AND:mul'
    },
    {
    description: 'OR logical operator that returns the token holders of both symbols with fixed balance to 1',
    tag: 'OR'
    },
    {
    description: 'OR:sum logical operator that returns the token holders of both symbols with the sum of their balances on both tokens',
    tag: 'OR:sum'
    },
    {
    description: 'OR:mul logical operator that returns the token holders of both symbols with the multiplication of their balances on both tokens',
    tag: 'OR:mul'
    }
    ]

    As seen in the strategy example above, you can combine operators to create complex predicates with many tokens:

    "predicate": "GPS AND:mul (GPS:Discord OR GPS:Github)"

    Creating a Census

    The first step in creating a complex census is to create the strategy itself. You can write a predicate with the operators defined above and use the predicate with createStrategy(). The only requirement is that you include a list of the necessary tokens used by this predicate, including the token ID (address), chainID, and optionally the minBalance (the minimum necessary balance to include a token-holder in a census).

    const strategyID = await census3Client.createStrategy('voc_test_strategy', 'VOC3TEST AND VOC3TEST2', {
    VOC3TEST: {
    ID: '0x9286d95DB5a59306113028EF0BA85bF7068A199F',
    chainID: 11155111,
    minBalance: '1',
    },
    VOC3TEST2: {
    ID: '0x61353Bc49B062EEe99F4768225f4e4f0df5DB1b9',
    chainID: 11155111,
    minBalance: '1',
    },
    });

    This API call, if successful, returns the ID of the newly-created strategy. You can also use getStrategies() again to make sure the strategy is supported. This ID is needed to create the census based off of the strategy:

    const census = await census3Client.createStrategyCensus(strategyID);

    This returns a census can be used to create an election just like any other. In this case, the census would represent all token-holders of the VOC3TEST and VOC3TEST3 tokens, all with a weight of 1. The selected strategy is displayed in the meta field of a token-based election.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    + \ No newline at end of file diff --git a/sdk/integration-details/vocdoni-tokens.html b/sdk/integration-details/vocdoni-tokens.html index 2410ece5d..dcbcfb065 100644 --- a/sdk/integration-details/vocdoni-tokens.html +++ b/sdk/integration-details/vocdoni-tokens.html @@ -3,7 +3,7 @@ -Vocdoni Tokens | Vocdoni developer portal +Vocdoni Tokens | Vocdoni developer portal @@ -12,14 +12,14 @@ - +
    -

    Vocdoni Tokens

    Behind-the-scenes, Vocdoni is powered by a custom blockchain. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital "currency" of Vocdoni tokens that have no real-world value but help with load-balancing and spam reduction. Actions that update data on the blockchain, such as creating an election, incur a "cost." Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.

    info

    Casting a vote never requires Vocdoni tokens.

    Initial Tokens

    Because accounts cannot hold Vocdoni tokens before they are created, client.createAccount() automatically requests tokens from the blockchain. In production environments, only enough tokens to create the account itself are provided. Moving forward, more tokens must be requested in order to create elections. +

    Vocdoni Tokens

    Behind-the-scenes, Vocdoni is powered by a custom blockchain. This component provides universal verifiability, but it also introduces some complexity. In order to distribute workload and verify transactions, our blockchain uses a digital "currency" of Vocdoni tokens that have no real-world value but help with spam reduction and self-sustainability. Actions that update data on the blockchain, such as creating an election, incur a "cost." Integrators are responsible for ensuring that accounts creating elections have a sufficient balance of tokens.

    info

    Casting a vote never requires Vocdoni tokens.

    Initial Tokens

    Because accounts cannot hold Vocdoni tokens before they are created, client.createAccount() automatically requests tokens from the blockchain. In production environments, only enough tokens to create the account itself are provided. Moving forward, more tokens must be requested in order to create elections. In non-production environments, a large amount of tokens is automatically supplied to accounts when they are created. You can create many elections in the STG and DEV environments before worrying about maintaining a balance.

    Checking Token Balance

    From this point on, you can check your account balance with client.createAccount() or client.fetchAccountInfo(). This provides all the information associated with the account, including the balance.

    Election Cost

    The token cost of a voting process is not constant; it is determined by many factors. After creating an election, but before publishing it to the blockchain, you should get a sense of the cost of the operation in order to ensure your account has sufficient balance. There are two methods to do this: client.estimateElectionCost() quickly provides a decent estimate of the cost and can be useful for writing UI components. client.calculateElectionCost() makes a time-intensive API call but provides an exact figure. It is helpful to use this directly before publishing the election to ensure it can be published.

    const price = await client.estimateElectionCost(election); // Should be an UnpublishedElection with a maxCensusSize
    console.log(price); // shows the estimated price
    estimate election cost

    In order to estimate the cost of an election quickly, the election must be created with a specified maxCensusSize. This restricts the number of users who can enter the census but enables quick election cost estimation. If you want an unlimited census size, just use calculateElectionCost instead.

    const electionCost = await client.calculateElectionCost(election);
    const info = await client.createAccount();
    if (info.balance < electionCost) {
    console.log('Need to request more tokens');
    }

    Requesting Tokens: The Faucet

    The main way for users to gain tokens in a production environment is via a faucet, a free provider of tokens. A faucet enables users to generate a faucetPackage. This package is essentially a set of instructions; it must still be sent to the blockchain in order to request the actual tokens.

    users & tokens

    Some systems require election administrators to request tokens manually for their elections. In other systems, integrators may handle token requests automatically on behalf of their users. This can be done manually or with a custom faucet implementation. Reach out for help with this.

    DEV & STG

    In development and staging environments, the faucet functionality is handled automatically. Behind-the-scenes, createAccount requests a large amount of tokens from a development faucet. These tokens should last a while, but once the account balance is low, more tokens must be requested. This can be done with

    await client.collectFaucetTokens();

    This method uses the default development faucet to generate a faucetPackage requesting new tokens. It can be used any number of times. In development environments, this is all that needs to be done!

    PROD

    Production environments require more hands-on generation of a faucetPackage. First you need to identify the account address you are requesting tokens for.

    console.log((await client.fetchAccountInfo()).address);

    There are multiple ways to request a faucet package:

    • Use https://app.vocdoni.io/faucet, our web-based faucet that requires users to login with some form of existing account (google, github, social media). It provides a large amount of tokens to the given address but limits the number of times a single user can request tokens per week.
    • Reach out via discord to request tokens sent to your account address.
    • If you are an integrator who needs to manage your own faucet to provide tokens to users automatically, ask us for help with creating a custom faucet.

    All of these faucets should provide you with a base-64 string containing the necessary information to request tokens from the blockchain with collectFaucetTokens. Note that each faucet package can only be used once.

    await client.collectFaucetTokens("<b64string>")
    collect faucet tokens

    In production environments, the collectFaucetTokens method requires a faucetPackage to be provided. In development and stage, this is optional as a package is generated automatically by default.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/voting-types.html b/sdk/integration-details/voting-types.html index d8783a9e9..7e4d4ab1e 100644 --- a/sdk/integration-details/voting-types.html +++ b/sdk/integration-details/voting-types.html @@ -12,7 +12,7 @@ - + @@ -24,7 +24,7 @@ importance in the decision-making process.
  • Quadratic voting, voters can cast multiple votes for issues they prioritize, but the cost of casting additional votes on the same issue rises exponentially.
  • The configuration of these election types happens at the time of election creation using the SDK. Refer to the respective documentation for the parameter requirements for each election type.

    These voting types describe different sets of behavior that can be generated with the set of election parameters. A comprehensive explanation of the parameters used in the ballot protocol can be found here.

    Results interpretation

    The structure for individual ballots and the corresponding results can vary depending on the election parameters. For example, a vote envelope [0, 2, 1] could mean one of the following:

    • 0 points for the first candidate, 2 points for the second candidate, 1 point for the third candidate
    • first-choice selection for the first candidate, third-choice for the second candidate, and second-choice for the third
    • choice of option 0 for the first question, option 2 for the second question, and option 1 for the third.

    The interpretation of votes is done at the protocol-level, according to the election parameters. The results are stored on the Vochain as a bi-dimensional array. Essentially, the ballot protocol is a system that transforms a unidimensional array (a vote, e.g., [1,4]) into a bi-dimensional array of results (e.g., [[2,5], [3,8]]).

    The interpretation of this matrix of results is done on the client side, which receives the raw results from the SDK. The SDK also provides metadata about the election to facilitate understanding of the results. More details on interpreting results can be found here.

    Here's a simple example to demonstrate how the same result array can be interpreted in different ways, depending on the election type:

    Linear-Weighted Choice Voting

    Consider a single-choice question where three candidates are ranked by voters, each receiving a number of 'points' according to each voter's ranking. This is an example of linear-weighted choice. A results array with 10 votes might look like this:

    [ 
    [4, 6, 0],
    [2, 4, 4],
    [4, 0, 6]
    ]

    Each row of this matrix represents a single candidate, and each column represents a chosen allocation of points. The numbers represent the total number of votes for that candidate/points combination.

    In this scenario:

    • The first candidate receives 4 0-point votes and 6 1-point votes
    • The second candidate receives 2 0-point, 4 1-point, and 4 2-point votes
    • The third candidate receives 4 0-point votes and 6 2-point votes

    We can use this results matrix to calculate the total weighted sum for each candidate: the first candidate receives 6 points, the second candidate receives 12, and the third candidate receives 12. Candidates 2 and 3 tie. This results interpretation is "weighted," meaning each choice represents a quantified amount of preference, and we could aggregate the results into a single array of allocated points without losing any information:

    [6, 12, 12]
    aggregated results

    For all elections where maxValue is set to 0, it is assumed that the election uses a weighted results system (like in this example). The aggregated results ([6, 12, 12]) are calculated on the indexer and reported as the official results.

    Ranked-Choice Voting

    Consider a single-choice question where three candidates are ranked by preference, and if no candidate receives more than 50% of the first-choice votes, second-choice votes are considered (a runoff election). This is one example of a ranked voting scheme. The results array could look identical to the one above:

    [ 
    [4, 6, 0],
    [2, 4, 4],
    [4, 0, 6]
    ]

    Each row of this matrix represents a single candidate, and each column represents the choice (first, second, third). The numbers represent the total number of votes for that candidate/choice combination.

    In this scenario:

    • The first candidate receives 4 first-choice and 6 second-choice votes
    • The second candidate receives 2 first-choice, 4 second-choice, and 4 third-choice votes
    • The third candidate receives 6 first-choice and 4 third-choice votes

    The main difference between this example in the last is that each vote count has to be treated as a discrete piece of data rather than a value that can be combined arithmetically with others. This is because this election has a complex method for calculating the winner where first and second choices have different meanings rather than different amounts of the same meaning. The entire results matrix is needed in order to calculate a result.

    ranked-choice

    For ranked-choice, the maxValue parameter cannot equal zero to signify that values are discrete options, not weighted points.

    In this case, the first and third candidates tie with 40% of the vote each when only first-choice votes are considered. Thus we must consider a runoff using second-choice votes: the first candidate gets 60% of the second-choice votes, and the third candidate gets 0%. The first candidate wins the election.

    Multiple Question

    Now, let's consider an election with three questions, where each question has three options. Voters must select one of the three options for each question. This is a multiple-question, multiple-choice election.

    [ 
    [4, 6, 0],
    [2, 4, 4],
    [4, 0, 6]
    ]

    Each row of this matrix represents a separate question, and each column represents the choice (first, second, third). The numbers represent the total number of votes for that question/choice combination.

    In this scenario:

    • For the first question, candidate 0 receives 4 votes and candidate 1 receives 6 (candidate 1 wins)
    • For the second question, candidate 0 receives 2 votes, candidate 1 receives 4, and candidate 2 receives 4 (candidates 1 and 2 tie)
    • For the third question, candidate 0 receives 4 votes and candidate 2 receives 6 (candidate 2 wins)

    You can see how the same results matrix could represent a wide set of interpretations, and it is crucial to pay attention to the election parameters and original design of the election when displaying the results.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/voting-types/approval.html b/sdk/integration-details/voting-types/approval.html index 430ba4e7e..8570da3ca 100644 --- a/sdk/integration-details/voting-types/approval.html +++ b/sdk/integration-details/voting-types/approval.html @@ -12,7 +12,7 @@ - + @@ -27,7 +27,7 @@ match the total number of choices in the election (maxCount).

    Results interpretation

    Assume a scenario where ten voters cast identical votes, i.e. [0, 1, 0, 1].

    The election results would be represented as a two-dimensional array:

    [ 
    [ '10', '0' ],
    [ '0', '10' ],
    [ '10', '0' ],
    [ '0', '10' ]
    ]

    Each position in the outer array corresponds to the available choices, and each position within the inner arrays signifies the number of voters who selected or did not select the corresponding choice. For example, [10, 0] indicates ten users did not select the choice, whereas [0, 10] means that ten users voted for the choice. So:

    • For choice 0, all 10 voters assigned it 0 points,
    • For choice 1, all 10 voters assigned it 1 point,
    • For choice 2, all 10 voters assigned it 0 points, and
    • For choice 3, all 10 voters assigned it 1 point.

    Remember, this interpretation assumes that all voters have used the same voting pattern.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/voting-types/quadratic.html b/sdk/integration-details/voting-types/quadratic.html index 2c32c1807..db75c0878 100644 --- a/sdk/integration-details/voting-types/quadratic.html +++ b/sdk/integration-details/voting-types/quadratic.html @@ -12,7 +12,7 @@ - + @@ -32,7 +32,7 @@ quadratic voting system, while it is possible to cast more votes for a preferred option, it also becomes exponentially more costly to do so, providing a self-balancing mechanism that aims to accurately reflect the strength of voters preferences.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/voting-types/ranked.html b/sdk/integration-details/voting-types/ranked.html index 0ebbea164..ed768dbe6 100644 --- a/sdk/integration-details/voting-types/ranked.html +++ b/sdk/integration-details/voting-types/ranked.html @@ -12,7 +12,7 @@ - + @@ -28,7 +28,7 @@ (maxCount), and the value assigned to each entry should not exceed maxValue.

    With the vote array [2, 3, 0, 1, 4], it means:

    • Choice 1 is ranked as the 3nd option
    • Choice 2 is ranked as the 4rd option
    • Choice 3 is ranked as the 1st option
    • Choice 4 is ranked as the 2nd option
    • Choice 5 is ranked as the 5th option

    Results interpretation

    Consider a scenario where 10 voters cast identical votes, i.e., [2, 3, 0, 1, 4].

    The election results would be represented as a two-dimensional array:

     [
    [ '0', '0', '10', '0', '0' ],
    [ '0', '0', '0', '10', '0' ],
    [ '10', '0', '0', '0', '0' ],
    [ '0', '10', '0', '0', '0' ],
    [ '0', '0', '0', '0', '10' ]
    ]

    Each position in the outer array corresponds to the available choices, as in the previous example: "Bitcoin:0, Ethereum:1, Monero:2, Zcash:3, Polkadot:4".

    Every position within the inner arrays indicates how many voters selected the corresponding choice for a specific ranking:

    • Choice 0 (Bitcoin) was selected as the 2nd option by all 10 voters
    • Choice 1 (Ethereum) was selected as the 3rd option by all 10 voters
    • Choice 2 (Monero) was selected as the 1st option by all 10 voters
    • Choice 3 (Zcash) was selected as the 2nd option by all 10 voters
    • Choice 4 (Polkadot) was selected as the 5th option by all 10 voters

    Remember, this interpretation assumes that all voters have used the same voting pattern.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/voting-types/single-choice.html b/sdk/integration-details/voting-types/single-choice.html index ddae991d4..37d2b0b3d 100644 --- a/sdk/integration-details/voting-types/single-choice.html +++ b/sdk/integration-details/voting-types/single-choice.html @@ -12,7 +12,7 @@ - + @@ -29,7 +29,7 @@ choice has accumulated.

    • For the first question ([ '10', '0', '0' ]): all 10 voters chose the first option.
    • For the second question ([ '0', '0', '10' ]): all 10 voters chose the third option.

    In the example above, the first question offers two options, and the second presents three. However, the results array for the first question contains three elements, as the maxValue for all questions is the same (in this case, 3, the maxValue of the question with the most options).

    Single question results interpretation

    Not so different, the results array will look like:

    [ [ '0', '0', '10' ] ]

    For the only one question, 10 voters select the third option

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/integration-details/voting-types/weighted.html b/sdk/integration-details/voting-types/weighted.html index 23d99aa0c..ce6bee988 100644 --- a/sdk/integration-details/voting-types/weighted.html +++ b/sdk/integration-details/voting-types/weighted.html @@ -12,7 +12,7 @@ - + @@ -34,7 +34,7 @@ weighted votes for 'yes'".

    tip

    In a weighted election, the Vochain stores the envelope without calculating the weight of each voter. However, when retrieving the results using the SDK, you will see the weights applied. The application of these weights is performed by the vocdoni-node indexer, which calculates the weights for you.

    The weights of each vote are stored in the envelope, which is saved on the Vochain.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/changelog.html b/sdk/reference/changelog.html index ed73e40f0..d9b574dcd 100644 --- a/sdk/reference/changelog.html +++ b/sdk/reference/changelog.html @@ -12,7 +12,7 @@ - + @@ -21,7 +21,7 @@ and this project adheres to Semantic Versioning.

    [0.7.5] - 2024-02-15

    Added

    • Added support for getting token holder balance in Census3 using tokenHolderBalance.
    • Added support for getting token holders based on strategy using getStrategyHolders.

    Fixed

    • Fixed CensusOrigin when election is using CSP census and anonymous.
    • Fixed bad generation of dist bundles in previous version.

    0.7.4 - 2024-02-06

    Added

    • Added new CspProofType type when voting in a CSP based election to choose the encryption type.

    0.7.3 - 2024-01-23

    Added

    • Added new ApprovalElection election type for creating approval elections easily.

    Fixed

    • Fixed costExponent to 1.
    • Fixed error when election has no metadata.
    • Fixed error with questions results for elections with no new type metadata.

    0.7.2 - 2024-01-17

    Added

    • Added new MultiChoiceElection election type for creating multi-choice elections easily.
    • Added new BudgetElection election type for creating budget elections easily.

    Fixed

    • Results in published elections are now correctly returned for each type of election.

    0.7.1 - 2024-01-11

    Changed

    • Supported tokens from Census3 using getSupportedTokens() returns now a token summary.
    • Census3 getStrategyEstimation accepts anonymous flag and returns accuracy for anonymous censuses.

    Fixed

    • Removed nullifier from vote package.
    • Returning census from type CspCensus when election is for CSP.

    Added

    • Added ArchivedAccountData for dealing with archived accounts and new fetchAccount function in client.
    • Added ErrFaucetAlreadyFunded for faucet limit requests.
    • Added ErrElectionFinished for doing actions when election is finished.
    • Added submitVoteSteps for voting using async generator steps.

    0.7.0 - 2023-12-13

    Changed

    • Changed sha256 library from @ethersproject/sha2 to js-sha256 for web workers.
    • Using API endpoint for estimating blocks from dates when creating an election.
    • [BREAKING] Census3 getStrategySize function changed to getStrategyEstimation giving estimated time and size for the given strategy.

    0.6.1 - 2023-11-29

    Added

    • New anonymous function hasRegisteredSIK for checking if a user has registered a SIK.

    Fixed

    • Removed outliers from block times for avoiding block estimation issues.

    0.6.0 - 2023-11-28

    Added

    • New election service functions nextElectionId and getElectionSalt.

    Changed

    • [BREAKING] Refactored options for isInCensus, hasAlreadyVoted, isAbleToVote and votesLeftCount.
    • [BREAKING] New options for AnonymousVote which enable to add the user's signature.
    • [BREAKING] New internal anonymous flow when signature is given by the consumer.

    0.5.3 - 2023-11-28

    Added

    • New account methods supported for listing, counting and checking account transfers in AccountAPI.

    Fixed

    • Archived elections without census URI are now accepted.

    Changed

    • Faucet options don't require token_limit anymore.

    0.5.2 - 2023-11-16

    Fixed

    • Anonymous vote packages are no longer signed.

    0.5.1 - 2023-11-15

    Fixed

    • Missing exported election type ArchivedElection.
    • Faucet errors correctly shown with message.

    0.5.0 - 2023-11-14

    Changed

    • [BREAKING] New full integration for Census3 v2, using tokens, strategies and censuses.

    0.4.3 - 2023-11-09

    Added

    • Support for archived elections with new election type ArchivedElection and with new census with type ArchivedCensus.

    0.4.2 - 2023-11-06

    Changed

    • Removed faucet path from default URLs.
    • Updated @vocdoni/proto dependency to 1.15.4.

    Added

    • Import, export and delete census functionality in census service.
    • Added new election parameter temporarySecretIdentity for deleting temporary SIKs once election is finished.

    Fixed

    • Fixed ffjavascript dependency to 0.2.59.

    0.4.1 - 2023-10-24

    Changed

    • Modified dev, stg and prod default URLs for all services.
    • Upgraded to new faucet.

    0.4.0 - 2023-10-10

    Changed

    • [BREAKING] New signatures for chain transactions.

    0.3.2 - 2023-10-10

    Added

    • Added support for uploading big censuses in chunks.

    Fixed

    • Added assert as embedded in rollup configuration.

    0.3.1 - 2023-09-20

    Added

    • New createElectionSteps function in client for using async generators and control creation flow.
    • New sendTokens function in client for transferring tokens between accounts.

    Changed

    • New user-friendly text for SIK payload signing.

    Fixed

    • Added ethers as embedded in rollup configuration for circomlibjs dependencies.

    0.3.0 - 2023-09-13

    Fixed

    • Ensuring proof value handled as hex for anonymous circuits inputs.

    Changed

    • [BREAKING] Removed some (probably not used) client properties for future refactor.
    • Added services as mid-layer between pure SDK client and API wrappers.

    Added

    • Census3 supported chains information.

    0.2.0 - 2023-09-04

    Fixed

    • dotobject helper returns null when key is not found.

    Changed

    • collectFaucetTokens function accepts raw faucet package payload.

    Added

    • Census3 error typings.
    • [BREAKING] Census3 anonymous censuses.

    0.1.1 - 2023-08-14

    Fixed

    • Added missing dependency readable-stream.

    0.1.0 - 2023-08-11

    Added

    • [BREAKING] Anonymous integration

    Fixed

    • Added missing maxCensusSize and manuallyEnded in fetchElection.

    0.0.18 - 2023-08-01

    Added

    • Election get function to fetch metadata values using dotobject

    Fixed

    • Added missing dependencies

    0.0.17 - 2023-07-21

    Added

    • Anonymous support using zkSNARK.

    Changed

    • Election meta field has a more lax typing.

    0.0.16 - 2023-07-04

    Added

    • SDK version added to election metadata.
    • Added new function changeElectionCensus to change the election census dynamically.
    • Added new helper function formatUnits for formatting big decimals values.

    Changed

    • New types defined in VocdoniCensus3Client with some additional documentation.
    • Added new field symbol to summary token list in Census3.
    • Added new field size to token information in Census3 as number of token holders.

    Fixed

    • Error codes coming from the API.

    0.0.15 - 2023-06-20

    Added

    • New InvalidElection type for invalid elections.
    • New estimateElectionCost function in client for estimating election cost.
    • New calculateElectionCost function in client for calculating the exact election cost.
    • New API wrappers for general chain information.

    Changed

    • fetchElections returns new InvalidElection type instead of throwing.

    Fixed

    • CSP elections use the URI and public key from the election census defined at creation.

    0.0.14 - 2023-06-12

    Added

    • maxValue, maxCount and maxTotalCost properties in IVoteType in an election for creating quadratic, approval and ranked elections.

    0.0.13 - 2023-06-06

    Added

    • Census3 integration
    • Added meta parameters to election metadata
    • Minor helper functions

    Changed

    • Added some new information to API endpoints

    Fixed

    • Unlocked rollup version

    0.0.12 - 2023-05-09

    Fixed

    • Fixed personal_sign provider call bug for certain environments

    0.0.11 - 2023-04-25

    Fixed

    • Fix type error in fetchAccountInfo

    0.0.10 - 2023-04-25

    Fixed

    • Fixed internal SetAccountTx nonce when creating transactions

    0.0.9 - 2023-04-25

    Added

    • generateRandomWallet function for assigning a random Wallet to the client

    Changed

    • isInCensus doesn't accept census type because censuses with public keys are removed
    • Refactored account methods to return new AccountData definition with Account field

    Removed

    • Ability to create censuses using public keys

    0.0.8 - 2023-04-05

    Added

    • Custom error handling (WIP)

    Changed

    • votesLeftCount checks if user is in census.
    • hasAlreadyVoted() returns the vote id or null if the account hasn't voted.

    Fixed

    • Increased time for transaction confirmation due to block time increase.

    0.0.7 - 2023-03-29

    Changed

    • Updated vocdoni/proto library to version 1.14.1.
    • Added maxCensusSize to the election creation.

    0.0.6 - 2023-03-22

    Changed

    • ElectionStatus includes new values ONGOING and UPCOMING. READY is removed an only used internally.
    • Election description changed from mandatory to optional.
    • fetchElections accepts no account and returns all elections in the chain.
    • fetchAccountInfo accepts arbitrary account to retrieve information.

    0.0.5 - 2023-03-08

    Added

    • fetchElections function to fetch all elections based on a given account
    • New organizationId property in PublishedElection

    Changed

    • PublishedCensus has size and weight fields for offchain census.

    0.0.4-alpha - 2023-03-01

    Added

    • Credential service provider integrated
    • Custom retry attempts and time for transactions waiting functionality
    • Added votesLeftCount function for checking how many times a user can submit a vote
    • New API requests added for chain information

    Changed

    • header and streamUri are no longer mandatory when creating an election.

    Fixed

    • No more 400 error status HTTP requests when asking for a non-confirmed transaction
    • maxValue property fixed in election data

    0.0.3-alpha - 2023-01-31

    Added

    • Functionality to check if a user is in census isInCensus
    • Functionality to check if a user has already voted hasAlreadyVoted
    • Functionality to check if a user is able to vote isAbleToVote
    • Export UMD version via @vocdoni/sdk/umd
    • Deterministic Wallet generation from arbitrary data

    Fixed

    • Return voteId when submitting vote instead of the transaction hash.
    • Buffer imports for bundle
    • Bundling & export issues

    Changed

    • Removed dvote-solidity dependency.

    0.0.2-alpha - 2022-12-20

    Added

    • Staging environment options for API and Faucet
    • Functionality to end, pause, cancel and continue an election

    Fixed

    • Fixed proof check using public key when signer is from type Wallet

    Changed

    • Use voting endpoint instead of generic submitTx.
    • Naming for client initialization options changed.
    • There are now the new UnpublishedElection and PublishedElection classes which extend from the abstract Election class.
    • fetchElection accepts an election id.

    0.0.1-alpha - 2022-12-01

    Added

    • First unstable version of the SDK for testing purposes

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Account.html b/sdk/reference/classes/Account.html index 36eeca26d..63047f095 100644 --- a/sdk/reference/classes/Account.html +++ b/sdk/reference/classes/Account.html @@ -12,13 +12,13 @@ - +

    Account

    @vocdoni/sdk / Account

    Class: Account

    Represents an account

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    avatar

    get avatar(): string

    Returns

    string

    Defined in

    types/account.ts:108

    set avatar(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/account.ts:112


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Defined in

    types/account.ts:92

    set description(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Defined in

    types/account.ts:96


    feed

    get feed(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Defined in

    types/account.ts:124

    set feed(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Defined in

    types/account.ts:128


    get header(): string

    Returns

    string

    Defined in

    types/account.ts:100

    set header(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/account.ts:104


    languages

    get languages(): string[]

    Returns

    string[]

    Defined in

    types/account.ts:140

    set languages(value): void

    Parameters

    NameType
    valuestring[]

    Returns

    void

    Defined in

    types/account.ts:144


    get logo(): string

    Returns

    string

    Defined in

    types/account.ts:116

    set logo(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/account.ts:120


    meta

    get meta(): { key: string ; value: any }[]

    Returns

    { key: string ; value: any }[]

    Defined in

    types/account.ts:132

    set meta(value): void

    Parameters

    NameType
    value{ key: string ; value: any }[]

    Returns

    void

    Defined in

    types/account.ts:136


    name

    get name(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Defined in

    types/account.ts:84

    set name(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Defined in

    types/account.ts:88

    Constructors

    constructor

    new Account(params?): Account

    Constructs an account

    Parameters

    NameTypeDescription
    params?IAccountAccount parameters

    Returns

    Account

    Defined in

    types/account.ts:33

    Methods

    generateMetadata

    generateMetadata(): AccountMetadata

    Returns

    AccountMetadata

    Defined in

    types/account.ts:65


    build

    build(params): Account

    Returns an account object

    Parameters

    NameTypeDescription
    paramsIAccountAccount parameters

    Returns

    Account

    Defined in

    types/account.ts:61

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/AccountAPI.html b/sdk/reference/classes/AccountAPI.html index fc8006e3c..9439657bf 100644 --- a/sdk/reference/classes/AccountAPI.html +++ b/sdk/reference/classes/AccountAPI.html @@ -12,13 +12,13 @@ - +

    AccountAPI

    @vocdoni/sdk / AccountAPI

    Class: AccountAPI

    Hierarchy

    • API

      AccountAPI

    Table of contents

    Methods

    Methods

    count

    count(url): Promise\<IAccountsCountResponse>

    Returns the number of accounts

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<IAccountsCountResponse>

    Defined in

    api/account.ts:131


    electionsList

    electionsList(url, accountId, page?): Promise\<IElectionListResponse>

    Returns paginated list of elections for a specific account

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    accountIdstringundefinedaccountId to get elections
    pagenumber0The page number

    Returns

    Promise\<IElectionListResponse>

    Defined in

    api/account.ts:212


    info

    info(url, accountId): Promise\<IAccountInfoResponse>

    Fetches an Account information

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    accountIdstringThe account we want the info from

    Returns

    Promise\<IAccountInfoResponse>

    Defined in

    api/account.ts:144


    list

    list(url, page?): Promise\<IAccountsListResponse>

    Returns paginated list of accounts

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    pagenumber0The page number

    Returns

    Promise\<IAccountsListResponse>

    Defined in

    api/account.ts:119


    metadata

    metadata(url, accountId): Promise\<AccountMetadata>

    Fetches the account metadata

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    accountIdstringThe account we want the info from

    Returns

    Promise\<AccountMetadata>

    Defined in

    api/account.ts:157


    setInfo

    setInfo(url, payload, metadata): Promise\<IAccountSetInfoResponse>

    Sets Account information

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    payloadstringThe set information info raw payload to be submitted to the chain
    metadatastringThe base64 encoded metadata JSON object

    Returns

    Promise\<IAccountSetInfoResponse>

    Defined in

    api/account.ts:171


    transfersCount

    transfersCount(url, accountId): Promise\<IAccountTransfersCountResponse>

    Returns the account's transfers count

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    accountIdstringaccountId to get the transfers count

    Returns

    Promise\<IAccountTransfersCountResponse>

    Defined in

    api/account.ts:198


    transfersList

    transfersList(url, accountId, page?): Promise\<IAccountTransfersResponse>

    Returns paginated list of transfers for a specific account

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    accountIdstringundefinedaccountId to get transfers
    pagenumber0The page number

    Returns

    Promise\<IAccountTransfersResponse>

    Defined in

    api/account.ts:185

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/AccountService.html b/sdk/reference/classes/AccountService.html index 110d0f094..4c1fe7cb3 100644 --- a/sdk/reference/classes/AccountService.html +++ b/sdk/reference/classes/AccountService.html @@ -12,13 +12,13 @@ - +

    AccountService

    @vocdoni/sdk / AccountService

    Class: AccountService

    Hierarchy

    Implements

    • AccountServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new AccountService(params): AccountService

    Instantiate the election service.

    Parameters

    NameTypeDescription
    paramsPartial\<AccountServiceParameters>The service parameters

    Returns

    AccountService

    Overrides

    Service.constructor

    Defined in

    services/account.ts:45

    Methods

    fetchAccountInfo

    fetchAccountInfo(address): Promise\<AccountData | ArchivedAccountData>

    Fetches account information.

    Parameters

    NameTypeDescription
    addressstringThe account address to fetch the information

    Returns

    Promise\<AccountData | ArchivedAccountData>

    Defined in

    services/account.ts:55


    setInfo

    setInfo(tx, metadata): Promise\<string>

    Updates an account with information

    Parameters

    NameTypeDescription
    txstringThe transaction for setting the account
    metadatastringThe account metadata

    Returns

    Promise\<string>

    The transaction hash

    Defined in

    services/account.ts:95


    signTransaction

    signTransaction(tx, message, walletOrSigner): Promise\<string>

    Parameters

    NameType
    txUint8Array
    messagestring
    walletOrSignerSigner | Wallet

    Returns

    Promise\<string>

    Defined in

    services/account.ts:100

    Properties

    chainService

    chainService: ChainService

    Implementation of

    AccountServiceProperties.chainService

    Defined in

    services/account.ts:38


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/AnonymousService.html b/sdk/reference/classes/AnonymousService.html index fc40633b6..2ba9a58ab 100644 --- a/sdk/reference/classes/AnonymousService.html +++ b/sdk/reference/classes/AnonymousService.html @@ -12,13 +12,13 @@ - +

    AnonymousService

    @vocdoni/sdk / AnonymousService

    Class: AnonymousService

    Hierarchy

    Implements

    • AnonymousServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new AnonymousService(params): AnonymousService

    Instantiate the anonymous service.

    Parameters

    NameTypeDescription
    paramsPartial\<AnonymousServiceParameters>The service parameters

    Returns

    AnonymousService

    Overrides

    Service.constructor

    Defined in

    services/anonymous.ts:71

    Methods

    checkCircuitsHashes

    checkCircuitsHashes(): ChainCircuits

    Checks circuit hashes

    Returns

    ChainCircuits

    The checked circuit parameters

    Defined in

    services/anonymous.ts:107


    fetchAccountSIK

    fetchAccountSIK(address): Promise\<string>

    Parameters

    NameType
    addressstring

    Returns

    Promise\<string>

    Defined in

    services/anonymous.ts:82


    fetchCircuits

    fetchCircuits(circuits?): Promise\<ChainCircuits>

    Fetches circuits for anonymous voting

    Parameters

    NameTypeDescription
    circuits?Omit\<ChainCircuits, "zKeyData" | "vKeyData" | "wasmData">Additional options for custom circuits

    Returns

    Promise\<ChainCircuits>

    Defined in

    services/anonymous.ts:130


    fetchZKProof

    fetchZKProof(address): Promise\<IZkProofResponse>

    Parameters

    NameType
    addressstring

    Returns

    Promise\<IZkProofResponse>

    Defined in

    services/anonymous.ts:93


    generateZkProof

    generateZkProof(inputs): Promise\<ZkProof>

    Parameters

    NameType
    inputsCircuitInputs

    Returns

    Promise\<ZkProof>

    Defined in

    services/anonymous.ts:76


    hasRegisteredSIK

    hasRegisteredSIK(address, signature, password?): Promise\<boolean>

    Parameters

    NameType
    addressstring
    signaturestring
    password?string

    Returns

    Promise\<boolean>

    Defined in

    services/anonymous.ts:87


    setCircuits

    setCircuits(circuits): ChainCircuits

    Sets circuits for anonymous voting

    Parameters

    NameTypeDescription
    circuitsChainCircuitsCustom circuits

    Returns

    ChainCircuits

    Defined in

    services/anonymous.ts:185


    signSIKPayload

    signSIKPayload(wallet): Promise\<string>

    Parameters

    NameType
    walletSigner | Wallet

    Returns

    Promise\<string>

    Defined in

    services/anonymous.ts:98


    calcCircuitInputs

    calcCircuitInputs(signature, password, electionId): Promise\<{ arboElectionId: string[] ; ffpassword: string ; ffsignature: string ; nullifier: any }>

    Parameters

    NameType
    signaturestring
    passwordstring
    electionIdstring

    Returns

    Promise\<{ arboElectionId: string[] ; ffpassword: string ; ffsignature: string ; nullifier: any }>

    Defined in

    services/anonymous.ts:232


    calcNullifier

    calcNullifier(signature, password, electionId): Promise\<bigint>

    Parameters

    NameType
    signaturestring
    passwordstring
    electionIdstring

    Returns

    Promise\<bigint>

    Defined in

    services/anonymous.ts:245


    calcSik

    calcSik(address, personal_sign, password?): Promise\<string>

    Parameters

    NameTypeDefault value
    addressstringundefined
    personal_signstringundefined
    passwordstring'0'

    Returns

    Promise\<string>

    Defined in

    services/anonymous.ts:255


    calcVoteId

    calcVoteId(signature, password, electionId): Promise\<string>

    Parameters

    NameType
    signaturestring
    passwordstring
    electionIdstring

    Returns

    Promise\<string>

    Defined in

    services/anonymous.ts:249


    generateGroth16Proof

    generateGroth16Proof(inputs, circuitPath, provingKey): Promise\<ZkProof>

    Parameters

    NameType
    inputsCircuitInputs
    circuitPathUint8Array
    provingKeyUint8Array

    Returns

    Promise\<ZkProof>

    Defined in

    services/anonymous.ts:190


    prepareCircuitInputs

    prepareCircuitInputs(electionId, address, password, signature, voteWeight, availableWeight, sikRoot, sikSiblings, censusRoot, censusSiblings, votePackage): Promise\<CircuitInputs>

    Parameters

    NameType
    electionIdstring
    addressstring
    passwordstring
    signaturestring
    voteWeightstring
    availableWeightstring
    sikRootstring
    sikSiblingsstring[]
    censusRootstring
    censusSiblingsstring[]
    votePackageBuffer

    Returns

    Promise\<CircuitInputs>

    Defined in

    services/anonymous.ts:198


    signatureToVocdoniSikSignature

    signatureToVocdoniSikSignature(personal_sign): string

    Parameters

    NameType
    personal_signstring

    Returns

    string

    Defined in

    services/anonymous.ts:268

    Properties

    chainCircuits

    chainCircuits: ChainCircuits

    Implementation of

    AnonymousServiceProperties.chainCircuits

    Defined in

    services/anonymous.ts:64


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6


    arbo_utils

    Static arbo_utils: Object

    Type declaration

    NameType
    toBigInt(str: string) => bigint
    toHash(input: string) => Promise\<string[]>
    toString(n: bigint) => string

    Defined in

    services/anonymous.ts:275


    ff_utils

    Static ff_utils: Object

    Type declaration

    NameType
    bigIntToFF(bi: bigint) => bigint
    hexToFFBigInt(hexStr: string) => bigint
    qbigint

    Defined in

    services/anonymous.ts:327


    hex_utils

    Static hex_utils: Object

    Type declaration

    NameType
    fromArrayBuffer(input: Uint8Array) => string
    fromBigInt(bi: bigint) => string
    toArrayBuffer(input: string) => Uint8Array

    Defined in

    services/anonymous.ts:302

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/AnonymousVote.html b/sdk/reference/classes/AnonymousVote.html index 9894df65e..b08ee3e73 100644 --- a/sdk/reference/classes/AnonymousVote.html +++ b/sdk/reference/classes/AnonymousVote.html @@ -12,13 +12,13 @@ - +

    AnonymousVote

    @vocdoni/sdk / AnonymousVote

    Class: AnonymousVote

    Represents a vote

    Hierarchy

    • Vote

      AnonymousVote

    Table of contents

    Accessors

    Constructors

    Accessors

    password

    get password(): string

    Returns

    string

    Defined in

    types/vote/anonymous.ts:20

    set password(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/vote/anonymous.ts:24


    signature

    get signature(): string

    Returns

    string

    Defined in

    types/vote/anonymous.ts:28

    set signature(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/vote/anonymous.ts:32


    votes

    get votes(): (number | bigint)[]

    Returns

    (number | bigint)[]

    Inherited from

    Vote.votes

    Defined in

    types/vote/vote.ts:16

    set votes(value): void

    Parameters

    NameType
    value(number | bigint)[]

    Returns

    void

    Inherited from

    Vote.votes

    Defined in

    types/vote/vote.ts:20

    Constructors

    constructor

    new AnonymousVote(votes, signature?, password?): AnonymousVote

    Constructs an anonymous vote

    Parameters

    NameTypeDefault valueDescription
    votes(number | bigint)[]undefinedThe list of votes values
    signature?stringundefinedThe signature of the payload
    passwordstring'0'The password of the anonymous vote

    Returns

    AnonymousVote

    Overrides

    Vote.constructor

    Defined in

    types/vote/anonymous.ts:14

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ApprovalElection.html b/sdk/reference/classes/ApprovalElection.html index fd1d13f27..d3895f01f 100644 --- a/sdk/reference/classes/ApprovalElection.html +++ b/sdk/reference/classes/ApprovalElection.html @@ -12,13 +12,13 @@ - +

    ApprovalElection

    @vocdoni/sdk / ApprovalElection

    Class: ApprovalElection

    Represents an approval election

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Inherited from

    UnpublishedElection.addSDKVersion

    Defined in

    types/election/unpublished.ts:275

    set addSDKVersion(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Inherited from

    UnpublishedElection.addSDKVersion

    Defined in

    types/election/unpublished.ts:279


    census

    get census(): Census

    Returns

    Census

    Inherited from

    UnpublishedElection.census

    Defined in

    types/election/unpublished.ts:249

    set census(value): void

    Parameters

    NameType
    valueCensus

    Returns

    void

    Inherited from

    UnpublishedElection.census

    Defined in

    types/election/unpublished.ts:253


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    UnpublishedElection.description

    Defined in

    types/election/unpublished.ts:173

    set description(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Inherited from

    UnpublishedElection.description

    Defined in

    types/election/unpublished.ts:177


    duration

    get duration(): number

    Returns

    number

    Inherited from

    UnpublishedElection.duration

    Defined in

    types/election/unpublished.ts:138


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Inherited from

    UnpublishedElection.electionType

    Defined in

    types/election/unpublished.ts:225

    set electionType(value): void

    Parameters

    NameType
    valueIElectionType

    Returns

    void

    Inherited from

    UnpublishedElection.electionType

    Defined in

    types/election/unpublished.ts:229


    endDate

    get endDate(): Date

    Returns

    Date

    Inherited from

    UnpublishedElection.endDate

    Defined in

    types/election/unpublished.ts:215

    set endDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Inherited from

    UnpublishedElection.endDate

    Defined in

    types/election/unpublished.ts:219


    get header(): string

    Returns

    string

    Inherited from

    UnpublishedElection.header

    Defined in

    types/election/unpublished.ts:181

    set header(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    UnpublishedElection.header

    Defined in

    types/election/unpublished.ts:185


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Inherited from

    UnpublishedElection.maxCensusSize

    Defined in

    types/election/unpublished.ts:258

    set maxCensusSize(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    UnpublishedElection.maxCensusSize

    Defined in

    types/election/unpublished.ts:262


    meta

    get meta(): any

    Returns

    any

    Inherited from

    UnpublishedElection.meta

    Defined in

    types/election/unpublished.ts:197

    set meta(value): void

    Parameters

    NameType
    valueany

    Returns

    void

    Inherited from

    UnpublishedElection.meta

    Defined in

    types/election/unpublished.ts:201


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Inherited from

    UnpublishedElection.questions

    Defined in

    types/election/unpublished.ts:241

    set questions(value): void

    Parameters

    NameType
    valueIQuestion[]

    Returns

    void

    Inherited from

    UnpublishedElection.questions

    Defined in

    types/election/unpublished.ts:245


    startDate

    get startDate(): Date

    Returns

    Date

    Inherited from

    UnpublishedElection.startDate

    Defined in

    types/election/unpublished.ts:206

    set startDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Inherited from

    UnpublishedElection.startDate

    Defined in

    types/election/unpublished.ts:210


    streamUri

    get streamUri(): string

    Returns

    string

    Inherited from

    UnpublishedElection.streamUri

    Defined in

    types/election/unpublished.ts:189

    set streamUri(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    UnpublishedElection.streamUri

    Defined in

    types/election/unpublished.ts:193


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Inherited from

    UnpublishedElection.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:267

    set temporarySecretIdentity(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Inherited from

    UnpublishedElection.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:271


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    UnpublishedElection.title

    Defined in

    types/election/unpublished.ts:164

    set title(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Inherited from

    UnpublishedElection.title

    Defined in

    types/election/unpublished.ts:168


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Inherited from

    UnpublishedElection.voteType

    Defined in

    types/election/unpublished.ts:233

    set voteType(value): void

    Parameters

    NameType
    valueIVoteType

    Returns

    void

    Inherited from

    UnpublishedElection.voteType

    Defined in

    types/election/unpublished.ts:237

    Constructors

    constructor

    new ApprovalElection(params): ApprovalElection

    Constructs an approval election

    Parameters

    NameTypeDescription
    paramsIApprovalElectionParametersApproval election parameters

    Returns

    ApprovalElection

    Overrides

    UnpublishedElection.constructor

    Defined in

    types/election/approval.ts:18

    Methods

    addQuestion

    addQuestion(title, description, choices): UnpublishedElection

    Parameters

    NameType
    titlestring | MultiLanguage\<string>
    descriptionstring | MultiLanguage\<string>
    choices({ title: string } | { title: MultiLanguage\<string> })[]

    Returns

    UnpublishedElection

    Overrides

    UnpublishedElection.addQuestion

    Defined in

    types/election/approval.ts:26


    generateEnvelopeType

    generateEnvelopeType(): object

    Returns

    object

    Overrides

    UnpublishedElection.generateEnvelopeType

    Defined in

    types/election/approval.ts:55


    generateMetadata

    generateMetadata(): ElectionMetadata

    Returns

    ElectionMetadata

    Overrides

    UnpublishedElection.generateMetadata

    Defined in

    types/election/approval.ts:65


    generateMode

    generateMode(): object

    Returns

    object

    Inherited from

    UnpublishedElection.generateMode

    Defined in

    types/election/unpublished.ts:154


    generateVoteOptions

    generateVoteOptions(): object

    Returns

    object

    Overrides

    UnpublishedElection.generateVoteOptions

    Defined in

    types/election/approval.ts:45


    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Inherited from

    UnpublishedElection.get

    Defined in

    types/election/election.ts:266


    removeQuestion

    removeQuestion(questionNumber): UnpublishedElection

    Parameters

    NameType
    questionNumbernumber

    Returns

    UnpublishedElection

    Inherited from

    UnpublishedElection.removeQuestion

    Defined in

    types/election/unpublished.ts:60


    checkVote

    checkVote(vote, voteType): void

    Parameters

    NameType
    voteVote
    voteTypeIVoteType

    Returns

    void

    Defined in

    types/election/approval.ts:79


    from

    from(params): ApprovalElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIApprovalElectionParametersUnpublished Election parameters

    Returns

    ApprovalElection

    Overrides

    UnpublishedElection.from

    Defined in

    types/election/approval.ts:22

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ArchivedElection.html b/sdk/reference/classes/ArchivedElection.html index 145d7fbae..1da5272af 100644 --- a/sdk/reference/classes/ArchivedElection.html +++ b/sdk/reference/classes/ArchivedElection.html @@ -12,13 +12,13 @@ - +

    ArchivedElection

    @vocdoni/sdk / ArchivedElection

    Class: ArchivedElection

    Represents a published election

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Inherited from

    PublishedElection.addSDKVersion

    Defined in

    types/election/election.ts:262


    census

    get census(): ArchivedCensus

    Returns

    ArchivedCensus

    Overrides

    PublishedElection.census

    Defined in

    types/election/archived.ts:17


    chainId

    get chainId(): string

    Returns

    string

    Inherited from

    PublishedElection.chainId

    Defined in

    types/election/published.ts:219


    creationTime

    get creationTime(): Date

    Returns

    Date

    Inherited from

    PublishedElection.creationTime

    Defined in

    types/election/published.ts:223


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    PublishedElection.description

    Defined in

    types/election/published.ts:147


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Inherited from

    PublishedElection.electionType

    Defined in

    types/election/published.ts:167


    endDate

    get endDate(): Date

    Returns

    Date

    Inherited from

    PublishedElection.endDate

    Defined in

    types/election/published.ts:163


    finalResults

    get finalResults(): boolean

    Returns

    boolean

    Inherited from

    PublishedElection.finalResults

    Defined in

    types/election/published.ts:203


    fromArchive

    get fromArchive(): boolean

    Returns

    boolean

    Inherited from

    PublishedElection.fromArchive

    Defined in

    types/election/published.ts:215


    get header(): string

    Returns

    string

    Inherited from

    PublishedElection.header

    Defined in

    types/election/published.ts:151


    id

    get id(): string

    Returns

    string

    Inherited from

    PublishedElection.id

    Defined in

    types/election/published.ts:187


    isValid

    get isValid(): boolean

    Returns

    boolean

    Inherited from

    PublishedElection.isValid

    Defined in

    types/election/published.ts:239


    manuallyEnded

    get manuallyEnded(): boolean

    Returns

    boolean

    Inherited from

    PublishedElection.manuallyEnded

    Defined in

    types/election/published.ts:211


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Inherited from

    PublishedElection.maxCensusSize

    Defined in

    types/election/published.ts:183


    meta

    get meta(): any

    Returns

    any

    Inherited from

    PublishedElection.meta

    Defined in

    types/election/election.ts:226


    metadataURL

    get metadataURL(): string

    Returns

    string

    Inherited from

    PublishedElection.metadataURL

    Defined in

    types/election/published.ts:227


    organizationId

    get organizationId(): string

    Returns

    string

    Inherited from

    PublishedElection.organizationId

    Defined in

    types/election/published.ts:191


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Inherited from

    PublishedElection.questions

    Defined in

    types/election/published.ts:175


    raw

    get raw(): object

    Returns

    object

    Inherited from

    PublishedElection.raw

    Defined in

    types/election/published.ts:235


    results

    get results(): string[][]

    Returns

    string[][]

    Inherited from

    PublishedElection.results

    Defined in

    types/election/published.ts:207


    resultsType

    get resultsType(): ElectionResultsType

    Returns

    ElectionResultsType

    Inherited from

    PublishedElection.resultsType

    Defined in

    types/election/published.ts:231


    startDate

    get startDate(): Date

    Returns

    Date

    Inherited from

    PublishedElection.startDate

    Defined in

    types/election/published.ts:159


    status

    get status(): ElectionStatus

    Returns

    ElectionStatus

    Inherited from

    PublishedElection.status

    Defined in

    types/election/published.ts:195


    streamUri

    get streamUri(): string

    Returns

    string

    Inherited from

    PublishedElection.streamUri

    Defined in

    types/election/published.ts:155


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Inherited from

    PublishedElection.temporarySecretIdentity

    Defined in

    types/election/election.ts:258


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    PublishedElection.title

    Defined in

    types/election/published.ts:143


    voteCount

    get voteCount(): number

    Returns

    number

    Inherited from

    PublishedElection.voteCount

    Defined in

    types/election/published.ts:199


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Inherited from

    PublishedElection.voteType

    Defined in

    types/election/published.ts:171

    Constructors

    constructor

    new ArchivedElection(params): ArchivedElection

    Constructs an archived election

    Parameters

    NameTypeDescription
    paramsIPublishedElectionParametersElection parameters

    Returns

    ArchivedElection

    Overrides

    PublishedElection.constructor

    Defined in

    types/election/archived.ts:13

    Methods

    checkVote

    checkVote(vote): void

    Parameters

    NameType
    voteVote

    Returns

    void

    Inherited from

    PublishedElection.checkVote

    Defined in

    types/election/published.ts:113


    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Inherited from

    PublishedElection.get

    Defined in

    types/election/election.ts:266


    build

    build(params): PublishedElection

    Returns a published election object

    Parameters

    NameTypeDescription
    paramsIPublishedElectionParametersPublished election parameters

    Returns

    PublishedElection

    Inherited from

    PublishedElection.build

    Defined in

    types/election/published.ts:100


    checkVote

    checkVote(vote, voteType): void

    Parameters

    NameType
    voteVote
    voteTypeIVoteType

    Returns

    void

    Inherited from

    PublishedElection.checkVote

    Defined in

    types/election/published.ts:127


    from

    from(params): UnpublishedElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIElectionParametersUnpublished Election parameters

    Returns

    UnpublishedElection

    Inherited from

    PublishedElection.from

    Defined in

    types/election/election.ts:206


    getStatus

    getStatus(status, startDate): ElectionStatus

    Parameters

    NameType
    statusAllElectionStatus
    startDateDate

    Returns

    ElectionStatus

    Inherited from

    PublishedElection.getStatus

    Defined in

    types/election/published.ts:104

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/BudgetElection.html b/sdk/reference/classes/BudgetElection.html index 2d8f978b8..1a279e17d 100644 --- a/sdk/reference/classes/BudgetElection.html +++ b/sdk/reference/classes/BudgetElection.html @@ -12,13 +12,13 @@ - +

    BudgetElection

    @vocdoni/sdk / BudgetElection

    Class: BudgetElection

    Represents a budget election

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Inherited from

    UnpublishedElection.addSDKVersion

    Defined in

    types/election/unpublished.ts:275

    set addSDKVersion(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Inherited from

    UnpublishedElection.addSDKVersion

    Defined in

    types/election/unpublished.ts:279


    census

    get census(): Census

    Returns

    Census

    Inherited from

    UnpublishedElection.census

    Defined in

    types/election/unpublished.ts:249

    set census(value): void

    Parameters

    NameType
    valueCensus

    Returns

    void

    Inherited from

    UnpublishedElection.census

    Defined in

    types/election/unpublished.ts:253


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    UnpublishedElection.description

    Defined in

    types/election/unpublished.ts:173

    set description(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Inherited from

    UnpublishedElection.description

    Defined in

    types/election/unpublished.ts:177


    duration

    get duration(): number

    Returns

    number

    Inherited from

    UnpublishedElection.duration

    Defined in

    types/election/unpublished.ts:138


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Inherited from

    UnpublishedElection.electionType

    Defined in

    types/election/unpublished.ts:225

    set electionType(value): void

    Parameters

    NameType
    valueIElectionType

    Returns

    void

    Inherited from

    UnpublishedElection.electionType

    Defined in

    types/election/unpublished.ts:229


    endDate

    get endDate(): Date

    Returns

    Date

    Inherited from

    UnpublishedElection.endDate

    Defined in

    types/election/unpublished.ts:215

    set endDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Inherited from

    UnpublishedElection.endDate

    Defined in

    types/election/unpublished.ts:219


    forceFullBudget

    get forceFullBudget(): boolean

    Returns

    boolean

    Defined in

    types/election/budget.ts:132

    set forceFullBudget(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Defined in

    types/election/budget.ts:136


    get header(): string

    Returns

    string

    Inherited from

    UnpublishedElection.header

    Defined in

    types/election/unpublished.ts:181

    set header(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    UnpublishedElection.header

    Defined in

    types/election/unpublished.ts:185


    maxBudget

    get maxBudget(): number

    Returns

    number

    Defined in

    types/election/budget.ts:148

    set maxBudget(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Defined in

    types/election/budget.ts:152


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Inherited from

    UnpublishedElection.maxCensusSize

    Defined in

    types/election/unpublished.ts:258

    set maxCensusSize(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    UnpublishedElection.maxCensusSize

    Defined in

    types/election/unpublished.ts:262


    meta

    get meta(): any

    Returns

    any

    Inherited from

    UnpublishedElection.meta

    Defined in

    types/election/unpublished.ts:197

    set meta(value): void

    Parameters

    NameType
    valueany

    Returns

    void

    Inherited from

    UnpublishedElection.meta

    Defined in

    types/election/unpublished.ts:201


    minStep

    get minStep(): number

    Returns

    number

    Defined in

    types/election/budget.ts:124

    set minStep(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Defined in

    types/election/budget.ts:128


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Inherited from

    UnpublishedElection.questions

    Defined in

    types/election/unpublished.ts:241

    set questions(value): void

    Parameters

    NameType
    valueIQuestion[]

    Returns

    void

    Inherited from

    UnpublishedElection.questions

    Defined in

    types/election/unpublished.ts:245


    startDate

    get startDate(): Date

    Returns

    Date

    Inherited from

    UnpublishedElection.startDate

    Defined in

    types/election/unpublished.ts:206

    set startDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Inherited from

    UnpublishedElection.startDate

    Defined in

    types/election/unpublished.ts:210


    streamUri

    get streamUri(): string

    Returns

    string

    Inherited from

    UnpublishedElection.streamUri

    Defined in

    types/election/unpublished.ts:189

    set streamUri(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    UnpublishedElection.streamUri

    Defined in

    types/election/unpublished.ts:193


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Inherited from

    UnpublishedElection.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:267

    set temporarySecretIdentity(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Inherited from

    UnpublishedElection.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:271


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    UnpublishedElection.title

    Defined in

    types/election/unpublished.ts:164

    set title(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Inherited from

    UnpublishedElection.title

    Defined in

    types/election/unpublished.ts:168


    useCensusWeightAsBudget

    get useCensusWeightAsBudget(): boolean

    Returns

    boolean

    Defined in

    types/election/budget.ts:140

    set useCensusWeightAsBudget(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Defined in

    types/election/budget.ts:144


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Inherited from

    UnpublishedElection.voteType

    Defined in

    types/election/unpublished.ts:233

    set voteType(value): void

    Parameters

    NameType
    valueIVoteType

    Returns

    void

    Inherited from

    UnpublishedElection.voteType

    Defined in

    types/election/unpublished.ts:237

    Constructors

    constructor

    new BudgetElection(params): BudgetElection

    Constructs a budget election

    Parameters

    NameTypeDescription
    paramsIBudgetElectionParametersBudget election parameters

    Returns

    BudgetElection

    Overrides

    UnpublishedElection.constructor

    Defined in

    types/election/budget.ts:35

    Methods

    addQuestion

    addQuestion(title, description, choices): UnpublishedElection

    Parameters

    NameType
    titlestring | MultiLanguage\<string>
    descriptionstring | MultiLanguage\<string>
    choices({ title: string } | { title: MultiLanguage\<string> })[]

    Returns

    UnpublishedElection

    Overrides

    UnpublishedElection.addQuestion

    Defined in

    types/election/budget.ts:49


    generateEnvelopeType

    generateEnvelopeType(): object

    Returns

    object

    Overrides

    UnpublishedElection.generateEnvelopeType

    Defined in

    types/election/budget.ts:78


    generateMetadata

    generateMetadata(): ElectionMetadata

    Returns

    ElectionMetadata

    Overrides

    UnpublishedElection.generateMetadata

    Defined in

    types/election/budget.ts:88


    generateMode

    generateMode(): object

    Returns

    object

    Inherited from

    UnpublishedElection.generateMode

    Defined in

    types/election/unpublished.ts:154


    generateVoteOptions

    generateVoteOptions(): object

    Returns

    object

    Overrides

    UnpublishedElection.generateVoteOptions

    Defined in

    types/election/budget.ts:68


    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Inherited from

    UnpublishedElection.get

    Defined in

    types/election/election.ts:266


    removeQuestion

    removeQuestion(questionNumber): UnpublishedElection

    Parameters

    NameType
    questionNumbernumber

    Returns

    UnpublishedElection

    Inherited from

    UnpublishedElection.removeQuestion

    Defined in

    types/election/unpublished.ts:60


    checkVote

    checkVote(vote, resultsType, voteType): void

    Parameters

    NameType
    voteVote
    resultsTypeElectionResultsType
    voteTypeIVoteType

    Returns

    void

    Defined in

    types/election/budget.ts:104


    from

    from(params): BudgetElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIBudgetElectionParametersUnpublished Election parameters

    Returns

    BudgetElection

    Overrides

    UnpublishedElection.from

    Defined in

    types/election/budget.ts:45

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Census.html b/sdk/reference/classes/Census.html index 503414dc8..b782d7bca 100644 --- a/sdk/reference/classes/Census.html +++ b/sdk/reference/classes/Census.html @@ -12,13 +12,13 @@ - +

    Census

    @vocdoni/sdk / Census

    Class: Census

    Represents a generic census

    Hierarchy

    Table of contents

    Accessors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Defined in

    types/census/census.ts:75


    size

    get size(): number

    Returns

    number

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Defined in

    types/census/census.ts:63


    type

    get type(): CensusType

    Returns

    CensusType

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Defined in

    types/census/census.ts:71

    Methods

    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Census3CensusAPI.html b/sdk/reference/classes/Census3CensusAPI.html index 27a172582..f505a67ae 100644 --- a/sdk/reference/classes/Census3CensusAPI.html +++ b/sdk/reference/classes/Census3CensusAPI.html @@ -12,13 +12,13 @@ - +

    Census3CensusAPI

    @vocdoni/sdk / Census3CensusAPI

    Class: Census3CensusAPI

    Hierarchy

    • Census3API

      Census3CensusAPI

    Table of contents

    Methods

    Methods

    census

    census(url, id): Promise\<ICensus3CensusResponse>

    Returns the information of the census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    idnumberThe identifier of the census

    Returns

    Promise\<ICensus3CensusResponse>

    Defined in

    api/census3/census.ts:119


    create

    create(url, strategyId, anonymous?): Promise\<ICensus3QueueResponse>

    Requests the creation of a new census with the strategy provided.

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    strategyIdnumberundefinedThe strategy identifier
    anonymousbooleanfalseIf the census has to be anonymous

    Returns

    Promise\<ICensus3QueueResponse>

    The queue identifier

    Defined in

    api/census3/census.ts:147


    list

    list(url, strategy): Promise\<ICensus3CensusListResponse>

    Fetches list of census based on given strategy

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    strategynumberThe identifier of the strategy

    Returns

    Promise\<ICensus3CensusListResponse>

    Defined in

    api/census3/census.ts:106


    queue

    queue(url, id): Promise\<ICensus3CensusQueueResponse>

    Returns the information of the census queue

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    idstringThe identifier of the census queue

    Returns

    Promise\<ICensus3CensusQueueResponse>

    Defined in

    api/census3/census.ts:132

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Census3ServiceAPI.html b/sdk/reference/classes/Census3ServiceAPI.html index ebebbd633..faf5835eb 100644 --- a/sdk/reference/classes/Census3ServiceAPI.html +++ b/sdk/reference/classes/Census3ServiceAPI.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Census3StrategyAPI.html b/sdk/reference/classes/Census3StrategyAPI.html index 3c017057b..a145ca33b 100644 --- a/sdk/reference/classes/Census3StrategyAPI.html +++ b/sdk/reference/classes/Census3StrategyAPI.html @@ -12,13 +12,13 @@ - +

    Census3StrategyAPI

    @vocdoni/sdk / Census3StrategyAPI

    Class: Census3StrategyAPI

    Hierarchy

    • Census3API

      Census3StrategyAPI

    Table of contents

    Methods

    Methods

    create

    create(url, alias, predicate, tokens): Promise\<ICensus3StrategyCreateResponse>

    Creates a new strategy based on the given token strategies and predicate.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    aliasstringThe alias of the strategy
    predicatestringThe predicate of the strategy
    tokensObjectThe token list for the strategy

    Returns

    Promise\<ICensus3StrategyCreateResponse>

    The identifier of the created strategy

    Defined in

    api/census3/strategy.ts:416


    estimation

    estimation(url, id, anonymous?): Promise\<ICensus3QueueResponse>

    Returns the estimation of size and time (in milliseconds) to create the census generated for the provided strategy

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    idnumberundefinedThe identifier of the strategy
    anonymousbooleanfalseIf the estimation should be done for anonymous census

    Returns

    Promise\<ICensus3QueueResponse>

    The queue identifier

    Defined in

    api/census3/strategy.ts:348


    estimationQueue

    estimationQueue(url, strategyId, queueId): Promise\<ICensus3StrategyEstimationQueueResponse>

    Returns the information of the strategy estimation queue

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    strategyIdnumberThe identifier of the strategy
    queueIdstringThe identifier of the strategy estimation queue

    Returns

    Promise\<ICensus3StrategyEstimationQueueResponse>

    Defined in

    api/census3/strategy.ts:364


    holders

    holders(url, id, pagination?): Promise\<ICensus3StrategyHoldersResponsePaginated>

    Fetches list of holders by strategy

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    idnumberThe identifier of the strategy
    pagination?Census3PaginationPagination options

    Returns

    Promise\<ICensus3StrategyHoldersResponsePaginated>

    Defined in

    api/census3/strategy.ts:290


    import

    import(url, cid): Promise\<ICensus3QueueResponse>

    Imports a strategy from IPFS from the given cid.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    cidstringThe cid of the IPFS where the strategy is stored

    Returns

    Promise\<ICensus3QueueResponse>

    The queue identifier

    Defined in

    api/census3/strategy.ts:400


    importQueue

    importQueue(url, queueId): Promise\<ICensus3StrategyImportQueueResponse>

    Returns the information of the strategy import queue

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    queueIdstringThe identifier of the strategy import queue

    Returns

    Promise\<ICensus3StrategyImportQueueResponse>

    Defined in

    api/census3/strategy.ts:384


    list

    list(url, pagination?): Promise\<ICensus3StrategiesListResponsePaginated>

    Fetches list of strategies

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    pagination?Census3PaginationPagination options

    Returns

    Promise\<ICensus3StrategiesListResponsePaginated>

    Defined in

    api/census3/strategy.ts:274


    listByToken

    listByToken(url, tokenId, chainId, externalId?): Promise\<ICensus3StrategiesListResponse>

    Fetches list of strategies based on given token

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    tokenIdstringThe identifier of the token
    chainIdnumberThe chain identifier of the token
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<ICensus3StrategiesListResponse>

    Defined in

    api/census3/strategy.ts:311


    operators

    operators(url): Promise\<ICensus3StrategiesOperatorsResponse>

    Returns the list of supported operators to build strategy predicates.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<ICensus3StrategiesOperatorsResponse>

    Defined in

    api/census3/strategy.ts:447


    strategy

    strategy(url, id): Promise\<Census3Strategy>

    Returns the information of the strategy

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    idnumberThe identifier of the strategy

    Returns

    Promise\<Census3Strategy>

    Defined in

    api/census3/strategy.ts:333


    validatePredicate

    validatePredicate(url, predicate): Promise\<ICensus3ValidatePredicateResponse>

    Validates a predicate.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    predicatestringThe predicate of the strategy

    Returns

    Promise\<ICensus3ValidatePredicateResponse>

    Parsed version of the predicate

    Defined in

    api/census3/strategy.ts:435

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Census3TokenAPI.html b/sdk/reference/classes/Census3TokenAPI.html index a1cdb884f..67da47278 100644 --- a/sdk/reference/classes/Census3TokenAPI.html +++ b/sdk/reference/classes/Census3TokenAPI.html @@ -12,13 +12,13 @@ - +

    Census3TokenAPI

    @vocdoni/sdk / Census3TokenAPI

    Class: Census3TokenAPI

    Hierarchy

    • Census3API

      Census3TokenAPI

    Table of contents

    Methods

    Methods

    create

    create(url, id, type, chainId, tags?, externalId?): Promise\<void>

    Triggers a new scan for the provided token.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    idstringThe token address
    typestringThe type of the token
    chainIdnumberThe chain id of the token
    tags?stringThe tags assigned for the token
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<void>

    promised IFileCIDResponse

    Defined in

    api/census3/token.ts:226


    holder

    holder(url, tokenId, chainId, holderId, externalId?): Promise\<ICensus3TokenHolderResponse>

    Returns if the holder ID is already registered in the database as a holder of the token ID and chain ID provided.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    tokenIdstringThe identifier of the token
    chainIdnumberThe chain identifier of the token
    holderIdstringThe identifier of the holder
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<ICensus3TokenHolderResponse>

    The balance of holder

    Defined in

    api/census3/token.ts:196


    list

    list(url, pagination?): Promise\<ICensus3TokenListResponsePaginated>

    Fetches list of already added tokens

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    pagination?Census3PaginationPagination options

    Returns

    Promise\<ICensus3TokenListResponsePaginated>

    Defined in

    api/census3/token.ts:148


    token

    token(url, tokenId, chainId, externalId?): Promise\<Census3Token>

    Fetch the full token information

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    tokenIdstringThe identifier of the token
    chainIdnumberThe chain identifier of the token
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<Census3Token>

    Defined in

    api/census3/token.ts:175


    types

    types(url): Promise\<ICensus3TokenTypesResponse>

    Fetches list of tokens types

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<ICensus3TokenTypesResponse>

    Defined in

    api/census3/token.ts:160

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/CensusAPI.html b/sdk/reference/classes/CensusAPI.html index bc76778e9..b02b7359c 100644 --- a/sdk/reference/classes/CensusAPI.html +++ b/sdk/reference/classes/CensusAPI.html @@ -12,13 +12,13 @@ - +

    CensusAPI

    @vocdoni/sdk / CensusAPI

    Class: CensusAPI

    Hierarchy

    • API

      CensusAPI

    Table of contents

    Methods

    Methods

    add

    add(url, authToken, censusId, participants): Promise\<ICensusAddResponse>

    Adds participants to a census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    authTokenstringAuthentication token
    censusIdstringThe id of the census to which participants are being added
    participants{ key: string ; weight?: bigint }[]An array of participants

    Returns

    Promise\<ICensusAddResponse>

    Defined in

    api/census.ts:151


    create

    create(url, authToken, type): Promise\<ICensusCreateResponse>

    Create's a new census in the API.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    authTokenstringAuthentication token
    typeCensusTypeType of census to be created

    Returns

    Promise\<ICensusCreateResponse>

    Defined in

    api/census.ts:132


    delete

    delete(url, authToken, censusId): Promise\<void>

    Deletes the given census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    authTokenstringAuthentication token
    censusIdstringThe census ID we want to export

    Returns

    Promise\<void>

    on success

    Defined in

    api/census.ts:273


    export

    export(url, authToken, censusId): Promise\<ICensusExportResponse>

    Exports the given census identifier

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    authTokenstringAuthentication token
    censusIdstringThe census ID we want to export

    Returns

    Promise\<ICensusExportResponse>

    on success

    Defined in

    api/census.ts:221


    import

    import(url, authToken, censusId, type, rootHash, data): Promise\<ICensusImportResponse>

    Imports data into the given census identifier

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    authTokenstringAuthentication token
    censusIdstringThe census ID we want to export
    typenumberThe type of the census
    rootHashstringThe root hash of the census
    datastringThe census data to be imported

    Returns

    Promise\<ICensusImportResponse>

    on success

    Defined in

    api/census.ts:243


    proof

    proof(url, censusId, key): Promise\<ICensusProofResponse>

    Checks if the specified address is in the specified census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    censusIdstringThe census ID of which we want the proof from
    keystringThe address to be checked

    Returns

    Promise\<ICensusProofResponse>

    on success

    Defined in

    api/census.ts:206


    publish

    publish(url, authToken, censusId): Promise\<ICensusPublishResponse>

    Publishes the census, so it can be used in processes

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    authTokenstringAuthentication token
    censusIdstringThe census ID we're publishing

    Returns

    Promise\<ICensusPublishResponse>

    on success

    Defined in

    api/census.ts:187


    size

    size(url, censusId): Promise\<ICensusSizeResponse>

    Returns the size of a given census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    censusIdstringThe census ID

    Returns

    Promise\<ICensusSizeResponse>

    Defined in

    api/census.ts:290


    type

    type(url, censusId): Promise\<ICensusTypeResponse>

    Returns the type of given census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    censusIdstringThe census ID

    Returns

    Promise\<ICensusTypeResponse>

    Defined in

    api/census.ts:316


    weight

    weight(url, censusId): Promise\<ICensusWeightResponse>

    Returns the weight of a given census

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    censusIdstringThe census ID

    Returns

    Promise\<ICensusWeightResponse>

    Defined in

    api/census.ts:303

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/CensusService.html b/sdk/reference/classes/CensusService.html index 53d79faf7..f967f30da 100644 --- a/sdk/reference/classes/CensusService.html +++ b/sdk/reference/classes/CensusService.html @@ -12,13 +12,13 @@ - +

    CensusService

    @vocdoni/sdk / CensusService

    Class: CensusService

    Hierarchy

    Implements

    • CensusServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new CensusService(params): CensusService

    Instantiate the census service.

    Parameters

    NameTypeDescription
    paramsPartial\<CensusServiceParameters>The service parameters

    Returns

    CensusService

    Overrides

    Service.constructor

    Defined in

    services/census.ts:73

    Methods

    add

    add(censusId, participants): Promise\<string>

    Parameters

    NameType
    censusIdstring
    participantsICensusParticipant[]

    Returns

    Promise\<string>

    Defined in

    services/census.ts:142


    create

    create(censusType): Promise\<{ auth: string ; id: string }>

    Parameters

    NameType
    censusTypeCensusType

    Returns

    Promise\<{ auth: string ; id: string }>

    Defined in

    services/census.ts:134


    createCensus

    createCensus(census): Promise\<void>

    Publishes the given census.

    Parameters

    NameTypeDescription
    censusPlainCensus | WeightedCensusThe census to be published.

    Returns

    Promise\<void>

    Defined in

    services/census.ts:228


    delete

    delete(censusId): Promise\<void>

    Deletes the given census.

    Parameters

    NameType
    censusIdstring

    Returns

    Promise\<void>

    Defined in

    services/census.ts:108


    export

    export(censusId): Promise\<CensusImportExport>

    Exports the given census identifier.

    Parameters

    NameTypeDescription
    censusIdstringThe census identifier

    Returns

    Promise\<CensusImportExport>

    Defined in

    services/census.ts:203


    fetchAccountToken

    fetchAccountToken(): Promise\<void>

    Fetches the specific account token auth and sets it to the current instance.

    Returns

    Promise\<void>

    Defined in

    services/census.ts:269


    fetchProof

    fetchProof(censusId, key): Promise\<CensusProof>

    Fetches proof that an address is part of the specified census.

    Parameters

    NameTypeDescription
    censusIdstringCensus we want to check the address against
    keystringThe address to be found

    Returns

    Promise\<CensusProof>

    Defined in

    services/census.ts:121


    get

    get(censusId): Promise\<{ size: number ; type: CensusType ; weight: bigint }>

    Fetches the information of a given census.

    Parameters

    NameType
    censusIdstring

    Returns

    Promise\<{ size: number ; type: CensusType ; weight: bigint }>

    Defined in

    services/census.ts:83


    import

    import(censusId, data): Promise\<ICensusImportResponse>

    Imports data into the given census identifier.

    Parameters

    NameTypeDescription
    censusIdstringThe census identifier
    dataCensusImportExportThe census data

    Returns

    Promise\<ICensusImportResponse>

    Defined in

    services/census.ts:216


    publish

    publish(censusId): Promise\<ICensusPublishResponse>

    Publishes the given census identifier.

    Parameters

    NameTypeDescription
    censusIdstringThe census identifier

    Returns

    Promise\<ICensusPublishResponse>

    Defined in

    services/census.ts:191

    Properties

    auth

    auth: CensusAuth

    Implementation of

    CensusServiceProperties.auth

    Defined in

    services/census.ts:65


    chunk_size

    chunk_size: number

    Implementation of

    CensusServiceProperties.chunk_size

    Defined in

    services/census.ts:66


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ChainAPI.html b/sdk/reference/classes/ChainAPI.html index 22bc49607..9e518d4fd 100644 --- a/sdk/reference/classes/ChainAPI.html +++ b/sdk/reference/classes/ChainAPI.html @@ -12,13 +12,13 @@ - +

    ChainAPI

    @vocdoni/sdk / ChainAPI

    Class: ChainAPI

    Hierarchy

    • API

      ChainAPI

    Table of contents

    Methods

    Methods

    blockByHash

    blockByHash(url, hash): Promise\<IChainBlockInfoResponse>

    Get block information by hash

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    hashstringblock hash

    Returns

    Promise\<IChainBlockInfoResponse>

    Defined in

    api/chain.ts:543


    blockByHeight

    blockByHeight(url, height): Promise\<IChainBlockInfoResponse>

    Get block information by height

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    heightnumberblock height

    Returns

    Promise\<IChainBlockInfoResponse>

    Defined in

    api/chain.ts:518


    blockToDate

    blockToDate(url, height): Promise\<IBlockToDateResponse>

    Return approximate date by a given block height.

    Parameters

    NameTypeDescription
    urlstringAPI URL
    heightnumberblock height to calculate approximate timestamp

    Returns

    Promise\<IBlockToDateResponse>

    Defined in

    api/chain.ts:585


    blockTransactions

    blockTransactions(url, height, page?): Promise\<IBlockTransactionsResponse>

    Get paginated list of transactions registered on specific block

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    heightnumberundefinedblock height
    pagenumber0the page number

    Returns

    Promise\<IBlockTransactionsResponse>

    Defined in

    api/chain.ts:557


    circuit

    circuit(url): Promise\<Uint8Array>

    Fetches a circuit.

    Parameters

    NameTypeDescription
    urlstringCircuit URL

    Returns

    Promise\<Uint8Array>

    Defined in

    api/chain.ts:403


    circuits

    circuits(url): Promise\<IChainGetCircuitResponse>

    Fetches info about the blockchain anonymous circuits.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<IChainGetCircuitResponse>

    Defined in

    api/chain.ts:391


    costs

    costs(url): Promise\<IChainGetCostsResponse>

    Fetches info about the blockchain costs.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<IChainGetCostsResponse>

    Defined in

    api/chain.ts:379


    dateToBlock

    dateToBlock(url, timeStamp): Promise\<IDateToBlockResponse>

    By a given date give the estimate block for the current Vochain.

    Parameters

    NameTypeDescription
    urlstringAPI URL
    timeStampnumberunix format timestamp

    Returns

    Promise\<IDateToBlockResponse>

    Defined in

    api/chain.ts:571


    info

    info(url): Promise\<IChainGetInfoResponse>

    Fetches info about the blockchain status.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<IChainGetInfoResponse>

    Defined in

    api/chain.ts:367


    organizationCount

    organizationCount(url): Promise\<IChainOrganizationCountResponse>

    Returns the number of organizations

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<IChainOrganizationCountResponse>

    Defined in

    api/chain.ts:479


    organizationList

    organizationList(url, page?, organizationId?): Promise\<IChainOrganizationListResponse>

    Returns the list of organizations by page

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    pagenumber0The page number
    organizationId?stringundefinedOrganization id or partial id to search. It has to be a valid hex string.

    Returns

    Promise\<IChainOrganizationListResponse>

    Defined in

    api/chain.ts:493


    submitTx

    submitTx(url, payload): Promise\<IChainSubmitTxResponse>

    Submits a transaction to the blockchain

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    payloadstringThe transaction data payload

    Returns

    Promise\<IChainSubmitTxResponse>

    Defined in

    api/chain.ts:454


    txInfo

    txInfo(url, txHash): Promise\<IChainTxReference>

    Fetches information about a transaction from the blockchain.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    txHashstringThe transaction hash which we want to retrieve the info from

    Returns

    Promise\<IChainTxReference>

    Defined in

    api/chain.ts:416


    txInfoByBlock

    txInfoByBlock(url, blockHeight, txIndex): Promise\<Tx>

    Fetches information about a transaction by its containing block an index on the block.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    blockHeightnumberBlock with the containing transaction
    txIndexnumberIndex on the block

    Returns

    Promise\<Tx>

    Defined in

    api/chain.ts:435


    txList

    txList(url, page?): Promise\<IChainTxListResponse>

    Returns the list of transactions by page

    Parameters

    NameTypeDefault valueDescription
    urlstringundefined{string} url API endpoint URL
    pagenumber0{number} page The page number

    Returns

    Promise\<IChainTxListResponse>

    Defined in

    api/chain.ts:467


    validatorsList

    validatorsList(url): Promise\<IChainValidatorsListResponse>

    Returns the list of validators

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL

    Returns

    Promise\<IChainValidatorsListResponse>

    Defined in

    api/chain.ts:530

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ChainService.html b/sdk/reference/classes/ChainService.html index de8d95264..b77ad58e5 100644 --- a/sdk/reference/classes/ChainService.html +++ b/sdk/reference/classes/ChainService.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@

    ChainService

    @vocdoni/sdk / ChainService

    Class: ChainService

    Hierarchy

    Implements

    • ChainServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new ChainService(params): ChainService

    Instantiate the chain service.

    Parameters

    NameTypeDescription
    paramsPartial\<ChainServiceParameters>The service parameters

    Returns

    ChainService

    Overrides

    Service.constructor

    Defined in

    services/chain.ts:47

    Methods

    dateToBlock

    dateToBlock(date): Promise\<number>

    Returns the block number for a given date.

    Parameters

    NameTypeDescription
    dateDateThe date which we want to retrieve the block number from

    Returns

    Promise\<number>

    The block number

    Defined in

    services/chain.ts:112


    fetchChainCosts

    fetchChainCosts(): Promise\<IChainGetCostsResponse>

    Fetches blockchain costs information if needed.

    Returns

    Promise\<IChainGetCostsResponse>

    Defined in

    services/chain.ts:72


    fetchChainData

    fetchChainData(): Promise\<ChainData>

    Fetches blockchain information if needed.

    Returns

    Promise\<ChainData>

    Defined in

    services/chain.ts:56


    submitTx

    submitTx(payload): Promise\<string>

    Submits a transaction to the blockchain

    Parameters

    NameTypeDescription
    payloadstringThe transaction data payload

    Returns

    Promise\<string>

    The transaction hash

    Defined in

    services/chain.ts:90


    txInfo

    txInfo(txHash): Promise\<IChainTxReference>

    Fetches information about a transaction from the blockchain.

    Parameters

    NameTypeDescription
    txHashstringThe transaction hash which we want to retrieve the info from

    Returns

    Promise\<IChainTxReference>

    The chain transaction

    Defined in

    services/chain.ts:101


    waitForTransaction

    waitForTransaction(tx, wait?, attempts?): Promise\<void>

    A convenience method to wait for a transaction to be executed. It will loop trying to get the transaction information, and will retry every time it fails.

    Parameters

    NameTypeDescription
    txstringTransaction to wait for
    wait?numberThe delay in milliseconds between tries
    attempts?numberThe attempts to try before failing

    Returns

    Promise\<void>

    Defined in

    services/chain.ts:126

    Properties

    chainCosts

    chainCosts: IChainGetCostsResponse

    Implementation of

    ChainServiceProperties.chainCosts

    Defined in

    services/chain.ts:38


    chainData

    chainData: ChainData

    Implementation of

    ChainServiceProperties.chainData

    Defined in

    services/chain.ts:39


    txWait

    txWait: TxWaitOptions

    Implementation of

    ChainServiceProperties.txWait

    Defined in

    services/chain.ts:40


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/CspAPI.html b/sdk/reference/classes/CspAPI.html index 54cf669c0..d069c5372 100644 --- a/sdk/reference/classes/CspAPI.html +++ b/sdk/reference/classes/CspAPI.html @@ -12,13 +12,13 @@ - +

    CspAPI

    @vocdoni/sdk / CspAPI

    Class: CspAPI

    Hierarchy

    • API

      CspAPI

    Table of contents

    Methods

    Methods

    info

    info(url): Promise\<ICspInfoResponse>

    CSP info

    Parameters

    NameTypeDescription
    urlstringCSP endpoint URL

    Returns

    Promise\<ICspInfoResponse>

    Defined in

    api/csp.ts:85


    sign

    sign(url, electionId, signatureType, payload, token): Promise\<ICspSignResponse>

    CSP sign

    Parameters

    NameTypeDescription
    urlstringCSP endpoint URL
    electionIdstringThe election identifier
    signatureTypestringThe type of the signature
    payloadstringThe payload from the user
    tokenstringThe token from the last step

    Returns

    Promise\<ICspSignResponse>

    Defined in

    api/csp.ts:132


    step

    step(url, electionId, signatureType, authType, stepNr, data, authToken?): Promise\<ICspIntermediateStepResponse | ICspFinalStepResponse>

    CSP step

    Parameters

    NameTypeDescription
    urlstringCSP endpoint URL
    electionIdstringThe election identifier
    signatureTypestringThe type of the signature
    authTypestringThe type of the auth method
    stepNrnumberThe step number
    dataany[]The auth data
    authToken?stringThe auth token from the previous step

    Returns

    Promise\<ICspIntermediateStepResponse | ICspFinalStepResponse>

    Defined in

    api/csp.ts:104

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/CspCensus.html b/sdk/reference/classes/CspCensus.html index ebeecae37..3fa115ce8 100644 --- a/sdk/reference/classes/CspCensus.html +++ b/sdk/reference/classes/CspCensus.html @@ -12,13 +12,13 @@ - +

    CspCensus

    @vocdoni/sdk / CspCensus

    Class: CspCensus

    Represents a published census

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    Census.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    Census.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    Census.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    Census.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    Census.isPublished

    Defined in

    types/census/census.ts:75


    size

    get size(): number

    Returns

    number

    Inherited from

    Census.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    Census.size

    Defined in

    types/census/census.ts:63


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    Census.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    Census.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    Census.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    Census.weight

    Defined in

    types/census/census.ts:71

    Constructors

    constructor

    new CspCensus(publicKey, cspURI): CspCensus

    Constructs a CSP census

    Parameters

    NameTypeDescription
    publicKeystringThe public
    cspURIstringThe URI of the CSP server

    Returns

    CspCensus

    Overrides

    Census.constructor

    Defined in

    types/census/csp.ts:14

    Methods

    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    Census.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/CspService.html b/sdk/reference/classes/CspService.html index 0c54f0750..7ca60fb81 100644 --- a/sdk/reference/classes/CspService.html +++ b/sdk/reference/classes/CspService.html @@ -12,13 +12,13 @@ - +

    CspService

    @vocdoni/sdk / CspService

    Class: CspService

    Hierarchy

    Implements

    • CspServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new CspService(params): CspService

    Instantiate the CSP service.

    Parameters

    NameTypeDescription
    paramsPartial\<CspServiceParameters>The service parameters

    Returns

    CspService

    Overrides

    Service.constructor

    Defined in

    services/csp.ts:29

    Methods

    cspSign

    cspSign(electionId, address, token): Promise\<string>

    Parameters

    NameType
    electionIdstring
    addressstring
    tokenstring

    Returns

    Promise\<string>

    Defined in

    services/csp.ts:64


    cspStep

    cspStep(electionId, stepNumber, data, authToken?): Promise\<ICspIntermediateStepResponse | ICspFinalStepResponse>

    Parameters

    NameType
    electionIdstring
    stepNumbernumber
    dataany[]
    authToken?string

    Returns

    Promise\<ICspIntermediateStepResponse | ICspFinalStepResponse>

    Defined in

    services/csp.ts:49


    cspVote

    cspVote(vote, signature, proof_type?): CspVote

    Parameters

    NameType
    voteVote
    signaturestring
    proof_type?CspProofType

    Returns

    CspVote

    Defined in

    services/csp.ts:75


    setInfo

    setInfo(): Promise\<ICspInfoResponse>

    Returns

    Promise\<ICspInfoResponse>

    Defined in

    services/csp.ts:43


    setUrlFromElection

    setUrlFromElection(election): string

    Parameters

    NameType
    electionElection

    Returns

    string

    Defined in

    services/csp.ts:39


    cspVote

    cspVote(vote, signature, proof_type?): CspVote

    Parameters

    NameType
    voteVote
    signaturestring
    proof_type?CspProofType

    Returns

    CspVote

    Defined in

    services/csp.ts:79


    fetchUrlFromElection

    fetchUrlFromElection(election): string

    Parameters

    NameType
    electionElection

    Returns

    string

    Defined in

    services/csp.ts:34

    Properties

    info

    info: ICspInfoResponse

    Implementation of

    CspServiceProperties.info

    Defined in

    services/csp.ts:22


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/CspVote.html b/sdk/reference/classes/CspVote.html index fef62f992..7c7597e45 100644 --- a/sdk/reference/classes/CspVote.html +++ b/sdk/reference/classes/CspVote.html @@ -12,13 +12,13 @@ - +

    CspVote

    @vocdoni/sdk / CspVote

    Class: CspVote

    Represents a vote

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Accessors

    proof_type

    get proof_type(): CspProofType

    Returns

    CspProofType

    Defined in

    types/vote/csp.ts:29

    set proof_type(value): void

    Parameters

    NameType
    valueCspProofType

    Returns

    void

    Defined in

    types/vote/csp.ts:33


    signature

    get signature(): string

    Returns

    string

    Defined in

    types/vote/csp.ts:21

    set signature(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Defined in

    types/vote/csp.ts:25


    votes

    get votes(): (number | bigint)[]

    Returns

    (number | bigint)[]

    Inherited from

    Vote.votes

    Defined in

    types/vote/vote.ts:16

    set votes(value): void

    Parameters

    NameType
    value(number | bigint)[]

    Returns

    void

    Inherited from

    Vote.votes

    Defined in

    types/vote/vote.ts:20

    Constructors

    constructor

    new CspVote(votes, signature, proof_type?): CspVote

    Constructs a csp vote

    Parameters

    NameTypeDescription
    votes(number | bigint)[]The list of votes values
    signaturestringThe CSP signature
    proof_type?CspProofType-

    Returns

    CspVote

    Overrides

    Vote.constructor

    Defined in

    types/vote/csp.ts:15

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Election.html b/sdk/reference/classes/Election.html index 75a2a6003..9c500ec21 100644 --- a/sdk/reference/classes/Election.html +++ b/sdk/reference/classes/Election.html @@ -12,13 +12,13 @@ - +

    Election

    @vocdoni/sdk / Election

    Class: Election

    Represents an election

    Hierarchy

    Table of contents

    Accessors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Defined in

    types/election/election.ts:262


    census

    get census(): Census

    Returns

    Census

    Defined in

    types/election/election.ts:250


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Defined in

    types/election/election.ts:214


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Defined in

    types/election/election.ts:238


    endDate

    get endDate(): Date

    Returns

    Date

    Defined in

    types/election/election.ts:234


    get header(): string

    Returns

    string

    Defined in

    types/election/election.ts:218


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Defined in

    types/election/election.ts:254


    meta

    get meta(): any

    Returns

    any

    Defined in

    types/election/election.ts:226


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Defined in

    types/election/election.ts:246


    startDate

    get startDate(): Date

    Returns

    Date

    Defined in

    types/election/election.ts:230


    streamUri

    get streamUri(): string

    Returns

    string

    Defined in

    types/election/election.ts:222


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Defined in

    types/election/election.ts:258


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Defined in

    types/election/election.ts:210


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Defined in

    types/election/election.ts:242

    Methods

    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Defined in

    types/election/election.ts:266


    from

    from(params): UnpublishedElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIElectionParametersUnpublished Election parameters

    Returns

    UnpublishedElection

    Defined in

    types/election/election.ts:206

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ElectionAPI.html b/sdk/reference/classes/ElectionAPI.html index 2a1ab1000..50a4650c7 100644 --- a/sdk/reference/classes/ElectionAPI.html +++ b/sdk/reference/classes/ElectionAPI.html @@ -12,13 +12,13 @@ - +

    ElectionAPI

    @vocdoni/sdk / ElectionAPI

    Class: ElectionAPI

    Hierarchy

    • API

      ElectionAPI

    Table of contents

    Methods

    Methods

    create

    create(url, payload, metadata): Promise\<IElectionCreateResponse>

    Creates a new election.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    payloadstringThe set information info raw payload to be submitted to the chain
    metadatastringThe base64 encoded metadata JSON object

    Returns

    Promise\<IElectionCreateResponse>

    Defined in

    api/election.ts:410


    electionsList

    electionsList(url, page?, filter?): Promise\<IElectionListResponse>

    Return list of all elections in the chain

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    pagenumber0The page number
    filterIElectionListFilter{}Search by organizationId, electionId, withResults, and status

    Returns

    Promise\<IElectionListResponse>

    Defined in

    api/election.ts:477


    info

    info(url, electionId): Promise\<IElectionInfoResponse>

    Fetches info about the specified process.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    electionIdstringThe identifier of the election

    Returns

    Promise\<IElectionInfoResponse>

    Defined in

    api/election.ts:383


    keys

    keys(url, electionId): Promise\<IElectionKeysResponse>

    Fetches the encryption keys from the specified process.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    electionIdstringThe identifier of the election

    Returns

    Promise\<IElectionKeysResponse>

    Defined in

    api/election.ts:396


    nextElectionId

    nextElectionId(url, organizationId, censusOrigin, envelopeType?): Promise\<IElectionNextIdResponse>

    Returns the next election id.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    organizationIdstringThe identifier of the organization
    censusOriginnumberThe census origin
    envelopeType?Partial\<IVoteMode>The envelope type

    Returns

    Promise\<IElectionNextIdResponse>

    Defined in

    api/election.ts:425


    price

    price(url, maxCensusSize, electionDuration, encryptedVotes, anonymousVotes, maxVoteOverwrite): Promise\<IElectionCalculatePriceResponse>

    Calculates the election price.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    maxCensusSizenumber
    electionDurationnumber
    encryptedVotesboolean
    anonymousVotesboolean
    maxVoteOverwritenumber

    Returns

    Promise\<IElectionCalculatePriceResponse>

    Defined in

    api/election.ts:509


    votesCount

    votesCount(url, electionId): Promise\<IElectionVotesCountResponse>

    Returns the number of votes of a given election

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    electionIdstringThe identifier of the election

    Returns

    Promise\<IElectionVotesCountResponse>

    Defined in

    api/election.ts:447


    votesList

    votesList(url, electionId, page?): Promise\<IElectionVoteListResponse>

    Returns the list of votes for a given election

    Parameters

    NameTypeDefault valueDescription
    urlstringundefinedAPI endpoint URL
    electionIdstringundefinedThe identifier of the election
    pagenumber0The page number

    Returns

    Promise\<IElectionVoteListResponse>

    Defined in

    api/election.ts:461

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ElectionService.html b/sdk/reference/classes/ElectionService.html index 3bec5092a..ddeebcb33 100644 --- a/sdk/reference/classes/ElectionService.html +++ b/sdk/reference/classes/ElectionService.html @@ -12,13 +12,13 @@ - +

    ElectionService

    @vocdoni/sdk / ElectionService

    Class: ElectionService

    Hierarchy

    Implements

    • ElectionServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new ElectionService(params): ElectionService

    Instantiate the election service.

    Parameters

    NameTypeDescription
    paramsPartial\<ElectionServiceParameters>The service parameters

    Returns

    ElectionService

    Overrides

    Service.constructor

    Defined in

    services/election.ts:69

    Methods

    calculateElectionCost

    calculateElectionCost(election): Promise\<number>

    Calculate the election cost

    Parameters

    NameType
    electionUnpublishedElection

    Returns

    Promise\<number>

    The cost in tokens.

    Defined in

    services/election.ts:336


    create

    create(payload, metadata): Promise\<IElectionCreateResponse>

    Creates a new election.

    Parameters

    NameTypeDescription
    payloadstringThe set information info raw payload to be submitted to the chain
    metadatastringThe base64 encoded metadata JSON object

    Returns

    Promise\<IElectionCreateResponse>

    The created election information

    Defined in

    services/election.ts:256


    estimateElectionCost

    estimateElectionCost(election): Promise\<number>

    Estimates the election cost

    Parameters

    NameType
    electionUnpublishedElection

    Returns

    Promise\<number>

    The cost in tokens.

    Defined in

    services/election.ts:323


    fetchElection

    fetchElection(electionId): Promise\<PublishedElection | ArchivedElection>

    Fetches info about an election.

    Parameters

    NameTypeDescription
    electionIdstringThe id of the election

    Returns

    Promise\<PublishedElection | ArchivedElection>

    Defined in

    services/election.ts:114


    fetchElections

    fetchElections(params): Promise\<(PublishedElection | ArchivedElection | InvalidElection)[]>

    Parameters

    NameType
    paramsPartial\<FetchElectionsParameters>

    Returns

    Promise\<(PublishedElection | ArchivedElection | InvalidElection)[]>

    Defined in

    services/election.ts:221


    getElectionSalt

    getElectionSalt(address, electionCount): Promise\<string>

    Returns an election salt for address

    Parameters

    NameTypeDescription
    addressstringThe address of the account
    electionCountnumberThe election count

    Returns

    Promise\<string>

    The election salt

    Defined in

    services/election.ts:287


    getNumericElectionId

    getNumericElectionId(electionId): number

    Returns a numeric election identifier

    Parameters

    NameTypeDescription
    electionIdstringThe identifier of the election

    Returns

    number

    The numeric identifier

    Defined in

    services/election.ts:301


    keys

    keys(electionId): Promise\<IElectionKeysResponse>

    Fetches the encryption keys from the specified process.

    Parameters

    NameTypeDescription
    electionIdstringThe identifier of the election

    Returns

    Promise\<IElectionKeysResponse>

    Defined in

    services/election.ts:313


    nextElectionId

    nextElectionId(address, election): Promise\<string>

    Returns the next election id.

    Parameters

    NameTypeDescription
    addressstringThe address of the account
    electionUnpublishedElectionThe unpublished election

    Returns

    Promise\<string>

    The next election identifier

    Defined in

    services/election.ts:268


    signTransaction

    signTransaction(tx, message, walletOrSigner): Promise\<string>

    Parameters

    NameType
    txUint8Array
    messagestring
    walletOrSignerSigner | Wallet

    Returns

    Promise\<string>

    Defined in

    services/election.ts:74

    Properties

    censusService

    censusService: CensusService

    Implementation of

    ElectionServiceProperties.censusService

    Defined in

    services/election.ts:61


    chainService

    chainService: ChainService

    Implementation of

    ElectionServiceProperties.chainService

    Defined in

    services/election.ts:62


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/FaucetAPI.html b/sdk/reference/classes/FaucetAPI.html index dc4bb1141..b54cb2a2c 100644 --- a/sdk/reference/classes/FaucetAPI.html +++ b/sdk/reference/classes/FaucetAPI.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/FaucetService.html b/sdk/reference/classes/FaucetService.html index f14b0a9a7..ec091e88c 100644 --- a/sdk/reference/classes/FaucetService.html +++ b/sdk/reference/classes/FaucetService.html @@ -12,13 +12,13 @@ - +

    FaucetService

    @vocdoni/sdk / FaucetService

    Class: FaucetService

    Hierarchy

    Implements

    • FaucetServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new FaucetService(params): FaucetService

    Instantiate the chain service.

    Parameters

    NameTypeDescription
    paramsPartial\<FaucetServiceParameters>The service parameters

    Returns

    FaucetService

    Overrides

    Service.constructor

    Defined in

    services/faucet.ts:38

    Methods

    fetchPayload

    fetchPayload(address): Promise\<string>

    Fetches a faucet payload. Only for development.

    Parameters

    NameTypeDescription
    addressstringThe address where to send the tokens

    Returns

    Promise\<string>

    The encoded faucet package

    Defined in

    services/faucet.ts:49


    parseFaucetPackage

    parseFaucetPackage(faucetPackage): FaucetPackage

    Parses a faucet package.

    Parameters

    NameType
    faucetPackagestring

    Returns

    FaucetPackage

    Defined in

    services/faucet.ts:58

    Properties

    token_limit

    token_limit: number

    Implementation of

    FaucetServiceProperties.token_limit

    Defined in

    services/faucet.ts:31


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/FileAPI.html b/sdk/reference/classes/FileAPI.html index 9fffcc556..f79c8d4e0 100644 --- a/sdk/reference/classes/FileAPI.html +++ b/sdk/reference/classes/FileAPI.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/FileService.html b/sdk/reference/classes/FileService.html index 41e1f772e..f21e34a9e 100644 --- a/sdk/reference/classes/FileService.html +++ b/sdk/reference/classes/FileService.html @@ -12,13 +12,13 @@ - +

    FileService

    @vocdoni/sdk / FileService

    Class: FileService

    Hierarchy

    Implements

    • FileServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new FileService(params): FileService

    Instantiate the election service.

    Parameters

    NameTypeDescription
    paramsPartial\<FileServiceParameters>The service parameters

    Returns

    FileService

    Overrides

    Service.constructor

    Defined in

    services/file.ts:16

    Methods

    calculateCID

    calculateCID(data): Promise\<string>

    Fetches the CID expected for the specified data content.

    Parameters

    NameTypeDescription
    datastringThe data of which we want the CID of

    Returns

    Promise\<string>

    Resulting CID

    Defined in

    services/file.ts:27

    Properties

    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/InvalidElection.html b/sdk/reference/classes/InvalidElection.html index d86f466b8..c91fc4872 100644 --- a/sdk/reference/classes/InvalidElection.html +++ b/sdk/reference/classes/InvalidElection.html @@ -12,13 +12,13 @@ - +

    InvalidElection

    @vocdoni/sdk / InvalidElection

    Class: InvalidElection

    Represents an invalid election

    Table of contents

    Accessors

    Constructors

    Accessors

    id

    get id(): string

    Returns

    string

    Defined in

    types/election/invalid.ts:20


    isValid

    get isValid(): boolean

    Returns

    boolean

    Defined in

    types/election/invalid.ts:24

    Constructors

    constructor

    new InvalidElection(params): InvalidElection

    Constructs an invalid election

    Parameters

    NameTypeDescription
    paramsIInvalidElectionParametersElection parameters

    Returns

    InvalidElection

    Defined in

    types/election/invalid.ts:16

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/MultiChoiceElection.html b/sdk/reference/classes/MultiChoiceElection.html index fb466ab00..1e0ceffcb 100644 --- a/sdk/reference/classes/MultiChoiceElection.html +++ b/sdk/reference/classes/MultiChoiceElection.html @@ -12,13 +12,13 @@ - +

    MultiChoiceElection

    @vocdoni/sdk / MultiChoiceElection

    Class: MultiChoiceElection

    Represents a multi choice election

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Inherited from

    UnpublishedElection.addSDKVersion

    Defined in

    types/election/unpublished.ts:275

    set addSDKVersion(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Inherited from

    UnpublishedElection.addSDKVersion

    Defined in

    types/election/unpublished.ts:279


    canAbstain

    get canAbstain(): boolean

    Returns

    boolean

    Defined in

    types/election/multichoice.ts:124

    set canAbstain(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Defined in

    types/election/multichoice.ts:128


    canRepeatChoices

    get canRepeatChoices(): boolean

    Returns

    boolean

    Defined in

    types/election/multichoice.ts:116

    set canRepeatChoices(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Defined in

    types/election/multichoice.ts:120


    census

    get census(): Census

    Returns

    Census

    Inherited from

    UnpublishedElection.census

    Defined in

    types/election/unpublished.ts:249

    set census(value): void

    Parameters

    NameType
    valueCensus

    Returns

    void

    Inherited from

    UnpublishedElection.census

    Defined in

    types/election/unpublished.ts:253


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    UnpublishedElection.description

    Defined in

    types/election/unpublished.ts:173

    set description(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Inherited from

    UnpublishedElection.description

    Defined in

    types/election/unpublished.ts:177


    duration

    get duration(): number

    Returns

    number

    Inherited from

    UnpublishedElection.duration

    Defined in

    types/election/unpublished.ts:138


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Inherited from

    UnpublishedElection.electionType

    Defined in

    types/election/unpublished.ts:225

    set electionType(value): void

    Parameters

    NameType
    valueIElectionType

    Returns

    void

    Inherited from

    UnpublishedElection.electionType

    Defined in

    types/election/unpublished.ts:229


    endDate

    get endDate(): Date

    Returns

    Date

    Inherited from

    UnpublishedElection.endDate

    Defined in

    types/election/unpublished.ts:215

    set endDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Inherited from

    UnpublishedElection.endDate

    Defined in

    types/election/unpublished.ts:219


    get header(): string

    Returns

    string

    Inherited from

    UnpublishedElection.header

    Defined in

    types/election/unpublished.ts:181

    set header(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    UnpublishedElection.header

    Defined in

    types/election/unpublished.ts:185


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Inherited from

    UnpublishedElection.maxCensusSize

    Defined in

    types/election/unpublished.ts:258

    set maxCensusSize(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    UnpublishedElection.maxCensusSize

    Defined in

    types/election/unpublished.ts:262


    maxNumberOfChoices

    get maxNumberOfChoices(): number

    Returns

    number

    Defined in

    types/election/multichoice.ts:108

    set maxNumberOfChoices(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Defined in

    types/election/multichoice.ts:112


    meta

    get meta(): any

    Returns

    any

    Inherited from

    UnpublishedElection.meta

    Defined in

    types/election/unpublished.ts:197

    set meta(value): void

    Parameters

    NameType
    valueany

    Returns

    void

    Inherited from

    UnpublishedElection.meta

    Defined in

    types/election/unpublished.ts:201


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Inherited from

    UnpublishedElection.questions

    Defined in

    types/election/unpublished.ts:241

    set questions(value): void

    Parameters

    NameType
    valueIQuestion[]

    Returns

    void

    Inherited from

    UnpublishedElection.questions

    Defined in

    types/election/unpublished.ts:245


    startDate

    get startDate(): Date

    Returns

    Date

    Inherited from

    UnpublishedElection.startDate

    Defined in

    types/election/unpublished.ts:206

    set startDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Inherited from

    UnpublishedElection.startDate

    Defined in

    types/election/unpublished.ts:210


    streamUri

    get streamUri(): string

    Returns

    string

    Inherited from

    UnpublishedElection.streamUri

    Defined in

    types/election/unpublished.ts:189

    set streamUri(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    UnpublishedElection.streamUri

    Defined in

    types/election/unpublished.ts:193


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Inherited from

    UnpublishedElection.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:267

    set temporarySecretIdentity(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Inherited from

    UnpublishedElection.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:271


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Inherited from

    UnpublishedElection.title

    Defined in

    types/election/unpublished.ts:164

    set title(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Inherited from

    UnpublishedElection.title

    Defined in

    types/election/unpublished.ts:168


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Inherited from

    UnpublishedElection.voteType

    Defined in

    types/election/unpublished.ts:233

    set voteType(value): void

    Parameters

    NameType
    valueIVoteType

    Returns

    void

    Inherited from

    UnpublishedElection.voteType

    Defined in

    types/election/unpublished.ts:237

    Constructors

    constructor

    new MultiChoiceElection(params): MultiChoiceElection

    Constructs a multi choice election

    Parameters

    NameTypeDescription
    paramsIMultiChoiceElectionParametersMulti choice election parameters

    Returns

    MultiChoiceElection

    Overrides

    UnpublishedElection.constructor

    Defined in

    types/election/multichoice.ts:24

    Methods

    addQuestion

    addQuestion(title, description, choices): UnpublishedElection

    Parameters

    NameType
    titlestring | MultiLanguage\<string>
    descriptionstring | MultiLanguage\<string>
    choices({ title: string } | { title: MultiLanguage\<string> })[]

    Returns

    UnpublishedElection

    Overrides

    UnpublishedElection.addQuestion

    Defined in

    types/election/multichoice.ts:35


    generateEnvelopeType

    generateEnvelopeType(): object

    Returns

    object

    Overrides

    UnpublishedElection.generateEnvelopeType

    Defined in

    types/election/multichoice.ts:65


    generateMetadata

    generateMetadata(): ElectionMetadata

    Returns

    ElectionMetadata

    Overrides

    UnpublishedElection.generateMetadata

    Defined in

    types/election/multichoice.ts:75


    generateMode

    generateMode(): object

    Returns

    object

    Inherited from

    UnpublishedElection.generateMode

    Defined in

    types/election/unpublished.ts:154


    generateVoteOptions

    generateVoteOptions(): object

    Returns

    object

    Overrides

    UnpublishedElection.generateVoteOptions

    Defined in

    types/election/multichoice.ts:54


    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Inherited from

    UnpublishedElection.get

    Defined in

    types/election/election.ts:266


    removeQuestion

    removeQuestion(questionNumber): UnpublishedElection

    Parameters

    NameType
    questionNumbernumber

    Returns

    UnpublishedElection

    Inherited from

    UnpublishedElection.removeQuestion

    Defined in

    types/election/unpublished.ts:60


    checkVote

    checkVote(vote, voteType): void

    Parameters

    NameType
    voteVote
    voteTypeIVoteType

    Returns

    void

    Defined in

    types/election/multichoice.ts:92


    from

    from(params): MultiChoiceElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIMultiChoiceElectionParametersUnpublished Election parameters

    Returns

    MultiChoiceElection

    Overrides

    UnpublishedElection.from

    Defined in

    types/election/multichoice.ts:31

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/OffchainCensus.html b/sdk/reference/classes/OffchainCensus.html index e8bc6c169..7f34ac151 100644 --- a/sdk/reference/classes/OffchainCensus.html +++ b/sdk/reference/classes/OffchainCensus.html @@ -12,13 +12,13 @@ - +

    OffchainCensus

    @vocdoni/sdk / OffchainCensus

    Class: OffchainCensus

    Represents an offchain census

    Hierarchy

    Table of contents

    Accessors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    Census.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    Census.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    Census.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    Census.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    Census.isPublished

    Defined in

    types/census/census.ts:75


    participants

    get participants(): ICensusParticipant[]

    Returns

    ICensusParticipant[]

    Defined in

    types/census/offchain.ts:45

    set participants(value): void

    Parameters

    NameType
    valueICensusParticipant[]

    Returns

    void

    Defined in

    types/census/offchain.ts:49


    size

    get size(): number

    Returns

    number

    Inherited from

    Census.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    Census.size

    Defined in

    types/census/census.ts:63


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    Census.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    Census.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    Census.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    Census.weight

    Defined in

    types/census/census.ts:71

    Methods

    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    Census.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/PlainCensus.html b/sdk/reference/classes/PlainCensus.html index cd0bd84be..54c94f75c 100644 --- a/sdk/reference/classes/PlainCensus.html +++ b/sdk/reference/classes/PlainCensus.html @@ -12,13 +12,13 @@ - +

    PlainCensus

    @vocdoni/sdk / PlainCensus

    Class: PlainCensus

    Represents a plain census

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    OffchainCensus.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    OffchainCensus.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    OffchainCensus.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    OffchainCensus.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    OffchainCensus.isPublished

    Defined in

    types/census/census.ts:75


    participants

    get participants(): ICensusParticipant[]

    Returns

    ICensusParticipant[]

    Inherited from

    OffchainCensus.participants

    Defined in

    types/census/offchain.ts:45

    set participants(value): void

    Parameters

    NameType
    valueICensusParticipant[]

    Returns

    void

    Inherited from

    OffchainCensus.participants

    Defined in

    types/census/offchain.ts:49


    size

    get size(): number

    Returns

    number

    Inherited from

    OffchainCensus.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    OffchainCensus.size

    Defined in

    types/census/census.ts:63


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    OffchainCensus.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    OffchainCensus.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    OffchainCensus.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    OffchainCensus.weight

    Defined in

    types/census/census.ts:71

    Constructors

    constructor

    new PlainCensus(): PlainCensus

    Constructs a plain census

    Returns

    PlainCensus

    Overrides

    OffchainCensus.constructor

    Defined in

    types/census/plain.ts:10

    Methods

    add

    add(participants): void

    Parameters

    NameType
    participantsstring | string[]

    Returns

    void

    Defined in

    types/census/plain.ts:14


    remove

    remove(key): void

    Parameters

    NameType
    keystring

    Returns

    void

    Defined in

    types/census/plain.ts:30


    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    OffchainCensus.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/PublishedCensus.html b/sdk/reference/classes/PublishedCensus.html index 432e1a6e2..2ec29a767 100644 --- a/sdk/reference/classes/PublishedCensus.html +++ b/sdk/reference/classes/PublishedCensus.html @@ -12,13 +12,13 @@ - +

    PublishedCensus

    @vocdoni/sdk / PublishedCensus

    Class: PublishedCensus

    Represents a published census

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    Census.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    Census.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    Census.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    Census.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    Census.isPublished

    Defined in

    types/census/census.ts:75


    size

    get size(): number

    Returns

    number

    Inherited from

    Census.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    Census.size

    Defined in

    types/census/census.ts:63


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    Census.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    Census.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    Census.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    Census.weight

    Defined in

    types/census/census.ts:71

    Constructors

    constructor

    new PublishedCensus(censusId, censusURI, type, size?, weight?): PublishedCensus

    Constructs a published census

    Parameters

    NameTypeDescription
    censusIdstringThe id of the census
    censusURIstringThe URI of the census
    typeCensusTypeThe type of the census
    size?numberThe size of the census
    weight?bigintThe weight of the census

    Returns

    PublishedCensus

    Overrides

    Census.constructor

    Defined in

    types/census/published.ts:17

    Methods

    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    Census.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/PublishedElection.html b/sdk/reference/classes/PublishedElection.html index 216f09bcb..06fad92db 100644 --- a/sdk/reference/classes/PublishedElection.html +++ b/sdk/reference/classes/PublishedElection.html @@ -12,13 +12,13 @@ - +

    PublishedElection

    @vocdoni/sdk / PublishedElection

    Class: PublishedElection

    Represents a published election

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Inherited from

    Election.addSDKVersion

    Defined in

    types/election/election.ts:262


    census

    get census(): PublishedCensus

    Returns

    PublishedCensus

    Overrides

    Election.census

    Defined in

    types/election/published.ts:179


    chainId

    get chainId(): string

    Returns

    string

    Defined in

    types/election/published.ts:219


    creationTime

    get creationTime(): Date

    Returns

    Date

    Defined in

    types/election/published.ts:223


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Overrides

    Election.description

    Defined in

    types/election/published.ts:147


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Overrides

    Election.electionType

    Defined in

    types/election/published.ts:167


    endDate

    get endDate(): Date

    Returns

    Date

    Overrides

    Election.endDate

    Defined in

    types/election/published.ts:163


    finalResults

    get finalResults(): boolean

    Returns

    boolean

    Defined in

    types/election/published.ts:203


    fromArchive

    get fromArchive(): boolean

    Returns

    boolean

    Defined in

    types/election/published.ts:215


    get header(): string

    Returns

    string

    Overrides

    Election.header

    Defined in

    types/election/published.ts:151


    id

    get id(): string

    Returns

    string

    Defined in

    types/election/published.ts:187


    isValid

    get isValid(): boolean

    Returns

    boolean

    Defined in

    types/election/published.ts:239


    manuallyEnded

    get manuallyEnded(): boolean

    Returns

    boolean

    Defined in

    types/election/published.ts:211


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Overrides

    Election.maxCensusSize

    Defined in

    types/election/published.ts:183


    meta

    get meta(): any

    Returns

    any

    Inherited from

    Election.meta

    Defined in

    types/election/election.ts:226


    metadataURL

    get metadataURL(): string

    Returns

    string

    Defined in

    types/election/published.ts:227


    organizationId

    get organizationId(): string

    Returns

    string

    Defined in

    types/election/published.ts:191


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Overrides

    Election.questions

    Defined in

    types/election/published.ts:175


    raw

    get raw(): object

    Returns

    object

    Defined in

    types/election/published.ts:235


    results

    get results(): string[][]

    Returns

    string[][]

    Defined in

    types/election/published.ts:207


    resultsType

    get resultsType(): ElectionResultsType

    Returns

    ElectionResultsType

    Defined in

    types/election/published.ts:231


    startDate

    get startDate(): Date

    Returns

    Date

    Overrides

    Election.startDate

    Defined in

    types/election/published.ts:159


    status

    get status(): ElectionStatus

    Returns

    ElectionStatus

    Defined in

    types/election/published.ts:195


    streamUri

    get streamUri(): string

    Returns

    string

    Overrides

    Election.streamUri

    Defined in

    types/election/published.ts:155


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Inherited from

    Election.temporarySecretIdentity

    Defined in

    types/election/election.ts:258


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Overrides

    Election.title

    Defined in

    types/election/published.ts:143


    voteCount

    get voteCount(): number

    Returns

    number

    Defined in

    types/election/published.ts:199


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Overrides

    Election.voteType

    Defined in

    types/election/published.ts:171

    Constructors

    constructor

    new PublishedElection(params): PublishedElection

    Constructs a published election

    Parameters

    NameTypeDescription
    paramsIPublishedElectionParametersElection parameters

    Returns

    PublishedElection

    Overrides

    Election.constructor

    Defined in

    types/election/published.ts:65

    Methods

    checkVote

    checkVote(vote): void

    Parameters

    NameType
    voteVote

    Returns

    void

    Defined in

    types/election/published.ts:113


    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Inherited from

    Election.get

    Defined in

    types/election/election.ts:266


    build

    build(params): PublishedElection

    Returns a published election object

    Parameters

    NameTypeDescription
    paramsIPublishedElectionParametersPublished election parameters

    Returns

    PublishedElection

    Defined in

    types/election/published.ts:100


    checkVote

    checkVote(vote, voteType): void

    Parameters

    NameType
    voteVote
    voteTypeIVoteType

    Returns

    void

    Defined in

    types/election/published.ts:127


    from

    from(params): UnpublishedElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIElectionParametersUnpublished Election parameters

    Returns

    UnpublishedElection

    Inherited from

    Election.from

    Defined in

    types/election/election.ts:206


    getStatus

    getStatus(status, startDate): ElectionStatus

    Parameters

    NameType
    statusAllElectionStatus
    startDateDate

    Returns

    ElectionStatus

    Defined in

    types/election/published.ts:104

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Service.html b/sdk/reference/classes/Service.html index f223cde6b..6df765252 100644 --- a/sdk/reference/classes/Service.html +++ b/sdk/reference/classes/Service.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/StrategyCensus.html b/sdk/reference/classes/StrategyCensus.html index 2c0987e33..a81cd6610 100644 --- a/sdk/reference/classes/StrategyCensus.html +++ b/sdk/reference/classes/StrategyCensus.html @@ -12,13 +12,13 @@ - +

    StrategyCensus

    @vocdoni/sdk / StrategyCensus

    Class: StrategyCensus

    Represents a census3 census

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    PublishedCensus.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    PublishedCensus.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    PublishedCensus.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    PublishedCensus.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    PublishedCensus.isPublished

    Defined in

    types/census/census.ts:75


    size

    get size(): number

    Returns

    number

    Inherited from

    PublishedCensus.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    PublishedCensus.size

    Defined in

    types/census/census.ts:63


    strategy

    get strategy(): Census3Strategy

    Returns

    Census3Strategy

    Defined in

    types/census/census3/strategy.ts:33

    set strategy(value): void

    Parameters

    NameType
    valueCensus3Strategy

    Returns

    void

    Defined in

    types/census/census3/strategy.ts:37


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    PublishedCensus.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    PublishedCensus.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    PublishedCensus.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    PublishedCensus.weight

    Defined in

    types/census/census.ts:71

    Constructors

    constructor

    new StrategyCensus(censusId, censusURI, anonymous, strategy, size?, weight?): StrategyCensus

    Constructs a census3 census

    Parameters

    NameTypeDescription
    censusIdstringThe id of the census
    censusURIstringThe URI of the census
    anonymousbooleanIf the census is anonymous
    strategyCensus3StrategyThe strategy information
    size?numberThe size of the census
    weight?bigintThe weight of the census

    Returns

    StrategyCensus

    Overrides

    PublishedCensus.constructor

    Defined in

    types/census/census3/strategy.ts:21

    Methods

    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    PublishedCensus.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/TokenCensus.html b/sdk/reference/classes/TokenCensus.html index 5291ca02f..11c5bbd16 100644 --- a/sdk/reference/classes/TokenCensus.html +++ b/sdk/reference/classes/TokenCensus.html @@ -12,13 +12,13 @@ - +

    TokenCensus

    @vocdoni/sdk / TokenCensus

    Class: TokenCensus

    Represents a census3 census

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    PublishedCensus.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    PublishedCensus.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    PublishedCensus.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    PublishedCensus.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    PublishedCensus.isPublished

    Defined in

    types/census/census.ts:75


    size

    get size(): number

    Returns

    number

    Inherited from

    PublishedCensus.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    PublishedCensus.size

    Defined in

    types/census/census.ts:63


    token

    get token(): Token

    Returns

    Token

    Defined in

    types/census/census3/token.ts:33

    set token(value): void

    Parameters

    NameType
    valueToken

    Returns

    void

    Defined in

    types/census/census3/token.ts:37


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    PublishedCensus.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    PublishedCensus.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    PublishedCensus.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    PublishedCensus.weight

    Defined in

    types/census/census.ts:71

    Constructors

    constructor

    new TokenCensus(censusId, censusURI, anonymous, token, size?, weight?): TokenCensus

    Constructs a census3 census

    Parameters

    NameTypeDescription
    censusIdstringThe id of the census
    censusURIstringThe URI of the census
    anonymousbooleanIf the census is anonymous
    tokenTokenThe token of the census
    size?numberThe size of the census
    weight?bigintThe weight of the census

    Returns

    TokenCensus

    Overrides

    PublishedCensus.constructor

    Defined in

    types/census/census3/token.ts:21

    Methods

    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    PublishedCensus.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/UnpublishedElection.html b/sdk/reference/classes/UnpublishedElection.html index 3fdc00800..db3d556ec 100644 --- a/sdk/reference/classes/UnpublishedElection.html +++ b/sdk/reference/classes/UnpublishedElection.html @@ -12,13 +12,13 @@ - +

    UnpublishedElection

    @vocdoni/sdk / UnpublishedElection

    Class: UnpublishedElection

    Represents an unpublished election

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    addSDKVersion

    get addSDKVersion(): boolean

    Returns

    boolean

    Overrides

    Election.addSDKVersion

    Defined in

    types/election/unpublished.ts:275

    set addSDKVersion(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Overrides

    Election.addSDKVersion

    Defined in

    types/election/unpublished.ts:279


    census

    get census(): Census

    Returns

    Census

    Overrides

    Election.census

    Defined in

    types/election/unpublished.ts:249

    set census(value): void

    Parameters

    NameType
    valueCensus

    Returns

    void

    Overrides

    Election.census

    Defined in

    types/election/unpublished.ts:253


    description

    get description(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Overrides

    Election.description

    Defined in

    types/election/unpublished.ts:173

    set description(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Overrides

    Election.description

    Defined in

    types/election/unpublished.ts:177


    duration

    get duration(): number

    Returns

    number

    Defined in

    types/election/unpublished.ts:138


    electionType

    get electionType(): IElectionType

    Returns

    IElectionType

    Overrides

    Election.electionType

    Defined in

    types/election/unpublished.ts:225

    set electionType(value): void

    Parameters

    NameType
    valueIElectionType

    Returns

    void

    Overrides

    Election.electionType

    Defined in

    types/election/unpublished.ts:229


    endDate

    get endDate(): Date

    Returns

    Date

    Overrides

    Election.endDate

    Defined in

    types/election/unpublished.ts:215

    set endDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Overrides

    Election.endDate

    Defined in

    types/election/unpublished.ts:219


    get header(): string

    Returns

    string

    Overrides

    Election.header

    Defined in

    types/election/unpublished.ts:181

    set header(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Overrides

    Election.header

    Defined in

    types/election/unpublished.ts:185


    maxCensusSize

    get maxCensusSize(): number

    Returns

    number

    Overrides

    Election.maxCensusSize

    Defined in

    types/election/unpublished.ts:258

    set maxCensusSize(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Overrides

    Election.maxCensusSize

    Defined in

    types/election/unpublished.ts:262


    meta

    get meta(): any

    Returns

    any

    Overrides

    Election.meta

    Defined in

    types/election/unpublished.ts:197

    set meta(value): void

    Parameters

    NameType
    valueany

    Returns

    void

    Overrides

    Election.meta

    Defined in

    types/election/unpublished.ts:201


    questions

    get questions(): IQuestion[]

    Returns

    IQuestion[]

    Overrides

    Election.questions

    Defined in

    types/election/unpublished.ts:241

    set questions(value): void

    Parameters

    NameType
    valueIQuestion[]

    Returns

    void

    Overrides

    Election.questions

    Defined in

    types/election/unpublished.ts:245


    startDate

    get startDate(): Date

    Returns

    Date

    Overrides

    Election.startDate

    Defined in

    types/election/unpublished.ts:206

    set startDate(value): void

    Parameters

    NameType
    valueDate

    Returns

    void

    Overrides

    Election.startDate

    Defined in

    types/election/unpublished.ts:210


    streamUri

    get streamUri(): string

    Returns

    string

    Overrides

    Election.streamUri

    Defined in

    types/election/unpublished.ts:189

    set streamUri(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Overrides

    Election.streamUri

    Defined in

    types/election/unpublished.ts:193


    temporarySecretIdentity

    get temporarySecretIdentity(): boolean

    Returns

    boolean

    Overrides

    Election.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:267

    set temporarySecretIdentity(value): void

    Parameters

    NameType
    valueboolean

    Returns

    void

    Overrides

    Election.temporarySecretIdentity

    Defined in

    types/election/unpublished.ts:271


    title

    get title(): MultiLanguage\<string>

    Returns

    MultiLanguage\<string>

    Overrides

    Election.title

    Defined in

    types/election/unpublished.ts:164

    set title(value): void

    Parameters

    NameType
    valueMultiLanguage\<string>

    Returns

    void

    Overrides

    Election.title

    Defined in

    types/election/unpublished.ts:168


    voteType

    get voteType(): IVoteType

    Returns

    IVoteType

    Overrides

    Election.voteType

    Defined in

    types/election/unpublished.ts:233

    set voteType(value): void

    Parameters

    NameType
    valueIVoteType

    Returns

    void

    Overrides

    Election.voteType

    Defined in

    types/election/unpublished.ts:237

    Constructors

    constructor

    new UnpublishedElection(params): UnpublishedElection

    Constructs an unpublished election

    Parameters

    NameTypeDescription
    paramsIElectionParametersElection parameters

    Returns

    UnpublishedElection

    Overrides

    Election.constructor

    Defined in

    types/election/unpublished.ts:23

    Methods

    addQuestion

    addQuestion(title, description, choices): UnpublishedElection

    Parameters

    NameType
    titlestring | MultiLanguage\<string>
    descriptionstring | MultiLanguage\<string>
    choices({ title: string ; value: number } | { title: MultiLanguage\<string> ; value: number })[]

    Returns

    UnpublishedElection

    Defined in

    types/election/unpublished.ts:41


    generateEnvelopeType

    generateEnvelopeType(): object

    Returns

    object

    Defined in

    types/election/unpublished.ts:144


    generateMetadata

    generateMetadata(metadata?): ElectionMetadata

    Parameters

    NameType
    metadata?ElectionMetadata

    Returns

    ElectionMetadata

    Defined in

    types/election/unpublished.ts:88


    generateMode

    generateMode(): object

    Returns

    object

    Defined in

    types/election/unpublished.ts:154


    generateVoteOptions

    generateVoteOptions(): object

    Returns

    object

    Defined in

    types/election/unpublished.ts:123


    get

    get(dot): any

    Parameters

    NameType
    dotstring

    Returns

    any

    Inherited from

    Election.get

    Defined in

    types/election/election.ts:266


    removeQuestion

    removeQuestion(questionNumber): UnpublishedElection

    Parameters

    NameType
    questionNumbernumber

    Returns

    UnpublishedElection

    Defined in

    types/election/unpublished.ts:60


    from

    from(params): UnpublishedElection

    Returns an unpublished election object

    Parameters

    NameTypeDescription
    paramsIElectionParametersUnpublished Election parameters

    Returns

    UnpublishedElection

    Inherited from

    Election.from

    Defined in

    types/election/election.ts:206

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/VocdoniCensus3Client.html b/sdk/reference/classes/VocdoniCensus3Client.html index 5557c8f40..f19b4a1e6 100644 --- a/sdk/reference/classes/VocdoniCensus3Client.html +++ b/sdk/reference/classes/VocdoniCensus3Client.html @@ -12,13 +12,13 @@ - +

    VocdoniCensus3Client

    @vocdoni/sdk / VocdoniCensus3Client

    Class: VocdoniCensus3Client

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new VocdoniCensus3Client(opts): VocdoniCensus3Client

    Instantiate new VocdoniCensus3 client.

    To instantiate the client just pass the ClientOptions you want or use an empty object for the defaults.

    const client = new VocdoniCensus3Client({EnvOptions.PROD})

    Parameters

    NameTypeDescription
    optsClientOptionsoptional arguments

    Returns

    VocdoniCensus3Client

    Defined in

    census3.ts:49

    Methods

    createCensus

    createCensus(strategyId, anonymous?): Promise\<ICensus3CensusResponse>

    Creates the census based on the given strategy

    Parameters

    NameTypeDefault valueDescription
    strategyIdnumberundefinedThe id of the strategy
    anonymousbooleanfalseIf the census has to be anonymous

    Returns

    Promise\<ICensus3CensusResponse>

    The census information

    Defined in

    census3.ts:359


    createStrategy

    createStrategy(alias, predicate, tokens): Promise\<number>

    Creates a new strategy based on the given tokens and predicate

    Parameters

    NameTypeDescription
    aliasstringThe alias of the strategy
    predicatestringThe predicate of the strategy
    tokensObjectThe token list for the strategy

    Returns

    Promise\<number>

    The strategy id

    Defined in

    census3.ts:276


    createStrategyCensus

    createStrategyCensus(strategyId, anonymous?): Promise\<StrategyCensus>

    Returns the actual census based on the given strategy id

    Parameters

    NameTypeDefault valueDescription
    strategyIdnumberundefinedThe strategy id
    anonymousbooleanfalseIf the census has to be anonymous

    Returns

    Promise\<StrategyCensus>

    The strategy census

    Defined in

    census3.ts:419


    createToken

    createToken(address, type, chainId?, externalId?, tags?): Promise\<void>

    Creates a new token to be tracked in the service

    Parameters

    NameTypeDefault valueDescription
    addressstringundefinedThe address of the token
    typestringundefinedThe type of the token
    chainIdnumber1The chain id of the token
    externalIdstring''The identifier used by external provider
    tagsstring[][]The tag list to associate the token with

    Returns

    Promise\<void>

    Defined in

    census3.ts:164


    createTokenCensus

    createTokenCensus(address, chainId, anonymous?, externalId?): Promise\<TokenCensus>

    Returns the actual census based on the given token using the default strategy set

    Parameters

    NameTypeDefault valueDescription
    addressstringundefinedThe address of the token
    chainIdnumberundefinedThe id of the chain
    anonymousbooleanfalseIf the census has to be anonymous
    externalId?stringundefinedThe identifier used by external provider

    Returns

    Promise\<TokenCensus>

    The token census

    Defined in

    census3.ts:396


    getCensus

    getCensus(id): Promise\<ICensus3CensusResponse>

    Returns the census3 census based on the given identifier

    Parameters

    NameTypeDescription
    idnumberThe id of the census

    Returns

    Promise\<ICensus3CensusResponse>

    The census3 census

    Defined in

    census3.ts:347


    getCensuses

    getCensuses(strategyId): Promise\<ICensus3CensusResponse[]>

    Returns the census3 censuses

    Parameters

    NameTypeDescription
    strategyIdnumberThe strategy identifier

    Returns

    Promise\<ICensus3CensusResponse[]>

    The list of census3 censuses

    Defined in

    census3.ts:336


    getStrategies

    getStrategies(): Promise\<Census3Strategy[]>

    Returns the strategies

    Returns

    Promise\<Census3Strategy[]>

    The list of strategies

    Defined in

    census3.ts:182


    getStrategiesByToken

    getStrategiesByToken(id, chainId, externalId?): Promise\<Census3Strategy[]>

    Returns the strategies from the given token

    Parameters

    NameTypeDescription
    idstringThe id (address) of the token
    chainIdnumberThe id of the chain
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<Census3Strategy[]>

    The list of strategies

    Defined in

    census3.ts:208


    getStrategy

    getStrategy(id): Promise\<Census3Strategy>

    Returns the information of the strategy based on the id

    Parameters

    NameTypeDescription
    idnumberThe id of the strategy

    Returns

    Promise\<Census3Strategy>

    The strategy information

    Defined in

    census3.ts:222


    getStrategyEstimation

    getStrategyEstimation(id, anonymous?): Promise\<{ accuracy: number ; size: number ; timeToCreateCensus: number }>

    Returns the estimation of size and time (in milliseconds) to create the census generated for the provided strategy

    Parameters

    NameTypeDefault valueDescription
    idnumberundefinedThe id of the strategy
    anonymousbooleanfalseIf the estimation should be done for anonymous census

    Returns

    Promise\<{ accuracy: number ; size: number ; timeToCreateCensus: number }>

    The strategy estimation

    Defined in

    census3.ts:234


    getStrategyHolders

    getStrategyHolders(id, pagination?): Promise\<StrategyHolders>

    Returns the strategy holders

    Parameters

    NameTypeDescription
    idnumberThe id of the strategy
    paginationCensus3PaginationPagination options

    Returns

    Promise\<StrategyHolders>

    The list strategy holders

    Defined in

    census3.ts:193


    getSupportedChains

    getSupportedChains(): Promise\<ICensus3SupportedChain[]>

    Returns a list of supported chain identifiers

    Returns

    Promise\<ICensus3SupportedChain[]>

    Supported chain list

    Defined in

    census3.ts:77


    getSupportedOperators

    getSupportedOperators(): Promise\<ICensus3StrategiesOperator[]>

    Returns a list of supported strategies operators

    Returns

    Promise\<ICensus3StrategiesOperator[]>

    Supported strategies operators list

    Defined in

    census3.ts:95


    getSupportedTokens

    getSupportedTokens(): Promise\<TokenSummary[]>

    Returns a list of summary tokens supported by the service

    Returns

    Promise\<TokenSummary[]>

    Token summary list

    Defined in

    census3.ts:62


    getSupportedTypes

    getSupportedTypes(): Promise\<string[]>

    Returns a list of supported tokens type

    Returns

    Promise\<string[]>

    Supported tokens type list

    Defined in

    census3.ts:86


    getToken

    getToken(id, chainId, externalId?): Promise\<Token>

    Returns the full token information based on the id (address)

    Parameters

    NameTypeDescription
    idstringThe id (address) of the token
    chainIdnumberThe id of the chain
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<Token>

    The token information

    Defined in

    census3.ts:107


    importStrategy

    importStrategy(cid): Promise\<Census3Strategy>

    Imports a strategy from IPFS from the given cid.

    Parameters

    NameTypeDescription
    cidstringThe IPFS cid of the strategy to import

    Returns

    Promise\<Census3Strategy>

    The strategy information

    Defined in

    census3.ts:291


    isHolderInToken

    isHolderInToken(tokenId, chainId, holderId, externalId?): Promise\<boolean>

    Returns if the holder ID is already registered in the database as a holder of the token.

    Parameters

    NameTypeDescription
    tokenIdstringThe id (address) of the token
    chainIdnumberThe id of the chain
    holderIdstringThe identifier of the holder
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<boolean>

    If the holder is in the token

    Defined in

    census3.ts:125


    tokenHolderBalance

    tokenHolderBalance(tokenId, chainId, holderId, externalId?): Promise\<bigint>

    Returns the balance of the holder based on the token and chain

    Parameters

    NameTypeDescription
    tokenIdstringThe id (address) of the token
    chainIdnumberThe id of the chain
    holderIdstringThe identifier of the holder
    externalId?stringThe identifier used by external provider

    Returns

    Promise\<bigint>

    The balance of the holder

    Defined in

    census3.ts:146


    validatePredicate

    validatePredicate(predicate): Promise\<ICensus3ValidatePredicateResponse>

    Validates a predicate

    Parameters

    NameTypeDescription
    predicatestringThe predicate of the strategy

    Returns

    Promise\<ICensus3ValidatePredicateResponse>

    The parsed predicate

    Defined in

    census3.ts:325

    Properties

    queueWait

    queueWait: Object

    Type declaration

    NameType
    attemptsnumber
    retryTimenumber

    Defined in

    census3.ts:38


    url

    url: string

    Defined in

    census3.ts:37

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/VocdoniSDKClient.html b/sdk/reference/classes/VocdoniSDKClient.html index 9f4ac38f5..e95ac5099 100644 --- a/sdk/reference/classes/VocdoniSDKClient.html +++ b/sdk/reference/classes/VocdoniSDKClient.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ point.

    Table of contents

    Constructors

    Account Methods

    Election Methods

    Voting Methods

    Other Methods

    Properties

    Constructors

    constructor

    new VocdoniSDKClient(opts): VocdoniSDKClient

    Instantiate new VocdoniSDK client.

    To instantiate the client just pass the ClientOptions you want or empty object to let defaults.

    const client = new VocdoniSDKClient({EnvOptions.PROD})

    Parameters

    NameTypeDescription
    optsClientOptionsoptional arguments

    Returns

    VocdoniSDKClient

    Defined in

    client.ts:128

    Account Methods

    createAccount

    createAccount(options?): Promise\<AccountData>

    Registers an account against vochain, so it can create new elections.

    Parameters

    NameTypeDescription
    options?ObjectAdditional options, like extra information of the account, or the faucet package string
    options.account?Account-
    options.faucetPackage?string-
    options.password?string-
    options.sik?boolean-

    Returns

    Promise\<AccountData>

    Defined in

    client.ts:420


    createAccountInfo

    createAccountInfo(options): Promise\<AccountData>

    Creates an account with information.

    Parameters

    NameTypeDescription
    optionsObjectAdditional options, like extra information of the account, or the faucet package string.
    options.accountAccount-
    options.faucetPackage?string-
    options.password?string-
    options.signedSikPayload?string-

    Returns

    Promise\<AccountData>

    Defined in

    client.ts:330


    fetchAccount

    fetchAccount(address?): Promise\<AccountData>

    Fetches account.

    Parameters

    NameTypeDescription
    address?stringThe account address to fetch the information

    Returns

    Promise\<AccountData>

    Defined in

    client.ts:198


    fetchAccountInfo

    fetchAccountInfo(address?): Promise\<AccountData | ArchivedAccountData>

    Fetches account information.

    Parameters

    NameTypeDescription
    address?stringThe account address to fetch the information

    Returns

    Promise\<AccountData | ArchivedAccountData>

    Defined in

    client.ts:179


    updateAccountInfo

    updateAccountInfo(account): Promise\<AccountData>

    Updates an account with information

    Parameters

    NameTypeDescription
    accountAccountAccount data.

    Returns

    Promise\<AccountData>

    Defined in

    client.ts:374


    Election Methods

    calculateElectionCost

    calculateElectionCost(election): Promise\<number>

    Calculate the election cost

    Parameters

    NameType
    electionUnpublishedElection

    Returns

    Promise\<number>

    The cost in tokens.

    Defined in

    client.ts:1042


    cancelElection

    cancelElection(electionId?): Promise\<void>

    Cancels an election.

    Parameters

    NameTypeDescription
    electionId?stringThe id of the election

    Returns

    Promise\<void>

    Defined in

    client.ts:633


    changeElectionCensus

    changeElectionCensus(electionId, censusId, censusURI): Promise\<void>

    Changes the census of an election.

    Parameters

    NameTypeDescription
    electionIdstringThe id of the election
    censusIdstringThe new census id (root)
    censusURIstringThe new census URI

    Returns

    Promise\<void>

    Defined in

    client.ts:679


    continueElection

    continueElection(electionId?): Promise\<void>

    Continues an election.

    Parameters

    NameTypeDescription
    electionId?stringThe id of the election

    Returns

    Promise\<void>

    Defined in

    client.ts:643


    createElection

    createElection(election): Promise\<string>

    Creates a new voting election.

    Parameters

    NameTypeDescription
    electionUnpublishedElectionThe election object to be created.

    Returns

    Promise\<string>

    Resulting election id.

    Defined in

    client.ts:514


    createElectionSteps

    createElectionSteps(election): AsyncGenerator\<ElectionCreationStepValue, any, unknown>

    Creates a new voting election by steps with async returns.

    Parameters

    NameTypeDescription
    electionUnpublishedElectionThe election object to be created.

    Returns

    AsyncGenerator\<ElectionCreationStepValue, any, unknown>

    The async step returns.

    Defined in

    client.ts:531


    endElection

    endElection(electionId?): Promise\<void>

    Ends an election.

    Parameters

    NameTypeDescription
    electionId?stringThe id of the election

    Returns

    Promise\<void>

    Defined in

    client.ts:613


    estimateElectionCost

    estimateElectionCost(election): Promise\<number>

    Estimates the election cost

    Parameters

    NameType
    electionUnpublishedElection

    Returns

    Promise\<number>

    The cost in tokens.

    Defined in

    client.ts:1032


    fetchElection

    fetchElection(electionId?): Promise\<PublishedElection | ArchivedElection>

    Fetches info about an election.

    Parameters

    NameTypeDescription
    electionId?stringThe id of the election

    Returns

    Promise\<PublishedElection | ArchivedElection>

    Defined in

    client.ts:226


    fetchElections

    fetchElections(account?, page?): Promise\<(PublishedElection | ArchivedElection | InvalidElection)[]>

    Fetches info about all elections created by the given account

    Parameters

    NameTypeDefault valueDescription
    account?stringundefinedspecify an account to search for. Otherwise client wallet address is used.
    pagenumber0-

    Returns

    Promise\<(PublishedElection | ArchivedElection | InvalidElection)[]>

    Defined in

    client.ts:240


    pauseElection

    pauseElection(electionId?): Promise\<void>

    Pauses an election.

    Parameters

    NameTypeDescription
    electionId?stringThe id of the election

    Returns

    Promise\<void>

    Defined in

    client.ts:623


    setElectionId

    setElectionId(electionId): void

    Sets an election id. Required by other methods like submitVote or createElection.

    Parameters

    NameTypeDescription
    electionIdstringElection id string

    Returns

    void

    Defined in

    client.ts:169


    Voting Methods

    hasAlreadyVoted

    hasAlreadyVoted(options?): Promise\<string>

    Checks if the user has already voted

    Parameters

    NameTypeDescription
    options?Partial\<WalletOption & ElectionIdOption & VoteIdOption>Options for has already voted

    Returns

    Promise\<string>

    The id of the vote

    Defined in

    client.ts:725


    isAbleToVote

    isAbleToVote(options?): Promise\<boolean>

    Checks if the user is able to vote

    Parameters

    NameTypeDescription
    options?Partial\<WalletOption & ElectionIdOption & VoteIdOption>Options for is able to vote

    Returns

    Promise\<boolean>

    Defined in

    client.ts:757


    isInCensus

    isInCensus(options?): Promise\<boolean>

    Checks if the user is in census.

    Parameters

    NameTypeDescription
    options?Partial\<WalletOption & ElectionIdOption>Options for is in census

    Returns

    Promise\<boolean>

    Defined in

    client.ts:703


    submitVote

    submitVote(vote): Promise\<string>

    Submits a vote.

    Parameters

    NameTypeDescription
    voteVote | AnonymousVote | CspVoteThe vote (or votes) to be sent.

    Returns

    Promise\<string>

    Vote confirmation id.

    Defined in

    client.ts:805


    submitVoteSteps

    submitVoteSteps(vote): AsyncGenerator\<VoteStepValue, any, unknown>

    Submits a vote by steps.

    Parameters

    NameTypeDescription
    voteVote | AnonymousVote | CspVoteThe vote (or votes) to be sent.

    Returns

    AsyncGenerator\<VoteStepValue, any, unknown>

    Vote confirmation id.

    Defined in

    client.ts:822


    votesLeftCount

    votesLeftCount(options?): Promise\<number>

    Checks how many times a user can submit their vote

    Parameters

    NameTypeDescription
    options?Partial\<WalletOption & ElectionIdOption & VoteIdOption>Options for votes left count

    Returns

    Promise\<number>

    Defined in

    client.ts:767


    Other Methods

    calculateCID

    calculateCID(data): Promise\<string>

    Fetches the CID expected for the specified data content.

    Parameters

    NameTypeDescription
    datastringThe data of which we want the CID of

    Returns

    Promise\<string>

    Resulting CID

    Defined in

    client.ts:1052


    collectFaucetTokens

    collectFaucetTokens(faucetPackage?): Promise\<AccountData>

    Calls the faucet to get new tokens. Under development environments, if no faucet package is provided, one is created and tokens are allocated.

    Parameters

    NameTypeDescription
    faucetPackage?stringThe faucet package

    Returns

    Promise\<AccountData>

    Account data information updated with new balance

    Defined in

    client.ts:487


    createCensus

    createCensus(census): Promise\<void>

    Publishes the given census.

    Parameters

    NameTypeDescription
    censusPlainCensus | WeightedCensusThe census to be published.

    Returns

    Promise\<void>

    Defined in

    client.ts:954


    cspInfo

    cspInfo(): Promise\<ICspInfoResponse>

    Returns

    Promise\<ICspInfoResponse>

    Defined in

    client.ts:990


    cspSign

    cspSign(address, token): Promise\<string>

    Parameters

    NameType
    addressstring
    tokenstring

    Returns

    Promise\<string>

    Defined in

    client.ts:1001


    cspStep

    cspStep(stepNumber, data, authToken?): Promise\<ICspIntermediateStepResponse | ICspFinalStepResponse>

    Parameters

    NameType
    stepNumbernumber
    dataany[]
    authToken?string

    Returns

    Promise\<ICspIntermediateStepResponse | ICspFinalStepResponse>

    Defined in

    client.ts:994


    cspUrl

    cspUrl(): Promise\<string>

    Returns

    Promise\<string>

    Defined in

    client.ts:985


    cspVote

    cspVote(vote, signature, proof_type?): CspVote

    Parameters

    NameType
    voteVote
    signaturestring
    proof_type?CspProofType

    Returns

    CspVote

    Defined in

    client.ts:1006


    fetchCensusInfo

    fetchCensusInfo(censusId): Promise\<{ size: number ; type: CensusType ; weight: bigint }>

    Fetches the information of a given census.

    Parameters

    NameType
    censusIdstring

    Returns

    Promise\<{ size: number ; type: CensusType ; weight: bigint }>

    Defined in

    client.ts:963


    fetchChainCosts

    fetchChainCosts(): Promise\<IChainGetCostsResponse>

    Fetches blockchain costs information if needed.

    Returns

    Promise\<IChainGetCostsResponse>

    Defined in

    client.ts:1014


    fetchChainId

    fetchChainId(): Promise\<string>

    Fetches blockchain information if needed and returns the chain id.

    Returns

    Promise\<string>

    Defined in

    client.ts:1022


    fetchCircuits

    fetchCircuits(circuits?): Promise\<ChainCircuits>

    Fetches circuits for anonymous voting

    Parameters

    NameTypeDescription
    circuits?Omit\<ChainCircuits, "zKeyData" | "vKeyData" | "wasmData">Additional options for custom circuits

    Returns

    Promise\<ChainCircuits>

    Defined in

    client.ts:972


    fetchFaucetPayload

    fetchFaucetPayload(): Promise\<string>

    Fetches a faucet payload. Only for development.

    Returns

    Promise\<string>

    Defined in

    client.ts:1060


    fetchProof

    fetchProof(censusId, key): Promise\<CensusProof>

    Fetches proof that an address is part of the specified census.

    Parameters

    NameTypeDescription
    censusIdstringCensus we want to check the address against
    keystringThe address to be found

    Returns

    Promise\<CensusProof>

    Defined in

    client.ts:945


    generateRandomWallet

    generateRandomWallet(): string

    Assigns a random Wallet to the client and returns its private key.

    Returns

    string

    The private key.

    Defined in

    client.ts:917


    parseFaucetPackage

    parseFaucetPackage(faucetPackage): FaucetPackage

    Parses a faucet package.

    Parameters

    NameTypeDescription
    faucetPackagestringThe encoded faucet package

    Returns

    FaucetPackage

    Defined in

    client.ts:1070


    sendTokens

    sendTokens(options): Promise\<void>

    Send tokens from one account to another.

    Parameters

    NameTypeDescription
    optionsSendTokensOptionsOptions for send tokens

    Returns

    Promise\<void>

    Defined in

    client.ts:458


    setCircuits

    setCircuits(circuits): ChainCircuits

    Sets circuits for anonymous voting

    Parameters

    NameTypeDescription
    circuitsChainCircuitsCustom circuits

    Returns

    ChainCircuits

    Defined in

    client.ts:981


    waitForTransaction

    waitForTransaction(tx, wait?, attempts?): Promise\<void>

    A convenience method to wait for a transaction to be executed. It will loop trying to get the transaction information, and will retry every time it fails.

    Parameters

    NameTypeDescription
    txstringTransaction to wait for
    wait?numberThe delay in milliseconds between tries
    attempts?numberThe attempts to try before failing

    Returns

    Promise\<void>

    Defined in

    client.ts:1083


    generateWalletFromData

    generateWalletFromData(data): Wallet

    Returns a Wallet based on the inputs.

    Parameters

    NameTypeDescription
    datastring | string[]The data inputs which should generate the Wallet

    Returns

    Wallet

    The deterministic wallet.

    Defined in

    client.ts:929

    Properties

    accountService

    accountService: AccountService

    Defined in

    client.ts:112


    anonymousService

    anonymousService: AnonymousService

    Defined in

    client.ts:106


    censusService

    censusService: CensusService

    Defined in

    client.ts:104


    chainService

    chainService: ChainService

    Defined in

    client.ts:105


    cspService

    cspService: CspService

    Defined in

    client.ts:107


    electionId

    electionId: string

    Defined in

    client.ts:116


    electionService

    electionService: ElectionService

    Defined in

    client.ts:108


    explorerUrl

    explorerUrl: string

    Defined in

    client.ts:117


    faucetService

    faucetService: FaucetService

    Defined in

    client.ts:111


    fileService

    fileService: FileService

    Defined in

    client.ts:110


    url

    url: string

    Defined in

    client.ts:114


    voteService

    voteService: VoteService

    Defined in

    client.ts:109


    wallet

    wallet: Signer | Wallet

    Defined in

    client.ts:115

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/Vote.html b/sdk/reference/classes/Vote.html index 313a63bf3..72ce6cc70 100644 --- a/sdk/reference/classes/Vote.html +++ b/sdk/reference/classes/Vote.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/VoteAPI.html b/sdk/reference/classes/VoteAPI.html index ccb9e75fb..04941930f 100644 --- a/sdk/reference/classes/VoteAPI.html +++ b/sdk/reference/classes/VoteAPI.html @@ -12,13 +12,13 @@ - +

    VoteAPI

    @vocdoni/sdk / VoteAPI

    Class: VoteAPI

    Hierarchy

    • API

      VoteAPI

    Table of contents

    Methods

    Methods

    info

    info(url, voteId): Promise\<IVoteInfoResponse>

    Vote info

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    voteIdstringThe identifier of the vote

    Returns

    Promise\<IVoteInfoResponse>

    Defined in

    api/vote.ts:103


    submit

    submit(url, payload): Promise\<IVoteSubmitResponse>

    Voting

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    payloadstringThe base64 encoded vote transaction

    Returns

    Promise\<IVoteSubmitResponse>

    Defined in

    api/vote.ts:89


    verify

    verify(url, processId, voteId): Promise\<boolean>

    Verify vote. A vote exists in a process.

    Parameters

    NameTypeDescription
    urlstringAPI endpoint URL
    processIdstringThe process identifier
    voteIdstringThe identifier of the vote

    Returns

    Promise\<boolean>

    Return true if response has status 200

    Defined in

    api/vote.ts:119

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/VoteService.html b/sdk/reference/classes/VoteService.html index 4b708e9f7..9a579fc21 100644 --- a/sdk/reference/classes/VoteService.html +++ b/sdk/reference/classes/VoteService.html @@ -12,13 +12,13 @@ - +

    VoteService

    @vocdoni/sdk / VoteService

    Class: VoteService

    Hierarchy

    Implements

    • VoteServiceProperties

    Table of contents

    Constructors

    Methods

    Properties

    Constructors

    constructor

    new VoteService(params): VoteService

    Instantiate the election service.

    Parameters

    NameTypeDescription
    paramsPartial\<VoteServiceParameters>The service parameters

    Returns

    VoteService

    Overrides

    Service.constructor

    Defined in

    services/vote.ts:45

    Methods

    encodeTransaction

    encodeTransaction(tx): string

    Parameters

    NameType
    txUint8Array

    Returns

    string

    Defined in

    services/vote.ts:58


    info

    info(voteId): Promise\<IVoteInfoResponse>

    Get the vote information

    Parameters

    NameTypeDescription
    voteIdstringThe identifier of the vote

    Returns

    Promise\<IVoteInfoResponse>

    Defined in

    services/vote.ts:68


    signTransaction

    signTransaction(tx, message, walletOrSigner): Promise\<string>

    Parameters

    NameType
    txUint8Array
    messagestring
    walletOrSignerSigner | Wallet

    Returns

    Promise\<string>

    Defined in

    services/vote.ts:50


    vote

    vote(payload): Promise\<IVoteSubmitResponse>

    Submit the vote to the chain

    Parameters

    NameTypeDescription
    payloadstringThe base64 encoded vote transaction

    Returns

    Promise\<IVoteSubmitResponse>

    Defined in

    services/vote.ts:79

    Properties

    chainService

    chainService: ChainService

    Implementation of

    VoteServiceProperties.chainService

    Defined in

    services/vote.ts:38


    url

    url: string

    Inherited from

    Service.url

    Defined in

    services/service.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/WalletAPI.html b/sdk/reference/classes/WalletAPI.html index ec44f4545..8c1a8f787 100644 --- a/sdk/reference/classes/WalletAPI.html +++ b/sdk/reference/classes/WalletAPI.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/WeightedCensus.html b/sdk/reference/classes/WeightedCensus.html index 7166c89cc..038119b66 100644 --- a/sdk/reference/classes/WeightedCensus.html +++ b/sdk/reference/classes/WeightedCensus.html @@ -12,13 +12,13 @@ - +

    WeightedCensus

    @vocdoni/sdk / WeightedCensus

    Class: WeightedCensus

    Represents a weighted census

    Hierarchy

    Table of contents

    Accessors

    Constructors

    Methods

    Accessors

    censusId

    get censusId(): string

    Returns

    string

    Inherited from

    OffchainCensus.censusId

    Defined in

    types/census/census.ts:35

    set censusId(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    OffchainCensus.censusId

    Defined in

    types/census/census.ts:39


    censusURI

    get censusURI(): string

    Returns

    string

    Inherited from

    OffchainCensus.censusURI

    Defined in

    types/census/census.ts:43

    set censusURI(value): void

    Parameters

    NameType
    valuestring

    Returns

    void

    Inherited from

    OffchainCensus.censusURI

    Defined in

    types/census/census.ts:47


    isPublished

    get isPublished(): boolean

    Returns

    boolean

    Inherited from

    OffchainCensus.isPublished

    Defined in

    types/census/census.ts:75


    participants

    get participants(): ICensusParticipant[]

    Returns

    ICensusParticipant[]

    Inherited from

    OffchainCensus.participants

    Defined in

    types/census/offchain.ts:45

    set participants(value): void

    Parameters

    NameType
    valueICensusParticipant[]

    Returns

    void

    Inherited from

    OffchainCensus.participants

    Defined in

    types/census/offchain.ts:49


    size

    get size(): number

    Returns

    number

    Inherited from

    OffchainCensus.size

    Defined in

    types/census/census.ts:59

    set size(value): void

    Parameters

    NameType
    valuenumber

    Returns

    void

    Inherited from

    OffchainCensus.size

    Defined in

    types/census/census.ts:63


    type

    get type(): CensusType

    Returns

    CensusType

    Inherited from

    OffchainCensus.type

    Defined in

    types/census/census.ts:51

    set type(value): void

    Parameters

    NameType
    valueCensusType

    Returns

    void

    Inherited from

    OffchainCensus.type

    Defined in

    types/census/census.ts:55


    weight

    get weight(): bigint

    Returns

    bigint

    Inherited from

    OffchainCensus.weight

    Defined in

    types/census/census.ts:67

    set weight(value): void

    Parameters

    NameType
    valuebigint

    Returns

    void

    Inherited from

    OffchainCensus.weight

    Defined in

    types/census/census.ts:71

    Constructors

    constructor

    new WeightedCensus(): WeightedCensus

    Constructs a weighted census

    Returns

    WeightedCensus

    Overrides

    OffchainCensus.constructor

    Defined in

    types/census/weighted.ts:10

    Methods

    add

    add(participants): void

    Parameters

    NameType
    participantsICensusParticipant | ICensusParticipant[]

    Returns

    void

    Defined in

    types/census/weighted.ts:14


    remove

    remove(key): void

    Parameters

    NameType
    keystring

    Returns

    void

    Defined in

    types/census/weighted.ts:18


    censusTypeFromCensusOrigin

    censusTypeFromCensusOrigin(censusOrigin, anonymous?): CensusType

    Parameters

    NameTypeDefault value
    censusOriginstringundefined
    anonymousbooleanfalse

    Returns

    CensusType

    Inherited from

    OffchainCensus.censusTypeFromCensusOrigin

    Defined in

    types/census/census.ts:81

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/classes/ZkAPI.html b/sdk/reference/classes/ZkAPI.html index db356cacc..d7e0b8007 100644 --- a/sdk/reference/classes/ZkAPI.html +++ b/sdk/reference/classes/ZkAPI.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/CensusOrigin.html b/sdk/reference/enums/CensusOrigin.html index f8b832c2a..1058d3666 100644 --- a/sdk/reference/enums/CensusOrigin.html +++ b/sdk/reference/enums/CensusOrigin.html @@ -12,13 +12,13 @@ - +

    CensusOrigin

    @vocdoni/sdk / CensusOrigin

    Enumeration: CensusOrigin

    Table of contents

    Enumeration Members

    Enumeration Members

    CENSUS_UNKNOWN

    CENSUS_UNKNOWN = 0

    Defined in

    api/chain/transactions.ts:234


    ERC1155

    ERC1155 = 13

    Defined in

    api/chain/transactions.ts:240


    ERC20

    ERC20 = 11

    Defined in

    api/chain/transactions.ts:238


    ERC721

    ERC721 = 12

    Defined in

    api/chain/transactions.ts:239


    ERC777

    ERC777 = 14

    Defined in

    api/chain/transactions.ts:241


    MINI_ME

    MINI_ME = 15

    Defined in

    api/chain/transactions.ts:242


    OFF_CHAIN_CA

    OFF_CHAIN_CA = 3

    Defined in

    api/chain/transactions.ts:237


    OFF_CHAIN_TREE

    OFF_CHAIN_TREE = 1

    Defined in

    api/chain/transactions.ts:235


    OFF_CHAIN_TREE_WEIGHTED

    OFF_CHAIN_TREE_WEIGHTED = 2

    Defined in

    api/chain/transactions.ts:236


    UNRECOGNIZED

    UNRECOGNIZED = -1

    Defined in

    api/chain/transactions.ts:243

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/CensusType.html b/sdk/reference/enums/CensusType.html index e97f770bc..a5abfe4f4 100644 --- a/sdk/reference/enums/CensusType.html +++ b/sdk/reference/enums/CensusType.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/CensusTypeEnum.html b/sdk/reference/enums/CensusTypeEnum.html index 3ab2e0d31..ee274d50c 100644 --- a/sdk/reference/enums/CensusTypeEnum.html +++ b/sdk/reference/enums/CensusTypeEnum.html @@ -12,13 +12,13 @@ - +

    CensusTypeEnum

    @vocdoni/sdk / CensusTypeEnum

    Enumeration: CensusTypeEnum

    Table of contents

    Enumeration Members

    Enumeration Members

    CENSUS_UNKNOWN

    CENSUS_UNKNOWN = "CENSUS_UNKNOWN"

    Defined in

    api/election.ts:150


    ERC1155

    ERC1155 = "ERC1155"

    Defined in

    api/election.ts:156


    ERC20

    ERC20 = "ERC20"

    Defined in

    api/election.ts:154


    ERC721

    ERC721 = "ERC721"

    Defined in

    api/election.ts:155


    ERC777

    ERC777 = "ERC777"

    Defined in

    api/election.ts:157


    MINI_ME

    MINI_ME = "MINI_ME"

    Defined in

    api/election.ts:158


    OFF_CHAIN_CA

    OFF_CHAIN_CA = "OFF_CHAIN_CA"

    Defined in

    api/election.ts:153


    OFF_CHAIN_TREE

    OFF_CHAIN_TREE = "OFF_CHAIN_TREE"

    Defined in

    api/election.ts:151


    OFF_CHAIN_TREE_WEIGHTED

    OFF_CHAIN_TREE_WEIGHTED = "OFF_CHAIN_TREE_WEIGHTED"

    Defined in

    api/election.ts:152

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/CspProofType.html b/sdk/reference/enums/CspProofType.html index c3f87c44f..0c2de13c0 100644 --- a/sdk/reference/enums/CspProofType.html +++ b/sdk/reference/enums/CspProofType.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/ElectionCreationSteps.html b/sdk/reference/enums/ElectionCreationSteps.html index 498643c6e..7717b0f35 100644 --- a/sdk/reference/enums/ElectionCreationSteps.html +++ b/sdk/reference/enums/ElectionCreationSteps.html @@ -12,13 +12,13 @@ - +

    ElectionCreationSteps

    @vocdoni/sdk / ElectionCreationSteps

    Enumeration: ElectionCreationSteps

    Table of contents

    Enumeration Members

    Enumeration Members

    CENSUS_CREATED

    CENSUS_CREATED = "census-created"

    Defined in

    services/election.ts:41


    CREATING

    CREATING = "creating"

    Defined in

    services/election.ts:46


    DONE

    DONE = "done"

    Defined in

    services/election.ts:47


    GENERATE_TX

    GENERATE_TX = "generate-tx"

    Defined in

    services/election.ts:44


    GET_ACCOUNT_DATA

    GET_ACCOUNT_DATA = "get-account-data"

    Defined in

    services/election.ts:42


    GET_CHAIN_DATA

    GET_CHAIN_DATA = "get-chain-data"

    Defined in

    services/election.ts:40


    GET_DATA_PIN

    GET_DATA_PIN = "get-data-pin"

    Defined in

    services/election.ts:43


    SIGN_TX

    SIGN_TX = "sign-tx"

    Defined in

    services/election.ts:45

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/ElectionResultsTypeNames.html b/sdk/reference/enums/ElectionResultsTypeNames.html index df4cfe7cc..60b2be605 100644 --- a/sdk/reference/enums/ElectionResultsTypeNames.html +++ b/sdk/reference/enums/ElectionResultsTypeNames.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/ElectionStatus.html b/sdk/reference/enums/ElectionStatus.html index ff1142d56..88968d3ed 100644 --- a/sdk/reference/enums/ElectionStatus.html +++ b/sdk/reference/enums/ElectionStatus.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/ElectionStatusReady.html b/sdk/reference/enums/ElectionStatusReady.html index 8f0bf3a34..4707ffb1a 100644 --- a/sdk/reference/enums/ElectionStatusReady.html +++ b/sdk/reference/enums/ElectionStatusReady.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/EnvOptions.html b/sdk/reference/enums/EnvOptions.html index 8a5d8cfae..c0dbb2cbd 100644 --- a/sdk/reference/enums/EnvOptions.html +++ b/sdk/reference/enums/EnvOptions.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/TransactionType.html b/sdk/reference/enums/TransactionType.html index f8a49bc5f..bc473748e 100644 --- a/sdk/reference/enums/TransactionType.html +++ b/sdk/reference/enums/TransactionType.html @@ -12,13 +12,13 @@ - +

    TransactionType

    @vocdoni/sdk / TransactionType

    Enumeration: TransactionType

    Table of contents

    Enumeration Members

    Enumeration Members

    ADMIN_TX

    ADMIN_TX = "admin"

    Defined in

    api/chain.ts:168


    COLLECT_FAUCET_TX

    COLLECT_FAUCET_TX = "collectFaucet"

    Defined in

    api/chain.ts:175


    MINT_TOKENS_TX

    MINT_TOKENS_TX = "mintTokens"

    Defined in

    api/chain.ts:171


    NEW_PROCESS_TX

    NEW_PROCESS_TX = "newProcess"

    Defined in

    api/chain.ts:167


    REGISTER_KEY_TX

    REGISTER_KEY_TX = "registerKey"

    Defined in

    api/chain.ts:170


    SEND_TOKENS_TX

    SEND_TOKENS_TX = "sendTokens"

    Defined in

    api/chain.ts:172


    SET_ACCOUNT_TX

    SET_ACCOUNT_TX = "setAccount"

    Defined in

    api/chain.ts:174


    SET_KEYKEEPER_TX

    SET_KEYKEEPER_TX = "setKeykeeper"

    Defined in

    api/chain.ts:176


    SET_PROCESS_TX

    SET_PROCESS_TX = "setProcess"

    Defined in

    api/chain.ts:169


    SET_TRANSACTION_COSTS_TX

    SET_TRANSACTION_COSTS_TX = "setTransactionCosts"

    Defined in

    api/chain.ts:173


    VOTE_ENVELOPE

    VOTE_ENVELOPE = "vote"

    Defined in

    api/chain.ts:166

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/TxType.html b/sdk/reference/enums/TxType.html index 035a31677..c2469a72e 100644 --- a/sdk/reference/enums/TxType.html +++ b/sdk/reference/enums/TxType.html @@ -12,13 +12,13 @@ - +

    TxType

    @vocdoni/sdk / TxType

    Enumeration: TxType

    Table of contents

    Enumeration Members

    Enumeration Members

    ADD_DELEGATE_FOR_ACCOUNT

    ADD_DELEGATE_FOR_ACCOUNT = 18

    Defined in

    api/chain/transactions.ts:331


    ADD_KEYKEEPER

    ADD_KEYKEEPER = 21

    Defined in

    api/chain/transactions.ts:334


    ADD_ORACLE

    ADD_ORACLE = 7

    Defined in

    api/chain/transactions.ts:320


    ADD_PROCESS_KEYS

    ADD_PROCESS_KEYS = 5

    Defined in

    api/chain/transactions.ts:318


    ADD_VALIDATOR

    ADD_VALIDATOR = 9

    Defined in

    api/chain/transactions.ts:322


    COLLECT_FAUCET

    COLLECT_FAUCET = 20

    Defined in

    api/chain/transactions.ts:333


    CREATE_ACCOUNT

    CREATE_ACCOUNT = 23

    Defined in

    api/chain/transactions.ts:336


    DELETE_KEYKEEPER

    DELETE_KEYKEEPER = 22

    Defined in

    api/chain/transactions.ts:335


    DEL_DELEGATE_FOR_ACCOUNT

    DEL_DELEGATE_FOR_ACCOUNT = 19

    Defined in

    api/chain/transactions.ts:332


    MINT_TOKENS

    MINT_TOKENS = 14

    Defined in

    api/chain/transactions.ts:327


    NEW_PROCESS

    NEW_PROCESS = 1

    Defined in

    api/chain/transactions.ts:314


    REGISTER_VOTER_KEY

    REGISTER_VOTER_KEY = 13

    Defined in

    api/chain/transactions.ts:326


    REMOVE_ORACLE

    REMOVE_ORACLE = 8

    Defined in

    api/chain/transactions.ts:321


    REMOVE_VALIDATOR

    REMOVE_VALIDATOR = 10

    Defined in

    api/chain/transactions.ts:323


    REVEAL_PROCESS_KEYS

    REVEAL_PROCESS_KEYS = 6

    Defined in

    api/chain/transactions.ts:319


    SEND_TOKENS

    SEND_TOKENS = 15

    Defined in

    api/chain/transactions.ts:328


    SET_ACCOUNT_INFO_URI

    SET_ACCOUNT_INFO_URI = 17

    Defined in

    api/chain/transactions.ts:330


    SET_PROCESS_CENSUS

    SET_PROCESS_CENSUS = 3

    Defined in

    api/chain/transactions.ts:316


    SET_PROCESS_QUESTION_INDEX

    SET_PROCESS_QUESTION_INDEX = 4

    Defined in

    api/chain/transactions.ts:317


    SET_PROCESS_RESULTS

    SET_PROCESS_RESULTS = 12

    Defined in

    api/chain/transactions.ts:325


    SET_PROCESS_STATUS

    SET_PROCESS_STATUS = 2

    Defined in

    api/chain/transactions.ts:315


    SET_TRANSACTION_COSTS

    SET_TRANSACTION_COSTS = 16

    Defined in

    api/chain/transactions.ts:329


    TX_UNKNOWN

    TX_UNKNOWN = 0

    Defined in

    api/chain/transactions.ts:313


    UNRECOGNIZED

    UNRECOGNIZED = -1

    Defined in

    api/chain/transactions.ts:337


    VOTE

    VOTE = 11

    Defined in

    api/chain/transactions.ts:324

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/enums/VoteSteps.html b/sdk/reference/enums/VoteSteps.html index cfe015322..da3a47157 100644 --- a/sdk/reference/enums/VoteSteps.html +++ b/sdk/reference/enums/VoteSteps.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/AccountMetadata.html b/sdk/reference/interfaces/AccountMetadata.html index 1782239d4..4a1d32227 100644 --- a/sdk/reference/interfaces/AccountMetadata.html +++ b/sdk/reference/interfaces/AccountMetadata.html @@ -12,14 +12,14 @@ - +

    AccountMetadata

    @vocdoni/sdk / AccountMetadata

    Interface: AccountMetadata

    JSON metadata. Intended to be stored on IPFS or similar. More info: https://vocdoni.io/docs/#/architecture/components/entity?id=meta

    Table of contents

    Properties

    Properties

    description

    description: MultiLanguage\<string>

    Defined in

    types/metadata/account.ts:53


    languages

    languages: string[]

    Defined in

    types/metadata/account.ts:50


    media

    media: Object

    Type declaration

    NameType
    avatarstring
    headerstring
    logostring

    Defined in

    types/metadata/account.ts:57


    meta

    Optional meta: Object

    Index signature

    [key: string]: any

    Defined in

    types/metadata/account.ts:62


    name

    name: MultiLanguage\<string>

    Defined in

    types/metadata/account.ts:52


    newsFeed

    newsFeed: MultiLanguage\<string>

    Defined in

    types/metadata/account.ts:55


    version

    version: "1.0"

    Defined in

    types/metadata/account.ts:49

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/AdminTx.html b/sdk/reference/interfaces/AdminTx.html index 94ae3e99e..cfae5a74a 100644 --- a/sdk/reference/interfaces/AdminTx.html +++ b/sdk/reference/interfaces/AdminTx.html @@ -12,13 +12,13 @@ - +

    AdminTx

    @vocdoni/sdk / AdminTx

    Interface: AdminTx

    Table of contents

    Properties

    Properties

    address

    Optional address: Uint8Array

    Defined in

    api/chain/transactions.ts:92


    encryptionPrivateKey

    Optional encryptionPrivateKey: Uint8Array

    Defined in

    api/chain/transactions.ts:93


    encryptionPublicKey

    Optional encryptionPublicKey: Uint8Array

    Defined in

    api/chain/transactions.ts:94


    keyIndex

    Optional keyIndex: number

    Defined in

    api/chain/transactions.ts:95


    nonce

    nonce: number

    Defined in

    api/chain/transactions.ts:98


    power

    Optional power: number

    Defined in

    api/chain/transactions.ts:96


    processId

    processId: Uint8Array

    Defined in

    api/chain/transactions.ts:91


    publicKey

    Optional publicKey: Uint8Array

    Defined in

    api/chain/transactions.ts:97


    txtype

    txtype: TxType

    Defined in

    api/chain/transactions.ts:90

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/CircuitInputs.html b/sdk/reference/interfaces/CircuitInputs.html index 60aec28ff..dc3c2db8e 100644 --- a/sdk/reference/interfaces/CircuitInputs.html +++ b/sdk/reference/interfaces/CircuitInputs.html @@ -12,13 +12,13 @@ - +

    CircuitInputs

    @vocdoni/sdk / CircuitInputs

    Interface: CircuitInputs

    Table of contents

    Properties

    Properties

    address

    address: string

    Defined in

    services/anonymous.ts:43


    availableWeight

    availableWeight: string

    Defined in

    services/anonymous.ts:38


    censusRoot

    censusRoot: string

    Defined in

    services/anonymous.ts:41


    censusSiblings

    censusSiblings: string[]

    Defined in

    services/anonymous.ts:48


    electionId

    electionId: string[]

    Defined in

    services/anonymous.ts:36


    nullifier

    nullifier: string

    Defined in

    services/anonymous.ts:37


    password

    password: string

    Defined in

    services/anonymous.ts:44


    signature

    signature: string

    Defined in

    services/anonymous.ts:45


    sikRoot

    sikRoot: string

    Defined in

    services/anonymous.ts:40


    sikSiblings

    sikSiblings: string[]

    Defined in

    services/anonymous.ts:47


    voteHash

    voteHash: string[]

    Defined in

    services/anonymous.ts:39


    voteWeight

    voteWeight: string

    Defined in

    services/anonymous.ts:46

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/CollectFaucetTx.html b/sdk/reference/interfaces/CollectFaucetTx.html index 9fd1ad917..51659783f 100644 --- a/sdk/reference/interfaces/CollectFaucetTx.html +++ b/sdk/reference/interfaces/CollectFaucetTx.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ElectionMetadata.html b/sdk/reference/interfaces/ElectionMetadata.html index 2dc57a4e4..6e5a4d7b1 100644 --- a/sdk/reference/interfaces/ElectionMetadata.html +++ b/sdk/reference/interfaces/ElectionMetadata.html @@ -12,14 +12,14 @@ - +

    ElectionMetadata

    @vocdoni/sdk / ElectionMetadata

    Interface: ElectionMetadata

    JSON metadata. Intended to be stored on IPFS or similar. More info: https://vocdoni.io/docs/#/architecture/components/process?id=process-metadata-json

    Table of contents

    Properties

    Properties

    description

    description: MultiLanguage\<string>

    Defined in

    types/metadata/election.ts:127


    media

    media: Object

    Type declaration

    NameType
    header?string
    streamUri?string

    Defined in

    types/metadata/election.ts:128


    meta

    Optional meta: Object

    Arbitrary key/value data that specific applications can use for their own needs

    Index signature

    [key: string]: any

    Defined in

    types/metadata/election.ts:133


    questions

    questions: IQuestion[]

    Defined in

    types/metadata/election.ts:136


    title

    title: MultiLanguage\<string>

    Defined in

    types/metadata/election.ts:126


    type

    type: ElectionResultsType

    Defined in

    types/metadata/election.ts:137


    version

    version: ProtocolVersion

    Defined in

    types/metadata/election.ts:125

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/FetchElectionsParameters.html b/sdk/reference/interfaces/FetchElectionsParameters.html index c08e48b23..ee2a0dc28 100644 --- a/sdk/reference/interfaces/FetchElectionsParameters.html +++ b/sdk/reference/interfaces/FetchElectionsParameters.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IAccount.html b/sdk/reference/interfaces/IAccount.html index ed5ead9c2..9e3ae1129 100644 --- a/sdk/reference/interfaces/IAccount.html +++ b/sdk/reference/interfaces/IAccount.html @@ -12,13 +12,13 @@ - +

    IAccount

    @vocdoni/sdk / IAccount

    Interface: IAccount

    Table of contents

    Properties

    Properties

    avatar

    Optional avatar: string

    Defined in

    types/account.ts:10


    description

    Optional description: string | MultiLanguage\<string>

    Defined in

    types/account.ts:7


    feed

    Optional feed: string | MultiLanguage\<string>

    Defined in

    types/account.ts:8


    Optional header: string

    Defined in

    types/account.ts:9


    languages

    Optional languages: string[]

    Defined in

    types/account.ts:5


    Optional logo: string

    Defined in

    types/account.ts:11


    meta

    Optional meta: { key: string ; value: any }[]

    Defined in

    types/account.ts:12


    name

    Optional name: string | MultiLanguage\<string>

    Defined in

    types/account.ts:6

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IAccountTransfersCountResponse.html b/sdk/reference/interfaces/IAccountTransfersCountResponse.html index 1b0e700ef..1a53a1efe 100644 --- a/sdk/reference/interfaces/IAccountTransfersCountResponse.html +++ b/sdk/reference/interfaces/IAccountTransfersCountResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IAccountsCountResponse.html b/sdk/reference/interfaces/IAccountsCountResponse.html index 5d1ce9eb1..6711547d9 100644 --- a/sdk/reference/interfaces/IAccountsCountResponse.html +++ b/sdk/reference/interfaces/IAccountsCountResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IAccountsListResponse.html b/sdk/reference/interfaces/IAccountsListResponse.html index 8b479671c..dbe9fa749 100644 --- a/sdk/reference/interfaces/IAccountsListResponse.html +++ b/sdk/reference/interfaces/IAccountsListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IApprovalElectionParameters.html b/sdk/reference/interfaces/IApprovalElectionParameters.html index 417b00526..b59622b8d 100644 --- a/sdk/reference/interfaces/IApprovalElectionParameters.html +++ b/sdk/reference/interfaces/IApprovalElectionParameters.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Inherited from

    IElectionParameters.maxCensusSize

    Defined in

    types/election/election.ts:145


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Inherited from

    IElectionParameters.meta

    Defined in

    types/election/election.ts:126


    questions

    Optional questions: IQuestion[]

    Inherited from

    IElectionParameters.questions

    Defined in

    types/election/election.ts:132


    startDate

    Optional startDate: string | number | Date

    Inherited from

    IElectionParameters.startDate

    Defined in

    types/election/election.ts:127


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Inherited from

    IElectionParameters.streamUri

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Inherited from

    IElectionParameters.temporarySecretIdentity

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Inherited from

    IElectionParameters.title

    Defined in

    types/election/election.ts:110


    voteType

    Optional voteType: IVoteType

    Inherited from

    IElectionParameters.voteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IBlockTransactionsResponse.html b/sdk/reference/interfaces/IBlockTransactionsResponse.html index 6e40c5d56..3d3246dbb 100644 --- a/sdk/reference/interfaces/IBlockTransactionsResponse.html +++ b/sdk/reference/interfaces/IBlockTransactionsResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IBudgetElectionParametersInfo.html b/sdk/reference/interfaces/IBudgetElectionParametersInfo.html index c3b43caaa..dbba6fbc9 100644 --- a/sdk/reference/interfaces/IBudgetElectionParametersInfo.html +++ b/sdk/reference/interfaces/IBudgetElectionParametersInfo.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Inherited from

    IElectionParameters.maxCensusSize

    Defined in

    types/election/election.ts:145


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Inherited from

    IElectionParameters.meta

    Defined in

    types/election/election.ts:126


    minStep

    Optional minStep: number

    Defined in

    types/election/budget.ts:8


    questions

    Optional questions: IQuestion[]

    Inherited from

    IElectionParameters.questions

    Defined in

    types/election/election.ts:132


    startDate

    Optional startDate: string | number | Date

    Inherited from

    IElectionParameters.startDate

    Defined in

    types/election/election.ts:127


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Inherited from

    IElectionParameters.streamUri

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Inherited from

    IElectionParameters.temporarySecretIdentity

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Inherited from

    IElectionParameters.title

    Defined in

    types/election/election.ts:110


    voteType

    Optional voteType: IVoteType

    Inherited from

    IElectionParameters.voteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IBudgetElectionParametersWithBudget.html b/sdk/reference/interfaces/IBudgetElectionParametersWithBudget.html index d23f8ee29..b8da8c5e8 100644 --- a/sdk/reference/interfaces/IBudgetElectionParametersWithBudget.html +++ b/sdk/reference/interfaces/IBudgetElectionParametersWithBudget.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Inherited from

    IBudgetElectionParametersInfo.maxCensusSize

    Defined in

    types/election/election.ts:145


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Inherited from

    IBudgetElectionParametersInfo.meta

    Defined in

    types/election/election.ts:126


    minStep

    Optional minStep: number

    Inherited from

    IBudgetElectionParametersInfo.minStep

    Defined in

    types/election/budget.ts:8


    questions

    Optional questions: IQuestion[]

    Inherited from

    IBudgetElectionParametersInfo.questions

    Defined in

    types/election/election.ts:132


    startDate

    Optional startDate: string | number | Date

    Inherited from

    IBudgetElectionParametersInfo.startDate

    Defined in

    types/election/election.ts:127


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Inherited from

    IBudgetElectionParametersInfo.streamUri

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Inherited from

    IBudgetElectionParametersInfo.temporarySecretIdentity

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Inherited from

    IBudgetElectionParametersInfo.title

    Defined in

    types/election/election.ts:110


    useCensusWeightAsBudget

    useCensusWeightAsBudget: false

    Defined in

    types/election/budget.ts:17


    voteType

    Optional voteType: IVoteType

    Inherited from

    IBudgetElectionParametersInfo.voteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight.html b/sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight.html index 78a74bb2c..626af43da 100644 --- a/sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight.html +++ b/sdk/reference/interfaces/IBudgetElectionParametersWithCensusWeight.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Inherited from

    IBudgetElectionParametersInfo.maxCensusSize

    Defined in

    types/election/election.ts:145


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Inherited from

    IBudgetElectionParametersInfo.meta

    Defined in

    types/election/election.ts:126


    minStep

    Optional minStep: number

    Inherited from

    IBudgetElectionParametersInfo.minStep

    Defined in

    types/election/budget.ts:8


    questions

    Optional questions: IQuestion[]

    Inherited from

    IBudgetElectionParametersInfo.questions

    Defined in

    types/election/election.ts:132


    startDate

    Optional startDate: string | number | Date

    Inherited from

    IBudgetElectionParametersInfo.startDate

    Defined in

    types/election/election.ts:127


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Inherited from

    IBudgetElectionParametersInfo.streamUri

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Inherited from

    IBudgetElectionParametersInfo.temporarySecretIdentity

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Inherited from

    IBudgetElectionParametersInfo.title

    Defined in

    types/election/election.ts:110


    useCensusWeightAsBudget

    useCensusWeightAsBudget: true

    Defined in

    types/election/budget.ts:13


    voteType

    Optional voteType: IVoteType

    Inherited from

    IBudgetElectionParametersInfo.voteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus.html b/sdk/reference/interfaces/ICensus.html index d5f5ddd0e..9d2d7af20 100644 --- a/sdk/reference/interfaces/ICensus.html +++ b/sdk/reference/interfaces/ICensus.html @@ -12,13 +12,13 @@ - +

    ICensus

    @vocdoni/sdk / ICensus

    Interface: ICensus

    Table of contents

    Properties

    Properties

    censusOrigin

    censusOrigin: CensusTypeEnum

    The type of the census

    Defined in

    api/election.ts:21


    censusRoot

    censusRoot: string

    The root of the census

    Defined in

    api/election.ts:26


    censusURL

    censusURL: string

    The URL of the census

    Defined in

    api/election.ts:36


    maxCensusSize

    maxCensusSize: number

    Max size of the census. How many voters the census can have.

    Defined in

    api/election.ts:41


    postRegisterCensusRoot

    postRegisterCensusRoot: string

    The post register root of the census

    Defined in

    api/election.ts:31

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3CensusListResponse.html b/sdk/reference/interfaces/ICensus3CensusListResponse.html index 71ac38ba9..cdfb9512a 100644 --- a/sdk/reference/interfaces/ICensus3CensusListResponse.html +++ b/sdk/reference/interfaces/ICensus3CensusListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3CensusQueueResponse.html b/sdk/reference/interfaces/ICensus3CensusQueueResponse.html index bfb1ce927..bf2faefc9 100644 --- a/sdk/reference/interfaces/ICensus3CensusQueueResponse.html +++ b/sdk/reference/interfaces/ICensus3CensusQueueResponse.html @@ -12,13 +12,13 @@ - +

    ICensus3CensusQueueResponse

    @vocdoni/sdk / ICensus3CensusQueueResponse

    Interface: ICensus3CensusQueueResponse

    Table of contents

    Properties

    Properties

    data

    data: ICensus3CensusResponse

    The census data

    Defined in

    api/census3/census.ts:84


    done

    done: boolean

    If the queue has been done

    Defined in

    api/census3/census.ts:64


    error

    error: Object

    The error of the queue

    Type declaration

    NameTypeDescription
    codenumberThe code of the error
    errorstringThe string of the error

    Defined in

    api/census3/census.ts:69


    progress

    progress: number

    The creation progress

    Defined in

    api/census3/census.ts:89

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3CensusResponse.html b/sdk/reference/interfaces/ICensus3CensusResponse.html index 9a2d9d47c..13a6eeefc 100644 --- a/sdk/reference/interfaces/ICensus3CensusResponse.html +++ b/sdk/reference/interfaces/ICensus3CensusResponse.html @@ -12,13 +12,13 @@ - +

    ICensus3CensusResponse

    @vocdoni/sdk / ICensus3CensusResponse

    Interface: ICensus3CensusResponse

    Table of contents

    Properties

    Properties

    ID

    ID: number

    The identifier of the census

    Defined in

    api/census3/census.ts:22


    accuracy

    accuracy: number

    The accuracy for an anonymous census

    Defined in

    api/census3/census.ts:57


    anonymous

    anonymous: boolean

    If the census is anonymous or not

    Defined in

    api/census3/census.ts:52


    merkleRoot

    merkleRoot: string

    The root of the census

    Defined in

    api/census3/census.ts:32


    size

    size: number

    The size of the census (number of token holders)

    Defined in

    api/census3/census.ts:42


    strategyID

    strategyID: number

    The identifier of the strategy of the built census

    Defined in

    api/census3/census.ts:27


    uri

    uri: string

    The URI of the census

    Defined in

    api/census3/census.ts:37


    weight

    weight: string

    The weight of the census (weight of all token holders)

    Defined in

    api/census3/census.ts:47

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3ServiceInfoResponse.html b/sdk/reference/interfaces/ICensus3ServiceInfoResponse.html index 8dd9a49ef..db2918b4b 100644 --- a/sdk/reference/interfaces/ICensus3ServiceInfoResponse.html +++ b/sdk/reference/interfaces/ICensus3ServiceInfoResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategiesListResponse.html b/sdk/reference/interfaces/ICensus3StrategiesListResponse.html index 0853077d2..3871b79a1 100644 --- a/sdk/reference/interfaces/ICensus3StrategiesListResponse.html +++ b/sdk/reference/interfaces/ICensus3StrategiesListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated.html b/sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated.html index f45677059..d73e72dd4 100644 --- a/sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated.html +++ b/sdk/reference/interfaces/ICensus3StrategiesListResponsePaginated.html @@ -12,13 +12,13 @@ - +

    ICensus3StrategiesListResponsePaginated

    @vocdoni/sdk / ICensus3StrategiesListResponsePaginated

    Interface: ICensus3StrategiesListResponsePaginated

    Hierarchy

    Table of contents

    Properties

    Properties

    pagination

    pagination: Census3Pagination

    The pagination information

    Defined in

    api/census3/strategy.ts:29


    strategies

    strategies: Census3Strategy[]

    The list of the strategies identifiers

    Inherited from

    ICensus3StrategiesListResponse.strategies

    Defined in

    api/census3/strategy.ts:22

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategiesOperator.html b/sdk/reference/interfaces/ICensus3StrategiesOperator.html index a56f99854..0c22ea67d 100644 --- a/sdk/reference/interfaces/ICensus3StrategiesOperator.html +++ b/sdk/reference/interfaces/ICensus3StrategiesOperator.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse.html b/sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse.html index 26b2eef6e..92d2b36d1 100644 --- a/sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse.html +++ b/sdk/reference/interfaces/ICensus3StrategiesOperatorsResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategyCreateResponse.html b/sdk/reference/interfaces/ICensus3StrategyCreateResponse.html index 0a5d98618..183949f3f 100644 --- a/sdk/reference/interfaces/ICensus3StrategyCreateResponse.html +++ b/sdk/reference/interfaces/ICensus3StrategyCreateResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse.html b/sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse.html index 26155612e..6207f3953 100644 --- a/sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse.html +++ b/sdk/reference/interfaces/ICensus3StrategyEstimationQueueResponse.html @@ -12,13 +12,13 @@ - +

    ICensus3StrategyEstimationQueueResponse

    @vocdoni/sdk / ICensus3StrategyEstimationQueueResponse

    Interface: ICensus3StrategyEstimationQueueResponse

    Table of contents

    Properties

    Properties

    data

    data: Object

    The estimation data of the strategy

    Type declaration

    NameTypeDescription
    accuracynumberThe accuracy for an anonymous census
    sizenumberThe estimation of the size
    timeToCreateCensusnumberThe estimation of the time to create the census

    Defined in

    api/census3/strategy.ts:126


    done

    done: boolean

    If the queue has been done

    Defined in

    api/census3/strategy.ts:106


    error

    error: Object

    The error of the queue

    Type declaration

    NameTypeDescription
    codenumberThe code of the error
    errorstringThe string of the error

    Defined in

    api/census3/strategy.ts:111


    progress

    progress: number

    The estimation progress

    Defined in

    api/census3/strategy.ts:146

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategyHoldersResponse.html b/sdk/reference/interfaces/ICensus3StrategyHoldersResponse.html index 0fba31ff6..0e2e5774f 100644 --- a/sdk/reference/interfaces/ICensus3StrategyHoldersResponse.html +++ b/sdk/reference/interfaces/ICensus3StrategyHoldersResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated.html b/sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated.html index 8fb006fae..efc7e4565 100644 --- a/sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated.html +++ b/sdk/reference/interfaces/ICensus3StrategyHoldersResponsePaginated.html @@ -12,13 +12,13 @@ - +

    ICensus3StrategyHoldersResponsePaginated

    @vocdoni/sdk / ICensus3StrategyHoldersResponsePaginated

    Interface: ICensus3StrategyHoldersResponsePaginated

    Hierarchy

    Table of contents

    Properties

    Properties

    holders

    holders: Object

    The list of the strategy holders

    Index signature

    [key: string]: string

    Inherited from

    ICensus3StrategyHoldersResponse.holders

    Defined in

    api/census3/strategy.ts:36


    pagination

    pagination: Census3Pagination

    The pagination information

    Defined in

    api/census3/strategy.ts:43

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategyImportQueueResponse.html b/sdk/reference/interfaces/ICensus3StrategyImportQueueResponse.html index 0f229a72c..6f194ae50 100644 --- a/sdk/reference/interfaces/ICensus3StrategyImportQueueResponse.html +++ b/sdk/reference/interfaces/ICensus3StrategyImportQueueResponse.html @@ -12,13 +12,13 @@ - +

    ICensus3StrategyImportQueueResponse

    @vocdoni/sdk / ICensus3StrategyImportQueueResponse

    Interface: ICensus3StrategyImportQueueResponse

    Table of contents

    Properties

    Properties

    data

    data: Census3Strategy

    The imported data strategy

    Defined in

    api/census3/strategy.ts:173


    done

    done: boolean

    If the queue has been done

    Defined in

    api/census3/strategy.ts:153


    error

    error: Object

    The error of the queue

    Type declaration

    NameTypeDescription
    codenumberThe code of the error
    errorstringThe string of the error

    Defined in

    api/census3/strategy.ts:158


    progress

    progress: number

    The importing progress

    Defined in

    api/census3/strategy.ts:178

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3StrategyToken.html b/sdk/reference/interfaces/ICensus3StrategyToken.html index 5fd70a5d2..7bc56b1bf 100644 --- a/sdk/reference/interfaces/ICensus3StrategyToken.html +++ b/sdk/reference/interfaces/ICensus3StrategyToken.html @@ -12,13 +12,13 @@ - +

    ICensus3StrategyToken

    @vocdoni/sdk / ICensus3StrategyToken

    Interface: ICensus3StrategyToken

    Table of contents

    Properties

    Properties

    id

    id: string

    The id (address) of the token.

    Defined in

    api/census3/strategy.ts:185


    method

    method: string

    The method used for checking balances.

    Defined in

    api/census3/strategy.ts:200


    minBalance

    minBalance: string

    The minimum balance.

    Defined in

    api/census3/strategy.ts:195


    name

    name: string

    The name of the token.

    Defined in

    api/census3/strategy.ts:190

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3SupportedChain.html b/sdk/reference/interfaces/ICensus3SupportedChain.html index 55e22677f..44414f612 100644 --- a/sdk/reference/interfaces/ICensus3SupportedChain.html +++ b/sdk/reference/interfaces/ICensus3SupportedChain.html @@ -12,13 +12,13 @@ - +

    ICensus3SupportedChain

    @vocdoni/sdk / ICensus3SupportedChain

    Interface: ICensus3SupportedChain

    Table of contents

    Properties

    Properties

    chainID

    chainID: number

    The identifier of the chain

    Defined in

    api/census3/service.ts:12


    name

    name: string

    The name of the chain

    Defined in

    api/census3/service.ts:22


    shortName

    shortName: string

    The short name of the chain

    Defined in

    api/census3/service.ts:17

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3TokenHolderResponse.html b/sdk/reference/interfaces/ICensus3TokenHolderResponse.html index ff141e948..492df89b5 100644 --- a/sdk/reference/interfaces/ICensus3TokenHolderResponse.html +++ b/sdk/reference/interfaces/ICensus3TokenHolderResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3TokenListResponse.html b/sdk/reference/interfaces/ICensus3TokenListResponse.html index a067eef29..0ed5feb1d 100644 --- a/sdk/reference/interfaces/ICensus3TokenListResponse.html +++ b/sdk/reference/interfaces/ICensus3TokenListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3TokenListResponsePaginated.html b/sdk/reference/interfaces/ICensus3TokenListResponsePaginated.html index 47ecc4f23..ccae8c4dc 100644 --- a/sdk/reference/interfaces/ICensus3TokenListResponsePaginated.html +++ b/sdk/reference/interfaces/ICensus3TokenListResponsePaginated.html @@ -12,13 +12,13 @@ - +

    ICensus3TokenListResponsePaginated

    @vocdoni/sdk / ICensus3TokenListResponsePaginated

    Interface: ICensus3TokenListResponsePaginated

    Hierarchy

    Table of contents

    Properties

    Properties

    pagination

    pagination: Census3Pagination

    The pagination information

    Defined in

    api/census3/token.ts:124


    tokens

    tokens: Census3SummaryToken[]

    The list of the tokens

    Inherited from

    ICensus3TokenListResponse.tokens

    Defined in

    api/census3/token.ts:110

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3TokenTypesResponse.html b/sdk/reference/interfaces/ICensus3TokenTypesResponse.html index e495db491..f08ab10bb 100644 --- a/sdk/reference/interfaces/ICensus3TokenTypesResponse.html +++ b/sdk/reference/interfaces/ICensus3TokenTypesResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3ValidatePredicateChild.html b/sdk/reference/interfaces/ICensus3ValidatePredicateChild.html index 4d8818b21..61923a061 100644 --- a/sdk/reference/interfaces/ICensus3ValidatePredicateChild.html +++ b/sdk/reference/interfaces/ICensus3ValidatePredicateChild.html @@ -12,13 +12,13 @@ - +

    ICensus3ValidatePredicateChild

    @vocdoni/sdk / ICensus3ValidatePredicateChild

    Interface: ICensus3ValidatePredicateChild

    Table of contents

    Properties

    Properties

    operator

    operator: string

    The operator used in the predicate

    Defined in

    api/census3/strategy.ts:221


    tokens

    tokens: (ICensus3ValidatePredicateToken | ICensus3ValidatePredicateChild)[]

    The list of tokens of the predicate

    Defined in

    api/census3/strategy.ts:226

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3ValidatePredicateResponse.html b/sdk/reference/interfaces/ICensus3ValidatePredicateResponse.html index d94f932d6..82273300e 100644 --- a/sdk/reference/interfaces/ICensus3ValidatePredicateResponse.html +++ b/sdk/reference/interfaces/ICensus3ValidatePredicateResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensus3ValidatePredicateToken.html b/sdk/reference/interfaces/ICensus3ValidatePredicateToken.html index 6b81328fc..19ab7df7b 100644 --- a/sdk/reference/interfaces/ICensus3ValidatePredicateToken.html +++ b/sdk/reference/interfaces/ICensus3ValidatePredicateToken.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensusExportResponse.html b/sdk/reference/interfaces/ICensusExportResponse.html index a93c7f875..4c959cb15 100644 --- a/sdk/reference/interfaces/ICensusExportResponse.html +++ b/sdk/reference/interfaces/ICensusExportResponse.html @@ -12,13 +12,13 @@ - +

    ICensusExportResponse

    @vocdoni/sdk / ICensusExportResponse

    Interface: ICensusExportResponse

    Table of contents

    Properties

    Properties

    data

    data: string

    The data of the census

    Defined in

    api/census.ts:54


    maxLevels

    maxLevels: number

    The max levels of the census

    Defined in

    api/census.ts:59


    rootHash

    rootHash: string

    The root hash of the census

    Defined in

    api/census.ts:49


    type

    type: number

    The type of the census

    Defined in

    api/census.ts:44

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensusImportResponse.html b/sdk/reference/interfaces/ICensusImportResponse.html index 6acef4bac..ada4b248a 100644 --- a/sdk/reference/interfaces/ICensusImportResponse.html +++ b/sdk/reference/interfaces/ICensusImportResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensusParticipant.html b/sdk/reference/interfaces/ICensusParticipant.html index ecb7ec97c..bc47b4e6f 100644 --- a/sdk/reference/interfaces/ICensusParticipant.html +++ b/sdk/reference/interfaces/ICensusParticipant.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensusProofResponse.html b/sdk/reference/interfaces/ICensusProofResponse.html index 6419dfdc0..51b897c89 100644 --- a/sdk/reference/interfaces/ICensusProofResponse.html +++ b/sdk/reference/interfaces/ICensusProofResponse.html @@ -12,13 +12,13 @@ - +

    ICensusProofResponse

    @vocdoni/sdk / ICensusProofResponse

    Interface: ICensusProofResponse

    Table of contents

    Properties

    Properties

    censusProof

    censusProof: string

    The proof for the given key

    Defined in

    api/census.ts:83


    censusRoot

    censusRoot: string

    The root (id) of the census

    Defined in

    api/census.ts:78


    censusSiblings

    Optional censusSiblings: string[]

    The census siblings

    Defined in

    api/census.ts:93


    type

    type: CensusType

    The type of the census

    Defined in

    api/census.ts:68


    value

    value: string

    The value for the given key

    Defined in

    api/census.ts:88


    weight

    weight: string

    The weight as a string

    Defined in

    api/census.ts:73

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICensusPublishResponse.html b/sdk/reference/interfaces/ICensusPublishResponse.html index f466d4c72..0ea8f9a4f 100644 --- a/sdk/reference/interfaces/ICensusPublishResponse.html +++ b/sdk/reference/interfaces/ICensusPublishResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainBlockInfoResponse.html b/sdk/reference/interfaces/IChainBlockInfoResponse.html index 3b3f1b556..09f33e4c6 100644 --- a/sdk/reference/interfaces/IChainBlockInfoResponse.html +++ b/sdk/reference/interfaces/IChainBlockInfoResponse.html @@ -12,13 +12,13 @@ - +

    IChainBlockInfoResponse

    @vocdoni/sdk / IChainBlockInfoResponse

    Interface: IChainBlockInfoResponse

    Table of contents

    Properties

    Properties

    data

    data: Object

    Type declaration

    NameType
    txsstring[]

    Defined in

    api/chain.ts:272


    evidence

    evidence: Object

    Type declaration

    NameType
    evidencestring[]

    Defined in

    api/chain.ts:275


    hash

    hash: string

    Defined in

    api/chain.ts:278


    header: Object

    Type declaration

    NameType
    appHashstring
    chainIdstring
    consensusHashstring
    dataHashstring
    evidenceHashstring
    heightnumber
    lastBlockIdBlockID
    lastCommitHashstring
    lastResultsHashstring
    nextValidatorsHashstring
    proposerAddressstring
    timestring
    validatorsHashstring
    version{ app: number ; block: number }
    version.appnumber
    version.blocknumber

    Defined in

    api/chain.ts:279


    lastCommit

    lastCommit: Object

    Type declaration

    NameType
    blockIdBlockID
    heightnumber
    roundnumber
    signatures{ blockIdFlag: number ; signature: string ; timestamp: string ; validatorAddress: string }[]

    Defined in

    api/chain.ts:298

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainGetCircuitResponse.html b/sdk/reference/interfaces/IChainGetCircuitResponse.html index 1067d71be..d53092273 100644 --- a/sdk/reference/interfaces/IChainGetCircuitResponse.html +++ b/sdk/reference/interfaces/IChainGetCircuitResponse.html @@ -12,13 +12,13 @@ - +

    IChainGetCircuitResponse

    @vocdoni/sdk / IChainGetCircuitResponse

    Interface: IChainGetCircuitResponse

    Table of contents

    Properties

    Properties

    circuitPath

    circuitPath: string

    The path of the circuit.

    Defined in

    api/chain.ts:127


    levels

    levels: number

    The circuit levels.

    Defined in

    api/chain.ts:132


    uri

    uri: string

    The base uri of the files.

    Defined in

    api/chain.ts:122


    vKeyFilename

    vKeyFilename: string

    The name of the verification key file.

    Defined in

    api/chain.ts:152


    vKeyHash

    vKeyHash: string

    The hash of the verification key file.

    Defined in

    api/chain.ts:147


    wasmFilename

    wasmFilename: string

    The name of the WASM file.

    Defined in

    api/chain.ts:162


    wasmHash

    wasmHash: string

    The hash of the WASM file.

    Defined in

    api/chain.ts:157


    zKeyFilename

    zKeyFilename: string

    The name of the proving key file.

    Defined in

    api/chain.ts:142


    zKeyHash

    zKeyHash: string

    The hash of the proving key file.

    Defined in

    api/chain.ts:137

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainGetCostsResponse.html b/sdk/reference/interfaces/IChainGetCostsResponse.html index ca68ef28b..e51d98cec 100644 --- a/sdk/reference/interfaces/IChainGetCostsResponse.html +++ b/sdk/reference/interfaces/IChainGetCostsResponse.html @@ -12,13 +12,13 @@ - +

    IChainGetCostsResponse

    @vocdoni/sdk / IChainGetCostsResponse

    Interface: IChainGetCostsResponse

    Table of contents

    Properties

    Properties

    basePrice

    basePrice: number

    The base price.

    Defined in

    api/chain.ts:97


    capacity

    capacity: number

    The capacity of the chain.

    Defined in

    api/chain.ts:102


    factors

    factors: Object

    The factors.

    Type declaration

    NameType
    k1number
    k2number
    k3number
    k4number
    k5number
    k6number
    k7number

    Defined in

    api/chain.ts:107

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainGetInfoResponse.html b/sdk/reference/interfaces/IChainGetInfoResponse.html index bc31d48c0..0c4ab7cfc 100644 --- a/sdk/reference/interfaces/IChainGetInfoResponse.html +++ b/sdk/reference/interfaces/IChainGetInfoResponse.html @@ -12,13 +12,13 @@ - +

    IChainGetInfoResponse

    @vocdoni/sdk / IChainGetInfoResponse

    Interface: IChainGetInfoResponse

    Table of contents

    Properties

    Properties

    blockTime

    blockTime: number[]

    The different block times from the chain.

    Defined in

    api/chain.ts:35


    blockTimestamp

    blockTimestamp: number

    The timestamp of the actual block.

    Defined in

    api/chain.ts:65


    chainId

    chainId: string

    The id of the current chain

    Defined in

    api/chain.ts:30


    circuitConfigurationTag

    circuitConfigurationTag: string

    The circuit configuration tag.

    Defined in

    api/chain.ts:85


    electionCount

    electionCount: number

    The number of elections existing on the Vochain.

    Defined in

    api/chain.ts:40


    genesisTime

    genesisTime: string

    The time of the genesis block.

    Defined in

    api/chain.ts:50


    height

    height: number

    The height or actual block of the current chain.

    Defined in

    api/chain.ts:55


    maxCensusSize

    maxCensusSize: number

    The maximum size of a census.

    Defined in

    api/chain.ts:90


    organizationCount

    organizationCount: number

    The number of organizations existing on the Vochain.

    Defined in

    api/chain.ts:45


    syncing

    syncing: boolean

    Whether the blockchain is syncing.

    Defined in

    api/chain.ts:60


    transactionCount

    transactionCount: number

    The number of transactions.

    Defined in

    api/chain.ts:70


    validatorCount

    validatorCount: number

    The number of validators.

    Defined in

    api/chain.ts:75


    voteCount

    voteCount: number

    The number of votes.

    Defined in

    api/chain.ts:80

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainOrganizationCountResponse.html b/sdk/reference/interfaces/IChainOrganizationCountResponse.html index 795b8d016..d3b5aa827 100644 --- a/sdk/reference/interfaces/IChainOrganizationCountResponse.html +++ b/sdk/reference/interfaces/IChainOrganizationCountResponse.html @@ -12,13 +12,13 @@ - +

    IChainOrganizationCountResponse

    @vocdoni/sdk / IChainOrganizationCountResponse

    Interface: IChainOrganizationCountResponse

    Table of contents

    Properties

    Properties

    count

    count: number

    The number of organizations

    Defined in

    api/chain.ts:241

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainOrganizationListResponse.html b/sdk/reference/interfaces/IChainOrganizationListResponse.html index f67e32fac..be57282f2 100644 --- a/sdk/reference/interfaces/IChainOrganizationListResponse.html +++ b/sdk/reference/interfaces/IChainOrganizationListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainOrganizationResponse.html b/sdk/reference/interfaces/IChainOrganizationResponse.html index 2cf1d0015..44e7ac5fb 100644 --- a/sdk/reference/interfaces/IChainOrganizationResponse.html +++ b/sdk/reference/interfaces/IChainOrganizationResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainSubmitTxResponse.html b/sdk/reference/interfaces/IChainSubmitTxResponse.html index e5d67c82a..f62578532 100644 --- a/sdk/reference/interfaces/IChainSubmitTxResponse.html +++ b/sdk/reference/interfaces/IChainSubmitTxResponse.html @@ -12,13 +12,13 @@ - +

    IChainSubmitTxResponse

    @vocdoni/sdk / IChainSubmitTxResponse

    Interface: IChainSubmitTxResponse

    Table of contents

    Properties

    Properties

    code

    code: number

    The response code

    Defined in

    api/chain.ts:227


    hash

    hash: string

    The hash of the transaction

    Defined in

    api/chain.ts:217


    response

    response: string

    The response data (can vary depending on the transaction type)

    Defined in

    api/chain.ts:222

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainTxCountResponse.html b/sdk/reference/interfaces/IChainTxCountResponse.html index b65261c73..c20b9c506 100644 --- a/sdk/reference/interfaces/IChainTxCountResponse.html +++ b/sdk/reference/interfaces/IChainTxCountResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainTxListResponse.html b/sdk/reference/interfaces/IChainTxListResponse.html index a5f6bce91..f3e10bd0f 100644 --- a/sdk/reference/interfaces/IChainTxListResponse.html +++ b/sdk/reference/interfaces/IChainTxListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainTxReference.html b/sdk/reference/interfaces/IChainTxReference.html index cad2ee5b9..9d97b8ab3 100644 --- a/sdk/reference/interfaces/IChainTxReference.html +++ b/sdk/reference/interfaces/IChainTxReference.html @@ -12,13 +12,13 @@ - +

    IChainTxReference

    @vocdoni/sdk / IChainTxReference

    Interface: IChainTxReference

    Table of contents

    Properties

    Properties

    blockHeight

    blockHeight: number

    The number of the block where the transaction is.

    Defined in

    api/chain.ts:193


    transactionHash

    transactionHash: string

    The hash of the transaction.

    Defined in

    api/chain.ts:188


    transactionIndex

    transactionIndex: number

    The index of the transaction inside the block.

    Defined in

    api/chain.ts:198


    transactionNumber

    transactionNumber: number

    The number of the transaction.

    Defined in

    api/chain.ts:183


    transactionType

    transactionType: TransactionType

    The type of the transaction.

    Defined in

    api/chain.ts:203

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainValidator.html b/sdk/reference/interfaces/IChainValidator.html index f1a71de6c..e822ff34e 100644 --- a/sdk/reference/interfaces/IChainValidator.html +++ b/sdk/reference/interfaces/IChainValidator.html @@ -12,13 +12,13 @@ - +

    IChainValidator

    @vocdoni/sdk / IChainValidator

    Interface: IChainValidator

    Table of contents

    Properties

    Properties

    address

    address: string

    Validator address

    Defined in

    api/chain.ts:339


    name

    name: string

    Validator name reference. Could be empty.

    Defined in

    api/chain.ts:344


    power

    power: number

    Current power of the validator

    Defined in

    api/chain.ts:329


    pubKey

    pubKey: string

    Validator public key

    Defined in

    api/chain.ts:334

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChainValidatorsListResponse.html b/sdk/reference/interfaces/IChainValidatorsListResponse.html index f8fcbb1ef..4f7cabdd1 100644 --- a/sdk/reference/interfaces/IChainValidatorsListResponse.html +++ b/sdk/reference/interfaces/IChainValidatorsListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IChoice.html b/sdk/reference/interfaces/IChoice.html index 87eeab03c..6a4bae88c 100644 --- a/sdk/reference/interfaces/IChoice.html +++ b/sdk/reference/interfaces/IChoice.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICspAuthStep.html b/sdk/reference/interfaces/ICspAuthStep.html index effdd5dc8..2b6b95bbc 100644 --- a/sdk/reference/interfaces/ICspAuthStep.html +++ b/sdk/reference/interfaces/ICspAuthStep.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICspFinalStepResponse.html b/sdk/reference/interfaces/ICspFinalStepResponse.html index 1d2948716..2eea7d75c 100644 --- a/sdk/reference/interfaces/ICspFinalStepResponse.html +++ b/sdk/reference/interfaces/ICspFinalStepResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICspInfoResponse.html b/sdk/reference/interfaces/ICspInfoResponse.html index 9b6621987..932db453f 100644 --- a/sdk/reference/interfaces/ICspInfoResponse.html +++ b/sdk/reference/interfaces/ICspInfoResponse.html @@ -12,13 +12,13 @@ - +

    ICspInfoResponse

    @vocdoni/sdk / ICspInfoResponse

    Interface: ICspInfoResponse

    Table of contents

    Properties

    Properties

    authSteps

    authSteps: ICspAuthStep[]

    The auth steps to follow in order to get a blind signature

    Defined in

    api/csp.ts:42


    authType

    authType: string

    The authentication type of the CSP

    Defined in

    api/csp.ts:37


    signatureType

    signatureType: string[]

    The types of signature of the CSP

    Defined in

    api/csp.ts:32


    title

    title: string

    The title of the CSP Information

    Defined in

    api/csp.ts:27

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICspIntermediateStepResponse.html b/sdk/reference/interfaces/ICspIntermediateStepResponse.html index 739abf58c..727950c74 100644 --- a/sdk/reference/interfaces/ICspIntermediateStepResponse.html +++ b/sdk/reference/interfaces/ICspIntermediateStepResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ICspSignResponse.html b/sdk/reference/interfaces/ICspSignResponse.html index c48f39c54..a2bbeac06 100644 --- a/sdk/reference/interfaces/ICspSignResponse.html +++ b/sdk/reference/interfaces/ICspSignResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionCreateResponse.html b/sdk/reference/interfaces/IElectionCreateResponse.html index 1c541c72c..1ce3f8d34 100644 --- a/sdk/reference/interfaces/IElectionCreateResponse.html +++ b/sdk/reference/interfaces/IElectionCreateResponse.html @@ -12,13 +12,13 @@ - +

    IElectionCreateResponse

    @vocdoni/sdk / IElectionCreateResponse

    Interface: IElectionCreateResponse

    Table of contents

    Properties

    Properties

    electionID

    electionID: string

    The election identifier

    Defined in

    api/election.ts:134


    metadataURL

    metadataURL: number

    The metadata URL

    Defined in

    api/election.ts:139


    txHash

    txHash: string

    The hash of the transaction

    Defined in

    api/election.ts:129

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionInfoResponse.html b/sdk/reference/interfaces/IElectionInfoResponse.html index 7741b7e90..27ade0b3e 100644 --- a/sdk/reference/interfaces/IElectionInfoResponse.html +++ b/sdk/reference/interfaces/IElectionInfoResponse.html @@ -12,13 +12,13 @@ - +

    IElectionInfoResponse

    @vocdoni/sdk / IElectionInfoResponse

    Interface: IElectionInfoResponse

    Table of contents

    Properties

    Properties

    census

    census: ICensus

    The census of the election

    Defined in

    api/election.ts:220


    chainId

    chainId: string

    The chain identifier of the election

    Defined in

    api/election.ts:215


    creationTime

    creationTime: string

    The date of creation of the election

    Defined in

    api/election.ts:230


    electionId

    electionId: string

    The id of the election

    Defined in

    api/election.ts:165


    electionMode

    electionMode: IElectionMode

    The election mode of the election

    Defined in

    api/election.ts:240


    endDate

    endDate: string

    The end date of the election

    Defined in

    api/election.ts:185


    finalResults

    finalResults: boolean

    If the election has the final results

    Defined in

    api/election.ts:195


    fromArchive

    fromArchive: boolean

    If the election comes from the archive

    Defined in

    api/election.ts:210


    manuallyEnded

    manuallyEnded: boolean

    If the election has been ended manually

    Defined in

    api/election.ts:205


    metadata

    metadata: ElectionMetadata

    The metadata of the election

    Defined in

    api/election.ts:250


    metadataURL

    metadataURL: string

    The URL of the metadata

    Defined in

    api/election.ts:225


    organizationId

    organizationId: string

    The id of the organization that created the election

    Defined in

    api/election.ts:170


    result

    Optional result: string[][]

    The result of the election

    Defined in

    api/election.ts:200


    startDate

    startDate: string

    The start date of the election

    Defined in

    api/election.ts:180


    status

    status: PROCESS_UNKNOWN | ENDED | CANCELED | PAUSED | RESULTS | READY

    The status of the election

    Defined in

    api/election.ts:175


    tallyMode

    tallyMode: ITallyMode

    The tally mode of the vote

    Defined in

    api/election.ts:245


    voteCount

    voteCount: number

    The number of votes of the election

    Defined in

    api/election.ts:190


    voteMode

    voteMode: IVoteMode

    The voting mode of the election

    Defined in

    api/election.ts:235

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionKeysResponse.html b/sdk/reference/interfaces/IElectionKeysResponse.html index 360a3c9f6..63c09d684 100644 --- a/sdk/reference/interfaces/IElectionKeysResponse.html +++ b/sdk/reference/interfaces/IElectionKeysResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionListFilter.html b/sdk/reference/interfaces/IElectionListFilter.html index 60ef3141e..bf9f1a6a4 100644 --- a/sdk/reference/interfaces/IElectionListFilter.html +++ b/sdk/reference/interfaces/IElectionListFilter.html @@ -12,13 +12,13 @@ - +

    IElectionListFilter

    @vocdoni/sdk / IElectionListFilter

    Interface: IElectionListFilter

    Table of contents

    Properties

    Properties

    electionId

    Optional electionId: string

    Defined in

    api/election.ts:364


    organizationId

    Optional organizationId: string

    Defined in

    api/election.ts:363


    status

    Optional status: PROCESS_UNKNOWN | ENDED | CANCELED | PAUSED | RESULTS | READY

    Defined in

    api/election.ts:366


    withResults

    Optional withResults: boolean

    Defined in

    api/election.ts:365

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionListResponse.html b/sdk/reference/interfaces/IElectionListResponse.html index 4f528f06b..1202127e3 100644 --- a/sdk/reference/interfaces/IElectionListResponse.html +++ b/sdk/reference/interfaces/IElectionListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionMode.html b/sdk/reference/interfaces/IElectionMode.html index dbd02bc17..0424fd84c 100644 --- a/sdk/reference/interfaces/IElectionMode.html +++ b/sdk/reference/interfaces/IElectionMode.html @@ -12,13 +12,13 @@ - +

    IElectionMode

    @vocdoni/sdk / IElectionMode

    Interface: IElectionMode

    Table of contents

    Properties

    Properties

    autoStart

    autoStart: boolean

    If the election should start automatically

    Defined in

    api/election.ts:75


    dynamicCensus

    dynamicCensus: boolean

    If the election has a dynamic census

    Defined in

    api/election.ts:85


    encryptedMetaData

    encryptedMetaData: boolean

    If the election has encrypted metadata

    Defined in

    api/election.ts:90


    interruptible

    interruptible: boolean

    If the election is interruptible

    Defined in

    api/election.ts:80


    preRegister

    preRegister: boolean

    If the election has preregister phase

    Defined in

    api/election.ts:95

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionNextIdResponse.html b/sdk/reference/interfaces/IElectionNextIdResponse.html index 42e39b876..c5100d03c 100644 --- a/sdk/reference/interfaces/IElectionNextIdResponse.html +++ b/sdk/reference/interfaces/IElectionNextIdResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionParameters.html b/sdk/reference/interfaces/IElectionParameters.html index 9dbf03f65..fbd96b367 100644 --- a/sdk/reference/interfaces/IElectionParameters.html +++ b/sdk/reference/interfaces/IElectionParameters.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Defined in

    types/election/election.ts:145


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Defined in

    types/election/election.ts:126


    questions

    Optional questions: IQuestion[]

    Defined in

    types/election/election.ts:132


    startDate

    Optional startDate: string | number | Date

    Defined in

    types/election/election.ts:127


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Defined in

    types/election/election.ts:110


    voteType

    Optional voteType: IVoteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionSummary.html b/sdk/reference/interfaces/IElectionSummary.html index 6841c811f..af9130f55 100644 --- a/sdk/reference/interfaces/IElectionSummary.html +++ b/sdk/reference/interfaces/IElectionSummary.html @@ -12,13 +12,13 @@ - +

    IElectionSummary

    @vocdoni/sdk / IElectionSummary

    Interface: IElectionSummary

    Table of contents

    Properties

    Properties

    electionId

    electionId: string

    The id of the election

    Defined in

    api/election.ts:322


    endDate

    endDate: string

    The end date of the election

    Defined in

    api/election.ts:342


    finalResults

    finalResults: boolean

    If the election has the final results

    Defined in

    api/election.ts:352


    organizationId

    organizationId: string

    The id of the organization

    Defined in

    api/election.ts:327


    startDate

    startDate: string

    The start date of the election

    Defined in

    api/election.ts:337


    status

    status: PROCESS_UNKNOWN | ENDED | CANCELED | PAUSED | RESULTS | READY

    The status of the election

    Defined in

    api/election.ts:332


    voteCount

    voteCount: number

    The number of votes of the election

    Defined in

    api/election.ts:347

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionType.html b/sdk/reference/interfaces/IElectionType.html index c3aa6d938..839dfe519 100644 --- a/sdk/reference/interfaces/IElectionType.html +++ b/sdk/reference/interfaces/IElectionType.html @@ -12,13 +12,13 @@ - +

    IElectionType

    @vocdoni/sdk / IElectionType

    Interface: IElectionType

    Table of contents

    Properties

    Properties

    anonymous

    Optional anonymous: boolean

    Enable anonymous voting.

    Defined in

    types/election/election.ts:92


    autoStart

    Optional autoStart: boolean

    If false, election will start PAUSED and will have to be resumed manually.

    Defined in

    types/election/election.ts:76


    dynamicCensus

    Optional dynamicCensus: boolean

    Can add more voters to the census tree during the election.

    Defined in

    types/election/election.ts:84


    interruptible

    Optional interruptible: boolean

    The process can be paused and resumed.

    Defined in

    types/election/election.ts:80


    secretUntilTheEnd

    Optional secretUntilTheEnd: boolean

    Protect the results until the end of the process if true. It will show live results otherwise.

    Defined in

    types/election/election.ts:88

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionVote.html b/sdk/reference/interfaces/IElectionVote.html index 21ad8a5d4..8cb5fa5c0 100644 --- a/sdk/reference/interfaces/IElectionVote.html +++ b/sdk/reference/interfaces/IElectionVote.html @@ -12,13 +12,13 @@ - +

    IElectionVote

    @vocdoni/sdk / IElectionVote

    Interface: IElectionVote

    Table of contents

    Properties

    Properties

    blockHeight

    blockHeight: number

    Block containing the vote transaction

    Defined in

    api/election.ts:303


    transactionIndex

    transactionIndex: number

    Transaction number on the block

    Defined in

    api/election.ts:308


    txHash

    txHash: string

    Containing transaction hash

    Defined in

    api/election.ts:288


    voteID

    voteID: string

    Vote unique identifier also known as vote nullifier

    Defined in

    api/election.ts:293


    voterID

    voterID: string

    Account that emit the vote

    Defined in

    api/election.ts:298

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IElectionVoteListResponse.html b/sdk/reference/interfaces/IElectionVoteListResponse.html index a27275f11..4cb7c0d30 100644 --- a/sdk/reference/interfaces/IElectionVoteListResponse.html +++ b/sdk/reference/interfaces/IElectionVoteListResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IEncryptionKey.html b/sdk/reference/interfaces/IEncryptionKey.html index d45b6f34f..0e4d8af28 100644 --- a/sdk/reference/interfaces/IEncryptionKey.html +++ b/sdk/reference/interfaces/IEncryptionKey.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IInvalidElectionParameters.html b/sdk/reference/interfaces/IInvalidElectionParameters.html index 28ca13935..7c927b6be 100644 --- a/sdk/reference/interfaces/IInvalidElectionParameters.html +++ b/sdk/reference/interfaces/IInvalidElectionParameters.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IMultiChoiceElectionParameters.html b/sdk/reference/interfaces/IMultiChoiceElectionParameters.html index 0af698a48..b5b7c3d56 100644 --- a/sdk/reference/interfaces/IMultiChoiceElectionParameters.html +++ b/sdk/reference/interfaces/IMultiChoiceElectionParameters.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Inherited from

    IElectionParameters.maxCensusSize

    Defined in

    types/election/election.ts:145


    maxNumberOfChoices

    maxNumberOfChoices: number

    Defined in

    types/election/multichoice.ts:8


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Inherited from

    IElectionParameters.meta

    Defined in

    types/election/election.ts:126


    questions

    Optional questions: IQuestion[]

    Inherited from

    IElectionParameters.questions

    Defined in

    types/election/election.ts:132


    startDate

    Optional startDate: string | number | Date

    Inherited from

    IElectionParameters.startDate

    Defined in

    types/election/election.ts:127


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Inherited from

    IElectionParameters.streamUri

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Inherited from

    IElectionParameters.temporarySecretIdentity

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Inherited from

    IElectionParameters.title

    Defined in

    types/election/election.ts:110


    voteType

    Optional voteType: IVoteType

    Inherited from

    IElectionParameters.voteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IPublishedElectionParameters.html b/sdk/reference/interfaces/IPublishedElectionParameters.html index 0795b0ddd..6df079327 100644 --- a/sdk/reference/interfaces/IPublishedElectionParameters.html +++ b/sdk/reference/interfaces/IPublishedElectionParameters.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    If the number of votes exceeds this limit, will throw Max census size for the election is greater than allowed size error.

    Inherited from

    IElectionParameters.maxCensusSize

    Defined in

    types/election/election.ts:145


    meta

    Optional meta: any

    Metadata (anything added by the election creator)

    Inherited from

    IElectionParameters.meta

    Defined in

    types/election/election.ts:126


    metadataURL

    metadataURL: string

    Defined in

    types/election/published.ts:37


    organizationId

    organizationId: string

    Defined in

    types/election/published.ts:28


    questions

    Optional questions: IQuestion[]

    Inherited from

    IElectionParameters.questions

    Defined in

    types/election/election.ts:132


    raw

    raw: object

    Defined in

    types/election/published.ts:39


    results

    results: string[][]

    Defined in

    types/election/published.ts:32


    resultsType

    resultsType: ElectionResultsType

    Defined in

    types/election/published.ts:38


    startDate

    Optional startDate: string | number | Date

    Inherited from

    IElectionParameters.startDate

    Defined in

    types/election/election.ts:127


    status

    status: AllElectionStatus

    Defined in

    types/election/published.ts:29


    streamUri

    Optional streamUri: string

    Election stream Uri (ex: a video url)

    Inherited from

    IElectionParameters.streamUri

    Defined in

    types/election/election.ts:122


    temporarySecretIdentity

    Optional temporarySecretIdentity: boolean

    Is used to remove the secret identities of the voters once the process is done.

    Inherited from

    IElectionParameters.temporarySecretIdentity

    Defined in

    types/election/election.ts:150


    title

    title: string | MultiLanguage\<string>

    Election title

    Inherited from

    IElectionParameters.title

    Defined in

    types/election/election.ts:110


    voteCount

    voteCount: number

    Defined in

    types/election/published.ts:30


    voteType

    Optional voteType: IVoteType

    Inherited from

    IElectionParameters.voteType

    Defined in

    types/election/election.ts:130

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IQuestion.html b/sdk/reference/interfaces/IQuestion.html index 806eb111f..c07c1efd0 100644 --- a/sdk/reference/interfaces/IQuestion.html +++ b/sdk/reference/interfaces/IQuestion.html @@ -12,13 +12,13 @@ - +

    IQuestion

    @vocdoni/sdk / IQuestion

    Interface: IQuestion

    Table of contents

    Properties

    Properties

    choices

    choices: IChoice[]

    Defined in

    types/metadata/election.ts:34


    description

    Optional description: MultiLanguage\<string>

    Defined in

    types/metadata/election.ts:32


    numAbstains

    Optional numAbstains: string

    Defined in

    types/metadata/election.ts:33


    title

    title: MultiLanguage\<string>

    Defined in

    types/metadata/election.ts:31

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ITallyMode.html b/sdk/reference/interfaces/ITallyMode.html index 3f6dda183..2c6388381 100644 --- a/sdk/reference/interfaces/ITallyMode.html +++ b/sdk/reference/interfaces/ITallyMode.html @@ -12,13 +12,13 @@ - +

    ITallyMode

    @vocdoni/sdk / ITallyMode

    Interface: ITallyMode

    Table of contents

    Properties

    Properties

    costExponent

    costExponent: number

    The cost exponent of the vote

    Defined in

    api/election.ts:122


    maxCount

    maxCount: number

    The max count of the vote's values sum

    Defined in

    api/election.ts:102


    maxTotalCost

    maxTotalCost: number

    The max total cost of the votes

    Defined in

    api/election.ts:117


    maxValue

    maxValue: number

    The max value of the vote's values

    Defined in

    api/election.ts:107


    maxVoteOverwrites

    maxVoteOverwrites: number

    The max number of votes overwrites

    Defined in

    api/election.ts:112

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IVoteInfoResponse.html b/sdk/reference/interfaces/IVoteInfoResponse.html index 09b128f02..5d2fc2cb1 100644 --- a/sdk/reference/interfaces/IVoteInfoResponse.html +++ b/sdk/reference/interfaces/IVoteInfoResponse.html @@ -12,13 +12,13 @@ - +

    IVoteInfoResponse

    @vocdoni/sdk / IVoteInfoResponse

    Interface: IVoteInfoResponse

    Table of contents

    Properties

    Properties

    blockHeight

    blockHeight: number

    The block number where the transaction is mined.

    Defined in

    api/vote.ts:56


    date

    date: string

    Date when the vote was emitted

    Defined in

    api/vote.ts:71


    electionID

    electionID: string

    The identifier of the election.

    Defined in

    api/vote.ts:51


    encryptionKeys

    Optional encryptionKeys: number[]

    Encryption key indexes used

    Defined in

    api/vote.ts:36


    overwriteCount

    overwriteCount: number

    The number of votes overwrites.

    Defined in

    api/vote.ts:66


    package

    package: string

    The stringified vote package JSON.

    Defined in

    api/vote.ts:41


    transactionIndex

    transactionIndex: number

    The index inside the block where the transaction is mined.

    Defined in

    api/vote.ts:61


    txHash

    txHash: string

    The hash of the transaction

    Defined in

    api/vote.ts:26


    voteID

    voteID: string

    The identifier of the vote, also called nullifier.

    Defined in

    api/vote.ts:31


    weight

    weight: string

    The weight of the vote.

    Defined in

    api/vote.ts:46

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IVoteMode.html b/sdk/reference/interfaces/IVoteMode.html index d1f2c107a..dbb7dba63 100644 --- a/sdk/reference/interfaces/IVoteMode.html +++ b/sdk/reference/interfaces/IVoteMode.html @@ -12,13 +12,13 @@ - +

    IVoteMode

    @vocdoni/sdk / IVoteMode

    Interface: IVoteMode

    Table of contents

    Properties

    Properties

    anonymous

    anonymous: boolean

    If the vote is anonymous

    Defined in

    api/election.ts:53


    costFromWeight

    costFromWeight: boolean

    Cost from weight of the election

    Defined in

    api/election.ts:68


    encryptedVotes

    encryptedVotes: boolean

    If the vote is encrypted

    Defined in

    api/election.ts:58


    serial

    serial: boolean

    If the vote is serial

    Defined in

    api/election.ts:48


    uniqueValues

    uniqueValues: boolean

    If the vote values are unique

    Defined in

    api/election.ts:63

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IVoteSubmitResponse.html b/sdk/reference/interfaces/IVoteSubmitResponse.html index 22bfd8876..f8dcffdb9 100644 --- a/sdk/reference/interfaces/IVoteSubmitResponse.html +++ b/sdk/reference/interfaces/IVoteSubmitResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IVoteType.html b/sdk/reference/interfaces/IVoteType.html index 8ccceb994..182126f8f 100644 --- a/sdk/reference/interfaces/IVoteType.html +++ b/sdk/reference/interfaces/IVoteType.html @@ -12,7 +12,7 @@ - + @@ -28,7 +28,7 @@ this value should match the total number of choices available for voting.

    Defined in

    types/election/election.ts:62


    maxTotalCost

    Optional maxTotalCost: number

    Specifies the maximum limit on the total sum of all ballot fields' values, if applicable. For instance, if the vote array is [0,0,3,2], the maxTotalCost should be set to 3.

    A value of 0 implies no maximum limit or that this parameter is not applicable in the current voting context.

    Defined in

    types/election/election.ts:69


    maxValue

    Optional maxValue: number

    Defines the maximum acceptable value for all fields in the voting process. By default, this value corresponds to the total number of choices available in a question.

    In the context of a quadratic voting system, this value should typically be set to 0.

    Defined in

    types/election/election.ts:53


    maxVoteOverwrites

    Optional maxVoteOverwrites: number

    The number of times a voter con overwrite its vote (change vote option).

    Defined in

    types/election/election.ts:15


    uniqueChoices

    Optional uniqueChoices: boolean

    Voter can only select one answer for question

    Defined in

    types/election/election.ts:11

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IZkProofResponse.html b/sdk/reference/interfaces/IZkProofResponse.html index 3092ee4bd..77b362e4e 100644 --- a/sdk/reference/interfaces/IZkProofResponse.html +++ b/sdk/reference/interfaces/IZkProofResponse.html @@ -12,13 +12,13 @@ - +

    IZkProofResponse

    @vocdoni/sdk / IZkProofResponse

    Interface: IZkProofResponse

    Table of contents

    Properties

    Properties

    censusProof

    censusProof: string

    The proof for the given key

    Defined in

    api/zk.ts:19


    censusRoot

    censusRoot: string

    The root (id) of the census

    Defined in

    api/zk.ts:14


    censusSiblings

    censusSiblings: string[]

    The value for the census siblings

    Defined in

    api/zk.ts:29


    value

    value: string

    The value for the given key

    Defined in

    api/zk.ts:24

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/IZkSIKResponse.html b/sdk/reference/interfaces/IZkSIKResponse.html index b8bd7beb3..1993734df 100644 --- a/sdk/reference/interfaces/IZkSIKResponse.html +++ b/sdk/reference/interfaces/IZkSIKResponse.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/MintTokensTx.html b/sdk/reference/interfaces/MintTokensTx.html index 3d1fafddb..573886013 100644 --- a/sdk/reference/interfaces/MintTokensTx.html +++ b/sdk/reference/interfaces/MintTokensTx.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/NewProcessTx.html b/sdk/reference/interfaces/NewProcessTx.html index 5e1b598b0..de21c1043 100644 --- a/sdk/reference/interfaces/NewProcessTx.html +++ b/sdk/reference/interfaces/NewProcessTx.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/Process.html b/sdk/reference/interfaces/Process.html index b029aa063..349cc3840 100644 --- a/sdk/reference/interfaces/Process.html +++ b/sdk/reference/interfaces/Process.html @@ -12,7 +12,7 @@ - + @@ -23,7 +23,7 @@ true and the StartBlock has been reached.

    Defined in

    api/chain/transactions.ts:215


    sourceBlockHeight

    Optional sourceBlockHeight: number

    SourceBlockHeight is the block height of the origin blockchain (if any)

    Defined in

    api/chain/transactions.ts:197


    sourceNetworkContractAddr

    Optional sourceNetworkContractAddr: Uint8Array

    sourceNetworkContractAddr is used for EVM token based voting and it is the contract address of the token that is going to define the census

    Defined in

    api/chain/transactions.ts:225


    sourceNetworkId

    sourceNetworkId: SourceNetworkId

    SourceNetworkId is the identifier of the network origin (where the process have been created)

    Defined in

    api/chain/transactions.ts:203


    startBlock

    startBlock: number

    StartBlock represents the tendermint block where the process goes from scheduled to active

    Defined in

    api/chain/transactions.ts:172


    status

    status: ProcessStatus

    Defined in

    api/chain/transactions.ts:184


    tokenDecimals

    Optional tokenDecimals: number

    tokenDecimals represents the number of decimals of the token (i.e ERC20) used for voting. It is normally used for processes with on-chain census

    Defined in

    api/chain/transactions.ts:230


    voteOptions

    voteOptions: ProcessVoteOptions

    Defined in

    api/chain/transactions.ts:191

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/Proof.html b/sdk/reference/interfaces/Proof.html index 1b135172e..055939749 100644 --- a/sdk/reference/interfaces/Proof.html +++ b/sdk/reference/interfaces/Proof.html @@ -12,13 +12,13 @@ - +

    Proof

    @vocdoni/sdk / Proof

    Interface: Proof

    Table of contents

    Properties

    Properties

    payload

    Optional payload: { $case: "graviton" ; graviton: { siblings: Uint8Array } } | { $case: "iden3" ; iden3: { siblings: Uint8Array } } | { $case: "ethereumStorage" ; ethereumStorage: { key: Uint8Array ; siblings: Uint8Array[] ; value: Uint8Array } } | { $case: "ethereumAccount" ; ethereumAccount: { balance: Uint8Array ; codeHash: Uint8Array ; nonce: Uint8Array ; siblings: Uint8Array[] ; storageHash: Uint8Array } } | { $case: "ca" ; ca: { bundle: { address: Uint8Array ; processId: Uint8Array } ; signature: Uint8Array ; type: ProofCA_Type } } | { $case: "arbo" ; arbo: { keyType: ProofArbo_KeyType ; siblings: Uint8Array ; type: ProofArbo_Type ; value: Uint8Array } } | { $case: "zkSnark" ; zkSnark: { a: string[] ; b: string[] ; c: string[] ; circuitParametersIndex: number ; publicInputs: string[] } } | { $case: "minimeStorage" ; minimeStorage: { proofNextBlock?: { key: Uint8Array ; siblings: Uint8Array[] ; value: Uint8Array } ; proofPrevBlock: { key: Uint8Array ; siblings: Uint8Array[] ; value: Uint8Array } } }

    Defined in

    api/chain/transactions.ts:341

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/RegisterKeyTx.html b/sdk/reference/interfaces/RegisterKeyTx.html index 5244876b8..383e5fba0 100644 --- a/sdk/reference/interfaces/RegisterKeyTx.html +++ b/sdk/reference/interfaces/RegisterKeyTx.html @@ -12,13 +12,13 @@ - +

    RegisterKeyTx

    @vocdoni/sdk / RegisterKeyTx

    Interface: RegisterKeyTx

    Table of contents

    Properties

    Properties

    newKey

    newKey: Uint8Array

    New key to register

    Defined in

    api/chain/transactions.ts:121


    nonce

    nonce: number

    Unique number per vote attempt, so that replay attacks can't reuse this payload

    Defined in

    api/chain/transactions.ts:115


    processId

    processId: Uint8Array

    The process for which the vote is casted

    Defined in

    api/chain/transactions.ts:117


    proof

    proof: Proof

    Franchise proof

    Defined in

    api/chain/transactions.ts:119


    weight

    weight: string

    Weight to delegate to newKey

    Defined in

    api/chain/transactions.ts:123

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/SendTokensTx.html b/sdk/reference/interfaces/SendTokensTx.html index 16977c02f..365c6fbc7 100644 --- a/sdk/reference/interfaces/SendTokensTx.html +++ b/sdk/reference/interfaces/SendTokensTx.html @@ -12,13 +12,13 @@ - +

    SendTokensTx

    @vocdoni/sdk / SendTokensTx

    Interface: SendTokensTx

    Table of contents

    Properties

    Properties

    from

    from: Uint8Array

    Defined in

    api/chain/transactions.ts:136


    nonce

    nonce: number

    Defined in

    api/chain/transactions.ts:135


    to

    to: Uint8Array

    Defined in

    api/chain/transactions.ts:137


    txtype

    txtype: TxType

    Defined in

    api/chain/transactions.ts:134


    value

    value: number

    Defined in

    api/chain/transactions.ts:138

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/ServiceProperties.html b/sdk/reference/interfaces/ServiceProperties.html index 6fdf2b259..b62f6a8b5 100644 --- a/sdk/reference/interfaces/ServiceProperties.html +++ b/sdk/reference/interfaces/ServiceProperties.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/SetAccountTx.html b/sdk/reference/interfaces/SetAccountTx.html index 1026245d8..1a21e8f1b 100644 --- a/sdk/reference/interfaces/SetAccountTx.html +++ b/sdk/reference/interfaces/SetAccountTx.html @@ -12,13 +12,13 @@ - +

    SetAccountTx

    @vocdoni/sdk / SetAccountTx

    Interface: SetAccountTx

    Table of contents

    Properties

    Properties

    account

    Optional account: Uint8Array

    Defined in

    api/chain/transactions.ts:151


    delegates

    delegates: Uint8Array[]

    Defined in

    api/chain/transactions.ts:153


    faucetPackage

    Optional faucetPackage: FaucetPackage

    Defined in

    api/chain/transactions.ts:152


    infoURI

    Optional infoURI: string

    Defined in

    api/chain/transactions.ts:150


    nonce

    Optional nonce: number

    Defined in

    api/chain/transactions.ts:149


    txtype

    txtype: TxType

    Defined in

    api/chain/transactions.ts:148

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/SetProcessTx.html b/sdk/reference/interfaces/SetProcessTx.html index d2c5fbbe7..2c7166e4f 100644 --- a/sdk/reference/interfaces/SetProcessTx.html +++ b/sdk/reference/interfaces/SetProcessTx.html @@ -12,13 +12,13 @@ - +

    SetProcessTx

    @vocdoni/sdk / SetProcessTx

    Interface: SetProcessTx

    Table of contents

    Properties

    Properties

    censusRoot

    Optional censusRoot: Uint8Array

    Defined in

    api/chain/transactions.ts:107


    censusURI

    Optional censusURI: string

    Defined in

    api/chain/transactions.ts:108


    nonce

    nonce: number

    Defined in

    api/chain/transactions.ts:103


    processId

    processId: Uint8Array

    Defined in

    api/chain/transactions.ts:104


    proof

    Optional proof: Proof

    Defined in

    api/chain/transactions.ts:109


    questionIndex

    Optional questionIndex: number

    Defined in

    api/chain/transactions.ts:106


    results

    Optional results: ProcessResult

    Defined in

    api/chain/transactions.ts:110


    status

    Optional status: ProcessStatus

    Defined in

    api/chain/transactions.ts:105


    txtype

    txtype: TxType

    Defined in

    api/chain/transactions.ts:102

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/SetTransactionCostsTx.html b/sdk/reference/interfaces/SetTransactionCostsTx.html index 44e592b37..f7e20a395 100644 --- a/sdk/reference/interfaces/SetTransactionCostsTx.html +++ b/sdk/reference/interfaces/SetTransactionCostsTx.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/Tx.html b/sdk/reference/interfaces/Tx.html index 0ba2522d9..348c6cc30 100644 --- a/sdk/reference/interfaces/Tx.html +++ b/sdk/reference/interfaces/Tx.html @@ -12,13 +12,13 @@ - +

    Tx

    @vocdoni/sdk / Tx

    Interface: Tx

    Table of contents

    Properties

    Properties

    tx

    Optional tx: { $case: "vote" ; vote: VoteEnvelope } | { $case: "newProcess" ; newProcess: NewProcessTx } | { $case: "admin" ; admin: AdminTx } | { $case: "setProcess" ; setProcess: SetProcessTx } | { $case: "registerKey" ; registerKey: RegisterKeyTx } | { $case: "mintTokens" ; mintTokens: MintTokensTx } | { $case: "sendTokens" ; sendTokens: SendTokensTx } | { $case: "setTransactionCosts" ; setTransactionCosts: SetTransactionCostsTx } | { $case: "setAccount" ; setAccountInfo: SetAccountTx } | { $case: "collectFaucet" ; collectFaucet: CollectFaucetTx }

    Defined in

    api/chain/transactions.ts:4


    txInfo

    txInfo: IChainTxReference

    Defined in

    api/chain/transactions.ts:53

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/interfaces/VoteEnvelope.html b/sdk/reference/interfaces/VoteEnvelope.html index 58f54412c..cda1d49a9 100644 --- a/sdk/reference/interfaces/VoteEnvelope.html +++ b/sdk/reference/interfaces/VoteEnvelope.html @@ -12,13 +12,13 @@ - +

    VoteEnvelope

    @vocdoni/sdk / VoteEnvelope

    Interface: VoteEnvelope

    Table of contents

    Properties

    Properties

    encryptionKeyIndexes

    encryptionKeyIndexes: number[]

    On encrypted votes, contains the (sorted) indexes of the keys used to encrypt

    Defined in

    api/chain/transactions.ts:80


    nonce

    nonce: string

    Unique number per vote attempt, so that replay attacks can't reuse this payload

    Defined in

    api/chain/transactions.ts:60


    nullifier

    nullifier: string

    Hash of the private key + processId

    Defined in

    api/chain/transactions.ts:76


    processId

    processId: string

    The process for which the vote is casted

    Defined in

    api/chain/transactions.ts:64


    proof

    proof: Proof

    Franchise proof

    Defined in

    api/chain/transactions.ts:68


    votePackage

    votePackage: string

    JSON string of the Vote Package (potentially encrypted), encoded as bytes.

    Defined in

    api/chain/transactions.ts:72

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/reference/sdk-reference.html b/sdk/reference/sdk-reference.html index af54e72ac..6cbb7d2e5 100644 --- a/sdk/reference/sdk-reference.html +++ b/sdk/reference/sdk-reference.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@ Throws an exception if it is not.

    Parameters

    NameType
    accountMetadataAccountMetadata

    Returns

    AccountMetadata

    Defined in

    types/metadata/account.ts:8


    checkValidElectionMetadata

    checkValidElectionMetadata(electionMetadata): ElectionMetadata

    Asserts that the given metadata is valid. Throws an exception if it is not.

    Parameters

    NameType
    electionMetadataElectionMetadata

    Returns

    ElectionMetadata

    Defined in

    types/metadata/election.ts:8


    delay

    delay(ms): Promise\<unknown>

    Parameters

    NameType
    msany

    Returns

    Promise\<unknown>

    Defined in

    util/common.ts:6


    dotobject

    dotobject(obj, dot): any

    Dot notation to object conversion. Takes any object as first argument and uses the string dot notation from the second argument (i.e. 'a.child.node') to access that given object value.

    Parameters

    NameTypeDescription
    objanyObject to be accessed by dot notation
    dotstringDot notation string to extract object data

    Returns

    any

    Return the object data

    Defined in

    util/common.ts:60


    ensure0x

    ensure0x(value): string

    Parameters

    NameType
    valuestring

    Returns

    string

    Defined in

    util/common.ts:12


    formatUnits

    formatUnits(value, decimals?): string

    Returns a string representation of value formatted with decimals digits

    Parameters

    NameTypeDefault valueDescription
    valueBigNumberishundefinedThe value in native BigInt
    decimalsnumber18The number of decimals

    Returns

    string

    The formatted string

    Defined in

    util/common.ts:48


    getBytes

    getBytes(count): Uint8Array

    Parameters

    NameType
    countnumber

    Returns

    Uint8Array

    Defined in

    util/common.ts:16


    getHex

    getHex(): string

    Generates a random seed and returns a 32 byte keccak256 hash of it (starting with "0x")

    Returns

    string

    Defined in

    util/common.ts:23


    strip0x

    strip0x(value): string

    Parameters

    NameType
    valuestring

    Returns

    string

    Defined in

    util/common.ts:8

    Type Aliases

    AccountData

    Ƭ AccountData: Object

    Type declaration

    NameType
    accountAccount
    addressstring
    balancenumber
    electionIndexnumber
    infoURL?string
    noncenumber
    sik?string

    Defined in

    services/account.ts:25


    AllElectionStatus

    Ƭ AllElectionStatus: ElectionStatus | ElectionStatusReady

    Defined in

    types/election/published.ts:24


    ArchivedAccountData

    Ƭ ArchivedAccountData: Pick\<AccountData, "address" | "account">

    Defined in

    services/account.ts:35


    Census3Census

    Ƭ Census3Census: ICensus3CensusResponse

    Defined in

    census3.ts:31


    Census3CreateStrategyToken

    Ƭ Census3CreateStrategyToken: Omit\<Census3StrategyToken, "chainAddress">

    Defined in

    api/census3/strategy.ts:100


    Census3Strategy

    Ƭ Census3Strategy: Object

    Type declaration

    NameTypeDescription
    IDnumberThe strategy identifier
    aliasstringThe strategy alias
    predicatestringThe strategy predicate
    tokens{ [key: string]: Census3StrategyToken; }The list of tokens
    uristringThe URI of the strategy

    Defined in

    api/census3/strategy.ts:46


    Census3StrategyToken

    Ƭ Census3StrategyToken: Object

    Type declaration

    NameTypeDescription
    IDstringThe id (address) of the token.
    chainAddressstringThe chain address of the token.
    chainIDnumberThe chain id of the token.
    externalID?stringThe external identifier of the token.
    minBalance?stringThe minimum balance for the strategy.

    Defined in

    api/census3/strategy.ts:73


    Census3SummaryToken

    Ƭ Census3SummaryToken: Omit\<Census3Token, "status" | "size"> & { synced: boolean }

    Defined in

    api/census3/token.ts:12


    Census3Token

    Ƭ Census3Token: Object

    Type declaration

    NameTypeDescription
    IDstringThe id (address) of the token.
    chainAddressstringThe chain address of the token.
    chainIDnumberThe chain id of the token.
    decimalsnumberThe decimals of the token
    defaultStrategynumberThe default strategy assigned.
    externalID?stringThe external identifier of the token.
    iconURI?stringThe icon URI of the token.
    namestringThe name of the token.
    sizenumberThe size (token holders) of the token.
    startBlocknumberThe creation block.
    status{ atBlock: number ; progress: number ; synced: boolean }The census3 status of the token.
    status.atBlocknumberAt which number of block the token is synced
    status.progressnumberThe progress percentage of the sync
    status.syncedbooleanIf the token is already synced or not.
    symbolstringThe symbol of the token.
    tags?stringThe tags of the token.
    totalSupplystringThe total supply of the token.
    typestringThe type of the token.

    Defined in

    api/census3/token.ts:14


    CensusImportExport

    Ƭ CensusImportExport: Object

    Type declaration

    NameType
    datastring
    maxLevelsnumber
    rootHashstring
    typenumber

    Defined in

    services/census.ts:42


    CensusProof

    Ƭ CensusProof: Object

    Type declaration

    NameType
    proofstring
    rootstring
    siblings?string[]
    typeCensusType
    valuestring
    weightstring

    Defined in

    services/census.ts:26


    ChainCircuits

    Ƭ ChainCircuits: Object

    Type declaration

    NameType
    vKeyDataUint8Array
    vKeyHashstring
    vKeyURIstring
    wasmDataUint8Array
    wasmHashstring
    wasmURIstring
    zKeyDataUint8Array
    zKeyHashstring
    zKeyURIstring

    Defined in

    services/anonymous.ts:51


    ChainCosts

    Ƭ ChainCosts: IChainGetCostsResponse

    Defined in

    services/chain.ts:14


    ChainData

    Ƭ ChainData: Object

    Type declaration

    NameType
    blockTimenumber[]
    blockTimestampnumber
    chainIdstring
    heightnumber
    maxCensusSizenumber

    Defined in

    services/chain.ts:29


    ChainTx

    Ƭ ChainTx: IChainTxReference

    Defined in

    services/chain.ts:15


    ClientOptions

    Ƭ ClientOptions: Object

    Optional VocdoniSDKClient arguments

    Type declaration

    NameType
    api_url?string
    electionId?string
    envEnvOptions
    faucet?Partial\<FaucetOptions>
    tx_wait?TxWaitOptions
    wallet?Wallet | Signer

    Defined in

    client.ts:86


    CspCensusProof

    Ƭ CspCensusProof: Object

    Type declaration

    NameType
    addressstring
    proof_type?CspProofType
    signaturestring
    type?number
    weight?bigint

    Defined in

    services/census.ts:56


    ElectionCreatedInformation

    Ƭ ElectionCreatedInformation: IElectionCreateResponse

    Defined in

    services/election.ts:37


    ElectionCreationStepValue

    Ƭ ElectionCreationStepValue: { key: GET_CHAIN_DATA } | { key: CENSUS_CREATED } | { key: GET_ACCOUNT_DATA } | { key: GET_DATA_PIN } | { key: GENERATE_TX } | { key: SIGN_TX } | { key: CREATING ; txHash: string } | { electionId: string ; key: DONE }

    Defined in

    services/election.ts:50


    ElectionIdOption

    Ƭ ElectionIdOption: Object

    Type declaration

    NameType
    electionIdstring

    Defined in

    types/client/account.ts:5


    ElectionKeys

    Ƭ ElectionKeys: IElectionKeysResponse

    Defined in

    services/election.ts:36


    ElectionMeta

    Ƭ ElectionMeta: AnyJson | JsonArray | JsonMap

    Defined in

    types/election/election.ts:101


    ElectionResultsType

    Ƭ ElectionResultsType: { name: SINGLE_CHOICE_MULTIQUESTION ; properties: {} } | { name: MULTIPLE_CHOICE ; properties: { abstainValues: string[] ; canAbstain: boolean ; repeatChoice: boolean } } | { name: BUDGET ; properties: { forceFullBudget: boolean ; maxBudget: number ; minStep: number ; useCensusWeightAsBudget: boolean } } | { name: APPROVAL ; properties: { acceptValue: number ; rejectValue: number } }

    Defined in

    types/metadata/election.ts:44


    FaucetOptions

    Ƭ FaucetOptions: FaucetServiceParameters

    Defined in

    services/faucet.ts:28


    FaucetPackage

    Ƭ FaucetPackage: Object

    Type declaration

    NameType
    payloadstring
    signaturestring

    Defined in

    services/faucet.ts:23


    HasAlreadyVotedOptions

    Ƭ HasAlreadyVotedOptions: Partial\<WalletOption & ElectionIdOption & VoteIdOption>

    Defined in

    types/client/account.ts:10


    IAccountSummary

    Ƭ IAccountSummary: Pick\<IAccountInfoResponse, "address" | "balance" | "nonce">

    Defined in

    api/account.ts:17


    IBudgetElectionParameters

    Ƭ IBudgetElectionParameters: IBudgetElectionParametersWithCensusWeight | IBudgetElectionParametersWithBudget

    Defined in

    types/election/budget.ts:21


    IsAbleToVoteOptions

    Ƭ IsAbleToVoteOptions: Partial\<WalletOption & ElectionIdOption & VoteIdOption>

    Defined in

    types/client/account.ts:12


    IsInCensusOptions

    Ƭ IsInCensusOptions: Partial\<WalletOption & ElectionIdOption>

    Defined in

    types/client/account.ts:9


    ParsedPredicate

    Ƭ ParsedPredicate: ICensus3ValidatePredicateResponse

    Defined in

    census3.ts:34


    SendTokensOptions

    Ƭ SendTokensOptions: Partial\<WalletOption> & { amount: number ; to: string }

    Defined in

    types/client/account.ts:8


    Strategy

    Ƭ Strategy: Census3Strategy

    Defined in

    census3.ts:27


    StrategyHolder

    Ƭ StrategyHolder: Object

    Type declaration

    NameType
    holderstring
    weightbigint

    Defined in

    census3.ts:28


    StrategyHolders

    Ƭ StrategyHolders: Object

    Type declaration

    NameType
    holdersStrategyHolder[]
    paginationCensus3Pagination

    Defined in

    census3.ts:29


    StrategyToken

    Ƭ StrategyToken: Census3CreateStrategyToken

    Defined in

    census3.ts:30


    SupportedChain

    Ƭ SupportedChain: ICensus3SupportedChain

    Defined in

    census3.ts:32


    SupportedOperator

    Ƭ SupportedOperator: ICensus3StrategiesOperator

    Defined in

    census3.ts:33


    Token

    Ƭ Token: Omit\<Census3Token, "tags"> & { tags: string[] }

    Defined in

    census3.ts:25


    TokenSummary

    Ƭ TokenSummary: Omit\<Census3SummaryToken, "tags"> & { tags: string[] }

    Defined in

    census3.ts:26


    TxWaitOptions

    Ƭ TxWaitOptions: Object

    Specify custom retry times and attempts when waiting for a transaction.

    Type declaration

    NameType
    attemptsnumber
    retryTimenumber

    Defined in

    services/chain.ts:24


    VoteIdOption

    Ƭ VoteIdOption: Object

    Type declaration

    NameType
    voteIdstring

    Defined in

    types/client/account.ts:6


    VoteInfo

    Ƭ VoteInfo: IVoteInfoResponse

    Defined in

    services/vote.ts:15


    VoteStepValue

    Ƭ VoteStepValue: { electionId: string ; key: GET_ELECTION } | { key: GET_PROOF } | { key: GET_SIGNATURE ; signature: string } | { key: CALC_ZK_PROOF } | { key: GENERATE_TX } | { key: SIGN_TX } | { key: DONE ; voteId: string }

    Defined in

    services/vote.ts:28


    VoteSubmit

    Ƭ VoteSubmit: IVoteSubmitResponse

    Defined in

    services/vote.ts:16


    VotesLeftCountOptions

    Ƭ VotesLeftCountOptions: Partial\<WalletOption & ElectionIdOption & VoteIdOption>

    Defined in

    types/client/account.ts:11


    WalletOption

    Ƭ WalletOption: Object

    Type declaration

    NameType
    walletWallet | Signer

    Defined in

    types/client/account.ts:4


    ZkProof

    Ƭ ZkProof: Object

    Type declaration

    NameType
    proof{ curve: string ; pi_a: string[] ; pi_b: string[][] ; pi_c: string[] ; protocol: string }
    proof.curvestring
    proof.pi_astring[]
    proof.pi_bstring[][]
    proof.pi_cstring[]
    proof.protocolstring
    publicSignalsstring[]

    Defined in

    services/anonymous.ts:23

    Variables

    AccountMetadataTemplate

    Const AccountMetadataTemplate: AccountMetadata

    Defined in

    types/metadata/account.ts:67


    ElectionMetadataTemplate

    Const ElectionMetadataTemplate: ElectionMetadata

    Defined in

    types/metadata/election.ts:140

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/sdk/tutorial.html b/sdk/tutorial.html index 480035569..f409af917 100644 --- a/sdk/tutorial.html +++ b/sdk/tutorial.html @@ -12,7 +12,7 @@ - + @@ -23,7 +23,7 @@ @vocdoni/sdk it will choose a version based on your current environment (commonjs or esm). There's also another UMD version which can be accessed via @vocdoni/sdk/umd in case you need it.

    Overview

    The following are the main steps we need to implement:

    • Connecting a client to the Vocdoni network
    • Creating a census with some random members
    • Creating an election
    • Sending votes
    • Checking the election results

    Client

    The first step will be connecting to a Vocdoni Gateway Node. We can do this easily with the VocdoniSDKClient. The client allows us to access all of the Vocdoni API calls.

    In order to create a client, we need a wallet, an envelope that holds a cryptographic key and enables our client to sign transactions for the blockchain. We'll be generating a random wallet with the ethers signer.

    We also need to define which Vocdoni environment we will connect to. Staging is the recommended environment for most testing use cases, since the dev environment is more subject to blockchain resets and downtimes than the stg one.

    src/client.ts

    export const getDefaultClient = () => {
    const wallet = Wallet.createRandom();
    const client = new VocdoniSDKClient({
    env: EnvOptions.STG,
    wallet: wallet,
    });

    return { wallet, client };
    };

    Now that we have a client connected to the STG environment, we need to register its wallet to the blockchain with createAccount(). Parameters here are optional, but let's define a name and description.

    tip

    An Account can represent an organization hosting a voting process. There are many parameters we can optionally add, like logo or even arbitrary meta. This can all be displayed on a custom frontend implementation. Using createAccount() on an account that already exists will fetch the account info from the blockchain.

    src/account.ts

    export const createAccount = (client: VocdoniSDKClient) => {
    return client
    .createAccount({
    account: new Account({
    languages: ['en'],
    name: {
    default: 'Account name',
    },
    description: 'Description of the account',
    logo: 'https://logo.io',
    }),
    })
    .then(() => client.fetchAccountInfo().then(info => console.log(info)));
    };

    Census

    With our client created and registered to the Vochain, the next step is to create a census of voters. The protocol enables many types of census and you can see how to implement each of them here. For our purposes it's easiest to use a plain census, the simplest form of off-chain tree census.

    We can create a random wallet to represent each voter just like we did for the client, and then we can register each voter's address to the census. The voter wallets have to be saved in order to sign their individual votes.

    src/census.ts

    export async function createCensus () {
    const census = new PlainCensus()

    // Create a list of random voters, register them to the census
    let voters: Wallet[] = []
    for (let i = 0; i < 5; i++) {
    voters.push(Wallet.createRandom())
    census.add(await voters[i].getAddress())
    }

    return { census, voters }
    }

    Election

    Creating a basic election is easy with Election.from(). We just need to specify the title and description, a header photo, an end date, and the census we created earlier. We can specify some electionType options, but this is not necessary as our election is using the default options.

    src/election.ts

    export const createElection = (census: PlainCensus): UnpublishedElection => {
    const election: UnpublishedElection = Election.from({
    title: 'Election title',
    description: 'Election description',
    header: 'https://source.unsplash.com/random',
    endDate: new Date().getTime() + 100000,
    census,
    });
    ...

    Questions can be added to an election with addQuestion. This is a single-choice (binary) election with only one question.

    src/election.ts

    ...
    election.addQuestion('This is a title', 'This is a description', [
    {
    title: 'Option 1',
    value: 0
    },
    {
    title: 'Option 2',
    value: 1
    }
    ])

    return election
    }

    Once our election is defined, it has to be officially created on the blockchain with client.CreateElection(). This will also provide us with a unique electionID. We want to use client.SetElectionID() so that the client knows which voting process to submit votes to.

    info

    Now that we have the electionId, we can also print out a link to view our voting process on the Vocdoni blockchain explorer! The explorer unlocks the universal verifiability of Vocdoni's protocol- even for this small example, the results of this election are verifiable by any observer and cannot be altered.

    src/election.ts

    const waitForElectionReady = (client: VocdoniSDKClient, electionId: string): Promise<string> => {
    return new Promise(f => setTimeout(f, 5000))
    .then(() => client.fetchElection(electionId))
    .then(election => {
    if (election.status !== ElectionStatus.ONGOING) {
    return waitForElectionReady(client, electionId);
    }
    return Promise.resolve(electionId);
    });
    };

    Publishing an election registers a transaction to the blockchain. This means we have to wait for the next block to process in order to ensure the transaction was successful. Here we use client.fetchElection() to fetch the election info from the blockchain, given our electionId. This allows us to wait until the election status is ONGOING, which means the election has been successfully published and has begun.

    src/election.ts

    export const publishElection = (client: VocdoniSDKClient, election: UnpublishedElection): Promise<string> => {
    return client.createElection(election).then(electionId => {
    client.setElectionId(electionId);
    console.log('Election created!', electionId);
    console.log('View this election at ' + client.explorerUrl + '/processes/show/#/' + electionId);
    console.log('Waiting for election to be published...');
    return waitForElectionReady(client, electionId);
    });
    };

    Voting

    With the election published, it's time to vote. We can use each of the wallets that we saved earlier to cast a unique vote for that imaginary voter. We do this by first setting client.wallet = voter, telling the client which wallet to use for bundling and submitting this vote.

    The we create the vote itself. A Vote is simply a list of values whose form depends on the type and number of questions in the election.

    tip

    For more info on vote types, see our section on the Ballot Protocol

    Then we can simply call client.submitVote(), and the SDK handles the creation, signing, and submission of the vote package. It returns a voteId which can be used to ensure the vote was correctly counted.

    src/vote.ts

    export const castVotes = (electionId: string, voters: Wallet[]) => {
    var votePromises = [];
    for (const voter of voters) {
    const client = new VocdoniSDKClient({ env: EnvOptions.STG, wallet: voter, electionId: electionId });
    // Create a vote for option 0 or 1
    const vote = new Vote([Math.round(Math.random())]);
    votePromises.push(
    client.submitVote(vote).then(voteId => {
    console.log('Vote sent! Vote id: ', voteId);
    console.log('Verify vote at ' + client.explorerUrl + '/verify/#/' + voteId);
    })
    );
    }
    return Promise.all(votePromises);
    };

    Results

    All that's left is checking the results of this election! client.fetchElection() returns an object with a simple array of results values- it's up to you to decide how to display them.

    tip

    Note that the results are available immediately because this election was configured with secretUntilTheEnd=false

    src/vote.ts

    export const countVotes = (client: VocdoniSDKClient) => {
    return client.fetchElection().then(election => {
    console.log('Election results: ');
    election.questions.forEach(question => {
    question.choices.forEach(choice => {
    console.log(choice.title.default + ': ' + choice.results);
    });
    });
    });
    };

    Running the code

    Here's a program that combines all the above functions into a working prototype:

    src/index.ts

    async function main () {
    console.log('Initializing client...');
    const { client } = getDefaultClient();

    console.log('Creating account...');
    await createAccount(client);

    console.log('Creating census with some random wallets...');
    const { census, voters } = await createCensus();

    console.log('Creating election...');
    const election = createElection(census);
    const electionId = await publishElection(client, election);

    console.log('Voting...');
    await castVotes(electionId, voters);

    console.log('Getting results...');
    await countVotes(client);
    }
    main();

    All we have to do is run

    tutorial $ yarn start
    yarn run v1.22.17
    $ ts-node src/index.ts
    Initializing client...
    Creating account...
    {
    account: Account {
    _languages: [ 'en' ],
    _name: { default: 'Account name' },
    _description: { default: 'Description of the account' },
    _feed: { default: '' },
    _header: '',
    _avatar: '',
    _logo: 'https://logo.io',
    _meta: []
    },
    address: '73b3e1ff1602c6ece34f9b75aa86f5f90b41a209',
    nonce: 0,
    balance: 50,
    electionIndex: 0,
    infoURL: 'ipfs://bafybeif5mbhhwuju2pyd54bxhn3tdsj6m5cukx6f5xvchqfh2wvzkpbjpy',
    metadata: {
    version: '1.0',
    languages: [ 'en' ],
    name: { default: 'Account name' },
    description: { default: 'Description of the account' },
    newsFeed: { default: '' },
    media: { logo: 'https://logo.io' },
    meta: {}
    },
    sik: 'c5321163e98108424f5c25e55980a1ea4811029c1ff72cae95f113dfc95fac22'
    }
    Creating census with some random wallets...
    Creating election...
    Election created! 4ae20a8eb4ca73b3e1ff1602c6ece34f9b75aa86f5f90b41a209020000000000
    View this election at https://stg.explorer.vote/processes/show/#/4ae20a8eb4ca73b3e1ff1602c6ece34f9b75aa86f5f90b41a209020000000000
    Waiting for election to be published...
    Voting...
    Vote sent! Vote id: 2fae8af3b02ec78af5a3bf06ec4aff1b7c000a1356a0aff1c07163da23f3d771
    Verify vote at https://stg.explorer.vote/verify/#/2fae8af3b02ec78af5a3bf06ec4aff1b7c000a1356a0aff1c07163da23f3d771
    Vote sent! Vote id: 8af200d25a159c9d862e84064a4d977df2b10ea23ffb32ddc2de18b9142df0b6
    Verify vote at https://stg.explorer.vote/verify/#/8af200d25a159c9d862e84064a4d977df2b10ea23ffb32ddc2de18b9142df0b6
    Vote sent! Vote id: 3cae37ec5c49ce338bcbc40b5102cf33bf9304c19c3f5e650c7c469b72664fc8
    Verify vote at https://stg.explorer.vote/verify/#/3cae37ec5c49ce338bcbc40b5102cf33bf9304c19c3f5e650c7c469b72664fc8
    Vote sent! Vote id: 937911458a52393b75f1428ec1613d3a481112491c51bfcc033e2f0009341022
    Verify vote at https://stg.explorer.vote/verify/#/937911458a52393b75f1428ec1613d3a481112491c51bfcc033e2f0009341022
    Vote sent! Vote id: a6e4f4fe0f0e56d41fc21c62473718c9fbbe4c451a6fd9c19dbfca1fef0dac8c
    Verify vote at https://stg.explorer.vote/verify/#/a6e4f4fe0f0e56d41fc21c62473718c9fbbe4c451a6fd9c19dbfca1fef0dac8c
    Getting results...
    Election results:
    Option 1: 2
    Option 2: 3
    ✨ Done in 45.08s.

    You can even check out the election I created on the blockchain explorer.

    Now that you've created a basic example with the SDK, you can integrate this functionality into your own applications. For more details, check out the integration details section and the more extensive examples

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/search.html b/search.html index f830bc806..2b499039b 100644 --- a/search.html +++ b/search.html @@ -12,13 +12,13 @@ - +

    Search the documentation

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/ui-components.html b/ui-components.html index e9b4eda4a..36f3f36b2 100644 --- a/ui-components.html +++ b/ui-components.html @@ -12,7 +12,7 @@ - + @@ -49,7 +49,7 @@ their theme files.

    i18n

    In order to change any of the texts contained in @vocdoni/chakra-components, you must specify the translations for each language in the ClientProvider:

    const translationsObject = {
    en: {
    // all english translations
    },
    ca: {
    // catalan translations
    }
    }
    <ClientProvider translations={translationsObject} />

    Check out the translations file in order to see all the available keys.

    LICENSE

    This components library is licensed under the GNU Affero General Public License v3.0.

    Vocdoni UI React Components
    Copyright (C) 2023 Vocdoni Roots MCU

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program. If not, see <https://www.gnu.org/licenses/>.

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/ui-components/Election.html b/ui-components/Election.html index c7607aba8..a07bebdd4 100644 --- a/ui-components/Election.html +++ b/ui-components/Election.html @@ -12,7 +12,7 @@ - + @@ -177,7 +177,7 @@ } }
    Result
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/ui-components/Organization.html b/ui-components/Organization.html index 0cc57dd25..72413e2e1 100644 --- a/ui-components/Organization.html +++ b/ui-components/Organization.html @@ -12,7 +12,7 @@ - + @@ -126,7 +126,7 @@ } }
    Result
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/accounts.html b/vocdoni-api/accounts.html index 57e08a247..f88a5c134 100644 --- a/vocdoni-api/accounts.html +++ b/vocdoni-api/accounts.html @@ -12,13 +12,13 @@ - +

    Accounts

    Related to account metadata (additional account information like balance, storage URI, process count...)

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/add-account.html b/vocdoni-api/add-account.html index 72b966142..a7796de8f 100644 --- a/vocdoni-api/add-account.html +++ b/vocdoni-api/add-account.html @@ -12,13 +12,13 @@ - +

    Add account

    Add a new account to the local store. It returns a token used to manage this account on the future.

    Path Parameters
    • privateKey string required

      Private key to add

    Responses

    OK


    Schema
    • address string
    • token string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/add-participants-to-census.html b/vocdoni-api/add-participants-to-census.html index a9d044b7b..45b418ac1 100644 --- a/vocdoni-api/add-participants-to-census.html +++ b/vocdoni-api/add-participants-to-census.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@

    Add participants to census

    Add list of public key/address with its weight to an unpublished census and returns the resulting Merkle Root.

    Each addition will modify the census merkle root creating a new "snapshot" of the census at this moment. This root identifies the census at this point and can be used to publish the census at this specific state.

    For example, supposing a census with id 0x1234 (random hex string generated during census creation), add 10 keys will generate specific root for this state, ex 0xabcd.

    If we add 5 keys more, the resulting root changes, the keys are added and the new census have the first 10 keys plus the last 5, with a resulting root of 0xffff.

    So, at publishing moment, you could specify no root to publish census on the last state (0xffff), which will publish the first 10 plus the last 5. Or either specify the snapshot point which you want to publish the census, for example 0x1234, which will publish just the first 10th.

    • Requires Bearer token
    • Adds a list of wallet public key or wallet address to a census with a specific weight
    • If the weight parameter is missing, weight=1 is considered
    Path Parameters
    • censusID string required

      Census id

    Request Body required

    PublicKey - weight array

    • participants object[]
    • key string
    • weight object
    Responses

    (empty body)

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/census-merkle-root.html b/vocdoni-api/census-merkle-root.html index 436743e33..bacf12ccc 100644 --- a/vocdoni-api/census-merkle-root.html +++ b/vocdoni-api/census-merkle-root.html @@ -16,13 +16,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/census-size.html b/vocdoni-api/census-size.html index 5c5c78b8c..8c34c0486 100644 --- a/vocdoni-api/census-size.html +++ b/vocdoni-api/census-size.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/census-total-weight.html b/vocdoni-api/census-total-weight.html index 95bda054a..902e52c9c 100644 --- a/vocdoni-api/census-total-weight.html +++ b/vocdoni-api/census-total-weight.html @@ -12,13 +12,13 @@ - +

    Census total weight

    It sums all weights added to the census. Weight is a stringified bigInt

    Path Parameters
    • censusID string required

      Census id

    Responses

    Sum of weight son a stringfied big int format


    Schema
    • weight string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/censuses.html b/vocdoni-api/censuses.html index d31ef4868..8e3d61567 100644 --- a/vocdoni-api/censuses.html +++ b/vocdoni-api/censuses.html @@ -12,7 +12,7 @@ - + @@ -21,7 +21,7 @@
    • Bearer token not required

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/chain.html b/vocdoni-api/chain.html index 1d8bb618d..0c6d48bb1 100644 --- a/vocdoni-api/chain.html +++ b/vocdoni-api/chain.html @@ -12,14 +12,14 @@ - +

    Chain

    Everything about internal Vochain information (transactions, organizations, blocks, stats...)

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/circuit-info.html b/vocdoni-api/circuit-info.html index f3f55d7ad..fed11ba55 100644 --- a/vocdoni-api/circuit-info.html +++ b/vocdoni-api/circuit-info.html @@ -12,7 +12,7 @@ - + @@ -23,7 +23,7 @@ current circuit configuration artifacts has

  • publicSignals object

    PublicSignals indicates the index of each public signal

  • property name* integer
  • uri string

    URI defines the URI from where to download the files

  • vKeyFilename string

    FilenameVerificationKey defines the name of the file of the circom VerificationKey

  • vKeyHash string

    VerificationKeyHash contains the expected hash for the file filenameVK

  • version string

    Version of the published circuit

  • wasmFilename string

    FilenameWasm defines the name of the file of the circuit wasm compiled version

  • wasmHash string

    WasmHash contains the expected hash for the file filenameWasm

  • zKeyFilename string

    FilenameProvingKey defines the name of the file of the circom ProvingKey

  • zKeyHash string

    ProvingKeyHash contains the expected hash for the file filenameZKey

  • Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/compute-election-price.html b/vocdoni-api/compute-election-price.html index a9387755a..c0cf5e85f 100644 --- a/vocdoni-api/compute-election-price.html +++ b/vocdoni-api/compute-election-price.html @@ -12,13 +12,13 @@ - +

    Compute election price

    Helper endpoint to get the election price.

    Request Body required

    5 election parameters that are required for calculating the price

    • anonymousVotes boolean
    • electionBlocks integer
    • electionDuration integer
    • encryptedVotes boolean
    • maxCensusSize integer
    • maxVoteOverwrite integer
    Responses

    OK


    Schema
    • price number
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/compute-ipfs-ci-dv-1-of-file.html b/vocdoni-api/compute-ipfs-ci-dv-1-of-file.html index 3895f3a7a..9e20f4675 100644 --- a/vocdoni-api/compute-ipfs-ci-dv-1-of-file.html +++ b/vocdoni-api/compute-ipfs-ci-dv-1-of-file.html @@ -12,13 +12,13 @@ - +

    Compute IPFS CIDv1 of file

    Helper endpoint to get the IPFS CIDv1 hash of a file

    Request Body required

    File bytes base64 encoded

    • payload string
    Responses

    OK


    Schema
    • cid string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/count-election-votes.html b/vocdoni-api/count-election-votes.html index 0e7fe4393..ae6f94004 100644 --- a/vocdoni-api/count-election-votes.html +++ b/vocdoni-api/count-election-votes.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/count-organization-elections.html b/vocdoni-api/count-organization-elections.html index d1adcabd3..fe2bfefe3 100644 --- a/vocdoni-api/count-organization-elections.html +++ b/vocdoni-api/count-organization-elections.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/count-organizations.html b/vocdoni-api/count-organizations.html index 911c90c46..f5952382e 100644 --- a/vocdoni-api/count-organizations.html +++ b/vocdoni-api/count-organizations.html @@ -12,13 +12,13 @@ - + - + \ No newline at end of file diff --git a/vocdoni-api/create-a-new-census.html b/vocdoni-api/create-a-new-census.html index 76b4414e7..611463220 100644 --- a/vocdoni-api/create-a-new-census.html +++ b/vocdoni-api/create-a-new-census.html @@ -12,13 +12,13 @@ - +

    Create a new census

    Create a new census on the backend side. The census is still unpublished until publish is called.

    To create the census it require a Bearer token created on the user side using a UUID. This token should we stored for the user to perform operations to this census such add participants or publish.

    It return a new random censusID (a random 32 bytes hex string), which are used (along with the Bearer token) to add participant keys to the census. Once the census is published no more keys can be added.

    To use a census on an election, it must be published.

    • Available types are: weighted and zkindexed
    • Require header Bearer token created user side
    Path Parameters
    • type string required

      Possible values: [weighted, zkweighted, csp]

      Census type

    Responses

    OK


    Schema
    • censusId string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/create-election-for-wallet.html b/vocdoni-api/create-election-for-wallet.html index d54731e57..bf9b006ce 100644 --- a/vocdoni-api/create-election-for-wallet.html +++ b/vocdoni-api/create-election-for-wallet.html @@ -12,13 +12,13 @@ - +

    Create election for wallet

    Creates an election. Requires the bearer token of the account you want to create the election.

    Request Body required

    Election description

    • census object
    • publicKey string
    • rootHash string
    • size integer
    • type string
    • url string
    • description object
    • property name* string
    • electionType object
    • anonymous boolean
    • autostart boolean
    • dynamicCensus boolean
    • interruptible boolean
    • secretUntilTheEnd boolean
    • endDate string
    • header string
    • questions object[]
    • choices object[]
    • title object
    • property name* string
    • value integer
    • description object
    • property name* string
    • title object
    • property name* string
    • startDate string
    • streamUri string
    • tempSIKs boolean
    • title object
    • property name* string
    • voteType object
    • costExponent integer
    • costFromWeight boolean
    • maxCount integer
    • maxValue integer
    • maxVoteOverwrites integer
    • uniqueChoices boolean
    Responses

    OK


    Schema
    • code integer
    • hash string
    • response base64
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/create-election.html b/vocdoni-api/create-election.html index eb5fcec83..dfd1e8f36 100644 --- a/vocdoni-api/create-election.html +++ b/vocdoni-api/create-election.html @@ -12,7 +12,7 @@ - + @@ -21,7 +21,7 @@ signature is only required in those transactions that actually need signature. I.e zk-Snarks based transactions won't needed, however the transaction should use this message type in order to preserve consistency on the Vochain

  • tx integer[]

    The bytes produced by Marshaling a Tx{} message

  • Responses

    It return txId, electionId and the metadataURL for the newly created election. If metadataURL is returned empty, means that there is some issue with the storage provider.


    Schema
    • electionID string
    • metadata integer[]
    • metadataURL string
    • txHash string
    • txPayload integer[]
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/delete-census.html b/vocdoni-api/delete-census.html index e67e803bd..806ee62ac 100644 --- a/vocdoni-api/delete-census.html +++ b/vocdoni-api/delete-census.html @@ -14,13 +14,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/election-information.html b/vocdoni-api/election-information.html index 4cb5e5eda..0ca7c8151 100644 --- a/vocdoni-api/election-information.html +++ b/vocdoni-api/election-information.html @@ -12,13 +12,13 @@ - +

    Election information

    Get full election information

    Path Parameters
    • electionID string required

      Election id

    Responses

    OK


    Schema
    • census object
    • censusOrigin string
    • censusRoot string
    • censusURL string
    • maxCensusSize integer
    • postRegisterCensusRoot string
    • chainId string
    • creationTime string
    • electionId string
    • electionMode object
    • autoStart boolean
    • dynamicCensus boolean
    • encryptedMetaData boolean
    • interruptible boolean
    • preRegister boolean
    • endDate string
    • finalResults boolean
    • fromArchive boolean
    • manuallyEnded boolean
    • metadata object
    • description object
    • property name* string
    • media object
    • header string
    • streamUri string
    • meta
    • questions object[]
    • choices object[]
    • title object
    • property name* string
    • value integer
    • description object
    • property name* string
    • title object
    • property name* string
    • title object
    • property name* string
    • type object
    • name string
    • properties
    • version string
    • metadataURL string
    • organizationId string
    • result array[]
    • startDate string
    • status string
    • tallyMode object
    • costExponent integer
    • maxCount integer
    • maxTotalCost integer
    • maxValue integer
    • maxVoteOverwrites integer
    • voteCount integer
    • voteMode object
    • anonymous boolean
    • costFromWeight boolean
    • encryptedVotes boolean
    • serial boolean
    • uniqueValues boolean
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/election-results.html b/vocdoni-api/election-results.html index 56d5e1545..2a92b83f1 100644 --- a/vocdoni-api/election-results.html +++ b/vocdoni-api/election-results.html @@ -12,13 +12,13 @@ - +

    Election results

    Returns a given election consensus results and useful information about the results. Results represented with BigInt strings.

    This method can be used by anyone, but it is also used by Chainlink for fetching Vochain results and store it to the Results contract on an EVM network.

    For discovering more about the on-chain results, please refer to chainlink-tally repository.

    Path Parameters
    • electionID string required

      Election id

    Responses

    OK


    Schema
    • censusRoot string

      CensusRoot is the root of the census tree

    • electionId string

      ElectionID is the ID of the election

    • organizationId string

      OrganizationID is the ID of the organization that created the election

    • results array[]

      Results is the list of votes

    • sourceContractAddress string

      SourceContractAddress is the address of the smart contract containing the census

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/elections.html b/vocdoni-api/elections.html index de507a5eb..4651bc630 100644 --- a/vocdoni-api/elections.html +++ b/vocdoni-api/elections.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/estimate-block-to-date.html b/vocdoni-api/estimate-block-to-date.html index 8535e6404..ce3332620 100644 --- a/vocdoni-api/estimate-block-to-date.html +++ b/vocdoni-api/estimate-block-to-date.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/estimate-date-to-block.html b/vocdoni-api/estimate-date-to-block.html index 9b5a000ae..738ab30df 100644 --- a/vocdoni-api/estimate-date-to-block.html +++ b/vocdoni-api/estimate-date-to-block.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/export-census-database.html b/vocdoni-api/export-census-database.html index f1e12cda9..f77cd41b3 100644 --- a/vocdoni-api/export-census-database.html +++ b/vocdoni-api/export-census-database.html @@ -12,13 +12,13 @@ - +

    Export census database

    Export the whole census database to a JSON file. Requires Admin Bearer token.

    Path Parameters
    • ipfs string required

      Export to IPFS. Blank to return the JSON file

    Responses

    OK


    Schema
    • valid boolean
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/export-census.html b/vocdoni-api/export-census.html index cc8233879..572aa1b38 100644 --- a/vocdoni-api/export-census.html +++ b/vocdoni-api/export-census.html @@ -12,14 +12,14 @@ - +

    Export census

    Export census to JSON format. Requires Bearer token

    Path Parameters
    • censusID string required

      Census id

    Responses

    OK


    Schema
    • censusID string
    • data integer[]
    • maxLevels integer

      MaxLevels is required to load the census with the original size because it could be different according to the election (and census) type.

    • rootHash string
    • size integer
    • token string
    • type integer

      Possible values: [0, 1, 2, 3, 4, 5, 6]

    • uri string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/exports-the-indexer-database.html b/vocdoni-api/exports-the-indexer-database.html index 73402218a..44b6d0141 100644 --- a/vocdoni-api/exports-the-indexer-database.html +++ b/vocdoni-api/exports-the-indexer-database.html @@ -12,13 +12,13 @@ - +

    Exports the indexer database

    Exports the indexer SQL database in raw format

    Responses

    OK


    Schema
    • string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/get-account.html b/vocdoni-api/get-account.html index 0c09ec687..be471bdb7 100644 --- a/vocdoni-api/get-account.html +++ b/vocdoni-api/get-account.html @@ -12,14 +12,14 @@ - +

    Get account

    Get account information by its address or public key. The infoURI parameter contain where account metadata is uploaded (like avatar, name...). It return also an already parsed "metadata" object from this infoUri. The meta object inside the metadata property is left to the user to add random information about the account.

    Path Parameters
    • address string required

      Account address

    Responses

    OK


    Schema
    • actions
    • description object
    • property name* string
    • languages string[]
    • media object
    • avatar string
    • header string
    • logo string
    • meta
    • name object
    • property name* string
    • newsFeed object
    • property name* string
    • version string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/get-block-by-hash.html b/vocdoni-api/get-block-by-hash.html index 9e95ad72c..5c6dfcaf8 100644 --- a/vocdoni-api/get-block-by-hash.html +++ b/vocdoni-api/get-block-by-hash.html @@ -12,7 +12,7 @@ - + @@ -24,7 +24,7 @@ ValidatorSet order. Any peer with a block can gossip signatures by index with a peer without recalculating the active ValidatorSet.

  • round integer
  • signatures object[]
  • block_id_flag integer

    Possible values: [1, 2, 3]

  • signature integer[]
  • timestamp string
  • validator_address integer[]
  • Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/get-block-by-height.html b/vocdoni-api/get-block-by-height.html index 7c873fe08..f5a56919e 100644 --- a/vocdoni-api/get-block-by-height.html +++ b/vocdoni-api/get-block-by-height.html @@ -12,7 +12,7 @@ - + @@ -24,7 +24,7 @@ ValidatorSet order. Any peer with a block can gossip signatures by index with a peer without recalculating the active ValidatorSet.

  • round integer
  • signatures object[]
  • block_id_flag integer

    Possible values: [1, 2, 3]

  • signature integer[]
  • timestamp string
  • validator_address integer[]
  • Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/get-next-election-id.html b/vocdoni-api/get-next-election-id.html index 135210547..08e954c15 100644 --- a/vocdoni-api/get-next-election-id.html +++ b/vocdoni-api/get-next-election-id.html @@ -12,13 +12,13 @@ - +

    Get next election ID

    nextElectionIDHandler

    Request Body required

    OrganizationID, CensusOrigin and EnvelopeType

    • censusOrigin integer
    • envelopeType object
    • anonymous boolean
    • costFromWeight boolean
    • encryptedVotes boolean
    • serial boolean
    • uniqueValues boolean
    • organizationId string
    Responses

    OK


    Schema
    • electionID string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/get-type-of-census.html b/vocdoni-api/get-type-of-census.html index dd9b99cc7..ffcbd1f79 100644 --- a/vocdoni-api/get-type-of-census.html +++ b/vocdoni-api/get-type-of-census.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/get-vote.html b/vocdoni-api/get-vote.html index 692721fd0..b597c470f 100644 --- a/vocdoni-api/get-vote.html +++ b/vocdoni-api/get-vote.html @@ -12,13 +12,13 @@ - +

    Get vote

    Get the content of an existing Vote. If is an encrypted election it return the encryptionKeys indexes and the package will be codified.

    The Vote is identified by its voteId, also called nullifier. The nullifier is deterministic and its hash could be computed as following (using Keccak256):

    • For signature based elections, is the hash of the voterAddress + processId
    • For anonymous elections, the privateKey + processId

    As well, on the response, the voterId won't be returned for anonymous elections, and the encryptionKeyIndexes only for finished encrypted elections.

    Height and txIndex refer to the block height and the index of the transaction where vote is registered.

    The overwriteCount refers to the number of vote overwrites already executed by the user. At election creation time, you can specify the maxVoteOverwrites parameter, which defines how many times a voter can submit a vote. Only last vote will be taken into election final results.

    Path Parameters
    • voteID string required

      Nullifier of the vote

    Responses

    OK


    Schema
    • blockHeight integer
    • date string

      Date when the vote was emitted

    • electionID string
    • encryptionKeys integer[]

      Sent only for encrypted elections (no results until the end)

    • number integer
    • overwriteCount integer
    • package integer[]

      For encrypted elections this will be codified

    • transactionIndex integer
    • txHash string
    • voteID string
    • voterID string
    • weight string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/import-census-database.html b/vocdoni-api/import-census-database.html index a897c3c6f..454f62187 100644 --- a/vocdoni-api/import-census-database.html +++ b/vocdoni-api/import-census-database.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/import-census.html b/vocdoni-api/import-census.html index d735c2c2a..0ad001252 100644 --- a/vocdoni-api/import-census.html +++ b/vocdoni-api/import-census.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-account-received-and-sent-token-transfers.html b/vocdoni-api/list-account-received-and-sent-token-transfers.html index b7b53e1d5..e8319eff5 100644 --- a/vocdoni-api/list-account-received-and-sent-token-transfers.html +++ b/vocdoni-api/list-account-received-and-sent-token-transfers.html @@ -12,13 +12,13 @@ - +

    List account received and sent token transfers

    Returns the token transfers for an account. A transfer is a token transference from one account to other (excepting the burn address).

    Path Parameters
    • accountID string required

      Specific accountID

    • page string required

      Paginator page

    Responses

    OK


    Schema
    • transfers object
    • received object[]
    • amount integer
    • from integer[]
    • height integer
    • timestamp string
    • to integer[]
    • txHash integer[]
    • sent object[]
    • amount integer
    • from integer[]
    • height integer
    • timestamp string
    • to integer[]
    • txHash integer[]
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-account-token-fees.html b/vocdoni-api/list-account-token-fees.html index 698c9f3ff..516f7ce93 100644 --- a/vocdoni-api/list-account-token-fees.html +++ b/vocdoni-api/list-account-token-fees.html @@ -12,13 +12,13 @@ - +

    List account token fees

    Returns the token fees for an account. A spending is an amount of tokens burnt from one account for executing transactions.

    Path Parameters
    • accountID string required

      Specific accountID

    • page string required

      Paginator page

    Responses

    OK


    Schema
    • fees object[]
    • cost integer
    • from integer[]
    • height integer
    • reference string
    • timestamp string
    • txType string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-all-census-references.html b/vocdoni-api/list-all-census-references.html index e27361be3..c1d0fbe5f 100644 --- a/vocdoni-api/list-all-census-references.html +++ b/vocdoni-api/list-all-census-references.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-all-token-fees-by-reference.html b/vocdoni-api/list-all-token-fees-by-reference.html index 842446d30..70766edd0 100644 --- a/vocdoni-api/list-all-token-fees-by-reference.html +++ b/vocdoni-api/list-all-token-fees-by-reference.html @@ -12,13 +12,13 @@ - +

    List all token fees by reference

    Returns the token fees list filtered by reference and ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.

    Path Parameters
    • reference string required

      Reference filter

    • page string required

      Paginator page

    Responses

    OK


    Schema
    • fees object[]
    • cost integer
    • from integer[]
    • height integer
    • reference string
    • timestamp string
    • txType string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-all-token-fees-by-type.html b/vocdoni-api/list-all-token-fees-by-type.html index 0db8e1358..bdbb05899 100644 --- a/vocdoni-api/list-all-token-fees-by-type.html +++ b/vocdoni-api/list-all-token-fees-by-type.html @@ -12,13 +12,13 @@ - +

    List all token fees by type

    Returns the token fees list filtered by type and ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.

    Path Parameters
    • type string required

      Type filter

    • page string required

      Paginator page

    Responses

    OK


    Schema
    • fees object[]
    • cost integer
    • from integer[]
    • height integer
    • reference string
    • timestamp string
    • txType string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-all-token-fees.html b/vocdoni-api/list-all-token-fees.html index 23b7e226e..aa3c89725 100644 --- a/vocdoni-api/list-all-token-fees.html +++ b/vocdoni-api/list-all-token-fees.html @@ -12,13 +12,13 @@ - +

    List all token fees

    Returns the token fees list ordered by date. A spending is an amount of tokens burnt from one account for executing transactions.

    Path Parameters
    • page string required

      Paginator page

    Responses

    OK


    Schema
    • fees object[]
    • cost integer
    • from integer[]
    • height integer
    • reference string
    • timestamp string
    • txType string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-election-votes.html b/vocdoni-api/list-election-votes.html index af97fa868..bcc9d9f2a 100644 --- a/vocdoni-api/list-election-votes.html +++ b/vocdoni-api/list-election-votes.html @@ -12,13 +12,13 @@ - +

    List election votes

    Returns the list of voteIDs for an election (paginated)

    Path Parameters
    • electionID string required

      Election id

    • page number required

      Page

    Responses

    OK


    Schema
    • blockHeight integer
    • date string

      Date when the vote was emitted

    • electionID string
    • encryptionKeys integer[]

      Sent only for encrypted elections (no results until the end)

    • number integer
    • overwriteCount integer
    • package integer[]

      For encrypted elections this will be codified

    • transactionIndex integer
    • txHash string
    • voteID string
    • voterID string
    • weight string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-elections-filtered.html b/vocdoni-api/list-elections-filtered.html index 21eb99353..64b830d65 100644 --- a/vocdoni-api/list-elections-filtered.html +++ b/vocdoni-api/list-elections-filtered.html @@ -12,13 +12,13 @@ - +

    List elections (filtered)

    Return a filtered elections list, the available filters have to be sent on the request body. Available are:

    {
    "organizationId": "hexString",
    "electionId": "hexString",
    "withResults": false,
    "status": "READY",
    }

    electionId can be partial.

    See elections list

    Path Parameters
    • page number required

      Page to paginate

    Request Body required

    Filtered by partial organizationID, partial processID, process status and with results available or not

    • electionId string
    • organizationId string
    • status string
    • withResults boolean
    Responses

    OK


    Schema
    • chainId string
    • electionId string
    • endDate string
    • finalResults boolean
    • fromArchive boolean
    • manuallyEnded boolean
    • organizationId string
    • result array[]
    • startDate string
    • status string
    • voteCount integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-elections.html b/vocdoni-api/list-elections.html index 8271dd83d..0728e647c 100644 --- a/vocdoni-api/list-elections.html +++ b/vocdoni-api/list-elections.html @@ -12,13 +12,13 @@ - +

    List elections

    Get a list of elections summaries.

    Path Parameters
    • page number required

      Page

    Responses

    OK


    Schema
    • chainId string
    • electionId string
    • endDate string
    • finalResults boolean
    • fromArchive boolean
    • manuallyEnded boolean
    • organizationId string
    • result array[]
    • startDate string
    • status string
    • voteCount integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-encryption-keys.html b/vocdoni-api/list-encryption-keys.html index 04d57c42e..76322f64d 100644 --- a/vocdoni-api/list-encryption-keys.html +++ b/vocdoni-api/list-encryption-keys.html @@ -12,13 +12,13 @@ - +

    List encryption keys

    Returns the list of public/private encryption keys

    Path Parameters
    • electionID string required

      Election id

    Responses

    OK


    Schema
    • privateKeys string
    • publicKeys string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-of-the-existing-accounts.html b/vocdoni-api/list-of-the-existing-accounts.html index 4976a2d38..04015fa21 100644 --- a/vocdoni-api/list-of-the-existing-accounts.html +++ b/vocdoni-api/list-of-the-existing-accounts.html @@ -12,13 +12,13 @@ - +

    List of the existing accounts

    Returns information (address, balance and nonce) of the existing accounts

    Path Parameters
    • page string required

      Paginator page

    Responses

    OK


    Schema
    • accounts object[]
    • address integer[]
    • balance integer
    • nonce integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-of-valid-sik-roots.html b/vocdoni-api/list-of-valid-sik-roots.html index 2faffd77e..c17b07b20 100644 --- a/vocdoni-api/list-of-valid-sik-roots.html +++ b/vocdoni-api/list-of-valid-sik-roots.html @@ -12,13 +12,13 @@ - +

    List of valid SIK roots

    Returns the list of currently valid roots of the merkle tree where the vochain account SIK's are stored.

    Responses

    OK


    Schema
    • sikroot string
    • siksiblings string[]
    • sikproof string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-organization-elections-by-status.html b/vocdoni-api/list-organization-elections-by-status.html index 79b3e4503..3c3f8a0dd 100644 --- a/vocdoni-api/list-organization-elections-by-status.html +++ b/vocdoni-api/list-organization-elections-by-status.html @@ -12,13 +12,13 @@ - +

    List organization elections by status

    List the elections of an organization by status

    Path Parameters
    • organizationID string required

      Specific organizationID

    • status string required

      Possible values: [ready, paused, canceled, ended, results]

      Status of the election

    • page number required

      Define de page number

    Responses

    OK


    Schema
    • elections object[]
    • chainId string
    • electionId string
    • endDate string
    • finalResults boolean
    • fromArchive boolean
    • manuallyEnded boolean
    • organizationId string
    • result array[]
    • startDate string
    • status string
    • voteCount integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-organization-elections.html b/vocdoni-api/list-organization-elections.html index 1bf43795b..a7729ba12 100644 --- a/vocdoni-api/list-organization-elections.html +++ b/vocdoni-api/list-organization-elections.html @@ -12,13 +12,13 @@ - +

    List organization elections

    List the elections of an organization

    Path Parameters
    • organizationID string required

      Specific organizationID

    • page number required

      Define de page number

    Responses

    OK


    Schema
    • elections object[]
    • chainId string
    • electionId string
    • endDate string
    • finalResults boolean
    • fromArchive boolean
    • manuallyEnded boolean
    • organizationId string
    • result array[]
    • startDate string
    • status string
    • voteCount integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-organizations-filtered.html b/vocdoni-api/list-organizations-filtered.html index 23018310b..bcb82a1c6 100644 --- a/vocdoni-api/list-organizations-filtered.html +++ b/vocdoni-api/list-organizations-filtered.html @@ -12,13 +12,13 @@ - +

    List organizations (filtered)

    Returns a list of organizations filtered by its partial id, paginated by the given page

    Path Parameters
    • page integer required

      Current page

    Request Body required

    Partial organizationId to filter by

    • organizationId string
    Responses

    OK


    Schema
    • organizations object[]
    • electionCount integer
    • organizationID string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-organizations.html b/vocdoni-api/list-organizations.html index cc45cde65..e6e48b089 100644 --- a/vocdoni-api/list-organizations.html +++ b/vocdoni-api/list-organizations.html @@ -12,14 +12,14 @@ - +

    List organizations

    An Organizations is an account with infoUri that contains organization associated metadata. An Account instead could be a validator, an oracle, a voter or just someone who wants to transfer tokens.

    The /chain/organizations endpoints are related only to the Organization account type.

    • Return list of organizations ids.
    • If no page is defined, will assume page 0.
    Path Parameters
    • page integer required

      Page number

    Responses

    OK


    Schema
    • organizations object[]
    • electionCount integer
    • organizationID string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-transactions.html b/vocdoni-api/list-transactions.html index 51f8af6d1..819ce56ea 100644 --- a/vocdoni-api/list-transactions.html +++ b/vocdoni-api/list-transactions.html @@ -14,13 +14,13 @@ - +

    List Transactions

    To get full transaction information use /chain/transaction/{blockHeight}/{txIndex}.\nWhere transactionIndex is the index of the transaction on the containing block.

    Path Parameters
    • page integer required

      Page number

    Responses

    It return a list of transactions references


    Schema
    • transactions object[]
    • blockHeight int32
    • transactionHash string
    • transactionIndex int32
    • transactionNumber int64
    • transactionType string

      Possible values: [vote, newProcess, admin, setProcess, registerKey, mintTokens, sendTokens, setTransactionCosts, setAccount, collectFaucet, setKeykeeper]

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/list-validators.html b/vocdoni-api/list-validators.html index 29fc68f19..cf9243fdd 100644 --- a/vocdoni-api/list-validators.html +++ b/vocdoni-api/list-validators.html @@ -12,13 +12,13 @@ - +

    List validators

    Returns the list of validators

    Responses

    OK


    Schema
    • validators object[]
    • address string
    • joinHeight integer
    • name string
    • power integer
    • proposals integer
    • pubKey string
    • score integer
    • validatorAddress string
    • votes integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/price-factors-information.html b/vocdoni-api/price-factors-information.html index e0de53c48..016b49f0f 100644 --- a/vocdoni-api/price-factors-information.html +++ b/vocdoni-api/price-factors-information.html @@ -12,13 +12,13 @@ - +

    Price factors information

    Package electionprice provides a mechanism for calculating the price of an election based on its characteristics.

    The formula used to calculate the price for creating an election on the Vocdoni blockchain is designed to take into account various factors that impact the cost and complexity of conducting an election. The price is determined by combining several components, each reflecting a specific aspect of the election process.

    1. Base Price: This is a fixed cost that serves as a starting point for the price calculation. It represents the minimal price for creating an election, regardless of its size or duration.
    2. Size Price: As the number of voters (maxCensusSize) in an election increases, the resources required to manage the election also grow. To account for this, the size price component is directly proportional to the maximum number of votes allowed in the election. Additionally, it takes into consideration the blockchain's maximum capacity (capacity) and the maximum capacity the blockchain administrators can set (maxCapacity). This ensures that the price is adjusted based on the current capacity of the blockchain.
    3. Duration Price: The length of the election (electionDuration) also affects the price, as longer elections occupy more resources over time. The duration price component is directly proportional to the election duration and inversely proportional to the maximum number of votes. This means that if the election lasts longer, the price increases, and if there are more votes in a shorter time, the price also increases to reflect the higher demand for resources.
    4. Encrypted Votes: If an election requires encryption for maintaining secrecy until the end (encryptedVotes), it demands additional resources and computational effort. Therefore, the encrypted price component is added to the total price when this feature is enabled.
    5. Anonymous Votes: Similarly, if an election must be anonymous (anonymousVotes), it requires additional measures to ensure voter privacy. As a result, the anonymous price component is added to the total price when this option is chosen.
    6. Overwrite Price: Allowing voters to overwrite their votes (maxVoteOverwrite) can increase the complexity of managing the election, as it requires additional resources to handle vote updates. The overwrite price component accounts for this by being proportional to the maximum number of vote overwrites and the maximum number of votes allowed in the election. It also takes into account the blockchain's capacity to ensure the price reflects the current resource constraints.

    The constant factors in the price formula play a crucial role in determining the price of an election based on its characteristics. Each factor is associated with a specific component of the price formula and helps to weigh the importance of that component in the final price calculation. The rationale beind these constant factors is to provide a flexible mechanism to adjust the pricing model based on the system's needs and requirements.

    • k1 (Size price factor): This constant factor affects the size price component of the formula. By adjusting k1, you can control the impact of the maximum number of votes (maxCensusSize) on the overall price. A higher k1 value would make the price increase more rapidly as the election size grows, while a lower k1 value would make the price less sensitive to the election size. The rationale behind k1 is to ensure that the pricing model can be adapted to accommodate different election sizes while considering the resource requirements.
    • k2 (Duration price factor): This constant factor influences the duration price component of the formula. By adjusting k2, you can control how the duration of the election (electionDuration) affects the price. A higher k2 value would make the price increase more quickly as the election duration extends, while a lower k2 value would make the price less sensitive to the election duration. The rationale behind k2 is to reflect the resource consumption over time and ensure that longer elections are priced accordingly.
    • k3 (Encrypted price factor): This constant factor affects the encrypted price component of the formula. By adjusting k3, you can control the additional cost associated with encrypted elections (encryptedVotes). A higher k3 value would make the price increase more significantly for elections that require encryption, while a lower k3 value would make the price less sensitive to the encryption requirement. The rationale behind k3 is to account for the extra computational effort and resources needed to ensure secrecy in encrypted elections.
    • k4 (Anonymous price factor): This constant factor influences the anonymous price component of the formula. By adjusting k4, you can control the additional cost associated with anonymous elections (anonymousVotes). A higher k4 value would make the price increase more significantly for elections that require anonymity, while a lower k4 value would make the price less sensitive to the anonymity requirement. The rationale behind k4 is to account for the extra measures and resources needed to ensure voter privacy in anonymous elections.
    • k5 (Overwrite price factor): This constant factor affects the overwrite price component of the formula. By adjusting k5, you can control the additional cost associated with allowing vote overwrites (maxVoteOverwrite). A higher k5 value would make the price increase more significantly for elections that permit vote overwrites, while a lower k5 value would make the price less sensitive to the overwrite allowance. The rationale behind k5 is to account for the increased complexity and resources needed to manage vote overwrites in the election process.
    • k6 (Non-linear growth factor): This constant factor determines the rate of price growth for elections with a maximum number of votes (maxCensusSize) exceeding the k7 threshold. By adjusting k6, you can control the non-linear growth rate of the price for larger elections. A higher k6 value would result in a more rapid increase in the price as the election size grows beyond the k7 threshold, while a lower k6 value would result in a slower increase in the price for larger elections. The rationale behind k6 is to provide a mechanism for controlling the pricing model's sensitivity to large elections. This factor ensures that the price accurately reflects the increased complexity, resource consumption, and management effort associated with larger elections, while maintaining a more affordable price for smaller elections. By fine-tuning k6, the pricing model can be adapted to balance accessibility for smaller elections with the need to cover costs and resource requirements for larger elections.
    • k7 (Size non-linear trigger): This constant factor represents a threshold value for the maximum number of votes (maxCensusSize) in an election. When the election size exceeds k7, the price growth becomes non-linear, increasing more rapidly beyond this point. The rationale behind k7 is to create a pricing model that accommodates a "freemium" approach, where smaller elections (under the k7 threshold) are priced affordably, while larger elections are priced more significantly due to their increased resource requirements and complexity. By adjusting k7, you can control the point at which the price transition from linear to non-linear growth occurs. A higher k7 value would allow for more affordable pricing for a larger range of election sizes, while a lower k7 value would result in more rapid price increases for smaller election sizes. This flexibility enables the pricing model to be tailored to the specific needs and goals of the Vocdoni blockchain, ensuring that small elections remain accessible and affordable,while larger elections are priced to reflect their higher resource demands.
    Responses

    OK


    Schema
    • basePrice integer

      base price for an election

    • capacity integer

      capacity of the blockchain

    • factors object
    • k1 number

      sizePriceFactor

    • k2 number

      durationPriceFactor

    • k3 number

      encryptedPriceFactor

    • k4 number

      anonymousPriceFactor

    • k5 number

      overwritePriceFactor

    • k6 number

      Size scaling factor for maxCensusSize

    • k7 integer

      Threshold for maxCensusSize scaling

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/prove-key-to-census.html b/vocdoni-api/prove-key-to-census.html index a58ef92c5..1e4fb0b44 100644 --- a/vocdoni-api/prove-key-to-census.html +++ b/vocdoni-api/prove-key-to-census.html @@ -12,13 +12,13 @@ - +

    Prove key to census

    Prove the key and weight belong to the census root hash.

    If the key exists on the census returns Merkle root information. Proof property is referred to the siblings of Merkle tree, the value points to the leaf of the Merkle Tree for this key (on this case, the weight), and weight is just the key weight for this census.

    Further reading

    • Requires Bearer token
    • Returns a merkle proof, proving the key and weight belongs to the census root hash
    Path Parameters
    • censusID string required

      Census id

    • key string required

      Key to proof

    Responses

    where proof is Merkle tree siblings and value is Merkle tree leaf value


    Schema
    • proof string
    • value string
    • weight number
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/publish-census-at-root.html b/vocdoni-api/publish-census-at-root.html index 2b2efd844..bcb323250 100644 --- a/vocdoni-api/publish-census-at-root.html +++ b/vocdoni-api/publish-census-at-root.html @@ -12,13 +12,13 @@ - +

    Publish census at root

    Register a census to the storage (IPFS in our case). After this, the census can't be edited.

    You could provide the census Merkle root to specify census publication at specific snapshot. See censuses/{censusId}/participants

    • Requires Bearer token
    • The census is copied to a new census identified by its Merkle Root
    • The new census cannot be modified
    • The census is published to the storage provided (IPFS in our case)
    • The new census ID is returned and can be used for querying
    • If a censusID with the same root has been already published, the request will fail
    • If root is specified as path parameter, it publish the census at specific root (append the census to existing one).
    Path Parameters
    • censusID string required

      Census id

    • root string required

      Specific root where to publish the census. Not required

    Responses

    It return published censusID and the ipfs uri where its uploaded


    Schema
    • census object
    • censusID string
    • uri string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/publish-census.html b/vocdoni-api/publish-census.html index 71d1ec7f9..c2f828d74 100644 --- a/vocdoni-api/publish-census.html +++ b/vocdoni-api/publish-census.html @@ -12,13 +12,13 @@ - +

    Publish census

    Register a census to the storage (IPFS in our case). After this, the census can't be edited.

    You could provide the census Merkle root to specify census publication at specific snapshot. See censuses/{censusId}/participants

    • Requires Bearer token
    • The census is copied to a new census identified by its Merkle Root
    • The new census cannot be modified
    • The census is published to the storage provided (IPFS in our case)
    • The new census ID is returned and can be used for querying
    • If a censusID with the same root has been already published, the request will fail
    • If root is specified as path parameter, it publish the census at specific root (append the census to existing one).
    Path Parameters
    • censusID string required

      Census id

    Responses

    It return published censusID and the ipfs uri where its uploaded


    Schema
    • census object
    • censusID string
    • uri string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/returns-if-the-address-provided-has-a-valid-sik.html b/vocdoni-api/returns-if-the-address-provided-has-a-valid-sik.html index a0184b0c3..b92dcaefe 100644 --- a/vocdoni-api/returns-if-the-address-provided-has-a-valid-sik.html +++ b/vocdoni-api/returns-if-the-address-provided-has-a-valid-sik.html @@ -12,13 +12,13 @@ - +

    Returns if the address provided has a valid SIK

    Returns if the address provided, associated to an a registered account or not, has a valid SIK already registered or not.

    Responses

    OK


    Schema
    • sik string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/set-account.html b/vocdoni-api/set-account.html index d94d96db1..4c377f9a2 100644 --- a/vocdoni-api/set-account.html +++ b/vocdoni-api/set-account.html @@ -12,14 +12,14 @@ - +

    Set account

    It register an account to the blockchain including IPFS metadata upload.

    • Requires a signed protobuf transaction on the body to perform the operation.
    • Metadata is not required, but if no metadata is provided the account won't be listed on /chain/organizations endpoint. Check there to read about differences between an account and a organization.
    Request Body required

    Transaction payload and metadata object encoded using base64

    • metadata string
    • txPayload string
    Responses

    OK


    Schema
    • metadataURL string
    • txHash string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/set-wallet-account.html b/vocdoni-api/set-wallet-account.html index c17146f83..34f0ee229 100644 --- a/vocdoni-api/set-wallet-account.html +++ b/vocdoni-api/set-wallet-account.html @@ -12,13 +12,13 @@ - +

    Set wallet account

    Set a new account. Needed the bearer token associated the account.

    Responses

    OK


    Schema
    • code integer
    • hash string
    • response base64
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/sik.html b/vocdoni-api/sik.html index e39825c7e..2cc359451 100644 --- a/vocdoni-api/sik.html +++ b/vocdoni-api/sik.html @@ -12,13 +12,13 @@ - + - + \ No newline at end of file diff --git a/vocdoni-api/submit-a-vote.html b/vocdoni-api/submit-a-vote.html index 2d2b85d2d..88422fec1 100644 --- a/vocdoni-api/submit-a-vote.html +++ b/vocdoni-api/submit-a-vote.html @@ -12,13 +12,13 @@ - +

    Submit a vote

    Submit a vote using a protobuf signed transaction. The corresponding result are the vote id and transaction hash where the vote is registered.

    Request Body required

    Requires a protobuf signed transaction

    • txPayload string
    Responses

    OK


    Schema
    • voteID string
    • txHash string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/submit-transaction.html b/vocdoni-api/submit-transaction.html index 264caaafc..2689f3f56 100644 --- a/vocdoni-api/submit-transaction.html +++ b/vocdoni-api/submit-transaction.html @@ -12,13 +12,13 @@ - +

    Submit transaction

    It submit a transaction. Depending of transaction type will return different kinds of responses:

    • For a NewElection transaction, response will be the newElectionId
    • For a Vote transaction, response will be the voteID

    Once the transaction is mined on the Vochain you can use chain/transactions/reference/{hash} to find the block height and its index on the block to get the transaction index using chain/transactions/{blockHeight}/{txIndex}.

    Request Body required

    Base64 payload string containing transaction data and signature

    • payload string
    Responses

    Return blockchain response. response could differ depending of transaction type.


    Schema
    • code integer
    • hash string
    • response base64
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/total-number-of-accounts.html b/vocdoni-api/total-number-of-accounts.html index 90fa9bb6b..129b39cc4 100644 --- a/vocdoni-api/total-number-of-accounts.html +++ b/vocdoni-api/total-number-of-accounts.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/total-number-of-sent-and-received-transactions.html b/vocdoni-api/total-number-of-sent-and-received-transactions.html index ef3d10026..47f58784e 100644 --- a/vocdoni-api/total-number-of-sent-and-received-transactions.html +++ b/vocdoni-api/total-number-of-sent-and-received-transactions.html @@ -12,13 +12,13 @@ - +

    Total number of sent and received transactions

    Returns the count of total number of sent and received transactions for an account. A transaction is a token transfer from one account to another existing account

    Path Parameters
    • accountID string required

      Specific accountID

    Responses

    Number of transaction sent and received for the account


    Schema
    • count integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/transaction-by-block-height-and-index.html b/vocdoni-api/transaction-by-block-height-and-index.html index 5c316a0f2..d990b2c73 100644 --- a/vocdoni-api/transaction-by-block-height-and-index.html +++ b/vocdoni-api/transaction-by-block-height-and-index.html @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@
    *Proof_EthereumStorage
    *Proof_EthereumAccount
    *Proof_Ca
    *Proof_Arbo
    *Proof_ZkSnark
    *Proof_MinimeStorage
    *Proof_FarcasterFrame
  • questionIndex integer
  • results object
  • votes object[]
  • question array[]
  • status integer

    Possible values: [0, 1, 2, 3, 4, 5]

  • tempSIKs boolean

    tempSIKs flag decides if when the process has finished, the SIKs related to it will be removed or not

  • txtype integer

    Possible values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]

  • txInfo object
  • blockHeight int32
  • transactionHash string
  • transactionIndex int32
  • transactionNumber int64
  • transactionType string

    Possible values: [vote, newProcess, admin, setProcess, registerKey, mintTokens, sendTokens, setTransactionCosts, setAccount, collectFaucet, setKeykeeper]

  • Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/transaction-by-hash.html b/vocdoni-api/transaction-by-hash.html index c601cb0cf..b038a85c6 100644 --- a/vocdoni-api/transaction-by-hash.html +++ b/vocdoni-api/transaction-by-hash.html @@ -12,13 +12,13 @@ - +

    Transaction by hash

    Using transaction hash it return the block and index containing that contains the transaction. After, you could use this block and index to retrieve transaction full info using transaction by block and index

    Path Parameters
    • hash string required

      Transaction hash

    Responses

    OK


    Schema
    • blockHeight int32
    • transactionHash string
    • transactionIndex int32
    • transactionNumber int64
    • transactionType string

      Possible values: [vote, newProcess, admin, setProcess, registerKey, mintTokens, sendTokens, setTransactionCosts, setAccount, collectFaucet, setKeykeeper]

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/transaction-by-index.html b/vocdoni-api/transaction-by-index.html index 8a69fd5cf..e543aecc1 100644 --- a/vocdoni-api/transaction-by-index.html +++ b/vocdoni-api/transaction-by-index.html @@ -12,13 +12,13 @@ - +

    Transaction by index

    Get transaction by its index. This is not transaction reference (hash), and neither the block height and block index. The transaction index is an incremental counter for each transaction. You could use the transaction block and index to retrieve full info using transaction by block and index.

    Path Parameters
    • index integer required

      Index of the transaction

    Responses

    OK


    Schema
    • blockHeight int32
    • transactionHash string
    • transactionIndex int32
    • transactionNumber int64
    • transactionType string

      Possible values: [vote, newProcess, admin, setProcess, registerKey, mintTokens, sendTokens, setTransactionCosts, setAccount, collectFaucet, setKeykeeper]

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/transaction-costs.html b/vocdoni-api/transaction-costs.html index 3716a712e..f06ad5abb 100644 --- a/vocdoni-api/transaction-costs.html +++ b/vocdoni-api/transaction-costs.html @@ -12,13 +12,13 @@ - +

    Transaction costs

    Returns the list of transactions and its cost

    Responses

    OK


    Schema
    • Tx_AddDelegateForAccount integer
    • Tx_CollectFaucet integer
    • Tx_CreateAccount integer
    • Tx_DelDelegateForAccount integer
    • Tx_DelSik integer
    • Tx_NewProcess integer
    • Tx_RegisterKey integer
    • Tx_SendTokens integer
    • Tx_SetAccountInfoURI integer
    • Tx_SetAccountValidator integer
    • Tx_SetProcessCensus integer
    • Tx_SetProcessQuestionIndex integer
    • Tx_SetProcessStatus integer
    • Tx_SetSik integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/transactions-count.html b/vocdoni-api/transactions-count.html index 04f131bd4..ff9b0a1c3 100644 --- a/vocdoni-api/transactions-count.html +++ b/vocdoni-api/transactions-count.html @@ -12,13 +12,13 @@ - + - + \ No newline at end of file diff --git a/vocdoni-api/transactions-in-a-block.html b/vocdoni-api/transactions-in-a-block.html index 3dbce18ea..ccf61f5c9 100644 --- a/vocdoni-api/transactions-in-a-block.html +++ b/vocdoni-api/transactions-in-a-block.html @@ -12,13 +12,13 @@ - +

    Transactions in a block

    Given a block returns the list of transactions for that block

    Path Parameters
    • height number required

      Block height

    • page number required

      Page to paginate

    Responses

    OK


    Schema array
    • transactionHash string
    • transactionIndex integer
    • transactionNumber integer
    • transactionType string
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/transfer-tokens.html b/vocdoni-api/transfer-tokens.html index 28b07b2d2..5001a060f 100644 --- a/vocdoni-api/transfer-tokens.html +++ b/vocdoni-api/transfer-tokens.html @@ -12,13 +12,13 @@ - +

    Transfer tokens

    Transfer balance to another account. Needed the bearer token associated the account.

    Path Parameters
    • dstAddress string required

      Destination address

    • amount string required

      Amount of tokens to transfer

    Responses

    OK


    Schema
    • code integer
    • hash string
    • response base64
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/verify-merkle-proof.html b/vocdoni-api/verify-merkle-proof.html index 13359bea8..536e623d0 100644 --- a/vocdoni-api/verify-merkle-proof.html +++ b/vocdoni-api/verify-merkle-proof.html @@ -12,13 +12,13 @@ - +

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/verify-vote.html b/vocdoni-api/verify-vote.html index c2d68f937..fcc2a4c1d 100644 --- a/vocdoni-api/verify-vote.html +++ b/vocdoni-api/verify-vote.html @@ -12,13 +12,13 @@ - +

    Verify vote

    Check if vote is registered on the blockchain on specific election. Just return Ok status code

    Path Parameters
    • electionID string required

      Election id

    • voteID string required

      Nullifier of the vote

    Responses

    (empty body)

    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/vocdoni-api.html b/vocdoni-api/vocdoni-api.html index 7e3654023..1c0a4a517 100644 --- a/vocdoni-api/vocdoni-api.html +++ b/vocdoni-api/vocdoni-api.html @@ -12,13 +12,13 @@ - +
    Version: 2.0.0

    Vocdoni API

    The Vocdoni API is a REST API that substitutes the previous RPCs in order to make it easier for developers/integrators to build on top of the voting protocol. This API facilitates creating votings using Vocdoni, without the hassle of learning a complex blockchain platform, allowing to perform all the features that enable the voting protocol such as creating an account, entity, voting process, census & vote, abstracting as much as possible the complexity and offering simple and straightforward methods to perform those actions.

    You can review the API endpoints documentation in this section, the main entities are:

    • Chain: The Vocdoni blockchain is named Vochain. It is a Byzantine fault-tolerant network based on Tendermint that executes the Vocdoni Protocol logic represented as a state machine. Its main purpose is to register votes in a decentralized and verifiable format. In those endpoints, you can consult the state of the chain, transactions costs, list organizations and get more Vochain info.
    • Accounts: Identified by an Ethereum like address. An account can create and manage elections, transfer tokens, give power to other accounts on his behalf (delegates) and manage its metadata.
    • Elections: Is a rule-set of options and requirements for creating a process in which people vote a series of options. To know more about the params of an election and its lifecycle go here. In this section you will find all information related to an election as its information, election keys, submitted votes & how to create a new election.
    • Censuses: The census is a key component of any voting process. It specifies the set of users (identified by a public key or address) eligible for participating in an election. To understand more about the Censuses you can check here. Here you will be able to get censuses information like the Merkle root, total weight & size, import/export the censuses and create new ones.
    • Votes: All the information related to the vote issued by a participant in a vote, you can check the validity of the vote, consult your information and send a vote.
    • SIK: The Secret Identity Key is a user-generated piece of information that proves the user's identity without revealing it. It is the hash of the user's address, the signature of a public message and an optional secret part. It is used to ensure anonymous voting. All registered accounts or anonymous voters must register a SIK, and they are all stored in a Merkle tree. The /siks endpoints help to generate a proof of membership, get the current valid SIK roots, or check if an account has a valid SIK.

    Errors

    Backend error messages list are defined here: https://github.com/vocdoni/vocdoni-node/blob/master/api/errors.go

    About the 204 no content error: this message will be returned only if the asset being queried cannot be found but no other errors have occurred. This response is commonly used to prevent Javascript errors that may arise when a client is waiting for a transaction to be published. During this waiting period, the client can repeatedly query the endpoint until a successful response with a status code of 200 is received, thereby avoiding any errors that may occur due to the transaction not being published yet.

    Authentication

    Security Scheme Type:http
    HTTP Authorization Scheme:basic
    Bearer format:

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/vochain-information.html b/vocdoni-api/vochain-information.html index 50c0fc174..4a9b434a4 100644 --- a/vocdoni-api/vochain-information.html +++ b/vocdoni-api/vochain-information.html @@ -12,13 +12,13 @@ - +

    Vochain information

    Return basic Vocdoni Blockchain (Vochain) information like blockTime, chainId, current height...

    blockTime: each array position return average time for 1 minute, 10 minutes, 1 hour, 6 hours and 24 hours.

    blockTime: every array position represents the average for 1 minute, 10m, 1h, 6h, 24h

    MaxCensusSize: is a new feature introduced in the blockchain that is used to limit the number of votes that can be registered for an election. This feature helps to prevent any potential overflow of the blockchain when the number of votes goes beyond the maximum limit. This is the maximum value that an election creation can allow.

    In order to create an election, the creator is required to set the MaxCensusSize parameter to a proper value. Typically, this value should be equal to the size of the census. If the MaxCensusSize parameter is set to 0, an error will occur and the election cannot be created.

    The MaxCensusSize parameter determines the maximum number of votes that can be registered by the blockchain. If the number of votes exceeds this limit, the vote transaction will fail (overwrite votes does not count).

    See MaxCensusSize attribute on the VocdoniSDK to add the maximum census size to a single election. Will throw an error if is superior than the allowed on the Vochain: Max census size for the election is greater than allowed size.

    networkCapacity indicates how many votes per block is the blockchain supposed to achieve. As bigger the capacity as cheaper the elections.

    Responses

    OK


    Schema
    • blockTime integer[]
    • blockTimestamp date-time
    • chainId string
    • circuitVersion string
    • electionCount integer
    • genesisTime date-time
    • height integer
    • maxCensusSize integer
    • networkCapacity integer
    • organizationCount integer
    • syncing boolean
    • transactionCount integer
    • validatorCount integer
    • voteCount integer
    Loading...

    Resources

    Guides
    Soon

    Tutorials
    Soon

    Copyright © 2024 Vocdoni, Inc. All rights reserved.
    - + \ No newline at end of file diff --git a/vocdoni-api/votes.html b/vocdoni-api/votes.html index 3cfbdc641..e5b8d4e95 100644 --- a/vocdoni-api/votes.html +++ b/vocdoni-api/votes.html @@ -12,13 +12,13 @@ - + - + \ No newline at end of file diff --git a/vocdoni-api/wallet.html b/vocdoni-api/wallet.html index 1799d9a1c..c8fa4acc1 100644 --- a/vocdoni-api/wallet.html +++ b/vocdoni-api/wallet.html @@ -12,13 +12,13 @@ - + - + \ No newline at end of file