Skip to content
DAOstack JavaScript Client
TypeScript Shell
Branch: master
Clone or download
Latest commit 6141b37 Sep 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documentation Subscription control (#296) Sep 10, 2019
scripts fix tests Dec 13, 2018
src version 0.2.7 Sep 10, 2019
test remove cache test Sep 11, 2019
tools remove some unused deps Mar 15, 2019
.editorconfig start with https://github.com/alexjoverm/typescript-library-starter.git Nov 11, 2018
.eslintrc linting Dec 11, 2018
.gitignore upgrade subgraph to 23 Jun 27, 2019
.travis.yml clean up .travis file Jul 31, 2019
CONTRIBUTING.md clean up documentation Jul 22, 2019
LICENSE Initial commit Nov 11, 2018
README.md tweak documentation Jul 23, 2019
code-of-conduct.md
codegen.yml version 0.2.7 Sep 10, 2019
docker-compose.yml use latest docker images Jul 30, 2019
package-lock.json version 0.2.7 Sep 10, 2019
package.json version 0.2.7 Sep 10, 2019
release.sh add npm ci to release script (again, sorry) Mar 15, 2019
rollup.config.ts trying to fix rollup Nov 28, 2018
tsconfig.json init Jun 11, 2019
tslint.json lint Dec 11, 2018

README.md

Build Status

DAOstack Client

The DAOStack Client is a nodejs library to work with the DAOstack ecosystem

  • Convenience functions to interact with the DAOstack contracts: create proposals, and vote and stake on them
  • A client library for the DAOstack subgraph - search for daos, proposals

Usage

In your nodejs project run

npm install --save @daostack/client

now you can do:

import { Arc } from '@daostack/client'

// create an Arc instance
const arc = new Arc({
  graphqlHttpProvider: "https://subgraph.daostack.io/subgraphs/name/v23",
  graphqlWsProvider: "wss://ws.subgraph.daostack.io/subgraphs/name/v23",
  web3Provider: `wss://mainnet.infura.io/ws/v3/${YOUR_TOKEN_HERE}`,
  ipfsProvider: {
    "host": "subgraph.daostack.io",
    "port": "443",
    "protocol": "https",
    "api-path": "/ipfs/api/v0/"
  }
})

// get a list of DAOs
arc.daos().subscribe(
  (daos) => console.log(`Here are your DAOS: ${daos}`)
)

More information

You can’t perform that action at this time.