// SPDX-License-Identifier: Apache-2.0
import { ipv4ToBase64, isIPv4Address } from '../helpers.js';
export class GenesisNetworkDataWrapper {
    nodeId;
    gossipEndpoint = [];
    weight;
    gossipCaCertificate;
    constructor(nodeId) {
        this.nodeId = nodeId;
    }
    /**
     * @param address - a fully qualified domain name or IP v4 address
     * @param port
     */
    addGossipEndpoint(address, port) {
        const isIpV4Address = isIPv4Address(address);
        this.gossipEndpoint.push({
            domainName: isIpV4Address ? '' : address,
            port,
            ipAddressV4: isIpV4Address ? ipv4ToBase64(address) : undefined,
        });
    }
}
//# sourceMappingURL=genesis-network-data-wrapper.js.map