Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
test update test Jul 12, 2019
.eslintrc.js add hash and keypair functions Sep 20, 2018
index.js update lib and add config.js Jul 12, 2019
package-lock.json fix package info Jul 22, 2019
package.json version fix Jul 22, 2019


NPM Version


sebakjs-sdk will introduce the basic usage of SEBAK for javascript.


npm install --save sebak-sdk

Create new transaction


Before creating new transaction, you should check these,

You can simply check 'network id' from SEBAK node information. If the address of your sebak node is '',

$ curl -v
  "policy": {
    "network-id": "sebak-test-network",
    "initial-balance": "10000000000000000000",
    "base-reserve": "1000000",

The value of "network-id", sebak-test-network is the 'network id'.


For the nature of transaction of SEBAK, one Transction can have multple Operations. Operation is the base unit of operating accounts like creating new account and payment. Currently SEBAK supports various kind of operations, but most of users will use CreateAccount and Payment operations. At this time, you can up to 1000 operations in one transaction. This number can be adjusted. This limit also can be checked by node information.


Sending Transation Example

  • This example is working in SEBAK TESTNET.
  • For MAINNET, change apiUrl and networkId.
const fetch = require('isomorphic-fetch');
const SebakSDK = require('sebak-sdk');


// In this example, target address is generated randomly.
const target = SebakSDK.sebakUtil.keyPairGenerate().address;
const amount = 10;
const apiUrl = '';
const networkId = 'sebak-test-network';
const transactionPath = '/api/v1/transactions';
const accountPath = '/api/v1/accounts/';
const apiTransactionUrl = url + transactionPath;
const apiAccountUrl = url + accountPath;

// Before sign the transaction, you should get the sequence_id of sending account.
fetch(apiAccountUrl + SebakSDK.sebakUtil.getPublicAddress(seed))
.then(function(res) {
    if (res.status != 200) {
        return process.exit(1);
    return res.json()
.then(function(json) {
    tx = new SebakSDK.transaction();
    tx.addOperation(target, amount, 'create-account');
    tx.sign(seed, networkId);

        method: 'POST',
        timeout: 3000,
        headers: {
            Accept: 'application/json',
            'Content-Type': 'application/json',
        body: JSON.stringify(tx.tx),
    .then(res => res.json())
    .then(json => console.log(json))
    .catch(err => console.log(err));


  • In SEBAK, like other cryptocurrencies there is 'fee'. 'fee' is multiplied by the number of operations in one transaction.


  • target address must new account, this means, it does not exist in the SEBAK network. You can check the account status thru account API of SEBAK. Please see .
  • amount for creating account must be bigger than base reserve, you can check the amount from SEBAK node information like 'network-id'


  • target address must exist in network.
You can’t perform that action at this time.