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

exonum-bundle-client

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exonum-bundle-client

Bundle client

  • 0.3.2
  • Source
  • npm
  • Socket score

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

Bundle client

npm version

Install exonum-bundle-client package into your project.

npm install exonum-bundle-client

To include in Node.JS:

var ExonumBundle = require('exonum-bundle-client')

To use in browser:

<script src="node_modules/exonum-bundle-client/dist/exonum-bundle-client.js"></script>

API

Validate hexadecimal string

ExonumBundle.validateHexadecimal(hash, bytes)
ArgumentDescriptionType
hashHash as hexadecimal string.String
bytesExpected length in bytes. Optional, 32 by default.Number

Returns boolean.

Validate Bitcoin address

ExonumBundle.validateBTCAddress(address, networkType)
ArgumentDescriptionType
addressBitcoin address as string.String
networkTypeprod, testnet or both. Optional, prod by default.String

Returns boolean.

Validate Ethereum address

ExonumBundle.validateETHAddress(address)
ArgumentDescriptionType
addressEthereum address as string.String

Returns boolean.

Generate mnemonic phrase

ExonumBundle.generateMnemonic()

Returns String.

Generate a new random signing key pair

ExonumBundle.generateKeyPair(passphrase, password)
ArgumentDescriptionType
passphraseMnemonic phrase as string.String
passwordPassword as string.String

Returns promise.

Fulfilled response:

{
  "publicKey": "...",
  "secretKey": "..."
}

Register a new user

ExonumBundle.addUser(apiRoot, keyPair, BTCAddress, ETHAddress)
ArgumentDescriptionType
apiRootRoot URL for node public API.String
keyPairSigning key pair.Object
BTCAddressBitcoin address as string.String
ETHAddressEthereum address as string.String

Returns promise.

Fulfilled response:

{
  "tx_hash": "..."
}

Transfer tokens

ExonumBundle.transfer(apiRoot, keyPair, to, amount)
ArgumentDescriptionType
apiRootRoot URL for node public API.String
keyPairSigning key pair.Object
toReceiver's public key as hexadecimal string.String
amountUint64 number as string.String

Returns promise.

Fulfilled response:

{
  "tx_hash": "..."
}

Get user refund addresses

ExonumBundle.getWithdraw(apiRoot, publicKey)
ArgumentDescriptionType
apiRootRoot URL for node public API.String
publicKeyPublic key as hexadecimal string.String

Returns promise.

Fulfilled response:

{
  "btc_address": "...",
  "eth_address": "...",
  "pub_key": "..."
}

Get user balances and investment addresses

ExonumBundle.getShare(apiRoot, publicKey)
ArgumentDescriptionType
apiRootRoot URL for node public API.String
publicKeyPublic key as hexadecimal string.String

Returns promise.

Fulfilled response:

{
  "btc_address": "...",
  "btc_balance": "...",
  "eth_balance": "...",
  "eth_contract_address": "...",
  "pub_key": "..."
}

Get user token balance

ExonumBundle.getDetail(apiRoot, publicKey)
ArgumentDescriptionType
apiRootRoot URL for node public API.String
publicKeyPublic key as hexadecimal string.String

Returns promise.

Fulfilled response:

{
  "balance": "...",
  "history_hash": "...",
  "history_len": "...",
  "pub_key": "..."
}

Get wallet and transactions as cryptographic proof

ExonumBundle.getHistory(apiRoot, publicKey)
ArgumentDescriptionType
apiRootRoot URL for node public API.String
publicKeyPublic key as hexadecimal string.String

Returns promise.

Fulfilled response:

{
  "wallet": {
    "balance": "...",
    "history_hash": "...",
    "history_len": "...",
    "pub_key": "..."
  },
  "history": [
    {
      "body": {
        "btc_address": "...",
        "eth_address": "...",
        "pub_key": "..."
      },
      "message_id": 10,
      "network_id": 0,
      "protocol_version": 0,
      "service_id": 128,
      "signature": "..."
    }
  ]
}

FAQs

Package last updated on 06 Mar 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