Konubinix' opinionated web of thoughts

How to Sign a Forged Transaction in Tezos

Fleeting

Following the indications from https://tezosguides.com/wallet_integration/basics/sign/ and

https://gitlab.com/xdev-tech/xdev-enterprise-business-network/tezos-api-gateway/-/issues/2

  1. the result of forge must be first prefixed with 0x03
  2. the prefixed data must be put in a blake2b digest of size 20
  3. the resulting data is signed using ed25519
  4. the resulting signature is prefixed with 0x04822B, then base58 encoded using the 4 character checksum
  5. this is the signature to give to signature parameter of /inject/jobs
  6. the raw signature as output by the ed25519 step (not the one with the prefix and the base58 encoding) is concatenated to the forge message, decoded from its hexadecimal representation
  7. this is the message to provide to inject.

https://gitlab.com/xdev-tech/xdev-enterprise-business-network/tezos-api-gateway/-/issues/2