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 - Copy the values from
.env.sample
into your.env
and fill in the values - Repeat for the Docker ENV files
/envs/dev.env
and/envs/prod.env
- 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
See OpenAPI documentation at /docs
for more details (only available when NODE_ENV
is development
). The following is an overview of how the routes are used together.
- Get various info for the frontend from
/chains/*
like supported chains, tokens, pool addresses, etc. GET /submit/fee
: get the fees. Use this to determine the total amount for the ERC20 approval. The approval must be completed before submitting the transaction or the transfer will fail.POST /submit
: submit will initiate the Kima Transaction and return a transaction id that can be used to monitor the status of the transactionGET /tx/{txId}/status
: use the transaction id from submit to get the transaction status
If enabled by suppling the COMPLIANCE_URL
environment variable, this route will check if an address meets compliance requirements- is not sanctioned, blocked, etc.
Use this in the frontend to notify the user an address is not compliant BEFORE doing the ERC20 approval. When compliance is enabled, the /submit
endpoint will return status 403
(Forbidden) if an address is not compliant.
Returns the KYC status for a specific uuid
verification session. You can use GET /uuid
to get a new uuid
.