Questions tagged [javascript]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
7 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
14 views

how to put use require and iota/core in the html client

How could I go about using iota/core library in the client side to send transactions? I tried to use browserify but got error Unexpected character '�' (1:0) while parsing /node_modules/opencv4nodejs/...
0
votes
0answers
25 views

How to get a list of transactions related to an an address using js?

I'm experimenting with the iota js library from github and trying to find a way to list all transactions related to an address. Specifically I want the amount of iota sent/received and the time of ...
0
votes
0answers
10 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 ...
0
votes
0answers
63 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
56 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
1answer
62 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
37 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
84 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
281 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
58 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
37 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
80 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
96 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
174 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
34 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
59 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
69 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
110 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
42 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....
4
votes
1answer
417 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
249 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
99 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
60 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
67 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
534 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'...