/** * 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, getU32Decoder, getU32Encoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getNoiseMapTypeDecoder, getNoiseMapTypeEncoder, getNoisePowerFunctionDecoder, getNoisePowerFunctionEncoder, type NoiseMapType, type NoiseMapTypeArgs, type NoisePowerFunction, type NoisePowerFunctionArgs, } from '.'; import { getI8F56Decoder, getI8F56Encoder, getU16F16Decoder, getU16F16Encoder, type I8F56, type I8F56Args, type U16F16, type U16F16Args, } from '../../fixed/codecs'; export type ScanNoiseMapBorsh = { noiseMapType: NoiseMapType; noisePowerFunction: NoisePowerFunction; xMultiplier: U16F16; yMultiplier: U16F16; zMultiplier: U16F16; xCenter: I8F56; yCenter: I8F56; originMaxDistance: I8F56; weight: U16F16; seedOffset: number; }; export type ScanNoiseMapBorshArgs = { noiseMapType: NoiseMapTypeArgs; noisePowerFunction: NoisePowerFunctionArgs; xMultiplier: U16F16Args; yMultiplier: U16F16Args; zMultiplier: U16F16Args; xCenter: I8F56Args; yCenter: I8F56Args; originMaxDistance: I8F56Args; weight: U16F16Args; seedOffset: number; }; export function getScanNoiseMapBorshEncoder(): Encoder { return getStructEncoder([ ['noiseMapType', getNoiseMapTypeEncoder()], ['noisePowerFunction', getNoisePowerFunctionEncoder()], ['xMultiplier', getU16F16Encoder()], ['yMultiplier', getU16F16Encoder()], ['zMultiplier', getU16F16Encoder()], ['xCenter', getI8F56Encoder()], ['yCenter', getI8F56Encoder()], ['originMaxDistance', getI8F56Encoder()], ['weight', getU16F16Encoder()], ['seedOffset', getU32Encoder()], ]); } export function getScanNoiseMapBorshDecoder(): Decoder { return getStructDecoder([ ['noiseMapType', getNoiseMapTypeDecoder()], ['noisePowerFunction', getNoisePowerFunctionDecoder()], ['xMultiplier', getU16F16Decoder()], ['yMultiplier', getU16F16Decoder()], ['zMultiplier', getU16F16Decoder()], ['xCenter', getI8F56Decoder()], ['yCenter', getI8F56Decoder()], ['originMaxDistance', getI8F56Decoder()], ['weight', getU16F16Decoder()], ['seedOffset', getU32Decoder()], ]); } export function getScanNoiseMapBorshCodec(): Codec< ScanNoiseMapBorshArgs, ScanNoiseMapBorsh > { return combineCodec( getScanNoiseMapBorshEncoder(), getScanNoiseMapBorshDecoder(), ); }