Coder Social home page Coder Social logo

casperdash-api's Introduction

API

Install

cd YOUR_WORKING_DIRECTORY/casperdash-api
npm install

Usage

npm start     //mainnet
npm run dev   //testnet

Tokens/RPC configuration

The default ERC20 token, NFT(cep47) or node rpc addresses can be configurable at

YOUR_WORKING_DIRECTORY/casperdash-api/config/testnet
YOUR_WORKING_DIRECTORY/casperdash-api/config/mainet
Configuration sample
  • ERC20
    // ERC20 token contract hash
    '6fe7d28174ae5946d1f805f38a7cb546842897b33f0220840f0638d156673e97';
  • NFT
    // Contract hash is key
    '6cdf5a5e23eedb6b79cfe52d16fa07cbdece9516b13dde03e6c28b288d5c3a7c': {
    	name: 'CaskCollectibleToken', // token name
    	symbol: 'CTT', // token symbol
    	namedKeys: {
    		// all named keys that you want to get should be list
    		metadata: {
    			// metadata named key
    			attributes: [
    				// list attributes which you want to massage before return to client
    				{ key: 'bg', name: 'Background' },
    				{ key: 'description', name: 'Description' },
    				{ key: 'distillery', name: 'Distillery' },
    
    			],
    		},
    		commissions: {
    			attributes: [
    				{ key: 'mcask_account', name: 'Metacask Account' },
    				{ key: 'mcask_rate', name: 'Commission Rate' },
    			],
    		},
    	},
    },
  • RPC javascript const RPC_CONFIG = [ { country: 'Singapore', ip: '134.209.110.11' }, { country: 'Singapore', ip: '68.183.226.35' }, ];

Document

Check document at http://localhost:3001/api-docs after running

Workflow and contributions

https://github.com/CasperDash/casperdash-client/wiki/Development-Workflow

License

MIT

casperdash-api's People

Contributors

djhahe avatar gaupoit avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

casperdash-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.