;
}
/**
* Hook for checking if a user is authorized by a policy.
*
* @example
* ```tsx
* import { Hooks } from 'wagmi/tempo'
*
* function App() {
* const { data, isLoading } = Hooks.policy.useIsAuthorized({
* policyId: 2n,
* user: '0x...',
* })
*
* if (isLoading) return Loading...
* return Authorized: {data ? 'Yes' : 'No'}
* }
* ```
*
* @param parameters - Parameters.
* @returns Query result with authorization status.
*/
export declare function useIsAuthorized(parameters?: useIsAuthorized.Parameters): useIsAuthorized.ReturnValue;
export declare namespace useIsAuthorized {
type Parameters = ConfigParameter & QueryParameter> & ExactPartial>;
type ReturnValue = UseQueryReturnType;
}
/**
* Hook for watching policy creation events.
*
* @example
* ```tsx
* import { Hooks } from 'wagmi/tempo'
*
* function App() {
* Hooks.policy.useWatchCreate({
* onPolicyCreated(args) {
* console.log('Policy created:', args)
* },
* })
*
* return Watching for policy creation...
* }
* ```
*
* @param parameters - Parameters.
*/
export declare function useWatchCreate(parameters?: useWatchCreate.Parameters): void;
export declare namespace useWatchCreate {
type Parameters = UnionCompute> & ConfigParameter & {
enabled?: boolean | undefined;
}>;
}
/**
* Hook for watching policy admin update events.
*
* @example
* ```tsx
* import { Hooks } from 'wagmi/tempo'
*
* function App() {
* Hooks.policy.useWatchAdminUpdated({
* onAdminUpdated(args) {
* console.log('Policy admin updated:', args)
* },
* })
*
* return Watching for admin updates...
* }
* ```
*
* @param parameters - Parameters.
*/
export declare function useWatchAdminUpdated(parameters?: useWatchAdminUpdated.Parameters): void;
export declare namespace useWatchAdminUpdated {
type Parameters = UnionCompute> & ConfigParameter & {
enabled?: boolean | undefined;
}>;
}
/**
* Hook for watching whitelist update events.
*
* @example
* ```tsx
* import { Hooks } from 'wagmi/tempo'
*
* function App() {
* Hooks.policy.useWatchWhitelistUpdated({
* onWhitelistUpdated(args) {
* console.log('Whitelist updated:', args)
* },
* })
*
* return Watching for whitelist updates...
* }
* ```
*
* @param parameters - Parameters.
*/
export declare function useWatchWhitelistUpdated(parameters?: useWatchWhitelistUpdated.Parameters): void;
export declare namespace useWatchWhitelistUpdated {
type Parameters = UnionCompute> & ConfigParameter & {
enabled?: boolean | undefined;
}>;
}
/**
* Hook for watching blacklist update events.
*
* @example
* ```tsx
* import { Hooks } from 'wagmi/tempo'
*
* function App() {
* Hooks.policy.useWatchBlacklistUpdated({
* onBlacklistUpdated(args) {
* console.log('Blacklist updated:', args)
* },
* })
*
* return Watching for blacklist updates...
* }
* ```
*
* @param parameters - Parameters.
*/
export declare function useWatchBlacklistUpdated(parameters?: useWatchBlacklistUpdated.Parameters): void;
export declare namespace useWatchBlacklistUpdated {
type Parameters = UnionCompute> & ConfigParameter & {
enabled?: boolean | undefined;
}>;
}
//# sourceMappingURL=policy.d.ts.map