EventsResource
Access via urblock.events.
Query webhook events for auditing, debugging, and building event-driven workflows.
Methods
list(params?)
List events with optional filtering.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Items per page (1-100) |
starting_after | string | — | Cursor for pagination |
type | string | — | Filter by event type (e.g., transaction.confirmed) |
const events = await urblock.events.list({ limit: 20 });
for (const event of events.data) {
console.log(event.id, event.type, event.created);
}
Returns: ListResponse<EventListItem>
retrieve(id)
Get a single event by ID.
const event = await urblock.events.retrieve("evt_abc123");
console.log(event.type); // "transaction.confirmed"
console.log(event.data); // event payload
console.log(event.created); // Unix timestamp
Returns: EventResponse
| Field | Type | Description |
|---|---|---|
id | string | Event ID (evt_...) |
type | string | Event type (e.g., token.deployed) |
data | object | Event payload with resource details |
created | number | Unix timestamp (seconds) |
See Also
- Events API — full endpoint reference
- Webhooks Guide — receive events in real time