readState method
Future<ReadStateResponse>
readState(
- Principal canisterId,
- ReadStateOptions fields,
- Identity? identity
override
Send a read state query to the replica. This includes a list of paths to return, and will return a Certificate. This will only reject on communication errors, but the certificate might contain less information than requested. @param effectiveCanisterId A Canister ID related to this call. @param options The options for this call.
Implementation
@override
Future<ReadStateResponse> readState(
Principal canisterId, ReadStateOptions fields, Identity? identity) {
return _sendAndWait(ProxyMessageReadStateResponse.fromJson({
"id": _nextId++,
"type": ProxyMessageKind.ReadState,
"args": [
canisterId is Principal ? canisterId.toString() : canisterId,
fields
],
}));
}