Categorygithub.com/NetSepio/gateway
modulepackage
0.0.13-alpha
Repository: https://github.com/netsepio/gateway.git
Documentation: pkg.go.dev

# README

NETSEPIO Engine

REST APIs for Web3 Auth and Smart Contract Functionalities

.github/workflows/test.yml Lint

Getting Started

Postgres for development

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

Steps to get started

  • 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

API Reference

Auth

For protected APIs use PASETO token which can be obtained after calling authenticate API.

Use Authorization key in header in order to send token

APIs

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.

  POST /authenticate
ParameterTypeDescription
flowIdstringRequired. flowId you got from flowId API
signaturestringRequired. signature obtained by signing flowId+EULA

Get profile details of user present in the system.

Note - Some unset data is emitted.

  GET /profile

Updates profile data like name, profile picture URL, etc.

  PATCH /profile
ParameterType
namestring
countrystring
profilePictureUrlstring

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
ParameterType
flowIdRequired. string
signatureRequired. string

Delegate review creation to other voter

  POST /delegateReviewCreation
ParameterType
voterRequired. string
MetaDataUriRequired. string
  POST /feedback
ParameterType
feedbackRequired. string
ratingRequired. int ranging from 0 to 5

Custom status codes

CodeMeaning
4011Token expired

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author