I'm migrating from
@scatterjs/eosjs firstname.lastname@example.org to
using eosjs I had the following solution:
using eosjs2 I found the following but doesn't really work:
const buffer: Serialize.SerialBuffer = new Serialize.SerialBuffer(); buffer.pushName(name); var number = buffer.getUint64AsNumber();
In the source code says: "Get a
uint64 as a
number only has 53 bits of precision; some values will change.
numeric.binaryToDecimal(serialBuffer.getUint8Array(8)) recommended instead"
But I really don't know how to use it!
where can I get this "numeric" reference from?
How to import it?
what is the whole code to encode a name and get its uint64 value representation?