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