jnordberg
dsteem
TypeScript

Steem blockchain RPC client

Last updated Apr 25, 2026
79
Stars
58
Forks
48
Issues
0
Stars/day
Attention Score
52
Language breakdown
TypeScript 94.9%
JavaScript 4.0%
Makefile 1.2%
Files click to expand
README

dsteem Build Status Coverage Status Package Version

Robust steem blockchain client library that runs in both node.js and the browser.


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


Build Status

Installation


Via npm

For node.js or the browser with browserify or webpack.

npm install dsteem

From cdn or self-hosted script

Grab dist/dsteem.js from a release 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 dsteem@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:

import {Client} from 'dsteem'

const client = new Client('https://api.steemit.com')

for await (const block of client.blockchain.getBlocks()) { console.log(New block, id: ${ block.block_id }) }

With

var dsteem = require('dsteem')

var client = new dsteem.Client('https://api.steemit.com') var key = dsteem.PrivateKey.fromLogin('username', 'password', 'posting')

client.broadcast.vote({ voter: 'username', author: 'almost-digital', permlink: 'dsteem-is-the-best', weight: 10000 }, key).then(function(result){ console.log('Included in block: ' + result.block_num) }, function(error) { console.error(error) })

With ES2016 (node.js 7+):

const {Client} = require('dsteem')

const client = new Client('https://api.steemit.com')

async function main() { const props = await client.database.getChainProperties() console.log(Maximum blocksize consensus: ${ props.maximumblocksize } bytes) client.disconnect() }

main().catch(console.error)

With node.js streams:

var dsteem = require('dsteem')
var es = require('event-stream') // npm install event-stream
var util = require('util')

var client = new dsteem.Client('https://api.steemit.com')

var stream = client.blockchain.getBlockStream()

stream.pipe(es.map(function(block, callback) { callback(null, util.inspect(block, {colors: true, depth: null}) + '\n') })).pipe(process.stdout)

Bundling


The easiest way to bundle dsteem (with browserify, webpack etc.) is to just npm install dsteem and require('dsteem') 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 dsteem and your app might have.

To allow for deduplication you can require('dsteem/lib/index-browser'), or if you plan to provide your own polyfills: require('dsteem/lib/index'). See src/index-browser.ts for a list of polyfills expected.


Share and Enjoy!

© 2026 GitRepoTrend · jnordberg/dsteem · Updated daily from GitHub