{"version":3,"file":"deleteNameRegistryInstruction.cjs","sources":["../../../src/instructions/deleteNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class DeleteNameRegistryInstruction {\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 = 3;\r\n  }\r\n\r\n  serialize(): Uint8Array {\r\n    return serialize(DeleteNameRegistryInstruction.schema, this);\r\n  }\r\n\r\n  getInstruction(\r\n    programAddress: Address,\r\n    domainAddress: Address,\r\n    refundTarget: Address,\r\n    owner: Address\r\n  ): IInstruction {\r\n    const data = this.serialize();\r\n\r\n    const accounts: IAccountMeta[] = [\r\n      {\r\n        address: domainAddress,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: owner,\r\n        role: AccountRole.READONLY_SIGNER,\r\n      },\r\n      {\r\n        address: refundTarget,\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":["DeleteNameRegistryInstruction","tag","static","struct","constructor","this","serialize","schema","getInstruction","programAddress","domainAddress","refundTarget","owner","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER"],"mappings":"qGAGaA,EACXC,IAEAC,cAAgB,CACdC,OAAQ,CACNF,IAAK,OAIT,WAAAG,GACEC,KAAKJ,IAAM,EAGb,SAAAK,GACE,OAAOA,YAAUN,EAA8BO,OAAQF,MAGzD,cAAAG,CACEC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOR,KAAKC,YAiBlB,MAAO,CACLG,iBACAK,SAjB+B,CAC/B,CACEC,QAASL,EACTM,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAWA,YAACE,iBAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAWA,YAACC,WAOpBL"}