Document.version field should be optional with default=[last_document_version]
Break backward compatibility.
Document
class set the protocol version as the first mandatory constructor field.
It is not easy for a new user to find the last version of the protocol.
To ease the creation of a document, this field should be set by default to the last protocol version.
So we need to set the field in last position, with the last protocol version of Duniter (12 at the time of writing) as default value.
Before:
def __init__(self, version: int, currency: str) -> None:
...
After:
def __init__(self, currency: str, version: int = 12) -> None:
...
Edited by Moul