@daostack/client
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-experimental.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @daostack/client

Weekly Downloads

2,131

Version

2.0.0-experimental.2

License

MIT

Unpacked Size

7.33 MB

Total Files

3971

Last publish

Collaborators

  • roienatan
  • daostack-npm