New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

striim-sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

striim-sdk

Javascript SDK for using hubii striim APIs

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

HUBII STRIIM SDK

About the SDK

This is a javascript library that wraps the hubii striim APIs making them easier to get started with.

About striim

striim is hubii's scaling solution for the Ethereum block chain. It is a hybrid centralized/decentralized solution that enables instant (micro-) payments, trading and trustless settlements.

About hubii

See www.hubii.com for more information.

Prerequisites

  • To use this software you need a modern version of NodeJS and NPM. We recommend having the current LTS version (v8.x) installed, or later, and updating NPM to the latest available version.
  • You will also need an API key for access to hubii's APIs.

Installation

To install the SDK into your project, simply run:

npm install striim-sdk

Usage

Create a provider to gain access to the low-level SDK:


    const striim = require('striim-sdk');

    const provider = new striim.StriimProvider(striim_base_url, striim_app_id, striim_app_secret);

The provider can be used to gain access to the API resources, such as a wallet's balance:


    const striim = require('striim-sdk');
    const provider = new striim.StriimProvider(striim_base_url, striim_app_id, striim_app_secret);

    // Logs all assets of the specified wallet to the console
    provider.getStriimBalances(wallet_address).then(console.log);

To do make more advanced workflows as easy as possible there is also a higher level SDK, e.g.: the Wallet class and the Payment class. In this example we create a payment, sign it and register it with the API:


    const striim = require('striim-sdk');
    const provider = new striim.StriimProvider(striim_base_url, striim_app_id, striim_app_secret);

    // Creates a new Payment, providing essential inputs such as the amount,
    // the currency, the sender, and the recipient.
    const monetaryAmount = new striim.MonetaryAmount(amount, erc20_token_address);
    const payment = new striim.Payment(provider, monetaryAmount, wallet_address, recipient_address);

    // Signs the payment with the private key belonging to your wallet_address.
    payment.sign(private_key);

    // Sends the signed payment to the API for registration and execution and
    // logs the API response to the console.
    payment.register().then(console.log);

Reference manual

Keywords

FAQs

Package last updated on 14 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc