aleph-im/pyaleph

Suggestion to implement cosmos ADR 036

Opened this issue · 0 comments

xpt1x commented

Cosmos's ADR 036 Arbitrary Message Signature Specification allows to easily sign offchain messages and can be very helpful integrating aleph with cosmos chains

Instead of using a hardcoded msg structure and chain-id as (current):

"type": "signutil/MsgSignText",

We can abide by ADR 036 and follow it's structure which is very much similar to current one
Hence yielding a transaction like this

{
  "type": "cosmos-sdk/StdTx",
  "value": {
    "msg": [
      {
        "type": "sign/MsgSignData",
        "value": {
          "signer": "cosmos1hftz5ugqmpg9243xeegsqqav62f8hnywsjr4xr",
          "data": "cmFuZG9t"
        }
      }
    ],
    "fee": {
      "amount": [],
      "gas": "0"
    },
    "signatures": [
      {
        "pub_key": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "AqnDSiRoFmTPfq97xxEb2VkQ/Hm28cPsqsZm9jEVsYK9"
        },
        "signature": "8y8i34qJakkjse9pOD2De+dnlc4KvFgh0wQpes4eydN66D9kv7cmCEouRrkka9tlW9cAkIL52ErB+6ye7X5aEg=="
      }
    ],
    "memo": ""
  }
}

#308
#353
aleph-im/aleph-js#48