Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# API

> API for Interacting with $EDI Token

## Setup

- valid Etherscan.io API Key
- Infura API Key


## Overview

* Exchanges
- Buying
- Selling
* Reporting
- CMC
- Coingecko
* Staking
- Current Status
- Epoch

## Examples

```bash
$ npm install -g @fr8/token
$ edi-ctl --help
```

## License
Apache-2.0
56 changes: 56 additions & 0 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "@fr8/token-api",
"version": "0.1.1",
"description": "",
"scripts": {
"postinstall": "rm -rf ./bundle && npm run bundle && npm run bundlejs",
"bundle": "npm run tsc -- --project tsconfig.bundle.json",
"bundlejs": "./node_modules/browserify/bin/cmd.js -p esmify ./bundle/src/Client.js -o ./bundle/etherscan-api.js -s EtherscanClient",
"exportpkgversion": "node ./scripts/export-version.js",
"pretest": "npm run exportpkgversion",
"preecoverage": "npm run exportpkgversion",
"test": "ava-ts test/ -v",
"coverage": "nyc ava-ts test/ -v",
"posttest": "npm run lint",
"tsc": "./node_modules/typescript/bin/tsc",
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"docs": "typedoc --module etherscan-api --out docs ./src --tsBuildInfoFile ./tsconfig.json",
"prepublish": "tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/freight-trust/editoken-api.git"
},
"keywords": [
"ethereum",
"api",
"eth",
"edi",
"erc20",
"staking"
],
"main": "dist/src/Client.js",
"types": "dist/index.d.ts",
"author": "SEE LICENSE",
"license": "MIT",
"bugs": {
"url": "https://github.com/freight-trust/editoken-api/issues"
},
"homepage": "https://github.com/freight-trust/editoken-api#readme",
"dependencies": {
"isomorphic-fetch": "^2.2.1"
},
"devDependencies": {
"etherscan-api-test-fixtures": "1.0.0",
"ava": "^2.2.0",
"ava-ts": "^0.25.2",
"browserify": "^16.5.0",
"esmify": "^2.1.1",
"nock": "^11.3.2",
"nyc": "^14.1.1",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"typedoc": "^0.15.0",
"typescript": "^3.5.3"
}
}
10 changes: 10 additions & 0 deletions api/scripts/bundler.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { FuseBox } = require('fuse-box');

const fuse = FuseBox.init({
homeDir: '../src',
output: '../bundle/$name.js',
});

fuse.bundle('etherscan-api').instructions(`> Client.ts`);

fuse.run();
6 changes: 6 additions & 0 deletions api/scripts/export-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const pkg = require('../package.json')
const fs = require('fs')
const text = `export const VERSION: string = '${pkg.version}'
`
fs.writeFileSync('./src/version.ts', text, 'utf-8')
console.log(`Version written to version.ts ${pkg.version}`)
Loading