config
This is the method to setup the global variables object on all your mintbase-js packages.
You can set them in three ways:
1. Use the config method (preferred)
If you want to setup on our config method, simply call the method with your config settings in the main file of your project.
This method will work on both server side and client side.
2. Pass the network directly to methods (where applicable).
Most @mintbase-js/data and @mintbase-js/sdk methods will accept network as an optional argument.
3. Use .env files (ex: Next.js, Remix, Express).
These variables will only work server-side due to limitations of process.env on client-side, however depending on what bundler you are using you may be able to set env variables at build time.
To retrieve env keys client-side, you can pass the keys as prop, ex Next.js 12:
Last updated