Details about the new subasset issuance type:
- The ID will be
21
- The encoded format will be
>QQ?{}s{}s
. This is an Asset ID (8 bytes), Quantity (8 bytes), Divisibilty (1 byte), Asset Longname (variable), Description (variable). Description is optional.
Callable assets are disabled so there is no reason to include the 12 bytes allotted to callable information at this time.
Option 1 - New Subasset Issuance Parsing Code
- Create new code at
subassetissuance.py
- This would duplicate some code and keep subasset issuance logic separate from issuance logic
- Refactor some of the shared issuance logic into a separate utility file
Option 2 - Merge Subasset Issuance into the current Issuance Parsing Code
- Modify
issuance.py
to handle both types ID20
and21
. - If the ID is type
21
, use the new encoded format.
BONUS - Allow type 21 to handle all issuances
- Create a new issuance code file:
issuance2.py
- Type
21
will not include the 12 bytes of unused callable information - Type
21
can handle all types of issuances - normal, subasset, reissuances, etc. - If the Asset Longname is empty, treat the transaction as a normal issuance
- Type
20
will still be supported for legacy clients.