/** * This code was GENERATED using the solita package. * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. * * See: https://github.com/metaplex-foundation/solita */ import * as beet from '@convergence-rfq/beet' /** * This type is used to derive the {@link CustomOptionalF64} type as well as the de/serializer. * However don't refer to it in your code but use the {@link CustomOptionalF64} type instead. * * @category userTypes * @category enums * @category generated * @private */ export type CustomOptionalF64Record = { Some: { value: beet.COption } None: void /* scalar variant */ } /** * Union type respresenting the CustomOptionalF64 data enum defined in Rust. * * NOTE: that it includes a `__kind` property which allows to narrow types in * switch/if statements. * Additionally `isCustomOptionalF64*` type guards are exposed below to narrow to a specific variant. * * @category userTypes * @category enums * @category generated */ export type CustomOptionalF64 = beet.DataEnumKeyAsKind export const isCustomOptionalF64Some = ( x: CustomOptionalF64 ): x is CustomOptionalF64 & { __kind: 'Some' } => x.__kind === 'Some' export const isCustomOptionalF64None = ( x: CustomOptionalF64 ): x is CustomOptionalF64 & { __kind: 'None' } => x.__kind === 'None' /** * @category userTypes * @category generated */ export const customOptionalF64Beet = beet.dataEnum([ [ 'Some', new beet.FixableBeetArgsStruct( [['value', beet.coption(beet.f64)]], 'CustomOptionalF64Record["Some"]' ), ], ['None', beet.unit], ]) as beet.FixableBeet