text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.METADATA_SCHEMA = exports.Metadata = exports.Data = exports.Edition = exports.EditionMarker = exports.MasterEditionV2 = exports.MasterEditionV1 = exports.MetadataKey = exports.ConfigData = exports.Creator = void 0;
  var Creator = /** @class */ (function () {
      function Creator(args) {
          this.address = args.address;
          this.verified = args.verified;
          this.share = args.share;
      }
      return Creator;
  }());
  exports.Creator = Creator;
  var ConfigData = /** @class */ (function () {
      function ConfigData(args) {
          this.name = args.name;
          this.symbol = args.symbol;
          this.uri = args.uri;
          this.sellerFeeBasisPoints = args.sellerFeeBasisPoints;
          this.creators = args.creators;
          this.maxNumberOfLines = args.maxNumberOfLines;
          this.isMutable = args.isMutable;
          this.maxSupply = args.maxSupply;
          this.retainAuthority = args.retainAuthority;
      }
      return ConfigData;
  }());
  exports.ConfigData = ConfigData;
  var MetadataKey;
  (function (MetadataKey) {
      MetadataKey[MetadataKey["Uninitialized"] = 0] = "Uninitialized";
      MetadataKey[MetadataKey["MetadataV1"] = 4] = "MetadataV1";
      MetadataKey[MetadataKey["EditionV1"] = 1] = "EditionV1";
      MetadataKey[MetadataKey["MasterEditionV1"] = 2] = "MasterEditionV1";
      MetadataKey[MetadataKey["MasterEditionV2"] = 6] = "MasterEditionV2";
      MetadataKey[MetadataKey["EditionMarker"] = 7] = "EditionMarker";
  })(MetadataKey = exports.MetadataKey || (exports.MetadataKey = {}));
  var MasterEditionV1 = /** @class */ (function () {
      function MasterEditionV1(args) {
          this.key = MetadataKey.MasterEditionV1;
          this.supply = args.supply;
          this.maxSupply = args.maxSupply;
          this.printingMint = args.printingMint;
          this.oneTimePrintingAuthorizationMint =
              args.oneTimePrintingAuthorizationMint;
      }
      ;
      return MasterEditionV1;
  }());
  exports.MasterEditionV1 = MasterEditionV1;
  var MasterEditionV2 = /** @class */ (function () {
      function MasterEditionV2(args) {
          this.key = MetadataKey.MasterEditionV2;
          this.supply = args.supply;
          this.maxSupply = args.maxSupply;
      }
      ;
      return MasterEditionV2;
  }());
  exports.MasterEditionV2 = MasterEditionV2;
  var EditionMarker = /** @class */ (function () {
      function EditionMarker(args) {
          this.key = MetadataKey.EditionMarker;
          this.ledger = args.ledger;
      }
      ;
      return EditionMarker;
  }());
  exports.EditionMarker = EditionMarker;
  var Edition = /** @class */ (function () {
      function Edition(args) {
          this.key = MetadataKey.EditionV1;
          this.parent = args.parent;
          this.edition = args.edition;
      }
      ;
      return Edition;
  }());
  exports.Edition = Edition;
  var Data = /** @class */ (function () {
      function Data(args) {
          this.name = args.name;
          this.symbol = args.symbol;
          this.uri = args.uri;
          this.sellerFeeBasisPoints = args.sellerFeeBasisPoints;
          this.creators = args.creators;
      }
      ;
      return Data;
  }());
  exports.Data = Data;
  var Metadata = /** @class */ (function () {
      function Metadata(args) {
          this.key = MetadataKey.MetadataV1;
          this.updateAuthority = args.updateAuthority;
          this.mint = args.mint;
          this.data = args.data;
          this.primarySaleHappened = args.primarySaleHappened;
          this.isMutable = args.isMutable;
      }
      ;
      return Metadata;
  }());
  exports.Metadata = Metadata;
  exports.METADATA_SCHEMA = new Map([
      [
          MasterEditionV1,
          {
              kind: 'struct',
              fields: [
                  ['key', 'u8'],
                  ['supply', 'u64'],
                  ['maxSupply', { kind: 'option', type: 'u64' }],
                  ['printingMint', 'pubkey'],
                  ['oneTimePrintingAuthorizationMint', [32]],
              ],
          },
      ],
      [
          MasterEditionV2,
          {
              kind: 'struct',
              fields: [
                  ['key', 'u8'],
                  ['supply', 'u64'],
                  ['maxSupply', { kind: 'option', type: 'u64' }],
              ],
          },
      ],
      [
          Edition,
          {
              kind: 'struct',
              fields: [
                  ['key', 'u8'],
                  ['parent', [32]],
                  ['edition', 'u64'],
              ],
          },
      ],
      [
          Data,
          {
              kind: 'struct',
              fields: [
                  ['name', 'string'],
                  ['symbol', 'string'],
                  ['uri', 'string'],
                  ['sellerFeeBasisPoints', 'u16'],
                  ['creators', { kind: 'option', type: [Creator] }],
              ],
          },
      ],
      [
          Creator,
          {
              kind: 'struct',
              fields: [
                  ['address', [32]],
                  ['verified', 'u8'],
                  ['share', 'u8'],
              ],
          },
      ],
      [
          Metadata,
          {
              kind: 'struct',
              fields: [
                  ['key', 'u8'],
                  ['updateAuthority', [32]],
                  ['mint', [32]],
                  ['data', Data],
                  ['primarySaleHappened', 'u8'],
                  ['isMutable', 'u8'],
              ],
          },
      ],
      [
          EditionMarker,
          {
              kind: 'struct',
              fields: [
                  ['key', 'u8'],
                  ['ledger', [31]],
              ],
          },
      ],
  ]);
  