• Stars
    star
    471
  • Rank 93,216 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Steem.js the official JavaScript library for Steem blockchain

GitHub license Steem.js channel on steemit.chat

Steem.js

Steem.js the JavaScript API for Steem blockchain

Documentation

Here is full documentation: https://github.com/steemit/steem-js/tree/master/doc

Browser

<script src="./steem.min.js"></script>
<script>
steem.api.getAccounts(['ned', 'dan'], function(err, response){
    console.log(err, response);
});
</script>

CDN

https://cdn.jsdelivr.net/npm/steem/dist/steem.min.js

<script src="https://cdn.jsdelivr.net/npm/steem/dist/steem.min.js"></script>

Webpack

Please have a look at the webpack usage example.

Server

Install

$ npm install steem --save

RPC Servers

https://api.steemit.com By Default

Examples

Broadcast Vote

var steem = require('steem');

var wif = steem.auth.toWif(username, password, 'posting');
steem.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) {
	console.log(err, result);
});

Get Accounts

steem.api.getAccounts(['ned', 'dan'], function(err, result) {
	console.log(err, result);
});

Get State

steem.api.getState('/trends/funny', function(err, result) {
	console.log(err, result);
});

Reputation Formatter

var reputation = steem.formatter.reputation(user.reputation);
console.log(reputation);

Steem Testnet

Steem-js requires some configuration to work on the public Steem testnet.

You need to set two Steem API options, address_prefix and chain_id.

steem.api.setOptions({
  address_prefix: 'TST',
  chain_id: '46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32',
  useTestNet: true,
});

The Chain ID could change. If it does, it may not be reflected here, but will be documented on any testnet launch announcements.

Contributions

Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list.

Issues

When you find issues, please report them!

License

MIT

More Repositories

1

steem

The blockchain for Smart Media Tokens (SMTs) and decentralized applications.
C++
1,950
star
2

condenser

The greatest application front-end to the Steem Blockchain.
JavaScript
506
star
3

steem-python

The official Python (3) library for the Steem Blockchain.
Python
154
star
4

devportal

Steem Platform Developer Documentation.
CSS
121
star
5

hivemind

Developer-friendly microservice powering social networks on the Steem blockchain.
Python
73
star
6

devportal-tutorials-js

Tutorials for the Developer Portal
JavaScript
44
star
7

sbds

Steem Blockchain Data Service
Python
37
star
8

smt-whitepaper

Smart Media Tokens whitepaper
TeX
29
star
9

jussi

JSON-RPC 2.0 Reverse Proxy Frontend for Steemit
Python
27
star
10

faucet

Steemit Account Creation Web Application
CSS
22
star
11

steem-uri-spec

steem:// signing spec and reference implementation
TypeScript
14
star
12

wallet

The wallet functionality of condenser
JavaScript
12
star
13

koa-jsonrpc

TypeScript
10
star
14

rcdemo

Python
10
star
15

rpc-auth

JSON-RPC 2.0 request authentication with Steem authorities
TypeScript
9
star
16

devportal-tutorials-py

Python
9
star
17

steem-ruby

Steem-ruby is the official Ruby library for the Steem blockchain
Ruby
9
star
18

lineman

JSON-RPC 2.0 WebSocket to HTTP proxy
TypeScript
8
star
19

tinman

Testnet management scripts
Python
8
star
20

yo

Modular event-driven notification service
Python
7
star
21

whitepaper

Steem Platform Whitepaper 2.0.
Makefile
7
star
22

steemnotify

Lua
6
star
23

libcrypto-js

Cryptographic utilities for Steem in Javascript. Zero dependencies.
JavaScript
5
star
24

redeemer-irredeemables

Makefile
4
star
25

hivemind-ruby

Ruby Object Relational Mapping for Hivemind
Ruby
4
star
26

steemdb

Volt
3
star
27

dbadmin

Admin console for steemit.com's backend database built with activeadmin
Ruby
3
star
28

bluepaper

Steem Bluepaper
Shell
3
star
29

conveyor

Conveyor - Steemit APIs
TypeScript
3
star
30

swift-steem

Steem client library for iOS, macOS and Linux written in Swift
C
3
star
31

irredeemables

General abuse list for filtering from frontends via hivemind
Makefile
2
star
32

simple_steem_client

A minimalist Steem RPC client in Python
Python
2
star
33

steemit-render

TypeScript
2
star
34

smt-wizard

A web based Smart Media Token (SMT) creation wizard.
HTML
2
star
35

hive2elastic

Fork of https://github.com/esteemapp/hive2elastic
Python
1
star
36

steem-docs

1
star
37

sdc-frontend

The nginx frontend proxy server for the sdc app
Shell
1
star
38

steem-deployments

steemit specific deployment scripts
Shell
1
star