{"version":3,"file":"createAtaInstruction.cjs","sources":["../../../src/instructions/createAtaInstruction.ts"],"sourcesContent":["import { getCreateAssociatedTokenIdempotentInstructionDataEncoder } from \"@solana-program/token\";\r\nimport { AccountRole, Address, AccountMeta, Instruction } 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): Instruction => {\r\n  const accounts: AccountMeta[] = [\r\n    {\n      address: payer,\n      role: AccountRole.WRITABLE_SIGNER,\n    },\n    {\n      address: ata,\n      role: AccountRole.WRITABLE,\n    },\n    {\n      address: owner,\n      role: AccountRole.READONLY,\n    },\n    {\n      address: mint,\n      role: AccountRole.READONLY,\n    },\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","WRITABLE_SIGNER","WRITABLE","READONLY","data","getCreateAssociatedTokenIdempotentInstructionDataEncoder","encode"],"mappings":"8IAGqC,CACnCA,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,KA6BO,CACLN,iBACAO,SA7B8B,CAC9B,CACEC,QAASP,EACTQ,KAAMC,EAAWA,YAACC,iBAEpB,CACEH,QAASN,EACTO,KAAMC,EAAWA,YAACE,UAEpB,CACEJ,QAASL,EACTM,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASJ,EACTK,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASH,EACTI,KAAMC,EAAWA,YAACG,UAEpB,CACEL,QAASF,EACTG,KAAMC,EAAWA,YAACG,WAOpBC,KAAMC,EAAwDA,2DAAGC,OAAO"}