Questions tagged [javascript]

Tag for questions on the javascript library of Iota and related subjects.

Filter by
Sorted by
Tagged with
0
votes
1answer
28 views

How to send a data payload of a size 1 MB or greater with MAM and node.js?

I know MAM is deprecated but I am doing some research on MAM. I was able to send and fetch a data payload of size 740 KB. But when I tried to use a data of 1 MB I am getting this issue with node.js ...
0
votes
2answers
31 views

How can i get messages using the index in the node.js client

Thank you in advance. I would like to have a working example using the node.js client of iota, where i give an index to a function and the function returns to me the messages or the message ids. I ...
0
votes
0answers
20 views

Module not found: Can't resolve '../build/Release'

I am trying to use @iota/wallet in a React app but it is failing at compile time with the following error: Failed to compile. ./node_modules/@iota/wallet/lib/index.js Module not found: Can't resolve '...
0
votes
1answer
80 views

How to publish messages using MAM to my private tangle?

I have a private tangle with 2 hornet nodes. I tried MAM using one of the devnet nodes by following the example on the official IOTA webpage. Can someone please tell me how do I publish and fetch ...
0
votes
0answers
14 views

How can one safely manage or transmit the side_key used for encryption in Masked Authenticated Messaging (MAM)?

I know that MAM currently does not provide any safe method for key transmission. But is there any cryptographic algorithm or method which can be used to safely transmit the side_key for MAM? Please ...
2
votes
1answer
47 views

Unable to read transaction from the Tangle

While following the IOTA JavaScript guide, I changed the example node to a main net node - https://nodes.thetangle.org:443 and received the following error message below. How do I get messages from ...
1
vote
1answer
37 views

What's the difference between getNewAddress and generateAddress?

What's the difference between getNewAddress and generateAddress? Don't see the diferences between them.
2
votes
2answers
152 views

Receiving JSON messages from ZMQ feed using an IRI fullnode

I am trying to use ZMQ feeds to monitor IRI nodes and addresses, but I am having trouble obtaining the "Message" in text and/or JSON. I am using this code: let zmq = require('zeromq') let sock = zmq....
1
vote
1answer
18 views

How do I fetch the latest transaction without using Zero MQ stream on a specific address?

When I make a simple request like shown in the iota workshop: https://github.com/iota-community/javascript-iota-workshop - 2.2-fetch-hello.js the newest transaction is not fetched but a random one. ...
0
votes
0answers
19 views

What is an “apiEndpoint” in poc-ipfs config file

In the poc-ipfs app blueprint from IOTA’s GitHub, they have a config file on the client side (link below), one of the parts of the script contains “apiEndpoint”, I do not know what would go there for ...
1
vote
0answers
115 views

How to attach a message multiple times (say 200 times) with the tangle using MAM

What I am trying to do is to attach a payload to the tangle using MAM protocol. If I run this loop for k=5 times it works fine i.e., data is attached to the Tangle. I confirmed that the data is ...
2
votes
1answer
128 views

Transaction is inconsistent. Reason: tails are not consistent

i'm trying to promote a transaction by using the following code const spamTransfer = [{address: '9'.repeat(81), value: 0, message: '', tag: ''}] iota.promoteTransaction(hash, 10, 9, spamTransfer, {...
0
votes
2answers
138 views

toTrytes() does not work

I'm always getting this error without understanding why. TypeError: Cannot read property 'toTrytes' of undefined Code: // Require the use of IOTA library const Iota = require('@iota/core') // ...
0
votes
0answers
44 views

getAccountData returns undefined

it is a few days ago that getAccountData has stopped returning value (returns always undefined). Does any of you know why? This is the code: iota.getAccountData(seed, {start: 0,security: 2}) ...
4
votes
1answer
100 views

Can iota.api.getTransfers() get specific transactions?

According to iota.lib.js documents, iota.api.getInputs(seed, [, options], callback) the getInputs() have a options argument. options object have four members, start, end, security and ...
4
votes
1answer
392 views

IOTA get all transactions for wallet/address programmatically js

