Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@signumjs/core

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@signumjs/core

Principal package with functions and models for building Signum Network applications.

  • 1.0.0-rc.75
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
575
decreased by-85.82%
Maintainers
1
Weekly downloads
 
Created
Source

@signumjs/core

Core module to build cool apps for the Signum blockchain platform

Installation

SignumJS can be used with NodeJS or Web. Two formats are available

Using with NodeJS and/or modern web frameworks

Install using npm:

npm install @signumjs/core

or using yarn:

yarn add @signumjs/core
Example
import {composeApi, ApiSettings} from '@signumjs/core'
import {Amount} from '@signumjs/util'

const apiSettings = new ApiSettings('https://testnet.signum.network:6876');
const api = composeApi(apiSettings);

// this self-executing file makes turns this file into a starting point of your app

(async () => {
    try{
        const {balanceNQT} = await api.account.getAccountBalance('13036514135565182944')
        console.log(`Account Balance: ${Amount.fromPlanck(balanceNQT).toString()}`)
    }
        catch(e){ // e is of type HttpError (as part of @signumjs/http)
        console.error(`Whooops, something went wrong: ${e.message}`)
    }
})()

Using in classic <script>

Each package is available as bundled standalone library using IIFE. This way signumJS can be used also within <script>-Tags. This might be useful for Wordpress and/or other PHP applications.

Just import the package using the HTML <script> tag.

<script src='https://cdn.jsdelivr.net/npm/@signumjs/core/dist/signumjs.min.js'></script>

Example
(function(){
    const api = sig$.composeApi({nodeHost: "https://testnet.burstcoin.network:6876"});
    api.network.getBlockchainStatus().then(console.log).catch(console.error);
})()

See more here: @signumjs/core Online Documentation

Keywords

FAQs

Package last updated on 28 Sep 2023

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