(value)
| 114 | * is treated as Big Endian data. |
| 115 | */ |
| 116 | function toBigInt(value) { |
| 117 | if (value instanceof Uint8Array) { |
| 118 | let result = "0x0"; |
| 119 | for (const v of value) { |
| 120 | result += Nibbles[v >> 4]; |
| 121 | result += Nibbles[v & 0x0f]; |
| 122 | } |
| 123 | return BigInt(result); |
| 124 | } |
| 125 | return getBigInt(value); |
| 126 | } |
| 127 | exports.toBigInt = toBigInt; |
| 128 | /** |
| 129 | * Gets a //number// from %%value%%. If it is an invalid value for |