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

@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

  • 1.0.0-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by447.37%
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 signle or multiple transactions with the same address

Creates a bunlde 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 single or multiple transactions with the same address
[entry.length]number1Entry length, which indicates how many transactions in the bundle will occupy
[entry.address]stringAddress, defaults to all-9s
[entry.value]number0Value to transfer in IOTAs
[entry.signatureMessageFragments]Array.<string>Array of signature message fragments trytes, 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)

Creates a bunlde with given transaction entries

Returns: Array.<Transaction> - Bundle

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

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

Adds a list of trytes in the bundle starting at offset

Returns: Array.<Transaction> - Transactions of finalized bundle

bundle~finalizeBundle(transactions)

ParamTypeDescription
transactionsArray.<Transaction>Transactions in the bundle

Finalizes the bundle by calculating the bundle hash

Returns: Array.<Transaction> - Transactions of finalized bundle

Keywords

FAQs

Package last updated on 18 Aug 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