You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2021. It is now read-only.
As part of the Lightweight SDK API we would like to have a class that eases creation of (raw) transactions. A raw transaction can be understood as a serialised Transaction that can be send to the network via a RPC node or directly on the TCP network.
The available Transactions and their possible attributes are described in the documentation. There are 2 existing examples on how to manually build raw transactions in python here. From that code you can see there is enough room to simplify this for the end user. e.g. adding a description attribute to the transaction is currently done as follows
contract_tx.Attributes.append(TransactionAttribute(usage=TransactionAttributeUsage.Description, data="My raw contract transaction description"))
a simplified interface could be
contract_tx.addDescription("My raw contract transaction description")
Some ideas:
simplify adding TX attributes (see example above)
simplify setting transaction destinations. Currently you have to create TransactionOutputs (ref) using script hashes and alike. Instead we could support an API like contract_tx.set_destination_addr("neo address")
support loading raw TX's and inspection
support TX validation e.g.
check that CertUrl, DescriptionUrl, Description, Remark series do not exceed 255 chars (see docs)
check that ContractHash, ECDH series, Hash series does not exceed 32 bytes (see docs)
check that there are no more than 16 attributes per TX (ref)
check that the maximum TX size is not exceeded (ref)
For the first iteration we should only support the following transactions
This is a TODO for a project (see side bar)
As part of the Lightweight SDK API we would like to have a class that eases creation of (raw) transactions. A raw transaction can be understood as a serialised
Transactionthat can be send to the network via a RPC node or directly on the TCP network.The available
Transactions and their possible attributes are described in the documentation. There are 2 existing examples on how to manually build raw transactions in python here. From that code you can see there is enough room to simplify this for the end user. e.g. adding a description attribute to the transaction is currently done as followsa simplified interface could be
Some ideas:
TransactionOutputs (ref) using script hashes and alike. Instead we could support an API likecontract_tx.set_destination_addr("neo address")CertUrl, DescriptionUrl, Description, Remark seriesdo not exceed 255 chars (see docs)ContractHash, ECDH series, Hash seriesdoes not exceed 32 bytes (see docs)For the first iteration we should only support the following transactions