stampDeleteSmartContractInterface method

Future<TSignedRequest> stampDeleteSmartContractInterface({
  1. required TDeleteSmartContractInterfaceBody input,
})

Produce a SignedRequest from TDeleteSmartContractInterfaceBody by using the client's stamp function.

See also: DeleteSmartContractInterface.

Implementation

Future<TSignedRequest> stampDeleteSmartContractInterface({
  required TDeleteSmartContractInterfaceBody input,
}) async {
  final fullUrl =
      '${config.baseUrl}/public/v1/submit/delete_smart_contract_interface';
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE',
  );
  final bodyJson = jsonEncode(body);
  final stamp = await stamper.stamp(bodyJson);

  return TSignedRequest(
    body: bodyJson,
    stamp: stamp,
    url: fullUrl,
  );
}