/** * 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, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; export type RefundPolicy = { maxAmount: bigint; maxTimeAfterPurchase: bigint }; export type RefundPolicyArgs = { maxAmount: number | bigint; maxTimeAfterPurchase: number | bigint; }; export function getRefundPolicyEncoder(): FixedSizeEncoder { return getStructEncoder([ ['maxAmount', getU64Encoder()], ['maxTimeAfterPurchase', getU64Encoder()], ]); } export function getRefundPolicyDecoder(): FixedSizeDecoder { return getStructDecoder([ ['maxAmount', getU64Decoder()], ['maxTimeAfterPurchase', getU64Decoder()], ]); } export function getRefundPolicyCodec(): FixedSizeCodec< RefundPolicyArgs, RefundPolicy > { return combineCodec(getRefundPolicyEncoder(), getRefundPolicyDecoder()); }