Skip to content

Request

request(options): Promise<StatusMap>

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

Request information in the request_status state tree for a given canister. Can be used to request information about the canister’s controllers, time, module hash, candid interface, and more.

CanisterStatusOptions

HttpAgent

HttpAgent optional authenticated agent to use to make the canister request. Useful for accessing private metadata under icp:private

Principal

Principal

Set<Path> | Path[]

[]

Promise<StatusMap>

object populated with data from the requested paths

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