docs(curves): update readme

This commit is contained in:
rymnc
2024-05-21 06:05:36 +05:30
parent 0db7a9bbbf
commit 0cdb9d4f01
2 changed files with 12 additions and 11 deletions

View File

@@ -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
@@ -55,7 +56,8 @@ jobs:
- bn254
- bls12_381
- bls12_377
target:
- secp256k1
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
@@ -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]
@@ -96,7 +98,7 @@ jobs:
ref: master
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Delete tag
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:

View File

@@ -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();
@@ -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
@@ -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.