🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@lum-network/sdk-javascript

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lum-network/sdk-javascript

Javascript SDK library for NodeJS and Web browsers to interact with the Lum Network.

Source
npmnpm
Version
0.4.1
Version published
Weekly downloads
44
780%
Maintainers
1
Weekly downloads
 
Created
Source

Lum Network - Javascript SDK

npm version License

This Javascript SDK enables browsers and NodeJS clients to interact with the Lum Network.

SDK Usage

Node version

The library is tested using NodeJS 10.x, 12.x, 14.x, 15.x.

It should also work in all recent browsers.

Installation

yarn add @lum-network/sdk-javascript

Documentation

The SDK code should be documented enough for developers to explore and use it easily. Therefore the documentation might not cover all the capabilities of the SDK. Feel free to contribute if you wish to improve the code documentation and/or the provided samples.

The Documentation contains:

  • Installation instructions
  • Basic usage
  • Code samples
  • Code auto-generated documentation

SDK Features

This SDK provides an easy access to all the available Lum Network blockchain RPCs as well as the payload generation and the cryptographic features to properly consume those RPCs.

Most commonly used features:

  • Core cryptographic tools:
    • Seed, private key and encrypted mnemonic generation
    • Private and public keys management
    • Transaction payload generation
    • Transaction signature and verification
  • Wallets:
    • Unlock wallets from private keys, keystore and mnemonic
    • Sign transaction using unlocked wallets
  • Client service:
    • Connection to a blockchain node (http and socket mode)
    • Commonly used Tendermint and Cosmos RPCs
    • All Lum Network dedicated RPCs
    • Transaction broadcast
  • Transactions
    • Payload generation
    • Signature
  • Messages & Types:
    • Cosmos & Lum messages payload building
    • Typescript implementation of RPCs requests and responses
  • Other utils:
    • Encoding data from/to: Uint8Array, base64 and hex
    • Build Transaction search queries
    • Log & event parsing

Code structure

The SDK is based on the CosmJS implementation and heavily relies on it.

It is intented to be used standalone, without having to import specific CosmJS packages which can get make implementations tricky and messy.

Therefore all codecs, types, functions are features from the CosmJS SDK are either re-implemented by this SDK or re-exported for simplicity purposes.

Directly importing the CosmJS SDK or other cryptographic library should be considered bad practice for most use cases.

Do not hesitate to contribute to this repository. This SDK is intended to be a one-stop-shop for all Lum Network javascript implementations and should definitely be improved over time by all its users.

Contributing

Contributions are most welcome.

Please test your changes with a local client and add unit tests coverage for your code before submission.

FAQs

Package last updated on 18 May 2021

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