Skip to content

Commit

Permalink
Added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Buzzec committed Sep 11, 2024
1 parent 95c3faf commit 6d65168
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# `@staratlas/stv`
A library for verifying vote results, released by the Star Atlas DAO.

## Purpose
This library allows users to verify vote results that have occurred within the Star Atlas DAO. It provides a way to ensure transparency and accountability in the voting process.

## Key Functionality

### `calculateStvWinners`
The main interaction function provided by this library, which calculates the winners of votes using the [Single Transferable Vote (STV) method](https://en.wikipedia.org/wiki/Single_transferable_vote).
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@staratlas/stv",
"version": "0.0.0",
"description": "STV vote code for the Star Atlas DAO",
"scripts": {
"build": "pnpm run -r build",
"watch": "pnpm build && pnpm run -r --parallel watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/stv/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('calculateStvWinners', () => {
// { voteCount: 1, voteOrder: ['Dave', 'Eve'] },
// { voteCount: 1, voteOrder: ['Eve', 'Dave'] },
// ];

//
// const { winners, tieCount } = calculateStvWinners(voteRecords, 3);
// console.log(winners);
// expect(winners.length).toBe(5);
Expand Down

0 comments on commit 6d65168

Please sign in to comment.