{"version":3,"file":"updateNameRegistryInstruction.cjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountRole, Address, AccountMeta, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class UpdateNameRegistryInstruction {\r\n  tag: number;\r\n  offset: number;\r\n  inputData: Uint8Array;\r\n\r\n  static schema = {\r\n    struct: {\r\n      tag: \"u8\",\r\n      offset: \"u32\",\r\n      inputData: { array: { type: \"u8\" } },\r\n    },\r\n  };\r\n\r\n  constructor(obj: { offset: number; inputDat: Uint8Array }) {\r\n    this.tag = 1;\r\n    this.offset = obj.offset;\r\n    this.inputData = obj.inputDat;\r\n  }\r\n\r\n  serialize(): Uint8Array {\r\n    return serialize(UpdateNameRegistryInstruction.schema, this);\r\n  }\r\n\r\n  getInstruction(\r\n    programAddress: Address,\r\n    domainAddress: Address,\r\n    signer: Address\r\n  ): Instruction {\r\n    const data = this.serialize();\r\n\r\n    const accounts: AccountMeta[] = [\r\n      {\r\n        address: domainAddress,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: signer,\r\n        role: AccountRole.READONLY_SIGNER,\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":["UpdateNameRegistryInstruction","tag","offset","inputData","static","struct","array","type","constructor","obj","this","inputDat","serialize","schema","getInstruction","programAddress","domainAddress","signer","data","accounts","address","role","AccountRole","WRITABLE","READONLY_SIGNER"],"mappings":"qGAGaA,EACXC,IACAC,OACAC,UAEAC,cAAgB,CACdC,OAAQ,CACNJ,IAAK,KACLC,OAAQ,MACRC,UAAW,CAAEG,MAAO,CAAEC,KAAM,SAIhC,WAAAC,CAAYC,GACVC,KAAKT,IAAM,EACXS,KAAKR,OAASO,EAAIP,OAClBQ,KAAKP,UAAYM,EAAIE,SAGvB,SAAAC,GACE,OAAOA,YAAUZ,EAA8Ba,OAAQH,MAGzD,cAAAI,CACEC,EACAC,EACAC,GAEA,MAAMC,EAAOR,KAAKE,YAalB,MAAO,CACLG,iBACAI,SAb8B,CAC9B,CACEC,QAASJ,EACTK,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAWA,YAACE,kBAOpBN"}