import * as ecc from 'eosjs-ecc' ; /** Digit pattern expression */ const digitPattern = /[06789]/g ; /** Digit mapping lookup */ const digitMapping = { '0' : '1' , '6' : '2' , '7' : '3' , '8' : '4' , '9' : '5' , } ; author Kevin Brown <github.com/thekevinbrown>
 *  param publicKey returns export const accountNameFromPublicKey = ( publicKey ) => hashToEOSName ( ecc . sha256 ( publicKey ) ) ; author Kevin Brown <github.com/thekevinbrown>
 *  returns export const hashToEOSName = ( data ) => `l${ data . substring ( 0 , 11 ) . replace ( digitPattern , ( match ) => digitMapping [ match ] ) . toLowerCase ( ) }` ; export type EosioAction = { account : string ; name : string ; authorization : { actor : string ; permission : string ; } [ ] ; data : any ; } ;