Skip to content

WhyNotSwitch/m3tering-arweave-gateway-interface

 
 

Repository files navigation

M3tering Arweave Gateway Interface

This project is a GraphQL interface for interacting with M3tering Protocol meter data. It integrates with Arweave and MongoDB to manage and query meter data efficiently.

Prerequisites

Before setting up the project, ensure you have the following installed:

  • Node.js (v16 or later)
  • npm (comes with Node.js)
  • MongoDB (running instance)
  • An Arweave Gateway URL

Setup Instructions

  1. Clone the Repository:

    git clone <repository-url>
    cd m3tering-arweave-gateway-interface
  2. Install Dependencies: Install the required dependencies using npm:

    npm install
  3. Configure Environment Variables: Create a .env file in the root directory by copying the provided .env.example file:

    cp .env.example .env

    Update the .env file with your Arweave Gateway URL and MongoDB URI and other variables.

  4. Compile the TypeScript Code: Compile the TypeScript code into JavaScript:

    npm run compile
  5. Run the Application: Start the application:

    npm start

    Alternatively, for development with hot-reloading:

    npm run dev
  6. Access the GraphQL Interface: Once the application is running, you can access the GraphQL interface at:

    http://localhost:5000/graphql
    

Key Environment Variables

  • ARWEAVE_GATEWAY_URL: The URL of the Arweave gateway to interact with.
  • MONGODB_URI: The connection string for your MongoDB instance.
  • GNOSIS_MAINNET_RPC
  • ETH_MAINNET_RPC
  • PORT

License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.5%
  • JavaScript 1.5%