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.
options
Section titled “options”The configuration for the canister status request.
Returns
Section titled “Returns”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.
Example
Section titled “Example”const status = await canisterStatus({ paths: ['controllers', 'candid'], ...options});
const controllers = status.get('controllers');