Skip to main content

normalize_fee_payer_service_encoding

Function normalize_fee_payer_service_encoding 

Source
fn normalize_fee_payer_service_encoding(raw: &[u8]) -> Option<Vec<u8>>
Expand description

Rewrites the Tempo fee payer service encoding of a raw transaction into the standard envelope encoding.

Fee payer service clients submit sponsorship requests with a 0x00 placeholder in the fee payer signature field (and the fee token left empty for the sponsor to fill), which the standard envelope decoder rejects. The placeholder is rewritten to the standard encoding of [FEE_PAYER_SIGNATURE_MARKER], preserving the sponsored signing state the sender committed to. Returns the normalized raw transaction when the input carries the placeholder and None for any other encoding.