Exploring IOTA #2, retrieve your transaction and create your “wallet”

In this article I show you how to retrieve information from the tangle and clarify how you can prepare your very first own “wallet” / address with your own seed / “password”.

Jan Bertrand
Coinmonks
Published in
10 min readJun 24, 2018

--

In the last article (Exploring IOTA #1) I have shown how to interact via node.js on a cloud Linux instance with the IOTA testnet (now called devnet). Last time we ended with sending zero value transaction to the devnet and were able to find this transaction via a tangle explorer.

In this chapter, we would like to retrieve the transaction we have send and in addition, change the code in order to

  • create your seed (your password to your wallet — if you lose it you lose all your funds connect to this seed/password)
  • create from your seed your addresses
  • get some test tokens (IOTAs)
  • send non-zero value transactions

Discover and review best Crypto wallets

Messages, zero-value transactions, and snapshots

If there is the one thing always mentioned about “blockchains” that they give you the assurance that the data in this ledger can not be tampered with.
This means our transaction which we have send (for me its a couple of days ago) should not have been changed.

That is true for IOTA as well but is only valid for messages within one snapshot. In order to reduce database size on the nodes (reference implementation on a server which participates in the IOTA ledger and which stores all transactions), the historical data gets pruned from time to time — in IOTA they call this a snapshot. In this step, just the correct balances on the addresses are retrieving consensus on the node network and all messages and zero value addresses are wiped out (at least this is my understanding of it).

This step assures that the local node database is reduced in size and the performance increase and the disc requirements reduce. But what happens to my immutable message I’ve transferred with my zero value transaction after a snapshot — its not anymore retrievable from the tangle.

There are concepts of permanodes around which finally could save all the historic information (or at least the information a company or and individual would need for all history — maybe we try to create such a permanode in the last chapter of this exploration), but I’ve not seen any service offered so far on the devnet. Don’t worry in our example we should be within one snapshot and be able to retrieve our message.

In addition, I think of IOTA as a protocol that enables immutable secure transmission/streaming of data for everyone/everything (permissionless ledger). You are able to send zero value transactions without fees and exchange value securely. Storing of data could be implemented in various ways as second or third layer protocols or as optional in the IOTA reference Implementation IRI.

For our article that means as well when you read this after a snapshot please use your bundle id, as mine is probably gone by then.

Retrieving the transaction

Back to coding again. The best way to find out which function we can use to retrieve the message is looking for the official github iota.lib.js repository.

After scrolling through the README my eyes crossed this function — let's try to implement it.

The easiest way to get your code always up to date and open to the community is by using git on the command line and publish your changed code to your github repro.

Here is a good first step for this:

228  git clone https://github.com/jhab82/exploring-iota.git
240 cd exploring-iota/
243 vim recieve.js
242 git checkout master
245 git diff
246 git status
252 git commit -m "bla bla done"
254 git push origin

This it the commands i’ve used to clone a project, change the recieve.js, checked the difference and the status and commit the changes finally pushed it to the master on github.

I’ve implemented the findTransactions function (above is the findTransactionObjects function introduced which acts as wrapper for this function) with passing only one bundle id. Nested in there I use the getBundle call to extract only the signatureMessageFragment from the Bundle (which holds our message).

Executing

node recieve.js

will give you the following:

The first line gives you the converted text messages from the raw trytes!

Wait a minute why do we need to slice this message…. I mean why do we need to reduce the whole bunch of 9 by one 9.

message = success2[0].signatureMessageFragment;                                        message = message.split("9").join("");                                        console.log(iota.utils.fromTrytes(message));

If you don’t do it it will give you “null”. Never mind there is an issue reported here: https://github.com/iotaledger/iota.lib.js/issues/96.

The explanation is that fromTrytes needs an even number of values. I am sure you can normalize it nicer than split and join… If you execute the below you get null.

message = success2[0].signatureMessageFragment;                                                                              console.log(iota.utils.fromTrytes(message));

They might change that in future implementations and throw an error if the amount of trytes is not able to be passed by fromTrytes.

Creating your own seed

If there is one thing you should take care about if you are in crypto/blockchain take your privatekeys, seeds, passwords seriously private!

You are now your own bank — there is no person or group which acts as a link between you and safe ground — you are responsible.

This is why you should never use any seed generators without understanding why and what and how.

For our purpose we just can stick to good old chap Linux for generating us a nice little acceptable seed which should be 81 characters long should only have capital letters and the number 9 — please in a random fashion…

cat /dev/urandom |tr -dc A-Z9|head -c${1:-81}

you might think what is wrong with Jan? he just told me I should never expose it and he almost fu** … paste it here…

Yeah i did not (the last letter are covered with a thick red paint though) but if you like to try — here is the challenge: Whoever get access to my devnet tokens on this wallet (how to get devnet tokens i will show you later) will get a special award. Its just guessing about 9–10 characters or you might want to brute force it.

The best learning here would be if you can understand that exposing your seed is crazy and that even with only 9–10 letter left its hard to guess your seed but not impossible. If you think you could just guess the 81 character please watch this

and just to make it more easy here is the part of the exposed seed for copy and paste (without 9–10 chars)

BIOBBXLOWLVSIBNAORH9VDZCQO9GUYAYCLDUY9W9UKSUCPONSSBPUCDAUUEOZIUXSBTEC9RI

So if you crack the last letter you could control the wallet (as this is on the devnet — you won’t get rich anyways)

We should really repeat all the stuff we have done prior and in the first article again to understand what is a seed ~ wallet. An address ~ temporary storage of information / value and how i can get tokens…

For now we are just changing our transfer function to be used with our seed and send again a zero value transaction:

This will give us when executed

Troubleshoot: As I’ve experienced problems with the remote PoW please just do the above code without the following two lines (in order to leave the PoW executed by the node rather than the powbox)

//const remoteCurl = require("@iota/curl-remote")
//remoteCurl(iota, "https://powbox.testnet.iota.org", 500)

Ok that means we have send from our seed (which is now private) a zero value transaction over the test net to the very popular address HELLOWORLDHELLOWORLD….

But what happens if i send a non-zero value transaction (I want to send devnet tokens to this address) — well than you need to have tokens send to your address first.

Create your first own address

Lets do it than. Create an address where only you — the seed holder has control of.

Just create a new little file and name it e.g. genNewAdress.js and copy your seed as const and the command as shown below

const seed = "PasteYourSeedHere"iota.api.getNewAddress (seed,  (error, success) => {
if(error){
console.log(error)
}else {
console.log(success)
}
})

After executing it you will get something similar (Your address is unique and obviously looks different than mine)

FBTICMZPRTLDFYZZSMBABZTBULMWZVRKZPXTFJEIOPUJLFQDIOPWHKCXKIBPYBGXBSHZIBRYUBMYCRGHA

The special thing about this address is that it belongs to me and only I am able to send value from this address to another address using my seed.

Get your devnet tokens

So lets get devnet tokens here:

I just paste my freshly created address in this little app and i get an ETA for receiving my tokens

Cool — I should have tokens but i don’t know hot to check them. Come on lets check via command line our balance.

Get your addresses balances

You could probably only have a look at that particular address but exploring IOTA further will show us that every time i spend form this address all remaining funds will be transferred to the next address generated from this seed. That means we would like to get the balance from all existing addresses created by this seed.

I have done this by nesting the getBalance command into the getNewAddress command (i’ve changed the operator => to include the function expression for better visibility)

const seed = "...."var addresses = new Set()
var allAddresses
iota.api.getNewAddress(seed, {'returnAll':true}, function(error, allAddresses) {
if(error) {
console.log(error)
} else {
allAddresses.forEach(function(addr) { addresses.add(addr)})
console.log(allAddresse)
iota.api.getBalances(allAddresses, 10, function(error, success) {
if(error) {
console.log(error)
}else {
console.log(success)
}
})
}
})

Congratulation you have received 1000 IOTA!

Send a non-zero value transaction

Now we could send to the popular Address “HELLOWORL…” some IOTAs — just because we can. Just copy the send.js and create a send_fromWallet.js script with your seed and changing the value from 0i to 1i.

const seed = "PasteYourSeedHere"
const message = iota.utils.toTrytes("I will send you 1i for just because i can....")
address = "HELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDD"const transfers = [{
value: 1,
address: address,
message: message
}]
iota.api.sendTransfer(seed, 3, 9, transfers, (error, success) => {
if (error) {
console.log(error)
} else {
console.log(success)
}
})

After executing this script you will receive a lot of information:

[ { hash: 'GIXQQGFCBHMHXFSG9ABJKXHB9ZZALWGEYLWFRULFFBOSBFXFNJJQYPHPHJ9ONQMKEDNUJTTHEZSEPE999',
signatureMessageFragment: 'SBEAKDXC9D9DEAGDTCBDSCEAMDCDIDEAVAXCEAUCCDFDEAYCIDGDHDEAQCTCRCPCIDGDTCEAXCEARCPCBDSASASASA999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999',
address: 'HELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDD',
value: 1,
obsoleteTag: 'LG9999999999999999999999999',
timestamp: 1529851449,
currentIndex: 0,
lastIndex: 3,
bundle: 'AIYWAEBHLFZYDYO9KULNOSRBCZSDYJVIYHTXCFVDEOGSRFJESGLEZVJXYOSYKJENFUVBOAZGHGJHYREBY',
trunkTransaction: 'HJLAJVBGJCCC9XRMLYOIJTPLBOELQMS9LMYGFYR9XDNWHUZYQDCZIQGNIFVXEMRBMCLEXVGKCXSUYV999',
branchTransaction: 'SAAGHDVRNZFGBUNKUCPAW9UYZKSZBKYEWVBTGGOQMPWTOPSMWIWIEQXHFGN9WLEIDUAVQB9E9ECO99999',
tag: 'LG9999999999999999999999999',
attachmentTimestamp: 1529851456551,
attachmentTimestampLowerBound: 0,
attachmentTimestampUpperBound: 3812798742493,
nonce: 'EMDIGCYYFVNXFJMWXPOMDWRUCCE' },
{ hash: 'HJLAJVBGJCCC9XRMLYOIJTPLBOELQMS9LMYGFYR9XDNWHUZYQDCZIQGNIFVXEMRBMCLEXVGKCXSUYV999',
signatureMessageFragment: 'XOFC99XBKNCJXFNLIHWBELHVHEWZPHYQ9PSMRNJKLUQE9KTPHDKPPZCDJ9IUTBANQIKFKQYREIKRBCVHYSBRAVOXZSZNOEBIBUEBDIIVYCHYXNWFALAFFZ9NCVZMIZDBRDQIHWJWSGIDCOGIX9XE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SHZIBRYUBMYCRGHA',
value: -1000,
obsoleteTag: '999999999999999999999999999',
timestamp: 1529851453,
currentIndex: 1,
lastIndex: 3,
bundle: 'AIYWAEBHLFZYDYO9KULNOSRBCZSDYJVIYHTXCFVDEOGSRFJESGLEZVJXYOSYKJENFUVBOAZGHGJHYREBY',
trunkTransaction: 'GKNBKDZM9XOEEDYWHLFLYGTW9YCEWQFZGC9FWRTRRLIBIBADFSITNOZAQBWKG9OTTJOKGNSQLJHVMZ999',
branchTransaction: 'SAAGHDVRNZFGBUNKUCPAW9UYZKSZBKYEWVBTGGOQMPWTOPSMWIWIEQXHFGN9WLEIDUAVQB9E9ECO99999',
tag: '999999999999999999999999999',
attachmentTimestamp: 1529851456539,
attachmentTimestampLowerBound: 0,
attachmentTimestampUpperBound: 3812798742493,
nonce: 'SFDLLPLZQ9GVBGPFHKVBCHPZ9W9' },
{ hash: 'GKNBKDZM9XOEEDYWHLFLYGTW9YCEWQFZGC9FWRTRRLIBIBADFSITNOZAQBWKG9OTTJOKGNSQLJHVMZ999',
signatureMessageFragment: 'DMYOLFZUNASYKIVELBBALIJWLITJTTAHPAGKCHMQNGWENOYWESBIMLRMKEHRCWWZCREVIYKTCDWBZYVKXZKXLZUCIAE9KNZMISVDLHEVSMKCAVUJ9ABTM9TQZXKPMRNRL9WLHPMHCFBPBHDPEQ9RANDVPAWPPFIWOYJAETGDCTYDSLDBYTB9BAS9GDPBWRHLQNGLJFFOJGJPFYNGFDAJVKVMVZXQSL9XCWUVZMKYIRKGQBBCQUWZNDWGBIMYHHIU9DMLH9STGQLGSANRYDOAAHLVLUBHEWOS9YDANVSIIXNCADJMWEZLDYNZLHTQ9CSBPZWWUBKGZIARYOHUHKKOEALUDJTBMZAWYMLSCBIASZUFHBRDLDCSSMAANAGNKUFEMYQLJCZDJQXHZGDTRKETCVJF9UACUZPUNBCZPGRPMUEVPNCUAMTTGWTAC9MXPSMESRFFRYOBOU9IXOLJCXHGOHUHLKIEDRJIXSFFSXAWGAZ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NARRFYSWK9EEKLRIICHKFNSCRASANBIAHXDMVPPWMWXXNWLQZIPBEDYRDOHIGH9DZYIEPQTLZCRENBRXPZWEAXQHIEJTKHKXBLEBCOV9RLWRSUSPYIWINYDDTWWJXRERDTYPVEEXSUZWOGCO9IEDCZIWRBLNEPLWSPZNEMGTEYQLVKKJYMQDMSPHUFLUWBZZDMPXXLHNZH9ZGFZUXJXQWJYNXKJSSMHUNEQLFAVUNRXOJRRHGRBMZUSURCJERGEIRVZLUJVUURGXYAYQHSOCNPSSCHXNJGRRAKRMO9DZVHDKYORNZXWQVBQWXATDMWJDVBEP9COVCGJRTQLMXEXYBOKPVXUYUIWLKA9CWFFSFHXQXNXCJKGXGFYHTJFIAIMMLBY9OHUZAYXCCSSUQBL9PRXUCBQMQWDAJHFPWMG9UQNZAWEMKCUMSHIXXHRFCASPIPBW9HVPVNPSIJ9QJXKIRGKYQWLYEDHOZNEYUAJACHEX9MDWKDZJPDDSIGAFALGBPQYHSMDBVGSUUMHXFBDVDRSOMINLGMETXWQBVJVKBWPZEHWRFCU9MYMDAWAOHRQXIZFAMYOXO99MSTEOQSEBPNNMBFWKGLHWVLGIBIL9O9EVTJRLWBDQHQQCVIEYUZ9D',
address: 'FBTICMZPRTLDFYZZSMBABZTBULMWZVRKZPXTFJEIOPUJLFQDIOPWHKCXKIBPYBGXBSHZIBRYUBMYCRGHA',
value: 0,
obsoleteTag: '999999999999999999999999999',
timestamp: 1529851453,
currentIndex: 2,
lastIndex: 3,
bundle: 'AIYWAEBHLFZYDYO9KULNOSRBCZSDYJVIYHTXCFVDEOGSRFJESGLEZVJXYOSYKJENFUVBOAZGHGJHYREBY',
trunkTransaction: 'VMJL9UVXBAPERHWIVGOMPNEHJBCTL9ABSGSMEKXCHNUW9NRAFSIVCKJFWXUDBFOMNQJHQEWZPPDRRG999',
branchTransaction: 'SAAGHDVRNZFGBUNKUCPAW9UYZKSZBKYEWVBTGGOQMPWTOPSMWIWIEQXHFGN9WLEIDUAVQB9E9ECO99999',
tag: '999999999999999999999999999',
attachmentTimestamp: 1529851456532,
attachmentTimestampLowerBound: 0,
attachmentTimestampUpperBound: 3812798742493,
nonce: 'DFLBUPZRIRIBODBQ9RKGIEANSBH' },
{ hash: 'VMJL9UVXBAPERHWIVGOMPNEHJBCTL9ABSGSMEKXCHNUW9NRAFSIVCKJFWXUDBFOMNQJHQEWZPPDRRG999',
signatureMessageFragment: '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999',
address: 'QWQLOWHRQCBFJTNVPKMHBISERXKEIFAQQIEFURQPQOXUMMXQIAHBYTT9LWEILYCTROE9FMCDZPFAZDGNZ',
value: 999,
obsoleteTag: '999999999999999999999999999',
timestamp: 1529851455,
currentIndex: 3,
lastIndex: 3,
bundle: 'AIYWAEBHLFZYDYO9KULNOSRBCZSDYJVIYHTXCFVDEOGSRFJESGLEZVJXYOSYKJENFUVBOAZGHGJHYREBY',
trunkTransaction: 'SAAGHDVRNZFGBUNKUCPAW9UYZKSZBKYEWVBTGGOQMPWTOPSMWIWIEQXHFGN9WLEIDUAVQB9E9ECO99999',
branchTransaction: 'SAAGHDVRNZFGBUNKUCPAW9UYZKSZBKYEWVBTGGOQMPWTOPSMWIWIEQXHFGN9WLEIDUAVQB9E9ECO99999',
tag: '999999999999999999999999999',
attachmentTimestamp: 1529851456523,
attachmentTimestampLowerBound: 0,
attachmentTimestampUpperBound: 3812798742493,
nonce: 'OIFJOUHQAYDBO9ZGCHATJUZ9CQM' } ]

Lets first make sure the one 1i is deducted from our Address, by executing our showBalances.js

Looks fine. Next we can use the tangle explorer to check whether our 1i has been received by this Address.

Congratulation! You have now

  • your address with 1000 devnet IOTAs.
  • You have executed a token transaction and
  • you know now how to retrieve transaction information.
  • Most importantly you know what could happen when you expose your seed.

In the next article I would like to show you what happened in the background when we transferred our 1i to the “HELLOWORLD…” address. I would like to explore a little more on the possible commands from the iota.lib.js repository and motivate some use cases.

Please get back to me if you struggle, have recommendation or just like to change something.

Cheers,
Jan

First article in this series: Exploring IOTA #1

Troubleshooting:

  • Disable remote Proof of Work (PoW) by commenting the remoteCurl part in our script
  • IOTA changed the testnet to be deprecated and renamed it to devnet. Please change your node server
https://nodes.devnet.iota.org:443

--

--