File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ export abstract class AbstractEthLikeCoin extends BaseCoin {
105105 return Math . pow ( 10 , this . _staticsCoin . decimalPlaces ) ;
106106 }
107107
108+ /** @inheritDoc */
109+ isEVM ( ) : boolean {
110+ return true ;
111+ }
112+
108113 valuelessTransferAllowed ( ) : boolean {
109114 return true ;
110115 }
Original file line number Diff line number Diff line change @@ -400,6 +400,11 @@ export class Eth extends BaseCoin {
400400 return true ;
401401 }
402402
403+ /** @inheritDoc */
404+ isEVM ( ) : boolean {
405+ return true ;
406+ }
407+
403408 getMPCAlgorithm ( ) : MPCAlgorithm {
404409 return 'ecdsa' ;
405410 }
Original file line number Diff line number Diff line change @@ -167,6 +167,14 @@ export abstract class BaseCoin implements IBaseCoin {
167167 return false ;
168168 }
169169
170+ /**
171+ * Flag indicating if this blockchain runs on EVM architecture.
172+ * @returns {boolean } True if the blockchain runs on EVM architecture.
173+ */
174+ isEVM ( ) : boolean {
175+ return false ;
176+ }
177+
170178 /**
171179 * Flag indicating if this coin supports BLS-DKG wallets.
172180 * @returns {boolean } True if BLS-DKG Wallets can be created for this coin
Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ export interface IBaseCoin {
361361 allowsAccountConsolidations ( ) : boolean ;
362362 getTokenEnablementConfig ( ) : TokenEnablementConfig ;
363363 supportsTss ( ) : boolean ;
364+ isEVM ( ) : boolean ;
364365 supportsBlsDkg ( ) : boolean ;
365366 getBaseFactor ( ) : number | string ;
366367 baseUnitsToBigUnits ( baseUnits : string | number ) : string ;
Original file line number Diff line number Diff line change @@ -205,6 +205,11 @@ export class Wallets implements IWallets {
205205 walletParams . enterprise = params . enterprise ;
206206 }
207207
208+ // EVM TSS wallets must use wallet version 3
209+ if ( ( isTss && this . baseCoin . isEVM ( ) ) !== ( params . walletVersion === 3 ) ) {
210+ throw new Error ( 'EVM TSS wallets are only supported for wallet version 3' ) ;
211+ }
212+
208213 if ( isTss ) {
209214 if ( isCold ) {
210215 throw new Error ( 'TSS cold wallets are not supported at this time' ) ;
You can’t perform that action at this time.
0 commit comments