/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { combineCodec, getAddressDecoder, getAddressEncoder, getBooleanDecoder, getBooleanEncoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, type Address, type Codec, type Decoder, type Encoder, type Option, type OptionOrNullable, } from "@solana/kit"; import { getDataV2Decoder, getDataV2Encoder, type DataV2, type DataV2Args, } from "./index.ts"; export type UpdateMetadataAccountArgsV2 = { data: Option; updateAuthority: Option
; primarySaleHappened: Option; isMutable: Option; }; export type UpdateMetadataAccountArgsV2Args = { data: OptionOrNullable; updateAuthority: OptionOrNullable
; primarySaleHappened: OptionOrNullable; isMutable: OptionOrNullable; }; export function getUpdateMetadataAccountArgsV2Encoder(): Encoder { return getStructEncoder([ ["data", getOptionEncoder(getDataV2Encoder())], ["updateAuthority", getOptionEncoder(getAddressEncoder())], ["primarySaleHappened", getOptionEncoder(getBooleanEncoder())], ["isMutable", getOptionEncoder(getBooleanEncoder())], ]); } export function getUpdateMetadataAccountArgsV2Decoder(): Decoder { return getStructDecoder([ ["data", getOptionDecoder(getDataV2Decoder())], ["updateAuthority", getOptionDecoder(getAddressDecoder())], ["primarySaleHappened", getOptionDecoder(getBooleanDecoder())], ["isMutable", getOptionDecoder(getBooleanDecoder())], ]); } export function getUpdateMetadataAccountArgsV2Codec(): Codec< UpdateMetadataAccountArgsV2Args, UpdateMetadataAccountArgsV2 > { return combineCodec( getUpdateMetadataAccountArgsV2Encoder(), getUpdateMetadataAccountArgsV2Decoder(), ); }