diff --git a/src/core/genesis_network_models/genesisNetworkNodeDataWrapper.ts b/src/core/genesis_network_models/genesisNetworkNodeDataWrapper.ts index 2bb9d9007..20183c393 100644 --- a/src/core/genesis_network_models/genesisNetworkNodeDataWrapper.ts +++ b/src/core/genesis_network_models/genesisNetworkNodeDataWrapper.ts @@ -14,7 +14,7 @@ * limitations under the License. * */ -import type {AccountId} from '@hashgraph/sdk'; +import type {AccountId, PublicKey} from '@hashgraph/sdk'; import type {GenesisNetworkNodeStructure, ServiceEndpoint, ToObject} from '../../types/index.js'; export class GenesisNetworkNodeDataWrapper @@ -30,7 +30,7 @@ export class GenesisNetworkNodeDataWrapper constructor( public readonly nodeId: number, - public readonly adminKey: string, + public readonly adminKey: PublicKey, public readonly description: string, ) {} @@ -39,7 +39,7 @@ export class GenesisNetworkNodeDataWrapper * @param port */ public addServiceEndpoint(domainName: string, port: number): void { - this.serviceEndpoint.push({domainName, port}); + this.serviceEndpoint.push({domainName, port, ipAddressV4: ''}); } /** @@ -47,10 +47,9 @@ export class GenesisNetworkNodeDataWrapper * @param port */ public addGossipEndpoint(domainName: string, port: number): void { - this.gossipEndpoint.push({domainName, port}); + this.gossipEndpoint.push({domainName, port, ipAddressV4: ''}); } - // @ts-ignore public toObject() { return { node: { diff --git a/src/core/genesis_network_models/genesis_network_data_constructor.ts b/src/core/genesis_network_models/genesis_network_data_constructor.ts index 9a9ff37ec..bb9669089 100644 --- a/src/core/genesis_network_models/genesis_network_data_constructor.ts +++ b/src/core/genesis_network_models/genesis_network_data_constructor.ts @@ -39,7 +39,7 @@ export class GenesisNetworkDataConstructor implements ToJSON { for (const nodeAlias of nodeAliases) { const nodeId = Templates.nodeIdFromNodeAlias(nodeAlias); const adminPrivateKey = PrivateKey.fromStringED25519(constants.GENESIS_KEY); - const adminPubKey = adminPrivateKey.publicKey.toStringRaw(); + const adminPubKey = adminPrivateKey.publicKey; this.nodes[nodeAlias] = new GenesisNetworkNodeDataWrapper(nodeId, adminPubKey, nodeAlias); } @@ -69,7 +69,7 @@ export class GenesisNetworkDataConstructor implements ToJSON { const certPem = nodeKeys.certificate.toString(); //* Assign the PEM certificate - this.nodes[nodeAlias].gossipCaCertificate = certPem; + this.nodes[nodeAlias].gossipCaCertificate = nodeKeys.certificate.toString('base64'); //* Decode the PEM to DER format const tlsCertDer = new Uint8Array(x509.PemConverter.decode(certPem)[0]); diff --git a/src/types/index.ts b/src/types/index.ts index e0f97ba2b..be22a2a13 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -19,8 +19,8 @@ import type net from 'net'; import type * as WebSocket from 'ws'; import type crypto from 'crypto'; import type {ListrTask, ListrTaskWrapper} from 'listr2'; -import type {AccountId} from '@hashgraph/sdk'; -import {type JsonString} from './aliases.js'; +import type {AccountId, PublicKey} from '@hashgraph/sdk'; +import type {JsonString} from './aliases.js'; // NOTE: DO NOT add any Solo imports in this file to avoid circular dependencies @@ -98,14 +98,14 @@ export type EmptyContextConfig = object; export type SoloListrTaskWrapper = ListrTaskWrapper; export interface ServiceEndpoint { - ipAddressV4?: Uint8Array; + ipAddressV4?: string; port: number; domainName: string; } export interface GenesisNetworkNodeStructure { nodeId: number; - accountId: AccountId | string; + accountId: AccountId; description: string; gossipEndpoint: ServiceEndpoint[]; serviceEndpoint: ServiceEndpoint[]; @@ -113,5 +113,5 @@ export interface GenesisNetworkNodeStructure { grpcCertificateHash: string; weight: number; deleted: boolean; - adminKey: string; + adminKey: PublicKey; } diff --git a/version.ts b/version.ts index 51ccec445..32f80ccb0 100644 --- a/version.ts +++ b/version.ts @@ -21,7 +21,7 @@ export const JAVA_VERSION = '21.0.1+12'; export const HELM_VERSION = 'v3.14.2'; -export const SOLO_CHART_VERSION = '0.36.2'; +export const SOLO_CHART_VERSION = '0.36.3'; export const HEDERA_PLATFORM_VERSION = 'v0.57.2'; export const MIRROR_NODE_VERSION = '0.118.1'; export const HEDERA_EXPLORER_VERSION = '0.2.1';