Questions tagged [javascript]
Tag for questions on the javascript library of Iota and related subjects.
34 questions
2
votes
2
answers
48
views
How to calculate the outputId?
How can I calculate the output id with transaction id and output index?
An OutputId is the the concatenation of transactionId+outputIndex where outputIndex needs to be converted to little endian first....
2
votes
1
answer
128
views
Is there a way to sign a transaction?
I would like to create a system whereby a client signs a message to authenticate itself in Shimmer.
What are my options?
1
vote
0
answers
63
views
Can't connect to custom hornet node using nodejs clientbuilder
Have a hornet node set up on AWS, able to access the dashboard and interact with the REST API just fine. However when trying to build a connection to it using nodejs @iota/client ClientBuilder cannot ...
0
votes
1
answer
135
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
2
answers
135
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
1
answer
122
views
How to handle access to wallet.rs Stronghold database in a serverless web app
Excited by the upcoming release of Chrysalis I wanted to start a little web app project using the wallet.rs library. Without going into too many details, users on the site will be able to generate an ...
1
vote
1
answer
172
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 ...
2
votes
1
answer
69
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
1
answer
54
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
2
answers
253
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
1
answer
34
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
0
answers
34
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
0
answers
125
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
1
answer
146
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
2
answers
170
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')
// ...