{"version":3,"file":"deleteRecordInstruction.cjs","sources":["../../../src/instructions/deleteRecordInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class deleteRecordInstruction {\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 = 5;\r\n  }\r\n\r\n  serialize(): Uint8Array {\r\n    return serialize(deleteRecordInstruction.schema, this);\r\n  }\r\n\r\n  getInstruction(\r\n    programAddress: Address,\r\n    systemProgram: Address,\r\n    splNameServiceProgram: Address,\r\n    payer: Address,\r\n    record: Address,\r\n    domainAddress: Address,\r\n    domainOwner: Address,\r\n    centralState: Address\r\n  ): IInstruction {\r\n    const data = this.serialize();\r\n\r\n    const accounts: IAccountMeta[] = [\r\n      {\r\n        address: systemProgram,\r\n        role: AccountRole.READONLY,\r\n      },\r\n      {\r\n        address: splNameServiceProgram,\r\n        role: AccountRole.READONLY,\r\n      },\r\n      {\r\n        address: payer,\r\n        role: AccountRole.WRITABLE_SIGNER,\r\n      },\r\n      {\r\n        address: record,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: domainAddress,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: domainOwner,\r\n        role: AccountRole.WRITABLE_SIGNER,\r\n      },\r\n      {\r\n        address: centralState,\r\n        role: AccountRole.READONLY,\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":["deleteRecordInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","payer","record","domainAddress","domainOwner","centralState","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"qGAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,YAAUN,EAAwBO,OAAQF,MAGnD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOZ,KAAKC,YAiClB,MAAO,CACLG,iBACAS,SAjC+B,CAC/B,CACEC,QAAST,EACTU,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASP,EACTQ,KAAMC,EAAWA,YAACE,iBAEpB,CACEJ,QAASN,EACTO,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAWA,YAACE,iBAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAWA,YAACC,WAOpBL"}