import { getPublicKeyByPath } from './derive' ; import Transport from '../transport' ; import * as utils from '../utils/index' ; import { PathType } from '../config/param' ; export default class EDDSACoin { coinType : string ; constructor ( coinType ) { this . coinType = coinType ; this . getPublicKey = this . getPublicKey . bind ( this ) ; } dev async getPublicKey ( transport , appPrivateKey , appId , isSLIP0010 = true ) { const pathType = isSLIP0010 ? PathType . SLIP0010 : PathType . BIP32EDDSA ; const path = await utils . getPath ( this . coinType , 0 , 3 , pathType ) ; return getPublicKeyByPath ( transport , appId , appPrivateKey , path ) ; } }