policy.useWatchCreate
Watches for policy creation events on the TIP403 Registry.
Usage
ts
import { Hooks } from 'wagmi/tempo'
Hooks.policy.useWatchCreate({
onPolicyCreated: (args, log) => {
console.log('args:', args)
},
})ts
import { createConfig, http } from 'wagmi'
import { tempoTestnet } from 'wagmi/chains'
import { KeyManager, webAuthn } from 'wagmi/tempo'
export const config = createConfig({
connectors: [
webAuthn({
keyManager: KeyManager.localStorage(),
}),
],
chains: [tempoTestnet],
multiInjectedProviderDiscovery: false,
transports: {
[tempoTestnet.id]: http(),
},
})Parameters
See Wagmi Action policy.watchCreate Parameters
config
Config | undefined
Config to use instead of retrieving from the nearest WagmiProvider.