I need to listen for a new transactions on testnet submitted by wallet/address programmatically(js). I have tried iota.lib.js, but findTransactionObjects and getAccountData always returns null. Is ...
0
votes
1answer
135 views

Interacting with IOTA from mobile application?

Is it possible to interact with IOTA Tangle (for example, send a message) using an application installed in a mobile phone? If so, is it possible to install IOTA library in a mobile phone? And if yes, ...
3
votes
0answers
45 views

Why do I need to create an IOTA instance to use the library functions?

Let the IOTA node instance be iota variable in the following context: var IOTA=require("./node_modules/iota.lib.js/lib/iota") var iota=new IOTA({ 'provider': 'https://iotanode.us:443'}) If I want to ...
1
vote
1answer
119 views

How do I generate an IOTA address from a given seed in Javascript without making an HTTP(s) requst?

In all of the ways to getNewAddress() we have to call an iri node (reference). But using the seed it is a deterministic algorith, why do I have to use and http request to do that? How do I generate ...
2
votes
1answer
106 views

findTransactionObjects() call returning empty array when searching for tag [duplicate]

With this findTransactionObjects call: iota.api.findTransactionObjects({ tags: [ 'ZARCXARCQCVAZA9BUAZASCVAEXP' ]}, callback) I am getting back an empty array. However, when I search for the tag on ...
3
votes
1answer
268 views

sendTransfer() 'Invalid transaction hash' when running mainnet but fine on testnet

When running a sendTransfer() on a testnet node (https://testnet140.tangle.works) I can attach without any problems. When I try to use a mainnet node (http://nodes.iota.fm:80) I get Invalid ...
2
votes
0answers
38 views

Caching account data

Reading through the documentation for the IOTA Javascript Library I realized the method iota.api.getAccountData can be provided with an starting index: iota.api.getAccountData(seed, {start: 123}, ...
1
vote
1answer
66 views

How to save the bundle trytes to reattach after a snapshot? [closed]

How to save the bundle trytes to reattach it after a snapshot? How to do this using the JavaScript library?
5
votes
1answer
71 views

Why are the first 2 characters of my tag altered?

I used the official javascript library to create and attach a transaction to the tangle, but the first 2 characters of the tag are always changed to some random characters. eg. ...
4
votes
1answer
122 views

Getting error: "Invalid Response: The deployment could not be found"

I'm trying to get account data with the following code: const iota = new IOTA({ 'host': 'https://testnet140.tangle.works', 'port': 443 }); const seed = //my seed iota.api.getAccountData(seed, ...
3
votes
0answers
44 views

I need help recovering my pre-Kerl funds [duplicate]

I think I generated a couple addresses with a pre-Kerl version of the wallet and sent funds from an exchange to them. I did this after the snapshots, so the funds are not frozen by the Foundation, i.e....
5
votes
1answer
429 views

Sample code for promoting a transaction using the official IOTA JS Library?

Is there a sample publicly available, showing how to use the official IOTA S Library to promote a transaction?
4
votes
1answer
252 views

sendTransfer Error: "inconsistent tips pair selected"

I'm trying to send my first zero-value transaction with the javascript library. I took out "attachToTangle" from my ini, but now getting this error: Uncaught Error: Request Error: inconsistent tips ...
6
votes
1answer
104 views

Javascript Transaction object Message versus Tag

What is the difference between the Message and Tag values when creating a new transaction object via the JS library
2
votes
1answer
87 views

How do I convert the nonce into an integer value with the official JS lib?

I tried to use fromTrytes() but the function does not accept trytes with an odd length. The nonce appears to always have an odd length, e.g. EPV9MUTXNFDAFNIQLAZWTOLAFJT.
2
votes
0answers
71 views

Invalid response from server using iota.lib.js

I try the sendTransfer command on my full node. After long time, I get this error: Error: Invalid Response: at Object.invalidResponse (/home/atena/iota/node_modules/iota.lib.js/lib/errors/...
9
votes
1answer
615 views

How to know a transaction is "confirmed"?

I'm building a little IOTA test project with TypeScript + Node.js. I want to start an action when IOTAs are received on an certain address. I've tried the findTransactionObjects function, but I don'...