You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

3 years ago
  1. ---
  2. layout: simple
  3. ---
  4. ## ToyChain Transaction
  5. Transactions block is an added record to the block which allow to attached values transfer to the block.
  6. A transaction descript a transfer of value between account protected via [ECC][1]
  7. (we use [secp256k1][5] see code [ECKeys.pm][2]).
  8. You can register your [keypair][4] in the [admin](/admin/) section under [signup / keygen][3].
  9. A transaction has inputs, outputs, and signatures,
  10. in order be valid
  11. - the total of inputs must be greater than the total of ouputs
  12. - every account on the input side must have enough balance to satisfy the transactions
  13. - all signature attached to the transaction must be authentic and the signed message not tempered
  14. example of transaction in ([yaml][6] format)
  15. <textarea name=tx rows=7></textarea>
  16. {% comment %}
  17. <button id=sign>sign</button>
  18. <button id=validate>validate</button>
  19. {%- endcomment -%}
  20. <button id=submit>submit</button>
  21. <textarea id=json></textarea>
  22. txaddr: <span id=txaddr><i>:txaddr</i></span>
  23. [1]: https://duckduckgo.com?q=Elliptic+Curve+Cryptography
  24. [2]: /lib/ECKeys.pm
  25. [3]: /admin/keygen.html
  26. [4]: /templ/keys.yml
  27. [5]: https://duckduckgo.com?q=secp256k1+!g
  28. [6]: /templ/txexample.yml
  29. <a href="/docs/txpool.html"><button id=txpool>txpool</button></a>
  30. <script src="transaction.js"></script>