iotaledger/iota.rs

How to sign offline in shimmer network

Closed this issue · 6 comments

I want to know how the shimmer network signs offline, what is the data to be signed, and how can I get it, is it the same logic as IOTA? I use js.

@Thoralf-M I have solved the offline signature. There is another problem, how do I get the historical transaction of an address, now there is a way to get the historical transaction, but too many requests will be made, I think this is not a good result, maybe I The method is wrong, can you provide an example?

Is the difference between transactionId and ouputId the last few digits? Can you tell me how the last few digits are calculated? I haven't found the relevant code yet.

With the indexer plugin and node core API you only get the current data, historic transactions will be pruned
For historic data you could use https://github.com/iotaledger/inx-chronicle

The output id consists of transaction id + output index where the output index is an u16 encoded with little endian, I believe you can use https://nodejs.org/api/buffer.html#bufwriteuint16levalue-offset for that

Let's say your transaction id is 0xddc8ebac40623cacfdd9d2f42a3c476c2ba1664b151744a88881efd541ad02da and this transaction has two outputs, then the first one would have output index 0 which gets converted to 0000 and then the output id is 0xddc8ebac40623cacfdd9d2f42a3c476c2ba1664b151744a88881efd541ad02da0000
For the second output it would be 0100, so 0xddc8ebac40623cacfdd9d2f42a3c476c2ba1664b151744a88881efd541ad02da0100

Hi @cao148, do you have more questions? Otherwise we'll close the issue, thanks.

Closing the issue for now. Please reopen or open a new one if you have more questions.