
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
This project is a library (wrapper around IOTA) ot integrate with FIWARE.
FIWARE is an open source initiative defining a universal set of standards for context data management which facilitate the development of Smart Solutions for different domains such as Smart Cities, Smart Industry, Smart Agrifood, and Smart Energy. IOTA is an open-source distributed ledger that is being built to power the future of the Internet of Things with feeless microtransactions and data integrity for machines. This library is an intial library(wrapper around IOTA libs) to support FIWARE Ecosystem.
npm install --save iota-lib
get the url of the provider Returns: string - endpoint of the provider
get the url of Tcp provider (zmq endpoint) Returns: string- endpoint of the provider
set a new provider instead default
https://nodes.devnet.thetangle.org:443
set TcpProvider instead default (zmq endpoint)
tcp://zmq.devnet.iota.org:5556
get the information about the node Returns: Promise - callback with Object, Object if any
Create MaM transaction Returns: Promise - callback with Object, Object if any
| Param | Type | Default | Description |
|---|---|---|---|
| data | string | data to be submitted in iota | |
| [options] | object | { mode : public } | (optional) for restricted options = {mode: restricted, secret: value} |
Fetch MaM transaction Returns: Promise - callback with Object, Object if any
| Param | Type | Description |
|---|---|---|
| hash | string | hash to be fetched |
| mode | string | mode could be either public or restricted |
| secret | string | secret of the data in case of restricted mode only |
Create a transaction
Returns: Promise - callback with Object, Object if any
| Param | Type | Description |
|---|---|---|
| address | string | address of the user |
| seed | string | seed belong to the address to create transaction |
| message | string | value to be put in transation |
| tag | string | (optional) tag |
fetch transactions belongs to specific address
Returns: Promise - callback with Object, Object if any
| Param | Type | Description |
|---|---|---|
| address | string | address of the user |
status of the transactions
Returns: Promise - callback with Object, Object if any
| Param | Type | Description |
|---|---|---|
| transactions | Array | transaction Hash |
confirm of the transaction mannually (if any conflict)
Returns: Promise - callback with Object, Object if any
| Param | Type | Description |
|---|---|---|
| transactions | Array | transaction Hash |
Create a new seed
Returns: string - generated seed
Create a new address
Returns: Promise - callback with Object, Object if any
| Param | Type | Default | Description |
|---|---|---|---|
| seed | string | seed to be use to create a new account | |
| [options] | Object | {index: 0, security: 2} | (optional) options, same address will be derived if seed, index and secuity is same |
get balance of the account
Returns: Promise - callback with Object, Object if any
| Param | Type | Description |
|---|---|---|
| address | string | address |
sort transaction messages
Returns: Array - sorted transactions
| Param | Type | Description |
|---|---|---|
| transaction | Array | transactions |
decode encoded message
Returns: string - decoded message
| Param | Type | Description |
|---|---|---|
| encodedMessage | string | encoded Message |
encode decoded message
Returns: string - encoded message
| Param | Type | Description |
|---|---|---|
| decodedMessage | string | decoded Message |
set of possible operations:
import { getNodeInfo } from "iota-lib";
getNodeInfo()
.then(res => {
console.log(`res is${JSON.stringify(res)}`);
})
.catch(err => {
console.log(`err${JSON.stringify(err)}`);
});
create of an account followed up with 2 steps: 1. create a new seed (you can also skip this step by using your existing seed) 2. calling a create new account function
import { generateSeed, createNewAddress } from "iota-lib";
//generate a new seed
const seed = generateSeed();
//create a new account
createNewAddress(seed)
.then(res => {
console.log(`address is:${res}`);
})
.catch(err => {
console.log(`err is:${err}`);
});
create of an account followed up with 2 steps: 1. create a new seed (you can also skip this step by using your existing seed) 2. calling a create new account function
import { generateSeed, createNewAddress } from "iota-lib";
//generate a new seed
const seed = generateSeed();
//create a new account
createNewAddress(seed)
.then(res => {
console.log(`address is:${res}`);
})
.catch(err => {
console.log(`err is:${err}`);
});
import { fetchTransaction } from "iota-lib";
fetchTransaction("HEQLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWOR99D")
.then(res => {
console.log(`response is :${JSON.stringify(res)}`);
})
.catch(err => {
console.log(`err is :${JSON.stringify(err)}`);
});
import { statusTransaction } from "iota-lib";
statusTransaction(["VDEVCBMSEUTOJNWSBCRQHJWAWXZCTFYUGFZXEPCFUVXQHEPQNL9I9BMMVFTUFTDEPRHRGPAIRAOVKQ999"])
.then(res => {
console.log(`response is :${JSON.stringify(res)}`);
})
.catch(err => {
console.log(`err is :${JSON.stringify(err)}`);
});
import { createMamTransaction } from "iota-lib";
createMamTransaction("test")
.then(re => {
console.log(`re is${JSON.stringify(re)}`);
})
.catch(er => {
console.log(`er is${JSON.stringify(er)}`);
});
import { createMamTransaction } from "iota-lib";
createMamTransaction("test", { mode: "restricted", secret: "1234" })
.then(re => {
console.log(`re is${JSON.stringify(re)}`);
})
.catch(er => {
console.log(`er is${JSON.stringify(er)}`);
});
import { fetchMamTransaction, decodeMessage } from "iota-lib";
fetchMamTransaction(
"9QBGGEEYGPNRZ9NQYBIVBNRJVPXWJUFHTKSRHOJZTNNKOBPBWGSXD9QRABWFDNP9VDOCRVHEIDPOWIUWC",
"public",
null,
res => {
const msg = decodeMessage(res);
console.log(`message${msg}`);
}
);
import { fetchMamTransaction, decodeMessage } from "iota-lib";
fetchMamTransaction(
"QQUTOYQDKWGEOSNDERIUTLNFJLKXKPGMZVDJJJNPMSXSIYHJDUUMZUEI9GGQSFQJD9GRVGCMNDDATPWDN",
"restricted",
"DONTSHARETHIS",
res => {
const msg = decodeMessage(res);
console.log(`message${msg}`);
}
);
MIT © 2020 FIWARE Foundation e.V.
FAQs
fiware iota connector
We found that iota-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.