Skip to content

feat: Accept HasAddress inputs in the ATA instruction plans - #186

Open
amilz wants to merge 1 commit into
solana-program:mainfrom
amilz:js/has-address-ata-plans
Open

amilz wants to merge 1 commit into
solana-program:mainfrom
amilz:js/has-address-ata-plans

Conversation

@amilz

@amilz amilz commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Widens the address inputs of getMintToATAInstructionPlan[Async] and getTransferToATAInstructionPlan[Async] from Address to InstructionAccountInput, matching what the generated instructions already accept. Any HasAddress object (e.g. a web3.js v3 PublicKey) can now be passed directly.

// before
await getMintToATAInstructionPlanAsync({ mint: mint.publicKey.toBase58(), owner: payer.publicKey.toBase58(), ... });
// after
await getMintToATAInstructionPlanAsync({ mint: mint.publicKey, owner: payer.publicKey, ... });

Addresses are unwrapped via getAddressFromResolvedInstructionAccount before deriving the ATA.

Not covered: findAssociatedTokenPda seeds and address-typed instruction data args (e.g. mintAuthority) are generated by Codama and still require Address. I'll look into Codama for addressing those.

FYI @lorisleiva

@amilz amilz changed the title Accept HasAddress inputs in the ATA instruction plans feat: Accept HasAddress inputs in the ATA instruction plans Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant