"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.MAGIC_NUMBER = void 0;

var _util = require("@polkadot/util");

var _U = _interopRequireDefault(require("../primitive/U32"));

// Copyright 2017-2019 @polkadot/types authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
const MAGIC_NUMBER = new _U.default(0x6174656d); // `meta`, reversed for Little Endian encoding

exports.MAGIC_NUMBER = MAGIC_NUMBER;

class MagicNumber extends _U.default {
  constructor(value) {
    super(value);
    (0, _util.assert)(this.eq(MAGIC_NUMBER), "MagicNumber mismatch: expected ".concat(MAGIC_NUMBER.toHex(), ", found ").concat(this.toHex()));
  }

}

exports.default = MagicNumber;