Socket
Socket
Sign inDemoInstall

@iota/bundle

Package Overview
Dependencies
Maintainers
5
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iota/bundle

Utilities for generating and signing bundles


Version published
Weekly downloads
58
decreased by-10.77%
Maintainers
5
Weekly downloads
 
Created
Source

@iota/bundle

Utilities for generating and signing bundles. A bundle in IOTA is an atomic set of transactions.

Installation

Install using npm:

npm install @iota/bundle

or using yarn:

yarn add @iota/bundle

API Reference

bundle~createBundle(entries)

ParamTypeDescription
entriesArray.<BundleEntry>Entries of single or multiple transactions with the same address

Creates a bundle with given transaction entries.

Returns: Array.<Transaction> - List of transactions in the bundle

bundle~addEntry(transactions, entry)

ParamTypeDefaultDescription
transactionsArray.<Transaction>List of transactions currently in the bundle
entryobjectEntry of a single or multiple transactions with the same address
[entry.length]number1Entry length, which indicates how many transactions in the bundle it will occupy
[entry.address]HashAddress, defaults to all-9s
[entry.value]number0Value to transfer in iotas
[entry.signatureMessageFragments]Array.<Trytes>List of signature message fragments, defaults to all-9s
[entry.timestamp]numberTransaction timestamp, defaults to Math.floor(Date.now() / 1000)
[entry.tag]stringOptional Tag, defaults to null tag (all-9s)

Adds given transaction entry to a bundle.

Returns: Array.<Transaction> - List of transactions in the updated bundle

bundle~addTrytes(transactions, fragments, [offset])

ParamTypeDefaultDescription
transactionsArray.<Transaction>List of transactions in the bundle
fragmentsArray.<Trytes>List of signature message fragments to add
[offset]number0Optional offset to start appending signature message fragments

Adds signature message fragments to transactions in a bundle starting at offset.

Returns: Array.<Transaction> - List of transactions in the updated bundle

bundle~finalizeBundle(transactions)

ParamTypeDescription
transactionsArray.<Transaction>List of transactions in the bundle

Finalizes a bundle by calculating the bundle hash.

Returns: Array.<Transaction> - List of transactions in the finalized bundle

Keywords

FAQs

Package last updated on 20 Feb 2019

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