getBox method

Future<BoxResponse> getBox(
  1. int applicationId,
  2. String name, {
  3. CancelToken? cancelToken,
  4. ProgressCallback? onSendProgress,
  5. ProgressCallback? onReceiveProgress,
})

Get box information for a given application.

Given an application ID and box name, it returns the box name and value (each base64 encoded). Box names must be in the goal app call arg encoding form 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use the form 'addr:XYZ...'.

Throws an AlgorandException if there is an HTTP error. Returns the block in the given round number.

Implementation

Future<BoxResponse> getBox(
  int applicationId,
  String name, {
  CancelToken? cancelToken,
  ProgressCallback? onSendProgress,
  ProgressCallback? onReceiveProgress,
}) async {
  return _boxesApi.getBoxByApplicationId(
    applicationId,
    name,
    cancelToken: cancelToken,
    onSendProgress: onSendProgress,
    onReceiveProgress: onReceiveProgress,
  );
}