/** * 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, getU8Decoder, getU8Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; import { getCargoIdDecoder, getCargoIdEncoder, type CargoId, type CargoIdArgs, } from '.'; export type DemocracyPtrLockedHousing = { cargoId: CargoId; quantity: bigint; /** Pinned at debit. Custody must not let destruction bypass the original respawn rule. */ mustRespawn: number; }; export type DemocracyPtrLockedHousingArgs = { cargoId: CargoIdArgs; quantity: number | bigint; /** Pinned at debit. Custody must not let destruction bypass the original respawn rule. */ mustRespawn: number; }; export function getDemocracyPtrLockedHousingEncoder(): FixedSizeEncoder { return getStructEncoder([ ['cargoId', getCargoIdEncoder()], ['quantity', getU64Encoder()], ['mustRespawn', getU8Encoder()], ]); } export function getDemocracyPtrLockedHousingDecoder(): FixedSizeDecoder { return getStructDecoder([ ['cargoId', getCargoIdDecoder()], ['quantity', getU64Decoder()], ['mustRespawn', getU8Decoder()], ]); } export function getDemocracyPtrLockedHousingCodec(): FixedSizeCodec< DemocracyPtrLockedHousingArgs, DemocracyPtrLockedHousing > { return combineCodec( getDemocracyPtrLockedHousingEncoder(), getDemocracyPtrLockedHousingDecoder(), ); }