@@ -41,6 +41,7 @@ export class Account {
4141 * @internal
4242 * @param address
4343 * @param keyPair
44+ * @param {SignSchema } signSchema The Sign Schema (NIS / Catapult)
4445 */
4546 private constructor (
4647 /**
@@ -50,7 +51,11 @@ export class Account {
5051 /**
5152 * The account keyPair, public and private key.
5253 */
53- private readonly keyPair : IKeyPair ) {
54+ private readonly keyPair : IKeyPair ,
55+ /**
56+ * The Sign Schema (NIS / Catapult).
57+ */
58+ private readonly signSchema : SignSchema = SignSchema . Catapult ) {
5459 }
5560
5661 /**
@@ -69,6 +74,7 @@ export class Account {
6974 return new Account (
7075 Address . createFromRawAddress ( address ) ,
7176 keyPair ,
77+ signSchema ,
7278 ) ;
7379 }
7480
@@ -88,7 +94,7 @@ export class Account {
8894 const keyPair = KeyPair . createKeyPairFromPrivateKeyString ( hashKey , signSchema ) ;
8995
9096 const address = Address . createFromPublicKey ( convert . uint8ToHex ( keyPair . publicKey ) , networkType , signSchema ) ;
91- return new Account ( address , keyPair ) ;
97+ return new Account ( address , keyPair , signSchema ) ;
9298 }
9399 /**
94100 * Create a new encrypted Message
@@ -128,7 +134,7 @@ export class Account {
128134 * @return {PublicAccount }
129135 */
130136 get publicAccount ( ) : PublicAccount {
131- return PublicAccount . createFromPublicKey ( this . publicKey , this . address . networkType ) ;
137+ return PublicAccount . createFromPublicKey ( this . publicKey , this . address . networkType , this . signSchema ) ;
132138 }
133139
134140 /**
0 commit comments