setProofApi

You will see some of the APIs with faster suffix, which makes the process faster. It does so by using proof generation api in the backend which can be hosted by anyone.

Ramestta has hosted the proof generation api which can be used by anyone. The API url is - https://proof-generator.ramestta.com/

The setProofApi can be used to set the proof api url.

import { setProofApi } from '@ramestta/ramajs'

setProofApi("https://proof-generator.ramestta.com/");

👉 We recommend to host the proof API by yourself which will give you better performance. The default api provided by Ramestta might have performance issue as it is being used by multiple people.

Here is proof api repo link - https://github.com/Ramestta-Blockchain/proof-generation-api

After you have deployed the api, you can set the api url in rama.js by using setProofApi.

e.g - if you have deployed the proof api and the base url is - https://xyz.com/, then you need to set base url in setProofApi

import { setProofApi } from '@ramestta/ramajs'

setProofApi("https://xyz.com/");

We recommend using faster API's, because some API's particularly where proof is being generated does a lot of RPC calls and it might be very slow with public RPC's.

Last updated