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 }}
Repository navigation
Add a or string ToJson(Metadata metadata) method to Method class #74
If you are using the SignPayloadAsync you get most of the information, But I agree the important ones are encoded in the byte[] parameters. We could allow to use an object, that implements IEncode, which you might be able to cast into the right parameters call. So you would be able to get the necessary information, out of the payload, previous to signing.
Activity
darkfriend77 commentedon Jan 31, 2024
If you are using the
SignPayloadAsyncyou get most of the information, But I agree the important ones are encoded in the byte[] parameters. We could allow to use an object, that implements IEncode, which you might be able to cast into the right parameters call. So you would be able to get the necessary information, out of the payload, previous to signing.#74 providing base to allow proper view on parameters
darkfriend77 commentedon Jan 31, 2024
It would lead to something like this where the parameters would be an array of ITypes at best
you would have to cast it back into the main class, could use reflection.
RostislavLitovkin commentedon Feb 2, 2024
It would be best if it could be translated from the SCALE encoded Method bytes.
The workaround you are suggesting will not work if the Method bytes are sent from a javascript dApp, which is how I would like to use it.
It would be great to be able to
Decodethe bytes back into the ITypes. Do you think it would be doable?darkfriend77 commentedon Feb 5, 2024
Yes, depending on what you exactly get, it should be doable to decode it back into the specific Type, format
Substrate.NET.API/Substrate.NetApi/Model/Extrinsics/Extrinsic.cs
Line 68 in cafdc16