py-substrate-interface
py-substrate-interface copied to clipboard
Allow raw hex-bytes as input for `struct` types
Now to encode a struct type it requires a dict with elements according to its specification. For example the session key struct:
{'grandpa': '0x...', 'babe': '0x...', 'im_online': '0x...', 'authority_discovery': '0x...', 'parachains': '0x...'}
following its definition https://github.com/polkascan/py-scale-codec/blob/v0.10.77/scalecodec/type_registry/default.json#L2340
It should also be possible to allow raw hex-bytes as input, so it would be possible to enter the output of a author_rotateKeys RPC call.