{"version":3,"file":"burnDomainInstruction.cjs","sources":["../../../src/instructions/burnDomainInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class burnDomainInstruction {\r\n  tag: number;\r\n\r\n  static schema = {\r\n    struct: {\r\n      tag: \"u8\",\r\n    },\r\n  };\r\n\r\n  constructor() {\r\n    this.tag = 16;\r\n  }\r\n\r\n  serialize(): Uint8Array {\r\n    return serialize(burnDomainInstruction.schema, this);\r\n  }\r\n\r\n  getInstruction(\r\n    programAddress: Address,\r\n    nameServiceId: Address,\r\n    systemProgram: Address,\r\n    domainAddress: Address,\r\n    reverse: Address,\r\n    resellingState: Address,\r\n    state: Address,\r\n    centralState: Address,\r\n    owner: Address,\r\n    target: Address\r\n  ): IInstruction {\r\n    const data = this.serialize();\r\n\r\n    const accounts: IAccountMeta[] = [\r\n      {\r\n        address: nameServiceId,\r\n        role: AccountRole.READONLY,\r\n      },\r\n      {\r\n        address: systemProgram,\r\n        role: AccountRole.READONLY,\r\n      },\r\n      {\r\n        address: domainAddress,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: reverse,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: resellingState,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: state,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: centralState,\r\n        role: AccountRole.READONLY,\r\n      },\r\n      {\r\n        address: owner,\r\n        role: AccountRole.READONLY_SIGNER,\r\n      },\r\n      {\r\n        address: target,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n    ];\r\n\r\n    return {\r\n      programAddress,\r\n      accounts,\r\n      data,\r\n    };\r\n  }\r\n}\r\n"],"names":["burnDomainInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","nameServiceId","systemProgram","domainAddress","reverse","resellingState","state","centralState","owner","target","data","accounts","address","role","AccountRole","READONLY","WRITABLE","READONLY_SIGNER"],"mappings":"qGAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,GAGb,SAAAK,GACE,OAAOA,YAAUN,EAAsBO,OAAQF,MAGjD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOd,KAAKC,YAyClB,MAAO,CACLG,iBACAW,SAzC+B,CAC/B,CACEC,QAASX,EACTY,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASV,EACTW,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASR,EACTS,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASP,EACTQ,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASJ,EACTK,KAAMC,EAAWA,YAACG,iBAEpB,CACEL,QAASH,EACTI,KAAMC,EAAWA,YAACE,WAOpBN"}