REST APIs for Web3 Auth and Smart Contract Functionalities
docker run --name="netsepio" --rm -d -p 5432:5432 \
-e POSTGRES_PASSWORD=netsepio \
-e POSTGRES_USER=netsepio \
-e POSTGRES_DB=netsepio \
postgres -c log_statement=all
- Run
go get ./...
to install dependencies - Set up env variables or create
.env
file as per.env-sample
file - Run
go test ./...
to make sure setup is working - Run
go run main.go
to start server
For protected APIs use PASETO token which can be obtained after calling authenticate API.
Use Authorization
key in header in order to send token
Returns flow ID and EULA which should be signed and send to authenticate API in order to get the PASETO which can be used for accessing all other APIs
GET /flowid?walletAddress={{wallet address}}
POST /authenticate
Parameter | Type | Description |
---|---|---|
flowId |
string |
Required. flowId you got from flowId API |
signature |
string |
Required. signature obtained by signing flowId+EULA |
Note - Some unset data is emitted.
GET /profile
PATCH /profile
Parameter | Type |
---|---|
name |
string |
country |
string |
profilePictureUrl |
string |
Returns flow ID and Eula which should be signed and passed to claim Role in order to successful verification and claim of role
GET /roleId/{{roleId}}
Successfully complete role claim by sending signature which is obtained from signing eula+flowId which was returned from roleId API (aka Request role)
POST /claimrole
Parameter | Type |
---|---|
flowId |
Required. string |
signature |
Required. string |
POST /delegateReviewCreation
Parameter | Type |
---|---|
voter |
Required. string |
MetaDataUri |
Required. string |
POST /feedback
Parameter | Type |
---|---|
feedback |
Required. string |
rating |
Required. int ranging from 1 to 5 |
Code | Meaning |
---|---|
4011 |
Token expired |
Set APTOS_PV
for cli