@@ -27,10 +27,10 @@ import {
2727 ImportanceDto ,
2828 ImportanceHeightDto ,
2929 ImportanceSnapshotBuilder ,
30- KeyDto ,
3130 MosaicBuilder ,
3231 PinnedVotingKeyBuilder ,
33- VotingKeyDto ,
32+ PublicKeyDto ,
33+ VotingPublicKeyDto ,
3434} from 'catbuffer-typescript' ;
3535import { Convert } from '../../core/format' ;
3636import { Mosaic , MosaicId } from '../mosaic' ;
@@ -112,16 +112,16 @@ export class AccountInfo {
112112 public serialize ( ) : Uint8Array {
113113 const address : AddressDto = this . address . toBuilder ( ) ;
114114 const addressHeight : HeightDto = new HeightDto ( this . addressHeight . toDTO ( ) ) ;
115- const publicKey : KeyDto = new KeyDto ( Convert . hexToUint8 ( this . publicKey ) ) ;
115+ const publicKey : PublicKeyDto = new PublicKeyDto ( Convert . hexToUint8 ( this . publicKey ) ) ;
116116 const publicKeyHeight : HeightDto = new HeightDto ( this . publicKeyHeight . toDTO ( ) ) ;
117117 const accountType = this . accountType . valueOf ( ) ;
118118 const supplementalPublicKeysMask = this . getAccountKeyTypeFlags ( ) ;
119119 const votingPublicKeys : PinnedVotingKeyBuilder [ ] =
120120 this . supplementalPublicKeys . voting ?. map ( ( key ) => AccountInfo . toPinnedVotingKeyBuilder ( key ) ) || [ ] ;
121121 const balances : MosaicBuilder [ ] = this . mosaics . map ( ( m ) => AccountInfo . toMosaicBuilder ( m ) ) ;
122- const linkedPublicKey : KeyDto | undefined = AccountInfo . toKeyDto ( this ?. supplementalPublicKeys ?. linked ?. publicKey ) ;
123- const nodePublicKey = AccountInfo . toKeyDto ( this ?. supplementalPublicKeys ?. node ?. publicKey ) ;
124- const vrfPublicKey = AccountInfo . toKeyDto ( this ?. supplementalPublicKeys ?. vrf ?. publicKey ) ;
122+ const linkedPublicKey : PublicKeyDto | undefined = AccountInfo . toPublicKeyDto ( this ?. supplementalPublicKeys ?. linked ?. publicKey ) ;
123+ const nodePublicKey = AccountInfo . toPublicKeyDto ( this ?. supplementalPublicKeys ?. node ?. publicKey ) ;
124+ const vrfPublicKey = AccountInfo . toPublicKeyDto ( this ?. supplementalPublicKeys ?. vrf ?. publicKey ) ;
125125 const importanceSnapshots : ImportanceSnapshotBuilder = new ImportanceSnapshotBuilder (
126126 new ImportanceDto ( this . importance . toDTO ( ) ) ,
127127 new ImportanceHeightDto ( this . importanceHeight . toDTO ( ) ) ,
@@ -179,21 +179,21 @@ export class AccountInfo {
179179 }
180180
181181 private static toPinnedVotingKeyBuilder ( key : AccountLinkVotingKey ) : PinnedVotingKeyBuilder {
182- const votingKeyDto = new VotingKeyDto ( Convert . hexToUint8 ( key . publicKey ) . slice ( 0 , 32 ) ) ;
182+ const votingPublicKeyDto = new VotingPublicKeyDto ( Convert . hexToUint8 ( key . publicKey ) . slice ( 0 , 32 ) ) ;
183183 const startEpoch : FinalizationEpochDto = new FinalizationEpochDto ( key . startEpoch ) ;
184184 const endEpoch : FinalizationEpochDto = new FinalizationEpochDto ( key . endEpoch ) ;
185- return new PinnedVotingKeyBuilder ( votingKeyDto , startEpoch , endEpoch ) ;
185+ return new PinnedVotingKeyBuilder ( votingPublicKeyDto , startEpoch , endEpoch ) ;
186186 }
187187
188188 private static toMosaicBuilder ( m : Mosaic ) : MosaicBuilder {
189189 return new MosaicBuilder ( ( m . id as MosaicId ) . toBuilder ( ) , new AmountDto ( m . amount . toDTO ( ) ) ) ;
190190 }
191191
192- private static toKeyDto ( publicKey : string | undefined ) : KeyDto | undefined {
192+ private static toPublicKeyDto ( publicKey : string | undefined ) : PublicKeyDto | undefined {
193193 if ( ! publicKey ) {
194194 return undefined ;
195195 }
196- return new KeyDto ( Convert . hexToUint8 ( publicKey ) ) ;
196+ return new PublicKeyDto ( Convert . hexToUint8 ( publicKey ) ) ;
197197 }
198198
199199 private static toHeightActivityBucketsBuilder ( b : ActivityBucket ) : HeightActivityBucketBuilder {
0 commit comments