{"version":3,"file":"validateRoaInstruction.cjs","sources":["../../../src/instructions/validateRoaInstruction.ts"],"sourcesContent":["import { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nexport class validateRoaInstruction {\r\n  tag: number;\r\n  staleness: boolean;\r\n  static schema = {\r\n    struct: {\r\n      tag: \"u8\",\r\n      staleness: \"bool\",\r\n    },\r\n  };\r\n\r\n  constructor(obj: { staleness: boolean }) {\r\n    this.tag = 3;\r\n    this.staleness = obj.staleness;\r\n  }\r\n\r\n  serialize(): Uint8Array {\r\n    return serialize(validateRoaInstruction.schema, this);\r\n  }\r\n\r\n  getInstruction(\r\n    programAddress: Address,\r\n    systemProgram: Address,\r\n    splNameServiceProgram: Address,\r\n    feePayer: Address,\r\n    record: Address,\r\n    domain: Address,\r\n    domainOwner: Address,\r\n    centralState: Address,\r\n    verifier: 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: feePayer,\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: domain,\r\n        role: AccountRole.WRITABLE,\r\n      },\r\n      {\r\n        address: domainOwner,\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: verifier,\r\n        role: AccountRole.WRITABLE_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":["validateRoaInstruction","tag","staleness","static","struct","constructor","obj","this","serialize","schema","getInstruction","programAddress","systemProgram","splNameServiceProgram","feePayer","record","domain","domainOwner","centralState","verifier","data","accounts","address","role","AccountRole","READONLY","WRITABLE_SIGNER","WRITABLE"],"mappings":"qGAGaA,EACXC,IACAC,UACAC,cAAgB,CACdC,OAAQ,CACNH,IAAK,KACLC,UAAW,SAIf,WAAAG,CAAYC,GACVC,KAAKN,IAAM,EACXM,KAAKL,UAAYI,EAAIJ,UAGvB,SAAAM,GACE,OAAOA,YAAUR,EAAuBS,OAAQF,MAGlD,cAAAG,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAOb,KAAKC,YAqClB,MAAO,CACLG,iBACAU,SArC+B,CAC/B,CACEC,QAASV,EACTW,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAAST,EACTU,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASR,EACTS,KAAMC,EAAWA,YAACE,iBAEpB,CACEJ,QAASP,EACTQ,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASN,EACTO,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASL,EACTM,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASH,EACTI,KAAMC,EAAWA,YAACE,kBAOpBN"}