diff --git a/modules/sdk-coin-hbar/src/hbar.ts b/modules/sdk-coin-hbar/src/hbar.ts index a1df0cfeec..e275ba4c8c 100644 --- a/modules/sdk-coin-hbar/src/hbar.ts +++ b/modules/sdk-coin-hbar/src/hbar.ts @@ -20,6 +20,7 @@ import { TokenEnablementConfig, BaseBroadcastTransactionOptions, BaseBroadcastTransactionResult, + NotSupported, } from '@bitgo/sdk-core'; import { BigNumber } from 'bignumber.js'; import * as stellar from 'stellar-sdk'; @@ -174,12 +175,12 @@ export class Hbar extends BaseCoin { } } - /** - * Generate Hedera Hashgraph key pair - * - * @param seed - * @returns {Object} object with generated pub, prv - */ + /** inheritdoc */ + deriveKeyWithSeed(): { derivationPath: string; key: string } { + throw new NotSupported('method deriveKeyWithSeed not supported for eddsa curve'); + } + + /** inheritdoc */ generateKeyPair(seed?: Buffer): KeyPair { const keyPair = seed ? new HbarKeyPair({ seed }) : new HbarKeyPair(); const keys = keyPair.getKeys(); diff --git a/modules/sdk-coin-hbar/test/unit/hbar.ts b/modules/sdk-coin-hbar/test/unit/hbar.ts index 50cd821961..23bb8b3a53 100644 --- a/modules/sdk-coin-hbar/test/unit/hbar.ts +++ b/modules/sdk-coin-hbar/test/unit/hbar.ts @@ -939,4 +939,12 @@ describe('Hedera Hashgraph:', function () { ); }); }); + + describe('deriveKeyWithSeed', function () { + it('should derive key with seed', function () { + (() => { + basecoin.deriveKeyWithSeed('test'); + }).should.throw('method deriveKeyWithSeed not supported for eddsa curve'); + }); + }); });