# About tutorials based on purestake.io services

**URL:** <https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223>\
**Category:** General\
**Created:** [November 19, 2020, 2:51pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223 "2020-11-19T14:51:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabiensen](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@fabiensen](https://forum.algorand.co/u/fabiensen)\
**Post date:** [November 19, 2020, 2:51pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/1 "2020-11-19T14:51:53Z")

</div>

Hi all!

My and my team’s goal is to store a MD5 of a file as the note of a transaction, to ensure that that file had that MD5 hash at that time(stamp). Fair enough, we can achieve this goal by using the following tutorial: [https://developer.algorand.org/tutorials/creating-javascript-transaction-purestake-api/](https://developer.algorand.org/tutorials/creating-javascript-transaction-purestake-api/) with NodeJS.

Although we could see the transactions as completed in AlgoExplorer, by its ID, in the testnet, we really have no idea about the following steps (in regards to the tutorial):

1. Recover Account - How are we supposed to find our mnemonic as simple Purestake Developer Portal user? By now the example works with the mnemonic found in the tutorial. From what I understand, purestake mission is to simplify developers interaction with Algorand, so I guess we don’t have to have a wallet (and our own mnemonic). Obviously purestake has a pricing, which should cover a certain number of transactions.

2. Create a Transaction - I see here an envelope is built, for registering a transaction. Now:

A) Which is the address to which the transaction should be sent? From where is this sting coming from UUOB7ZC2IEE4A7JO4WY4TXKXWDFNATM43TL73IZRAFIFFOE6ORPKC7Q62E as per the example in the tutorial? What we have after registration to purestake is just an API Key.

B) What to indicate as Amount and Fee? Here the confusion can come to us by considering your price plan. We see that until 5,000 calls per day, there is a free plan.

C) How is a request considered in this case? Is a request considered one, that is only the final call to make the transaction?

Thank you very much for your support!  
Fabio

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://forum.algorand.co/u/Tim)\
**Post date:** [November 19, 2020, 4:12pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/2 "2020-11-19T16:12:20Z")

</div>

Fabio -

The API just provides access to the blockchain and is entirely a separate thing from your Algorand accounts. Each example does have a sample account provided, typically with a mnemonic that can be used to re-generate the public key and private (signing) keys using a SDK of choice (or goal or a wallet like AlgoSigner or the mobile wallet).

In the JS SDK creating a new account is as simple as `var account = algosdk.generateAccount();` .

So for your first question, generate an account and store the mnemonic safely as it is the only way to recover the account. Russ goes into some detail on this here - [https://developer.algorand.org/tutorials/create-account-testnet-javascript/](https://developer.algorand.org/tutorials/create-account-testnet-javascript/) .

Once the account is setup and funded, you can send Algos around Testnet. The amount is up to you, it’s the amount you want to send, the fee to use is the one from the parameters call (min-fee) and is the cost of using the network for your transaction. The example you cite, [https://developer.algorand.org/tutorials/creating-javascript-transaction-purestake-api/](https://developer.algorand.org/tutorials/creating-javascript-transaction-purestake-api/), goes through this in detail. If you use TestNet there is no limit on requests, but either way Amount/Fee and the transaction are wholly separate from the API itself (which again is the conduit to the blockchain).

In a typical transaction through the API several calls are made.

1. Get the current transaction parameters
2. Post the signed transaction
3. Get the pending transaction queue looking for completion of the transaction, typically a total of 1-3 times (once per block).

So, 3-6 requests. If you let the code check pending repeatedly per block, it will burn many more requests and not result in any speedup.

---

<div class="post-metadata">

**Author:** ![fabiensen](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@fabiensen](https://forum.algorand.co/u/fabiensen)\
**Post date:** [November 19, 2020, 4:19pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/3 "2020-11-19T16:19:46Z")

</div>

Tim, thank you very much for your prompt and kind response. I beg your pardon if these questions may sound silly, but for those who are new to this topic, like we are, was not so clear how to start.  
So, thank you again for your time, I’ll review your answer and let you know.

Regards  
Fabio

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://forum.algorand.co/u/Tim)\
**Post date:** [November 19, 2020, 4:28pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/4 "2020-11-19T16:28:52Z")

</div>

It is a lot to take in, the community is happy help get you up to speed!

---

<div class="post-metadata">

**Author:** ![fabrice](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fabrice](https://forum.algorand.co/u/fabrice)\
**Post date:** [November 19, 2020, 8:18pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/5 "2020-11-19T20:18:35Z")

</div>

Hi @fabiensen,

Welcome to Algorand!

I just wanted to chime in regarding MD5.  
MD5 is now considered insecure for almost all applications (this includes timestamping documents) and I would strongly recommend you to switch to SHA2 or SHA3 if you can.  
See [https://en.wikipedia.org/wiki/MD5#Security](https://en.wikipedia.org/wiki/MD5#Security)

---

<div class="post-metadata">

**Author:** ![ryanRfox](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/ryanrfox/32/364_2.png) [@ryanRfox](https://forum.algorand.co/u/ryanRfox)\
**Post date:** [November 19, 2020, 8:19pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/6 "2020-11-19T20:19:09Z")

</div>

@fabiensen glad you are here building. Here is a link to generating a new account and saving the mnemonic:

> **[3. Your First Transaction - Algorand Developer Docs](https://developer.algorand.org/docs/build-apps/hello_world/#generate-a-publicprivate-key-pair)**

That is midway thru the introductory series on sending your first transaction. I can tell you are beyond that already, but should review the information about key pairs, mnemonics, addresses, account generation here:

> **[Overview - Algorand Developer Docs](https://developer.algorand.org/docs/features/accounts/#keys-and-addresses)**

---

<div class="post-metadata">

**Author:** ![fabiensen](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@fabiensen](https://forum.algorand.co/u/fabiensen)\
**Post date:** [November 20, 2020, 10:33am UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/7 "2020-11-20T10:33:56Z")

</div>

Thanks guys!

your responses addressed me to the right places where to find proper information.  
About SHA-1, we just changed from MD5 to it.

Our scripts are working great now and are now fully integrated in our software. Now, we have just to go live in the main net.

I add this article [https://medium.com/algorand/the-algorand-pay-transaction-73f273cd71a](https://medium.com/algorand/the-algorand-pay-transaction-73f273cd71a) to the sources you indicated. I think it gives answers to other questions one may have, in a very clear way.

Thanks  
Fabio

---

<div class="post-metadata">

**Author:** ![fabrice](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fabrice](https://forum.algorand.co/u/fabrice)\
**Post date:** [November 20, 2020, 2:18pm UTC](https://forum.algorand.co/t/about-tutorials-based-on-purestake-io-services/2223/8 "2020-11-20T14:18:48Z")

</div>

Unfortunately, SHA-1 is now also considered insecure for almost all applications (this includes timestamping documents) and I would strongly recommend you to switch to SHA-2 (i.e. SHA-256, SHA-384, …) or SHA-3 if you can.  
See [https://en.wikipedia.org/wiki/SHA-1#Attacks](https://en.wikipedia.org/wiki/SHA-1#Attacks)

SHA-256 might be the choice that is the most common.
