useEvents
Usage
connect()
must be called and a connection must be initiated before account information will be returned.
The useEvents
hook is a React Hook wrapper around the createEvent function
import { EventsFilter, useEvents, UseEventsOptions } from '@puzzlehq/sdk';
const filter: EventsFilter = { type: 'Send', programId: 'credits.aleo', functionId: 'transfer_private'}
const { fetchPage, events, loading, error, page, pageCount } = useEvents({ filter, page: 2});
Types
See the events page for types.