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