showing results for - "eosio name to int js"
Hajar
24 Feb 2016
1import { createInitialTypes, SerialBuffer } from 'eosjs/dist/eosjs-serialize';
2convertName(name){
3  const builtinTypes = createInitialTypes()
4  const typeUint64 = builtinTypes.get("uint64")
5  const typeName = builtinTypes.get("name")
6  var buffer = new SerialBuffer({ textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });
7
8  typeName.serialize(buffer, name)
9  return typeUint64.deserialize(buffer)
10}
11
12console.log(convertName("hossainiiiir"));
13
queries leading to this page
eosio name to int jseosio name to int js