Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ppoliani committed Feb 12, 2024
1 parent e37ea89 commit 4676353
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ npm install -g snarkjs@latest

### Download SRS File

To create a ZKP you would need to download the correct SRS file (based on your circuit size). For example, if your circuit has around 65K constraints then you would need to download the following file https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_16.ptau.
To create a ZKP you would need to download the correct SRS file (based on your circuit size). For example, if your circuit has around 65K constraints then you would need to download an srs file of size 16;

You can replace the number 16 in the above URL to download the correct SRS file for your circuit.

> You can download the file to any location you wish. You will later provide the location of the file when running the CLI tool.
```shell
zkbtc download-srs --srs-size 16
```

### Bitcoin wallet

Expand Down Expand Up @@ -77,20 +77,20 @@ The zkapp doesn't have to do anything with the `truncated_txid` field (although
You can deploy a stateless zkapp with the following command:

```shell
$ zkbtc deploy-zkapp --circom-circuit-path examples/circuit/stateless.circom --srs-path ~/.zkbitcoin/srs_16.ptau --satoshi-amount 1000
$ zkbtc deploy-zkapp --circom-circuit-path examples/circuit/stateless.circom --srs-size 16 --satoshi-amount 1000
```

> Use the `--srs-path` where you downloaded the SRS file. Check "Download SRS File" above.
> Use the `srs-size` that corresponds to the SRS file you downloaded earlier.
This will lock 1,000 satoshis in the zkapp and return the transaction ID of the transaction that deployed the zkapp. A stateless zkapp can be referenced by that transaction ID.

Bob can then unlock the funds from the stateless zkapp with the following command:

```shell
$ zkbtc use-zkapp --txid "e793bdd8dfdd9912d971790a5f385ad3f1215dce97e25dbefe5449faba632836" --circom-circuit-path examples/circuit/stateless.circom --srs-path ~/.zkbitcoin/srs_16.ptau --proof-inputs '{"preimage":["1"]}' --recipient-address "tb1q6nkpv2j9lxrm6h3w4skrny3thswgdcca8cx9k6"
$ zkbtc use-zkapp --txid "e793bdd8dfdd9912d971790a5f385ad3f1215dce97e25dbefe5449faba632836" --circom-circuit-path examples/circuit/stateless.circom --srs-size 16 --proof-inputs '{"preimage":["1"]}' --recipient-address "tb1q6nkpv2j9lxrm6h3w4skrny3thswgdcca8cx9k6"
```

> Use the `--srs-path` where you downloaded the SRS file. Check "Download SRS File" above.
> Use the `srs-size` that corresponds to the SRS file you downloaded earlier.
### Stateful zkapps

Expand Down

0 comments on commit 4676353

Please sign in to comment.