A web server that works as a middleware between Kima Transaction Widget and Kima Chain. Once it receives a transaction request from the frontend (Kima Transaction Widget), it will submit a transaction to Kima Chain using pre-defined wallet's private key and returns transaction id to the frontend. This wallet is called Developer Wallet, and it should have enough KIMA token to pay gas fee.
- Create a
.env
file - Fill in parameters:
PORT=3001 <or any other port> KIMA_BACKEND_MNEMONIC=<developer wallet's mnemonic> KIMA_BACKEND_SECRET=<secret for jwt> KIMA_BACKEND_NODE_PROVIDER=rpc_testnet.kima.finance XPLORISK_URL=<xplorisk lambda function endpoint>
- To run locally:
npm run dev
- Otherwise build the
docker-compose
and run it - Use
docker-compose.yml
for dev,docker-compose-prod.yml
for prod
-
/auth
:The
Kima Transaction Widget
calls this endpoint before it submits a transaction request. ReturnsJWT
as cookie which has 5 seconds of life time. This cookie will be expired after 5 seconds.Kima Transaction Widget
calls second endpoint right after it receivesJWT Auth Token
. -
/submit
:- Validate
JWT Auth Token
which has sent as cookie from the frontend. - Submit a transaction to Kima Chain using
Developer Wallet
. - Return transaction id to the frontend so that it starts monitoring it's status.
- Validate
-
/compliant
:Request parameter
: wallet address to check compliantResponse
:ok
if address is compliant,fail
if address is non-compliant -
/uuid
:Generate
uuid
for FIAT payment session to use depasify API. -
/kyc
:Return kyc status for specific
uuid
of verification session using depasify API.