MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / encodeRlp

Function encodeRlp

lib.commonjs/utils/rlp-encode.js:44–51  ·  view source on GitHub ↗

* Encodes %%object%% as an RLP-encoded [[DataHexString]].

(object)

Source from the content-addressed store, hash-verified

42 * Encodes %%object%% as an RLP-encoded [[DataHexString]].
43 */
44function encodeRlp(object) {
45 let result = "0x";
46 for (const v of _encode(object)) {
47 result += nibbles[v >> 4];
48 result += nibbles[v & 0xf];
49 }
50 return result;
51}
52exports.encodeRlp = encodeRlp;
53//# sourceMappingURL=rlp-encode.js.map

Callers

nothing calls this directly

Calls 1

_encodeFunction · 0.70

Tested by

no test coverage detected