gearConfiguration

Initial configuration of external libs.

Overview

In this section, we will configure the axios kit and stellar wallet. Everything you need to make it work.

Environment Variables

For this project, we'll use the dev environment. In order to request the API Key, please go to our dApparrow-up-right and request it. You can see this section below as well:

keyRequest API Keychevron-right
NEXT_PUBLIC_API_URL_DEV=https://dev.api.trustlesswork.com
NEXT_PUBLIC_API_KEY=YOU API KEY

Axios Configuration

import axios from "axios";

/**
 *
 * Axios Instance
 * @Reference URL: https://axios-http.com/docs/intro
 *
 */
const http = axios.create({
  baseURL: NEXT_PUBLIC_API_URL_DEV,
  timeout: 60000, // 1 minute
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.NEXT_PUBLIC_API_KEY}`,
  },
});

export default http;

Stellar Wallet Kit Configuration

Last updated