/** * 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, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type Lockup = { /** * UnixTimestamp at which this stake will allow withdrawal, unless the * transaction is signed by the custodian */ unixTimestamp: bigint; /** * epoch height at which this stake will allow withdrawal, unless the * transaction is signed by the custodian */ epoch: bigint; /** * custodian signature on a transaction exempts the operation from * lockup constraints */ custodian: Address; }; export type LockupArgs = { /** * UnixTimestamp at which this stake will allow withdrawal, unless the * transaction is signed by the custodian */ unixTimestamp: number | bigint; /** * epoch height at which this stake will allow withdrawal, unless the * transaction is signed by the custodian */ epoch: number | bigint; /** * custodian signature on a transaction exempts the operation from * lockup constraints */ custodian: Address; }; export function getLockupEncoder(): FixedSizeEncoder { return getStructEncoder([ ["unixTimestamp", getI64Encoder()], ["epoch", getU64Encoder()], ["custodian", getAddressEncoder()], ]); } export function getLockupDecoder(): FixedSizeDecoder { return getStructDecoder([ ["unixTimestamp", getI64Decoder()], ["epoch", getU64Decoder()], ["custodian", getAddressDecoder()], ]); } export function getLockupCodec(): FixedSizeCodec { return combineCodec(getLockupEncoder(), getLockupDecoder()); }