|
cryptnox-pos 1.0.0
Standalone USDC payment terminal firmware (ESP32 + Cryptnox smart card)
|
Minimal RLP encoder for EIP-1559 (type 2) Ethereum transactions. More...
#include <stdint.h>#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | eth_tx_t |
| EIP-1559 (type 2) transaction parameters. More... | |
Functions | |
| size_t | eth_rlp_encode_unsigned (const eth_tx_t *tx, uint8_t *out, size_t out_max) |
| Encode an unsigned EIP-1559 transaction: 0x02 || RLP([chainId, nonce, ...]). | |
| size_t | eth_rlp_encode_signed (const eth_tx_t *tx, uint8_t v, const uint8_t r[32], const uint8_t s[32], uint8_t *out, size_t out_max) |
| Encode a signed EIP-1559 transaction: 0x02 || RLP([..., v, r, s]). | |
Minimal RLP encoder for EIP-1559 (type 2) Ethereum transactions.
Definition in file eth_rlp.h.
| size_t eth_rlp_encode_signed | ( | const eth_tx_t * | tx, |
| uint8_t | v, | ||
| const uint8_t | r[32], | ||
| const uint8_t | s[32], | ||
| uint8_t * | out, | ||
| size_t | out_max ) |
Encode a signed EIP-1559 transaction: 0x02 || RLP([..., v, r, s]).
| [in] | tx | Transaction parameters. |
| [in] | v | Signature parity bit; must be 0 or 1. |
| [in] | r | 32-byte big-endian ECDSA r component. |
| [in] | s | 32-byte big-endian ECDSA s component. |
| [out] | out | Output buffer for the encoded bytes. |
| [in] | out_max | Capacity of out. |
out_max or tx->calldata_len exceeds the internal scratch bound. Definition at line 268 of file eth_rlp.cpp.
References encode_common_fields(), ITEMS_BUF_MAX, rlp_int256(), rlp_list_header(), and rlp_uint64().
Referenced by sign_and_broadcast().
| size_t eth_rlp_encode_unsigned | ( | const eth_tx_t * | tx, |
| uint8_t * | out, | ||
| size_t | out_max ) |
Encode an unsigned EIP-1559 transaction: 0x02 || RLP([chainId, nonce, ...]).
| [in] | tx | Transaction parameters. |
| [out] | out | Output buffer for the encoded bytes. |
| [in] | out_max | Capacity of out. |
out_max or tx->calldata_len exceeds the internal scratch bound. Definition at line 244 of file eth_rlp.cpp.
References encode_common_fields(), ITEMS_BUF_MAX, and rlp_list_header().
Referenced by sign_and_broadcast().