create Plan type (list of instructions) if none exists { ixs: TransactionInstruction[], artifacts: T } (ixs are the instructions, artifacts is any extra info)
implement ensureAta({ owner, mint }) returning a Plan<{ ata: PublicKey }> (empty plan if ATA exists)
derive ATA, optionally include create-ATA Ix if ATA missing
return artifacts.ata
create
Plantype (list of instructions) if none exists{ ixs: TransactionInstruction[], artifacts: T }(ixs are the instructions, artifacts is any extra info)implement
ensureAta({ owner, mint })returning aPlan<{ ata: PublicKey }>(empty plan if ATA exists)derive ATA, optionally include create-ATA Ix if ATA missing
return
artifacts.ata