"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EthereumTransactionHash = void 0;
var EthereumTransactionHash = /** @class */ (function () {
    function EthereumTransactionHash(hash) {
        this._hash = hash;
    }
    EthereumTransactionHash.parse = function (input) {
        if (!/^0x[a-z0-9]{64}$/.test(input)) {
            throw new Error("Invalid Ethereum transaction hash");
        }
        return new EthereumTransactionHash(input);
    };
    EthereumTransactionHash.prototype.toString = function () {
        return this._hash;
    };
    EthereumTransactionHash.prototype.equals = function (other) {
        return this._hash === other._hash;
    };
    return EthereumTransactionHash;
}());
exports.EthereumTransactionHash = EthereumTransactionHash;
