-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# frost-ts | ||
|
||
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/zmeyer44/frost-ts/node.js.yml) | ||
![GitHub issues](https://img.shields.io/github/issues/zmeyer44/frost-ts) | ||
![GitHub package.json version](https://img.shields.io/github/package-json/v/zmeyer44/frost-ts) | ||
![GitHub stars](https://img.shields.io/github/stars/zmeyer44/frost-ts) | ||
|
||
⚠️ **Be Careful:** This project is in early development and should be used for testing purposes only. | ||
|
||
Typescript implementation of Flexible Round-Optimized Schnorr Threshold Signatures (FROST). | ||
|
||
## Sponsors | ||
|
||
Sponsorship at any level is appreciated and encouraged. Currently this work is supported by [OpenSats](https://opensats.org). | ||
|
||
## Usage | ||
|
||
### Install | ||
|
||
```shell | ||
npm i frost-ts | ||
``` | ||
|
||
### Example | ||
|
||
```typescript | ||
import { Participant } from "frost-ts"; | ||
|
||
const p1 = new Participant(1, 2, 3); | ||
const p2 = new Participant(2, 2, 3); | ||
const p3 = new Participant(3, 2, 3); | ||
|
||
p1.init_keygen(); | ||
p2.init_keygen(); | ||
p3.init_keygen(); | ||
|
||
p1.generate_shares(); | ||
p2.generate_shares(); | ||
p3.generate_shares(); | ||
|
||
p1.aggregate_shares([p2.shares![p1.index - 1], p3.shares![p1.index - 1]]); | ||
p2.aggregate_shares([p1.shares![p2.index - 1], p3.shares![p2.index - 1]]); | ||
p3.aggregate_shares([p1.shares![p3.index - 1], p2.shares![p3.index - 1]]); | ||
``` | ||
|
||
## Learn about FROST | ||
|
||
[FROST Paper](https://eprint.iacr.org/2020/852.pdf) | ||
[Python Implementation](https://github.com/jesseposner/FROST-BIP340) | ||
[Podcast Episode](https://www.youtube.com/watch?v=8nuFt-1SWRI) |