Testing the /transaction endpoint

Now let's create some transactions with our /transaction endpoint. For this, head over to Postman, make sure that the settings are the same as before, and make the following changes:

We have set the amount to 1000 bitcoins. We'll leave the sender and the recipient address as they are, but you can change it to whatever you want. Once we post to the /transaction endpoint, in return we should get the text transaction that will be added in block 4, which we did. This transaction got added to block 4 because we already have three blocks in our chain.

Let's make another example transaction. Here we will change ...

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.