Socket
Book a DemoInstallSign in
Socket

@ardier16/q-js-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ardier16/q-js-sdk

Typescript Library to interact with Q System Contracts

1.4.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

Q Javascript SDK

prepare

Install package as dependency

npm install --save @q-dev/q-js-sdk

using

Instantiation of ContractRegistry:

const contractRegistry = new ContractRegistryInstance(web3)

Retrieving SDK version:

import { Web3Adapter, Web3Factory, Web3 } from '@q-dev/q-js-sdk'
const web3 = Web3Factory.createFromMnemonic('your-rpc-Url', 'mnemonic')
const adapter = new Web3Adapter(web3)
const SDKVersion = adapter.SDK_VERSION

Obtaining of system-contracts instances:

const validators = await contractRegistry.validators()

Read access:

const longList = await validators.getLongList()

Write access:

await validators.commitStake({from: 'user-address', value: 'amount-for-commit'})

Full SDK api reference versions

  • latest
  • devnet
  • testnet

external documentations

Keywords

Q

FAQs

Package last updated on 14 Oct 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.