"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const light_1 = require("protobufjs/light");
const protobuf_1 = require("../protobuf");
/**
 * Identity based on a DARC identifier
 */
class IdentityDarc extends light_1.Message {
    constructor(props) {
        super(props);
        this.id = Buffer.from(this.id || protobuf_1.EMPTY_BUFFER);
    }
    /**
     * @see README#Message classes
     */
    static register() {
        protobuf_1.registerMessage("IdentityDarc", IdentityDarc);
    }
    /** @inheritdoc */
    verify(msg, signature) {
        return false;
    }
    /** @inheritdoc */
    toBytes() {
        return this.id;
    }
    /** @inheritdoc */
    toString() {
        return `darc:${this.id.toString("hex")}`;
    }
}
exports.default = IdentityDarc;
