Repository navigation
feat: Accept HasAddress inputs in the ATA instruction plans - #186
Merged
Merged
Conversation
lorisleiva
previously approved these changes
Oct 11, 2026
lorisleiva
left a comment
Member
There was a problem hiding this comment.
Thank you for tackling those!
…n plans Widen `authority` (transferToATA) and `mintAuthority` (mintToATA) from `Address | TransactionSigner` to `InstructionAccountInput | InstructionSignerInput`, matching the generated instructions, so a HasAddress such as a multisig can be passed alongside `multiSigners`. Program overrides (`systemProgram`, `tokenProgram`, `associatedTokenProgram`) in createMint, mintToATA and transferToATA now accept `Address | HasAddress` and are unwrapped only when provided, keeping the existing defaults.
The renderer now accepts `Address | HasAddress` for public key inputs (instruction data args, PDA seeds, account data args). Generated clients require @solana/kit ^8.5.0, so bump it accordingly.
Widen `mintAuthority` to `Address | HasAddress` and `freezeAuthority` to `OptionOrNullable<Address | HasAddress>`, matching the regenerated `getInitializeMint2Instruction`. The async ATA plans now pass `tokenProgram` straight to `findAssociatedTokenPda`, whose seeds accept `HasAddress`.
Armss6556
approved these changes
Oct 14, 2026
The renderer now accepts HasAddress program address overrides, so the ATA instruction plans pass their program configs through without unwrapping. The token plugin accepts an optional programAddress that defaults the program for generated, batch and plan-based instructions.
Bumps `@solana-program/system` to 0.16 and the Kit plugins to 0.19 in the JS client. System 0.16's `getCreateAccountInstruction` accepts `HasAddress` program addresses, so `getCreateMintInstructionPlan` no longer needs to unwrap the `systemProgram` and `tokenProgram` overrides before passing them through.
lorisleiva
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets the hand-written helpers accept
HasAddressinputs (e.g. a web3.js v3PublicKey), matching the generated client.mintToATA/transferToATA: address, authority and program override inputs widened toInstructionAccountInput/Address | HasAddress.createMint: mint/freeze authorities and program overrides acceptHasAddress.@codama/renderers-jsto 2.7.0 (PDA seeds, data args, fetchers and program overrides acceptHasAddress), dropping the now-redundant unwraps.tokenProgram({ programAddress })forwards to the generated plugin and defaults the program forbatch,createMint,mintToATAandtransferToATA.FYI @lorisleiva