Skip to content

Commit

Permalink
Merge pull request #2 from rarimo/feature/migrate-to-kit
Browse files Browse the repository at this point in the history
Feature: migrate to kit
  • Loading branch information
violog authored May 13, 2024
2 parents bbf12ad + 9e93032 commit cef6dbe
Show file tree
Hide file tree
Showing 25 changed files with 1,648 additions and 558 deletions.
9 changes: 6 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ broadcaster:
query_limit: 10

verifier:
verification_keys_paths:
sha1: "./verification_key.json"
sha256: "./verification_key.json"
verification_key_path: "./verification_key.json"
allowed_age: 18
allowed_citizenships: ["UKR"]

root_verifier:
rpc: evm_rpc_url
contract: registration_contract_address
request_timeout: 10s
6 changes: 5 additions & 1 deletion docs/spec/components/schemas/Airdrop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ allOf:
type: object
required:
- address
- nullifier
- status
- amount
- tx_hash
- created_at
- updated_at
properties:
address:
type: string
description: Destination address for the airdrop
example: "rarimo1qlyq3ej7j7rrkw6sluz658pzne88ymf66vjcap"
nullifier:
type: string
description: User nullifier
example: "48274927346589028382136333339484890005759403737728382873187445992373311929001"
status:
type: string
description: Status of the airdrop transaction
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/components/schemas/AirdropKey.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ required:
properties:
id:
type: string
description: User nullifier
example: "0x04a32216f2425dc7343031352de3d62a7b0d3b4bf7a66d6c8c2aa8c9f4f2632b"
description: Airdrop UUID
example: "4bf0b086-decf-4ffb-8d30-7c28665adef9"
type:
type: string
enum: [ airdrop ]
5 changes: 0 additions & 5 deletions docs/spec/components/schemas/CreateAirdrop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@ allOf:
type: object
required:
- address
- algorithm
- zk_proof
properties:
address:
type: string
description: Destination address for the airdrop
example: "rarimo1qlyq3ej7j7rrkw6sluz658pzne88ymf66vjcap"
algorithm:
type: string
description: Signing algorithm used in proof. The value from passport document SOD is assumed.
example: "sha256_ecdsa"
zk_proof:
type: string
format: types.ZKProof
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ get:
- Airdrop
summary: Get an airdrop
description: Get an airdrop for unique user.
operationId: createAirdrop
operationId: getAirdrop
parameters:
- in: path
name: id
name: nullifier
description: User nullifier
required: true
schema:
type: string
example: "0x04a32216f2425dc7343031352de3d62a7b0d3b4bf7a66d6c8c2aa8c9f4f2632b"
example: "48274927346589028382136333339484890005759403737728382873187445992373311929001"
responses:
200:
content:
Expand Down
49 changes: 25 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ module github.com/rarimo/airdrop-svc
go 1.22

require (
github.com/Masterminds/squirrel v1.4.0
github.com/Masterminds/squirrel v1.5.4
github.com/alecthomas/kingpin v2.2.6+incompatible
github.com/cosmos/cosmos-sdk v0.46.12
github.com/decred/dcrd/bech32 v1.1.3
github.com/ethereum/go-ethereum v1.13.11
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/iden3/go-rapidsnark/types v0.0.3
github.com/iden3/go-rapidsnark/verifier v0.0.5
github.com/rarimo/rarimo-core v0.0.0-20231004143803-6b209428ecbf
github.com/rarimo/zkverifier-kit v0.2.0
github.com/rubenv/sql-migrate v1.6.1
gitlab.com/distributed_lab/ape v1.7.1
gitlab.com/distributed_lab/figure/v3 v3.1.3
gitlab.com/distributed_lab/kit v1.11.2
gitlab.com/distributed_lab/figure/v3 v3.1.4
gitlab.com/distributed_lab/kit v1.11.3
gitlab.com/distributed_lab/logan v3.8.1+incompatible
gitlab.com/distributed_lab/running v0.0.0-20200706131153-4af0e83eb96c
gitlab.com/distributed_lab/running v1.6.0
google.golang.org/grpc v1.59.0
)

Expand All @@ -34,14 +33,15 @@ require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd v0.23.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/confio/ics23/go v0.9.0 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
Expand All @@ -59,12 +59,12 @@ require (
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/raven-go v0.2.0 // indirect
github.com/getsentry/sentry-go v0.26.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand All @@ -85,21 +85,22 @@ require (
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/iden3/go-iden3-crypto v0.0.15 // indirect
github.com/iden3/go-rapidsnark/verifier v0.0.5 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/jmoiron/sqlx v1.2.0 // indirect
github.com/jmoiron/sqlx v1.3.5 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
Expand Down Expand Up @@ -127,10 +128,10 @@ require (
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.18.2 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/btcd v0.1.1 // indirect
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
Expand All @@ -142,17 +143,17 @@ require (
github.com/zondax/ledger-go v0.14.1 // indirect
gitlab.com/distributed_lab/figure v2.1.2+incompatible // indirect
gitlab.com/distributed_lab/lorem v0.2.1 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
Expand Down
Loading

0 comments on commit cef6dbe

Please sign in to comment.