{"repo":"openhive-network/dhive","free":true,"listed":false,"github":"https://github.com/openhive-network/dhive","clone":"git clone https://github.com/openhive-network/dhive.git","description":"dhive library - mirror of https://gitlab.syncad.com/hive/dhive","language":"TypeScript","stars":13,"topics":["dhive","hive","blockchain","cryptocurrency","javascript","typescript"],"license":null,"category":"blockchain-web3","readme_excerpt":"dhive Robust hive client library that runs in both node.js and the browser. Needs test net urls, chain id --- note As of version 0.7.0 WebSocket support has been removed. The only transport provided now is HTTP(2). For most users the only change required is to swap wss:// to https:// in the address. If you run your own full node make sure to set the proper CORS headers if you plan to access it from a browser. --- Browser compatibility Installation Via npm For node.js or the browser with browserify or webpack. From cdn or self-hosted script Grab dist/dhive.js from git and include in your html: Or from the unpkg cdn: Make sure to set the version you want when including from the cdn, you can also use dhive@latest but that is not always desirable. See unpkg.com for more information. Usage In the browser See the demo source for an example on how to setup a livereloading TypeScript pipeline with wintersmith and browserify. In node.js With TypeScript: With JavaScript: With ES2016 (node.js 7+): With node.js streams: Bundling The easiest way to bundle dhive (with browserify, webpack etc.) is to just npm install @hiveio/dhive and require('@hiveio/dhive') which will give you well-tested (see browser compatibility matrix above) pre-bundled code guaranteed to JustWork™. However, that is not always desirable since it will not allow your bundler to de-duplicate any shared dependencies dhive and your app might have. To allow for deduplication you can require('@hiveio/dhive/lib/index-browser'","default_branch":null,"files":null,"tree":[],"storefront":"/r/openhive-network","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/openhive-network/dhive/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}