Minor Changes
-
#254
ce4164dThanks @amilz! - Public key types now acceptAddress | HasAddresswherever they are encoded from an input — i.e. instruction data arguments, PDA seeds, account data arguments and defined types — so that third-party wrappers such as web3.js'sPublicKeycan be passed directly instead of being converted to anAddressfirst. The loose (*Argsand*Seeds) types are widened toAddress | HasAddressand are encoded directly bygetAddressEncoder(), which accepts address-bearing objects since@solana/kit8.5, whilst the strict types and decoders keep yielding anAddress. Generated clients therefore require@solana/kit^8.5.0, which is now the default dependency version. Remaining accounts backed by an existing public key array argument likewise unwrap each item to its address viagetAddressFromResolvedInstructionAccount.Note that code reading public key values from loose types as plain addresses (e.g. passing
seeds.ownerfrom anAssociatedTokenSeedsorargs.mintAuthorityfrom a resolver scope to a function expecting anAddress) needs updating since these values may now be address-bearing objects. Types whose loose and strict variants previously coincided because of public keys (e.g.export type MyTypeArgs = MyType) are now declared separately.