/** * 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 web3 from '@solana/web3.js'; import * as beet from '@metaplex-foundation/beet'; /** * This type is used to derive the {@link TxHook} type as well as the de/serializer. * However don't refer to it in your code but use the {@link TxHook} type instead. * * @category userTypes * @category enums * @category generated * @private */ export type TxHookRecord = { User: void; Authority: void; CPIProgram: { programId: web3.PublicKey; data: Uint8Array; }; }; /** * Union type respresenting the TxHook data enum defined in Rust. * * NOTE: that it includes a `__kind` property which allows to narrow types in * switch/if statements. * Additionally `isTxHook*` type guards are exposed below to narrow to a specific variant. * * @category userTypes * @category enums * @category generated */ export type TxHook = beet.DataEnumKeyAsKind; export declare const isTxHookUser: (x: TxHook) => x is { __kind: "User"; } & Omit & { __kind: 'User'; }; export declare const isTxHookAuthority: (x: TxHook) => x is { __kind: "Authority"; } & Omit & { __kind: 'Authority'; }; export declare const isTxHookCPIProgram: (x: TxHook) => x is { __kind: "CPIProgram"; } & Omit<{ programId: web3.PublicKey; data: Uint8Array; }, "void"> & { __kind: 'CPIProgram'; }; /** * @category userTypes * @category generated */ export declare const txHookBeet: beet.FixableBeet;