You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hook provides a convenient way of doing custom API calls unrelated to transactions or smart contract queries. By default it will use Elrond API endpoint. But it can be any type of API, not only Elrond API. In that case you would need to pass the `{ baseEndpoint: "https://some-api.com" }` in options
189
+
The hook provides a convenient way of doing custom API calls unrelated to transactions or smart contract queries. By default it will use MultiversX API endpoint. But it can be any type of API, not only MultiversX API. In that case you would need to pass the `{ baseEndpoint: "https://some-api.com" }` in options
@@ -203,9 +203,9 @@ The hook uses `swr` and native `fetch` under the hood.
203
203
204
204
### Working with the API
205
205
206
-
The API endpoint is proxied on the backend side. The only public API endpoint is `/api/elrond`. This is useful when you don't want to show the API endpoint because, for example, you use the paid ones. Also, there is an option to block the `/api/elrond` endpoint to be used only within the Dapp, even previewing it in the browser won't be possible.
206
+
The API endpoint is proxied on the backend side. The only public API endpoint is `/api/multiversx`. This is useful when you don't want to show the API endpoint because, for example, you use the paid ones. Also, there is an option to block the `/api/multiversx` endpoint to be used only within the Dapp, even previewing it in the browser won't be possible.
207
207
208
-
You can use `API_ALLOWED_DAPP_HOST` in the .env file to enable `/api/elrond` restrictions. If you don't want to restrict it, you can remove that variable.
208
+
You can use `API_ALLOWED_DAPP_HOST` in the .env file to enable `/api/multiversx` restrictions. If you don't want to restrict it, you can remove that variable.
209
209
210
210
In the `middleware.ts`, you'll find the logic for the API restrictions. And in the `next.config.js`, you'll find the configuration for rewrites of the API.
211
211
@@ -224,12 +224,12 @@ Here are all variables:
224
224
# Public variables (exposed on the frontend)
225
225
# =============================================
226
226
227
-
#Elrond chain (can be devnet, testnet, mainnet)
228
-
NEXT_PUBLIC_ELROND_CHAIN = devnet
227
+
#MultiversX chain (can be devnet, testnet, mainnet)
228
+
NEXT_PUBLIC_MULTIVERSX_CHAIN = devnet
229
229
230
230
# This is the masked/proxied public API endpoint
231
231
# only current instance of the Dapp can use it if only API_ALLOWED_DAPP_HOST is set
All variables which start with `NEXT_PUBLIC_` will be readable on the frontend side of the dapp. So please don't use them for any secret keys and data. If you need something to be available only on the backend side, don't use the `NEXT_PUBLIC_` prefix.
274
274
275
-
You can set up the chain type here. Use `NEXT_PUBLIC_ELROND_CHAIN` to set devnet, testnet or mainnet.
275
+
You can set up the chain type here. Use `NEXT_PUBLIC_MULTIVERSX_CHAIN` to set devnet, testnet or mainnet.
276
276
277
277
Each hosting provider will have a different way of doing that. We will take a look at how Netlify is doing that below.
278
278
@@ -306,12 +306,12 @@ If you would like to test other templates:
306
306
Dapps using it (send the links if you used it, use issues here on GitHub):
0 commit comments