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

Function arrayifyInteger

lib.esm/utils/rlp-encode.js:3–10  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1//See: https://github.com/ethereum/wiki/wiki/RLP
2import { getBytes } from "./data.js";
3function arrayifyInteger(value) {
4 const result = [];
5 while (value) {
6 result.unshift(value & 0xff);
7 value >>= 8;
8 }
9 return result;
10}
11function _encode(object) {
12 if (Array.isArray(object)) {
13 let payload = [];

Callers 1

_encodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected