14 Commits

Author SHA1 Message Date
Artem
318aaf8cd5 modified sdk release script, changelog and version bump, 2025-09-02 14:55:10 +04:00
Artem
317be4697a changelog and version bumps 2025-07-31 21:30:16 +04:00
Francisco Bezzecchi
ba371ec745 chore: unifying eslint versions 2025-04-11 15:31:54 -03:00
moebius
6ae88dbe5d fix: miscellaneous fixes (#88) 2025-02-17 19:52:57 +01:00
moebius
c0d80bcf6f chore: update relayer with sdk package (#82) 2025-02-14 10:52:03 +00:00
bezze
f3e9e35e0b test: relayer unit testing (#77) 2025-02-10 09:26:07 +00:00
moebius
2555543d88 chore: publish to gpr (#78) 2025-02-10 09:08:21 +00:00
Turtle
16c0852e26 fix: sdk package name (#75) 2025-02-07 23:42:41 +01:00
Turtle
e1164d4ed4 chore: update package and publish as restricted (#74)
Fixed package name and publish as restricted
2025-02-07 23:33:03 +01:00
bezze
b6f58e6887 feat: relayer data checks and sdk integration (#58)
The core functionality of the feature takes place at
`packages/relayer/src/services/privacyPoolRelayer.service.ts` in the
`validateWithdrawal` function. There we check in order:
1. Decode Withdrawal.data and check feeReceiver ==
CONFIGURED_FEE_RECEIVER && feeBPS == CONFIGURED_FEE_BPS
2. Hash (Withdrawal || Scope) and check hash == Proof.context
3. Verify proof with SDK.verifyProof(Proof)
4. Call Entrypoint.scopeToPool() to get asset pool
5. Call Pool.ASSET() to get withdrawn asset
6. Check proof.withdrawnAmount() >=
CONFIGURED_MINIMUM_AMOUNT[withdrawn_asset]

If everything is ok, we call the Entrypoint.relay() with the user's
proof.

I've added examples for the config files `env.example`,
`withdraw_amount.example.json`. The first one are environment variables
to be defined in the server's environment. The second one contains a
mapping of the mimimum withdraw limits for the different supported
assets. There's an env var that should contain a path to this file.

Added a `Dockerfile` and a `docker-compose.yml` to the relayer to test
it or use it in dev flows. The circuit artifacts are loaded as volumes,
so before starting the docker-compose, you should run `yarn present`
from the circuits package dir to group all the artifacts and make them
easily accesible.

Additionally added a small package in
`/packages/relayer/test/integration/relay` that can be built and run to
test the relayer.
2025-02-05 14:24:29 +00:00
moebius
fd23947363 chore: update readmes (#57) 2025-02-03 08:49:17 +00:00
bezze
cc4cd8f13f feat: relayer basic implementation (#53)
There are a lot of TODOs related to code quality, mostly happy path
assumptions, input sanitization, error handling and tests. Feature wise
it's missing the contract interaction (should be straight forward once
it's implemented in the SDK) and the sqlite database for request
tracking.
2025-01-31 19:01:11 +00:00
moebius
b81ed7bc34 feat: add SDK package (#12)
This PR introduces the template for the SDK package.
2025-01-08 13:30:40 +00:00
moebius
689f8d1971 init repository 2024-12-16 16:36:48 -03:00