Skip to content

Commit

Permalink
docs(curves): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed May 21, 2024
1 parent 0db7a9b commit 0cdb9d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
- bn254
- bls12_381
- bls12_377
target:
- secp256k1
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- i686-unknown-linux-gnu
Expand Down Expand Up @@ -55,7 +56,8 @@ jobs:
- bn254
- bls12_381
- bls12_377
target:
- secp256k1
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
Expand Down Expand Up @@ -84,7 +86,7 @@ jobs:
name: ${{ matrix.target }}-archive
path: ${{ matrix.target }}-erc-5564-${{ matrix.curve }}.tar.gz
retention-days: 2

prepare-prerelease:
name: Prepare pre-release
needs: [linux, macos]
Expand All @@ -96,7 +98,7 @@ jobs:
ref: master
- name: Download artifacts
uses: actions/download-artifact@v2

- name: Delete tag
uses: dev-drprasad/[email protected]
with:
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ Uses the [arkworks-rs](https://github.com/arkworks-rs/curves) suite of libraries
1. `ark_bn254`
2. `ark_bls_12_381`
3. `ark_bls_12_377`
4. `secp256k1`

## Usage

Note: this scheme should be used with the fork of [circom-rln](https://github.com/rymnc/circom-rln-erc5564).

```rust
use erc_5564_rs::{StealthAddressOnCurve}; // can use bls12_381_impl or bls12_377_impl too
use ark_bn254::Bn254;
use erc_5564_rs::{StealthAddressOnCurve};
use ark_bn254::Bn254; // or ark_bls_12_381::Bls12_381 or ark_bls_12_377::Bls12_377, or erc_5564_rs::Secp256k1

fn main() {
let (spending_key, spending_public_key) = Bn254::random_keypair();
Expand All @@ -39,10 +38,10 @@ fn main() {
## Building and Testing

1. Building
`cargo build --release --features <bn254/bls12_381/bls12_377>`
`cargo build --release --features <bn254/bls12_381/bls12_377/secp256k1>`

2. Testing
`cargo test --release --features <bn254/bls12_381/bls12_377>`
`cargo test --release --features <bn254/bls12_381/bls12_377/secp256k1>`

## FFI Api

Expand All @@ -55,4 +54,4 @@ Check out the nightly releases.
## Attribution

- The original circuits for rln are located [here](https://github.com/Rate-Limting-Nullifier/circom-rln), by the PSE group
- Inspired by the [erc-5564](https://eips.ethereum.org/EIPS/eip-5564) eip and the [poc](https://github.com/nerolation/EIP-Stealth-Address-ERC/blob/main/minimal_poc.ipynb) by Nerolation.
- Inspired by the [erc-5564](https://eips.ethereum.org/EIPS/eip-5564) eip and the [poc](https://github.com/nerolation/EIP-Stealth-Address-ERC/blob/main/minimal_poc.ipynb) by Nerolation.

0 comments on commit 0cdb9d4

Please sign in to comment.