npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

heix-sdk

v0.11.6

Published

heix sdk for stellar blockchain

Downloads

111

Readme

How to install

Method one:

Using SDK for your coding.

npm i heix-sdk --save

// NOTE: test production environment
const { _SDK } = require('heix-sdk')('production');

// NOTE: test qa environment
const { _SDK } = require('heix-sdk')('qa');

// NOTE: test development environment
const { _SDK } = require('heix-sdk')();

const secret = your_secret_key
const issuerPublic = issuer_public_key
const licence = your_jwt_licence

const sdk = _SDK.init(secret, issuerPublic, licence);

const result = await sdk.RequestAuditedTokenTxn(obj);

HOW to USE these api

Before start

It is welcome to use Heix-sdk. All you need to do is applying JWT token from BTCARD Inc. We will give you instrucation about how to use BA (Blockchain Authentication) to active your public key and join our network.

Please email to us: [email protected]

INIT

const result = await sdk.init(secret, issuerPublic,licence);

TrustAuditedTokenTxn

const obj = {
    token: @string,  // example: 'USDB'
    issue: @string

}
const result = await sdk.TrustAuditedTokenTxn(obj);

RequestAuditedTokenTxn

const obj = {
    total: @number,
    token: @string,
    alloc: [{
        address: @string,,
        amount: @number
    }]
}
const result = await sdk.RequestAuditedTokenTxn(obj);

ApproveAuditedTokenTxn

const result = await sdk.ApproveAuditedTokenTxn(envelope);

SendAuditedTokenTxn

const obj = {
   tokenID: @string,
   amount: @number,
   to: @address,
   docs: @array[] //目前無功能
}
const result = await sdk.SendAuditedTokenTxn(obj);

AuditedDocument

// if one or many issuers are signing one contract.
const issuers = [issuer1 issuer2, ...]
const result = await sdk.AuditedDocument(issuers, docHash, memo);

GetTokenBalance

const obj = {
   address:@string,
   tokenID: @string,
   licence:@jwt
}
const result = await sdk.GetTokenBalance(address:@string, tokenID: @string,licence:@jwt);

GetTransationByHash

const obj = {
   hash:@string,
   licence:@jwt
}
const result = await sdk.GetTransationByHash(obj);

DepositTokenTxn

const obj = {
   tokenID:@string,
   amount:@string |@number
   to:@string
}
const result = await sdk.DepositTokenTxn(obj);

SendMultiPayments

const obj = {
    payments:[{
    	token: @string,
        amount: @string,
        destination:@string
    }]
}
const result = await sdk.SendMultiPayments(obj);

Method Two:

Run as a server

npm i heix-sdk --save

// NOTE: test production environment
const { _SERVER } = require('heix-sdk')('production');

// NOTE: test qa environment
const { _SERVER } = require('heix-sdk')('qa');

// NOTE: test development environment
const { _SERVER } = require('heix-sdk')();

const arg = {
    port: 5000,
    issuer: issuer_public_key
}

await _SERVER(arg);

Then, you can use it as RESTful API

TrustAuditedTokenTxn

POST::http://localhost:5000/sdk/TrustAuditedTokenTxn
header: application/json
body:
{
    privateKey: your_secret_key,
    token: asset_name
}

RequestAuditedTokenTxn

POST::http://localhost:5000/sdk/RequestAuditedTokenTxn
header: application/json
body:
{
    privateKey: your_secret_key,
    total 1000,
    token: 'USD',  // your asset code
    alloc: [{
        address: your_public_key,
        amount: 999
    }]
}

ApproveAuditedTokenTxn

POST::http://localhost:5000/sdk/ApproveAuditedTokenTxn
header: application/json
body:
{
    privateKey: your_secret_key,
    envelope: envelope_base64
}

SendAuditedTokenTxn

POST::http://localhost:5000/sdk/SendAuditedTokenTxn
header: application/json
body:
{
   privateKey: your_secret_key,
   tokenID: 'USD',
   amount: 500,
   to: public_key,
   docs: @array[] //目前無功能
}

GetTokenBalance

POST::http://localhost:5000/sdk/GetTokenBalance
header: application/json
body {
   address:@string,
   tokenID: @string
}

GetTransationByHash

POST::http://localhost:5000/sdk/GetTransationByHash
header: application/json
body {
   hash:@string
}

DepositTokenTxn

POST::http://localhost:5000/sdk/DepositTokenTxn
header: application/json
body {
   tokenID: @string,
   amount: @string |@number
   to: @string
}

TradeReatFund

POST::http://localhost:5000/sdk/TradeReatFund
header: application/json
body {
    traderA: @string,
    traderB: @string,
    fund: @string,
    amount: @number
}

How to logging

step1. install filebeat

linux:

cd ~/
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.3.1-linux-x86_64.tar.gz
tar xzvf filebeat-7.3.1-linux-x86_64.tar.gz
cd ~/filebeat-7.3.1-linux-x86_64 

step2. modify filebeat input path in filebeat.yml

    filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

- type: log

  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
      - /YOUR SYSTEM HOME PATH/heix-sdk/sdk.log

step3. modify filebeat output path in filebeat.yml

    # choose elasticsearch or logstash for filebeat output
    #-------------------------- Elasticsearch output ------------------------------
    #output.elasticsearch:
    #   # Array of hosts to connect to.
    #hosts: ["elk.elandfintech.com:9200"]

    #----------------------------- Logstash output --------------------------------
    #output.logstash:
    # The Logstash hosts
    # index: elandfintech
    #hosts: ["elk.elandfintech.com:5044"]

step4. execute filebeat

    ./filebeat -c filebeat.yml -e