Skip to content

fiatdao/sdk-i

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIAT SDK

Repository containing an SDK for easier interaction with FIAT

Getting started

Installing

Install the FIAT SDK by running the following command

yarn add @fiatdao/sdk # npm install @fiatdao/sdk

Usage

Instantiating the SDK via an existing provider

const detectEthereumProvider = require('@metamask/detect-provider');
const fiat = await fiat.fromProvider(await detectEthereumProvider());

Instantiating the SDK via private key in a node environment

const fiat = await FIAT.fromPrivateKey(
  process.env.JSON_RPC_ENDPOINT_URL,
  process.env.PRIVATE_KEY
);

Requirements

This repository uses Node.js and Yarn for building and testing.

Set .env

Copy and update contents from .env.example to .env

Tests

After installing dependencies with yarn, run yarn test to run the tests.

Building and testing

git clone https://github.com/fiatdao/sdk
cd fiat
yarn # This installs the project's dependencies.
yarn test