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}}
Request PASETO for the user who accepted the EULA by signing it with flow ID, i.e. flowid+EULA.
Parameter
Type
Description
flowId
string
Required . flowId you got from flowId API
signature
string
Required . signature obtained by signing flowId+EULA
Get profile details of user present in the system.
Note - Some unset data is emitted.
Updates profile data like name, profile picture URL, etc.
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
Successfully complete role claim by sending signature which is obtained from signing eula+flowId which was returned from roleId API (aka Request role)
Parameter
Type
flowId
Required . string
signature
Required . string
Delegate review creation to other voter
POST /delegateReviewCreation
Parameter
Type
voter
Required . string
MetaDataUri
Required . string
Parameter
Type
feedback
Required . string
rating
Required . int
ranging from 1 to 5
Code
Meaning
4011
Token expired
Set APTOS_PV
for cli