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):
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.
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?
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(); .
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/, 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.
Get the current transaction parameters
Post the signed transaction
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.
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.
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
@fabiensen glad you are here building. Here is a link to generating a new account and saving the mnemonic:
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:
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
SHA-256 might be the choice that is the most common.