Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IBM/evote
/ functions
Functions
30 in github.com/IBM/evote
⨍
Functions
30
◇
Types & classes
12
↓ 6 callers
Method
myAssetExists
* * myAssetExists * * Checks to see if a key exists in the world state. * @param myAssetId - the key of the asset to read * @returns b
contract/lib/voterContract.js:252
↓ 3 callers
Method
queryByObjectType
* Query by the main objects in this app: ballot, election, votableItem, and Voter. * Return all key-value pairs of a given type. * * @param {C
contract/lib/voterContract.js:417
↓ 2 callers
Method
deleteMyAsset
* * deleteMyAsset * * Deletes a key-value pair from the world state, based on the key given. * * @param myAssetId - the key of the as
contract/lib/voterContract.js:206
↓ 2 callers
Method
generateBallot
* * generateBallot * * Creates a ballot in the world state, and updates voter ballot and castBallot properties. * * @param ctx - the c
contract/lib/voterContract.js:135
↓ 2 callers
Method
queryWithQueryString
* Evaluate a queryString * * @param {Context} ctx the transaction context * @param {String} queryString the query string to be evaluate
contract/lib/voterContract.js:371
↓ 2 callers
Method
readMyAsset
* * readMyAsset * * Reads a key-value pair from the world state, based on the key given. * * @param myAssetId - the key of the asset
contract/lib/voterContract.js:226
↓ 2 callers
Method
validateVoter
* * validateVoter * * check for valid ID card - stateID or drivers License. * * @param voterId - an array of choices * @returns -
contract/lib/Voter.js:51
↓ 1 callers
Method
init
* * init * * This function creates voters and gets the application ready for use by creating * an election from the data files in the dat
contract/lib/voterContract.js:40
↓ 1 callers
Function
main
(userName)
web-app/server/registerUser.js:23
↓ 1 callers
Function
main
()
web-app/server/enrollAdmin.js:28
↓ 1 callers
Function
queryAll
()
web-app/server/invoke.js:25
↓ 1 callers
Method
validateBallot
* * validateBallot * * check to make sure a ballot has not been created for this * voter. * * @param voterId - the unique Id for a
contract/lib/Ballot.js:51
↓ 1 callers
Method
validateElection
* * validateElection * * check for valid election, cross check with government. Don't want duplicate * elections. * * @param elect
contract/lib/Election.js:15
↓ 1 callers
Method
validateRegistrar
* * validateRegistrar * * check for valid registrarId, should be cross checked with government * * @param voterId - an array of choic
contract/lib/Voter.js:69
Function
castBallot
(electionId, voterId, picked)
web-app/client/src/services/apiService.js:4
Method
castVote
* * castVote * * First to checks that a particular voterId has not voted before, and then * checks if it is a valid election time, and i
contract/lib/voterContract.js:273
Method
constructor
* * Election * * Constructor for an Election object. Specifies start and end date. * * @param items - an array of choices * @para
contract/lib/Election.js:35
Method
constructor
* * VotableItem * * Constructor for a VotableItem object. These will eventually be placed on the * ballot. * * @param votableId
contract/lib/VotableItem.js:18
Method
constructor
* * Voter * * Constructor for a Voter object. Voter has a voterId and registrar that the * voter is . * * @param items - an array
contract/lib/Voter.js:16
Method
constructor
* * Ballot * * Constructor for a Ballot object. This is what the point of the application is - create * ballots, have a voter fill them o
contract/lib/Ballot.js:17
Method
constructor
()
contract/test/my-asset-contract.js:27
Method
createVoter
* * createVoter * * Creates a voter in the world state, based on the args given. * * @param args.voterId - the Id the voter, used as
contract/lib/voterContract.js:164
Function
getCurrentStanding
()
web-app/client/src/services/apiService.js:41
Function
queryAll
()
web-app/client/src/services/apiService.js:11
Method
queryAll
* Query and return all key value pairs in the world state. * * @param {Context} ctx the transaction context * @returns - all key-value pairs
contract/lib/voterContract.js:354
Function
queryByKey
(key)
web-app/client/src/services/apiService.js:36
Function
queryByObjectType
()
web-app/client/src/services/apiService.js:14
Function
queryWithQueryString
(selected)
web-app/client/src/services/apiService.js:17
Function
registerVoter
(voterId, registrarId, firstName, lastName)
web-app/client/src/services/apiService.js:22
Function
validateVoter
(voterId)
web-app/client/src/services/apiService.js:31