/** * 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, getArrayDecoder, getArrayEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Codec, type Decoder, type Encoder, } from "@solana/kit"; /** Maps each RuleSet revision to its byte offset within the PDA. */ export type RuleSetRevisionMapV1 = { /** Byte offset of each revision, indexed by revision number. */ ruleSetRevisions: Array; }; export type RuleSetRevisionMapV1Args = { /** Byte offset of each revision, indexed by revision number. */ ruleSetRevisions: Array; }; export function getRuleSetRevisionMapV1Encoder(): Encoder { return getStructEncoder([ ["ruleSetRevisions", getArrayEncoder(getU64Encoder())], ]); } export function getRuleSetRevisionMapV1Decoder(): Decoder { return getStructDecoder([ ["ruleSetRevisions", getArrayDecoder(getU64Decoder())], ]); } export function getRuleSetRevisionMapV1Codec(): Codec< RuleSetRevisionMapV1Args, RuleSetRevisionMapV1 > { return combineCodec( getRuleSetRevisionMapV1Encoder(), getRuleSetRevisionMapV1Decoder(), ); }