RLP functions¶
-
int eth_rlp_init(struct eth_rlp *rlp, int m)¶
-
int eth_rlp_uint8(struct eth_rlp *rlp, uint8_t *d)¶
-
int eth_rlp_uint16(struct eth_rlp *rlp, uint16_t *d)¶
-
int eth_rlp_uint32(struct eth_rlp *rlp, uint32_t *d)¶
-
int eth_rlp_uint64(struct eth_rlp *rlp, uint64_t *d)¶
-
int eth_rlp_uint(struct eth_rlp *rlp, uint64_t *d)¶
Encodes/decodes at most 64 bit unsigned integer.
The difference between this function and
eth_rlp_uint64
is that,eth_rlp_uint64
reads exactly 8 bytes from the integer, while this function will read bytes based on the size of the integer.- Parameters
rlp – [in] Target rlp.
d – [inout] Ponter to uint64_t to read/write the data from/to.
- Returns
1
on success,-1
otherwise.
-
int eth_rlp_address(struct eth_rlp *rlp, char **addr)¶
-
int eth_rlp_array(struct eth_rlp *rlp)¶
-
int eth_rlp_array_end(struct eth_rlp *rlp)¶
-
int eth_rlp_bytes(struct eth_rlp *rlp, uint8_t **bytes, size_t *len)¶
-
int eth_rlp_hex(struct eth_rlp *rlp, char **hex, int *len)¶
-
int eth_rlp_len(struct eth_rlp *rlp, size_t *len, uint8_t *base)¶
-
int eth_rlp_to_hex(char **dest, struct eth_rlp *src)¶
-
int eth_rlp_to_bytes(uint8_t **dest, size_t *len, struct eth_rlp *src)¶
-
int eth_rlp_from_hex(struct eth_rlp *dest, char *hex, int len)¶
-
int eth_rlp_free(struct eth_rlp *rlp)¶