Skip to content

Fails to unmarshal transaction types with keyless signature #14

@conorpp

Description

@conorpp

The current Signature type found in Transaction currently handles signatures that look like this:

      "signature": {
        "sender": {
          "public_key": "0xd2b2e1e78128ba9482232adafb90b6adfa710c3d8b82510423af5eb6a16b3bca",
          "signature": "0x0e8491dda3ff0925ba227631e33438d95a01da6529e3bc83f3d11de4b97995b2d39f47b2d9b6321a0097f6eb7b62f017e0056324d5e49f2270f15cb354a0b90c",
          "type": "ed25519_signature"
        }

However, there are transaction signatures that look like:

      "signature": {
        "sender": {
          "public_key": {
            "value": "0x1b68747470733a2f2f6163636f756e74732e676f6f676c652e636f6d2076fb5829c1cbd6541428a652a49595cdeaeb0cc5505bfed698563c1f7b53d72f",
            "type": "keyless"
          },
          "signature": {
            "value": "0x000041bfa18a5688cddbffb13bbb610eb3c802a4689505020ce4536b68058ff5f08c699398e356194c5278e088c03b028405db9f3210c61ff322fac2f8e4088063279b4a404c3e1c3c093e144e1177876ae5dcfa7742d73c192350fac4fc37ce2411ba17e98220f33d2381f21486fad4f24e8cc876bca8fe3ac3f3875927a092e18180969800000000000000010040c2e7824650cc63d37fe95ad4cfea47222038be9eece627de4cfd38cf0411ef4377a54b9a864e5e3da191508ea0b36443e54c238ef4d09c4d5b40434656893d074c7b22616c67223a225253323536222c226b6964223a2235643132616237383263623630393632383566363965343861656139393037396262353963623836222c22747970223a224a5754227d00f1c467000000000020d0ca2939774eb740fde7cb28597b9823187863bf6fe2ad1532e1a01a3160947600402b4a8a5e2c2b9dada447286685e673ebf3a591bc5694f7f48e32e56050d603f5f0dbaf430bb8f3154867d9863bea0088ec174780802a7ad5c935383c78ea740b",
            "type": "keyless"
          },
          "type": "single_key_signature"
        }

Example: https://aptoscan.com/transaction/2374613848

It would be nice to update the Signature type to be able to unmarshal from both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions