import type { Id } from '../id.js'; import type { GeoClientContext } from './context.js'; export type ClientEntityVoteParams = { authorSpaceId: Id | string; spaceId: Id | string; entityId: Id | string; }; export type EntityVoteCalldataParams = ClientEntityVoteParams & { spaceRegistryAddress: `0x${string}`; }; /** * Encodes upvote calldata. * * Use this pure helper when you already have the target space registry address. * Use `geo.entityVotes.upvote(...)` when the address should come from the * configured network. * * @example * ```ts * const tx = encodeUpvoteEntityCalldata({ * authorSpaceId, * spaceId, * entityId, * spaceRegistryAddress, * }); * ``` * * @param params Author space, target space, entity ID, and space registry address. * @returns Target registry address and encoded calldata. * @throws When any supplied ID is invalid. */ export declare function encodeUpvoteEntityCalldata(params: EntityVoteCalldataParams): { to: `0x${string}`; calldata: `0x${string}`; }; /** * Encodes downvote calldata. * * @example * ```ts * const tx = encodeDownvoteEntityCalldata({ * authorSpaceId, * spaceId, * entityId, * spaceRegistryAddress, * }); * ``` * * @param params Author space, target space, entity ID, and space registry address. * @returns Target registry address and encoded calldata. * @throws When any supplied ID is invalid. */ export declare function encodeDownvoteEntityCalldata(params: EntityVoteCalldataParams): { to: `0x${string}`; calldata: `0x${string}`; }; /** * Encodes vote-withdrawal calldata. * * @example * ```ts * const tx = encodeWithdrawEntityVoteCalldata({ * authorSpaceId, * spaceId, * entityId, * spaceRegistryAddress, * }); * ``` * * @param params Author space, target space, entity ID, and space registry address. * @returns Target registry address and encoded calldata. * @throws When any supplied ID is invalid. */ export declare function encodeWithdrawEntityVoteCalldata(params: EntityVoteCalldataParams): { to: `0x${string}`; calldata: `0x${string}`; }; /** * Builds calldata for upvoting an entity using the configured space registry. * * @example * ```ts * const tx = geo.entityVotes.upvote({ * authorSpaceId, * spaceId, * entityId, * }); * ``` * * @param context Client context containing the target network configuration. * @param params Author space, target space, and entity ID. * @returns Target registry address and encoded calldata. * @throws When IDs are invalid or the configured network is missing `SPACE_REGISTRY_ADDRESS`. */ export declare function upvote(context: GeoClientContext, params: ClientEntityVoteParams): { to: `0x${string}`; calldata: `0x${string}`; }; /** * Builds calldata for downvoting an entity using the configured space registry. * * @example * ```ts * const tx = geo.entityVotes.downvote({ * authorSpaceId, * spaceId, * entityId, * }); * ``` * * @param context Client context containing the target network configuration. * @param params Author space, target space, and entity ID. * @returns Target registry address and encoded calldata. * @throws When IDs are invalid or the configured network is missing `SPACE_REGISTRY_ADDRESS`. */ export declare function downvote(context: GeoClientContext, params: ClientEntityVoteParams): { to: `0x${string}`; calldata: `0x${string}`; }; /** * Builds calldata for withdrawing an entity vote using the configured space registry. * * @example * ```ts * const tx = geo.entityVotes.withdraw({ * authorSpaceId, * spaceId, * entityId, * }); * ``` * * @param context Client context containing the target network configuration. * @param params Author space, target space, and entity ID. * @returns Target registry address and encoded calldata. * @throws When IDs are invalid or the configured network is missing `SPACE_REGISTRY_ADDRESS`. */ export declare function withdraw(context: GeoClientContext, params: ClientEntityVoteParams): { to: `0x${string}`; calldata: `0x${string}`; }; //# sourceMappingURL=entity-votes.d.ts.map