How to Sign a Forged Transaction in Tezos
Fleeting- External reference: https://gitlab.com/xdev-tech/xdev-enterprise-business-network/tezos-api-gateway/-/issues/2
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
- the result of forge must be first prefixed with 0x03
- the prefixed data must be put in a blake2b digest of size 20
- the resulting data is signed using ed25519
- the resulting signature is prefixed with 0x04822B, then base58 encoded using the 4 character checksum
- this is the signature to give to signature parameter of /inject/jobs
- 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
- this is the message to provide to inject.
— https://gitlab.com/xdev-tech/xdev-enterprise-business-network/tezos-api-gateway/-/issues/2