{"version":3,"file":"createAtaInstruction.cjs","sources":["../../../src/instructions/createAtaInstruction.ts"],"sourcesContent":["import { getCreateAssociatedTokenIdempotentInstructionDataEncoder } from \"@solana-program/token\";\r\nimport { AccountRole, Address, IAccountMeta, IInstruction } from \"@solana/kit\";\r\n\r\nexport const _createAtaInstruction = (\r\n  programAddress: Address,\r\n  payer: Address,\r\n  ata: Address,\r\n  owner: Address,\r\n  mint: Address,\r\n  systemProgram: Address,\r\n  splTokenProgram: Address\r\n): IInstruction => {\r\n  const accounts: IAccountMeta[] = [\r\n    {\r\n      address: payer,\r\n      role: AccountRole.READONLY,\r\n    },\r\n    {\r\n      address: ata,\r\n      role: AccountRole.READONLY,\r\n    },\r\n    {\r\n      address: owner,\r\n      role: AccountRole.WRITABLE,\r\n    },\r\n    {\r\n      address: mint,\r\n      role: AccountRole.WRITABLE,\r\n    },\r\n    {\r\n      address: systemProgram,\r\n      role: AccountRole.READONLY,\r\n    },\r\n    {\r\n      address: splTokenProgram,\r\n      role: AccountRole.READONLY,\r\n    },\r\n  ];\r\n\r\n  return {\r\n    programAddress,\r\n    accounts,\r\n    data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\r\n  };\r\n};\r\n"],"names":["programAddress","payer","ata","owner","mint","systemProgram","splTokenProgram","accounts","address","role","AccountRole","READONLY","WRITABLE","data","getCreateAssociatedTokenIdempotentInstructionDataEncoder","encode"],"mappings":"8IAGqC,CACnCA,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,KA6BO,CACLN,iBACAO,SA7B+B,CAC/B,CACEC,QAASP,EACTQ,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASN,EACTO,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASL,EACTM,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASJ,EACTK,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASH,EACTI,KAAMC,EAAWA,YAACC,UAEpB,CACEH,QAASF,EACTG,KAAMC,EAAWA,YAACC,WAOpBE,KAAMC,EAAwDA,2DAAGC,OAAO"}