Skip to content

request

request(options): Promise<StatusMap>

Defined in: packages/agent/src/canisterStatus/index.ts:153

Requests information from a canister’s read_state endpoint. Can be used to request information about the canister’s controllers, time, module hash, candid interface, and more.

CanisterStatusOptions

The configuration for the canister status request.

Promise<StatusMap>

A map populated with data from the requested paths. Each path is a key in the map, and the value is the data obtained from the certificate for that path.

CanisterStatusOptions for detailed options.

const status = await canisterStatus({
paths: ['controllers', 'candid'],
...options
});
const controllers = status.get('controllers');